From 43047fa94aa196341bfd6d56fb4c1e63eec68b5d Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 5 Aug 2011 13:25:45 -0400 Subject: [PATCH] [SIGNED-OFF] Fix for Bug 6674 - Collapse display of patron address by default This patch takes the feature implemented in the original patch for Bug 5436 and reimplements it in a slightly more abstracted way. The JavaScript can now be applied to any pair of elements like this: a block with class "collapsed" followed by a link with class "togglecollapse." In the circ-menu include, both the address info block and the link to show/hide it have unique ids ("contact" and "showcontact" respectively) so that IntranetUserCSS can be used to force them to show: #contact { display : block; } #showcontact { display : none; } Revision adds compatibility for display of extended patron attributes and makes changes consistent across includes, including circ-menu.tt. Signed-off-by: Nicole C. Engard --- .../intranet-tmpl/prog/en/css/staff-global.css | 33 +++++++++++++++++++- .../intranet-tmpl/prog/en/includes/circ-menu.inc | 21 ++++++++---- .../intranet-tmpl/prog/en/includes/circ-menu.tt | 17 ++++++--- koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js | 11 ++++++ .../intranet-tmpl/prog/img/more-right-arrow.gif | Bin 0 -> 81 bytes 5 files changed, 68 insertions(+), 14 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/img/more-right-arrow.gif diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css index c52c252..64aead2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -484,7 +484,7 @@ div.patroninfo ul { border-right : 1px solid #000; border-bottom : 0; border-top : 0; - padding : 0; + padding : .5em 0; margin : 0; } @@ -496,6 +496,19 @@ div.patroninfo ul li, div.patronviews ul li { list-style-type : none; } +#patronimage { + border-right : 1px solid #000; +} + +#patronimage img { + max-width : 140px; + margin: .3em 0 .3em .3em; + padding: .2em; + border: 1px solid #CCCCCC; + width:auto !important; + width:130px; +} + div.patronviews { border-right : 1px solid #000; border-top : 1px solid #000; @@ -1912,6 +1925,24 @@ ul.budget_hierarchy li:last-child:after { ul.budget_hierarchy li:first-child:after { content: ""; } +.collapse { + display : none; +} +.togglecollapse { + border-right : 1px solid #000; + font-size: 85%; + display: block; + padding: .2em .2em .2em 15px; + margin: 0; + cursor: pointer; +} +.toggleclosed { + background: #eee url(../../img/more-right-arrow.gif) 0 50% no-repeat; +} +.toggleopen { + background: #eee url(../../img/more-up-arrow.gif) 0 50% no-repeat; +} + .holdcount { font-size : 105%; line-height : 200%; } .holdcount a { border : 1px solid #a4bedd; background-color : #e4ecf5; font-weight : bold; -moz-border-radius: 4px; padding : .1em .4em; text-decoration : none; } .holdcount a:hover { background-color : #ebeff7; } 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 a9fd453..8ef3409 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -1,17 +1,19 @@ + + [% IF ( borrowernumber ) %]
[% firstname %] [% surname %] ([% cardnumber %])
-
    [% IF ( patronimages ) %] [% IF ( picture ) %] -
  • [% firstname %] [% surname %] ([% cardnumber %])
  • +
    [% firstname %] [% surname %] ([% cardnumber %])
    [% ELSE %] -
  • [% firstname %] [% surname %] ([% cardnumber %])
  • +
    [% firstname %] [% surname %] ([% cardnumber %])
    [% END %] [% END %] +
    • [% IF ( address ) %] [% address %] [% ELSE %] @@ -22,7 +24,7 @@ [% END %]
    • [% IF ( city ) %] [% city %][% IF ( state ) %], [% state %][% END %] - [% zipcode %][% IF ( country ) %], [% country %][% END %] + [% zipcode %][% IF ( country ) %]
      [% country %][% END %] [% ELSE %] No city stored. [% END %]
    • @@ -48,6 +50,11 @@
    • No email stored.
    • [% END %] [% END %] +
    +Contact Information +
      +
    • Category: [% categoryname %] ([% categorycode %])
    • +
    • Home Library: [% IF ( branchname ) %][% branchname %][% ELSE %][% branch %][% END %]
    • [% FOREACH extendedattribute IN extendedattributes %] [% IF ( extendedattribute.display_checkout ) %] [% IF ( extendedattribute.value ) %] @@ -55,9 +62,9 @@ [% END %] [% END %] [% END %] -
    • Category: [% categoryname %] ([% categorycode %])
    • -
    • Home Library: [% IF ( branchname ) %][% branchname %][% ELSE %][% branch %][% END %]
    • -
+ +Library Information + + +Library Information +