From 746814054a83bc4a3abe3bd53fece420fae27bbc Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 5 Aug 2011 13:25:45 -0400 Subject: [PATCH] [REVISED] Fix for Bug 6674 - Collapse display of patron address by default Content-Type: text/plain; charset="utf-8" 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. --- .../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 8b2b8f5..c53fa8a 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 %])
-
+ +Library Information + + +Library Information +