[Koha-patches] [PATCH] Bug 10197: Add classes to patron info list

Srdjan srdjan at catalyst.net.nz
Tue Jul 16 02:47:30 CEST 2013


From: "Nicole C. Engard" <nengard at bywatersolutions.com>

This patch adds classes to the patron info found on the
top left of the circulation and patron related pages to
allow for easy styling of the information displayed.

To test:

* Apply patch
* View a patron detail page and view the source on the list to the
  left to see the styles
* View a checkout screen and view the source on the list to the
  left with patron info to see the styles
* You could also try to style things by customizing your CSS

Signed-off-by: Srdjan <srdjan at catalyst.net.nz>
---
 koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc | 18 +++++++++---------
 koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt  | 18 +++++++++---------
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc
index 7101260..4632467 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc
@@ -4,31 +4,31 @@
 <style type="tex/css">img { width: expression(this.width > 140 ? 140: true);
 }</style>
 <![endif]-->
-<ul>
+<ul class="patronbriefinfo">
 [% IF ( patronimages ) %]
 [% IF ( picture ) %]
 <li><img src="/cgi-bin/koha/members/patronimage.pl?crdnum=[% cardnumber | uri %]" id="patronimage" alt="[% firstname %] [% surname %] ([% cardnumber %])" border="0" style="max-width : 140px; margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC; width:auto !important; width:130px;" /></li>
 [% ELSE %]
-<li><img src="[% interface %]/[% theme %]/img/patron-blank.png" alt="[% firstname %] [% surname %] ([% cardnumber %])" border="0" style="margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC;" /></li>
+<li id="patronbasics"><img src="[% interface %]/[% theme %]/img/patron-blank.png" alt="[% firstname %] [% surname %] ([% cardnumber %])" border="0" style="margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC;" /></li>
 [% END %]
 [% END %]
     [% IF ( address or address2 ) %]
         [% IF ( address ) %]
-            <li>[% address %]</li>
+            <li class="patronaddress1">[% address %]</li>
         [% END %]
         [% IF ( address2 ) %]
-            <li>[% address2 %]</li>
+            <li class="patronaddress2">[% address2 %]</li>
         [% END %]
     [% ELSE %]
             <li><span class="empty" id="noadressstored">No address stored.</span></li>
     [% END %]
-    <li>[% IF ( city ) %]
+    <li class="patroncity">[% IF ( city ) %]
             [% city %][% IF ( state ) %], [% state %][% END %]
 	    [% zipcode %][% IF ( country ) %], [% country %][% END %]
     [% ELSE %]
         <span class="empty" id="nocitystored">No city stored.</span>
     [% END %]</li>
-    <li>[% IF ( phone ) %]
+    <li class="patronphone">[% IF ( phone ) %]
         [% phone %]
     [% ELSE %]
         [% IF ( mobile ) %]
@@ -53,12 +53,12 @@
     [% IF ( ExtendedPatronAttributes ) %][% FOREACH extendedattribute IN extendedattributes %]
         [% IF ( extendedattribute.display_checkout ) %]
             [% IF ( extendedattribute.value ) %]
-                <li>[% extendedattribute.description %] : [% IF ( extendedattribute.value_description ) %][% extendedattribute.value_description %][% ELSE %][% extendedattribute.value %][% END %]</li>
+                <li class="patronattribute"><span class="patronattributelabel">[% extendedattribute.description %]</span> : [% IF ( extendedattribute.value_description ) %][% extendedattribute.value_description %][% ELSE %][% extendedattribute.value %][% END %]</li>
             [% END %]
         [% END %]
     [% END %][% END %]
-    <li>Category: [% categoryname %] ([% categorycode %])</li>
-    <li>Home library: [% IF ( branchname ) %][% branchname %][% ELSE %][% branch %][% END %]</li>
+    <li class="patroncategory">Category: [% categoryname %] ([% categorycode %])</li>
+    <li class="patronlibrary">Home library: [% IF ( branchname ) %][% branchname %][% ELSE %][% branch %][% END %]</li>
 </ul></div>
 <div id="menu">
 <ul>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt
index 1b91a3c..8d52b90 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt
@@ -6,32 +6,32 @@ in the global namespace %]
 <style type="tex/css">img { width: expression(this.width > 140 ? 140: true);
 }</style>
 <![endif]-->
-<ul>
+<ul class="patronbriefinfo">
 [% IF ( patronimages ) %]
 [% IF borrower.has_picture %]
 <li><img src="/cgi-bin/koha/members/patronimage.pl?crdnum=[% borrower.cardnumber %]" id="patronimage" alt="[% borrower.firstname %] [% borrower.surname %] ([% borrower.cardnumber %])" border="0" style="max-width : 140px; margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC; width:auto !important; width:130px;" /></li>
 [% ELSE %]
-<li><img src="[% interface %]/[% theme %]/img/patron-blank.png" alt="[% borrower.firstname %] [% borrower.surname %] ([% borrower.cardnumber %])" border="0" style="margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC;" /></li>
+<li id="patronbasics"><img src="[% interface %]/[% theme %]/img/patron-blank.png" alt="[% borrower.firstname %] [% borrower.surname %] ([% borrower.cardnumber %])" border="0" style="margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC;" /></li>
 [% END %]
 [% END %]
     [% IF ( borrower.address or borrower.address2 ) %]
         [% IF ( borrower.address ) %]
-            <li>[% borrower.address %]</li>
+            <li class="patronaddress1">[% borrower.address %]</li>
         [% END %]
         [% IF ( borrower.address2 ) %]
-            <li>[% borrower.address2 %]</li>
+            <li class="patronaddress2">[% borrower.address2 %]</li>
         [% END %]
     [% ELSE %]
             <li><span class="empty" id="noaddressstored">No address stored.</span></li>
     [% END %]
-    <li>
+    <li class="patroncity">
     [% IF borrower.city %]
             [% borrower.city %][% IF borrower.state %], [% borrower.state %][% END %]
 	    [% borrower.zipcode %][% IF ( borrower.country ) %], [% borrower.country %][% END %]
     [% ELSE %]
         <span class="empty" id="nocitystored">No city stored.</span>
     [% END %]</li>
-    <li>[% IF borrower.phone %]
+    <li class="patronphone">[% IF borrower.phone %]
         [% borrower.phone %]
     [% ELSE %]
         [% IF borrower.mobile %]
@@ -56,12 +56,12 @@ in the global namespace %]
     [% IF ( ExtendedPatronAttributes ) %][% FOREACH extendedattribute IN borrower.extendedattributes %]
         [% IF ( extendedattribute.display_checkout ) %]
             [% IF ( extendedattribute.value ) %]
-                <li>[% extendedattribute.description %] : [% IF ( extendedattribute.value_description ) %][% extendedattribute.value_description %][% ELSE %][% extendedattribute.value %][% END %]</li>
+                <li class="patronattribute"><span class="patronattributelabel">[% extendedattribute.description %]</span> : [% IF ( extendedattribute.value_description ) %][% extendedattribute.value_description %][% ELSE %][% extendedattribute.value %][% END %]</li>
             [% END %]
         [% END %]
     [% END %][% END %]
-    <li>Category: [% borrower.description %] ([% borrower.categorycode %])</li>
-    <li>Home library: [% IF ( borrower.branchname ) %][% borrower.branchname %][% ELSE %][% borrower.branch %][% END %]</li>
+    <li class="patroncategory">Category: [% borrower.description %] ([% borrower.categorycode %])</li>
+    <li class="patronlibrary">Home library: [% IF ( borrower.branchname ) %][% borrower.branchname %][% ELSE %][% borrower.branch %][% END %]</li>
 </ul></div>
 <div id="menu">
 <ul>
-- 
1.8.1.2


More information about the Koha-patches mailing list