061f2e9251
Show patron attributes in the sidebar on circ and patron pages [Edit from Owen Leonard: This patch takes changes originally in Bug 5436 and isolates just the parts relating to display of patron attributes. Because function for pulling patron attributes was merged with the function for displaying address information in SetMemberInfosInTemplate() (also found in Bug 5749), I moved the call to GetBorrowerAttributes into the individual scripts. That keeps the functionality relating specifically to patron attributes separate from the proposed changes to displaying addresses. Because I think it's important to keep the display consistent, I added display of patron attributes to all pages which include the patron information sidebar.] Rebased for compatability with bug 3489 and database documentation by Ian Walls, 9-21-11 Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
79 lines
4.4 KiB
Text
79 lines
4.4 KiB
Text
[%# duplicates circ-menu.inc but assumes all borrower attributes are in a borrower variable rather than
|
|
in the global namespace %]
|
|
[% IF borrower %]
|
|
<div class="patroninfo"><h5>[% borrower.firstname %] [% borrower.surname %] ([% borrower.cardnumber %])</h5>
|
|
<!--[if IE 6]>
|
|
<style type="tex/css">img { width: expression(this.width > 140 ? 140: true);
|
|
}</style>
|
|
<![endif]-->
|
|
<ul>
|
|
[% 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="/intranet-tmpl/prog/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 %]
|
|
<li>[% IF borrower.address %]
|
|
[% borrower.address %]
|
|
[% ELSE %]
|
|
<span class="empty">No address stored.</span>
|
|
[% END %]</li>
|
|
[% IF borrower.address2 %]
|
|
<li>[% borrower.address2 %]</li>
|
|
[% END %]<li>
|
|
[% IF borrower.city %]
|
|
[% borrower.city %][% IF borrower.state %], [% borrower.state %][% END %]
|
|
[% borrower.zipcode %][% IF ( borrower.country ) %], [% borrower.country %][% END %]
|
|
[% ELSE %]
|
|
<span class="empty">No city stored.</span>
|
|
[% END %]</li>
|
|
<li>[% IF borrower.phone %]
|
|
[% borrower.phone %]
|
|
[% ELSE %]
|
|
[% IF borrower.mobile %]
|
|
[% borrower.mobile %]
|
|
[% ELSE %]
|
|
[% IF borrower.phonepro %]
|
|
[% borrower.phonepro %]
|
|
[% ELSE %]
|
|
<span class="empty">No phone stored.</span>
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]</li>
|
|
[% IF borrower.email %]
|
|
<li class="email"> <a href="mailto:[% borrower.email %]" title="[% borrower.email %]">[% borrower.email %]</a></li>
|
|
[% ELSE %]
|
|
[% IF borrower.emailpro %]
|
|
<li class="email"> <a href="mailto:[% borrower.emailpro %]" title="[% borrower.emailpro %]">[% borrower.emailpro %]</a></li>
|
|
[% ELSE %]
|
|
<li> <span class="empty">No email stored.</span> </li>
|
|
[% END %]
|
|
[% END %]
|
|
[% 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>
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
<li>Category: [% borrower.description %] ([% borrower.categorycode %])</li>
|
|
<li>Home Library: [% IF ( borrower.branchname ) %][% borrower.branchname %][% ELSE %][% borrower.branch %][% END %]</li>
|
|
</ul></div>
|
|
<div id="menu">
|
|
<ul>
|
|
[% IF ( circview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrower.borrowernumber %]">Check Out</a></li>
|
|
[% IF ( CAN_user_borrowers ) %]
|
|
[% IF ( detailview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]">Details</a></li>
|
|
[% END %]
|
|
[% IF ( CAN_user_updatecharges ) %]
|
|
[% IF ( finesview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrower.borrowernumber %]">Fines</a></li>
|
|
[% END %]
|
|
[% IF ( intranetreadinghistory ) %][% IF ( readingrecordview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/readingrec.pl?borrowernumber=[% borrower.borrowernumber %]">Circulation History</a></li>[% END %]
|
|
[% IF ( CAN_user_parameters ) %][% IF ( logview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/tools/viewlog.pl?do_it=1&modules=MEMBERS&modules=circulation&object=[% borrower.borrowernumber %]&src=circ">Modification Log</a></li>[% END %]
|
|
[% IF ( EnhancedMessagingPreferences ) %]
|
|
[% END %]
|
|
[% IF ( sentnotices ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/notices.pl?borrowernumber=[% borrower.borrowernumber %]">Notices</a></li>
|
|
</ul></div>
|
|
[% END %]
|
|
|