Bug 21121: Added new system preference to control hiding of personal patron informati...
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / circ-menu.inc
1 [% USE Koha %]
2 [% IF ( patron.borrowernumber ) %]
3 <div class="patroninfo"><h5>[% INCLUDE 'patron-title.inc' %]</h5>
4 <!--[if IE 6]>
5 <style type="tex/css">img { width: expression(this.width > 140 ? 140: true);
6 }</style>
7 <![endif]-->
8 <ul class="patronbriefinfo">
9     [% IF ( patronimages ) %]
10         [% IF ( patron.image ) %]
11             <li>
12                 <img src="/cgi-bin/koha/members/patronimage.pl?borrowernumber=[% patron.borrowernumber | uri %]" id="patronimage" alt="[% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])" />
13             </li>
14         [% ELSE %]
15             <li id="patronbasics">
16                 <div></div>
17             </li>
18         [% END %]
19     [% END %]
20     [% IF !(Koha.Preference('HidePersonalPatronDetailOnCirculation')) %]
21         [% IF Koha.Preference( 'AddressFormat' ) %]
22             [% INCLUDE "member-display-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
23         [% ELSE %]
24             [% INCLUDE 'member-display-address-style-us.inc' %]
25         [% END %]
26
27         [% IF ( patron.phone || patron.mobile || patron.phonepro ) %]<li class="patronphone">
28         [% IF ( patron.phone ) %]
29             <a href="tel:[% patron.phone | url %]">[% patron.phone | html %]</a>
30         [% ELSE %]
31             [% IF ( patron.mobile ) %]
32                 <a href="tel:[% patron.mobile | url %]">[% patron.mobile | html %]</a>
33             [% ELSE %]
34                 [% IF ( patron.phonepro ) %]
35                     <a href="tel:[% patron.phonepro | url %]">[% patron.phonepro | html %]</a>
36                 [% END %]
37             [% END %]
38         [% END %]</li>[% END %]
39         [% IF ( patron.email ) %]
40             <li class="email"> <a href="mailto:[% patron.email | url %]" title="[% patron.email | html %]">[% patron.email | html %]</a></li>
41         [% ELSE %]
42             [% IF ( patron.emailpro ) %]
43                 <li class="email"> <a href="mailto:[% patron.emailpro | url %]" title="[% patron.emailpro | html %]">[% patron.emailpro | html %]</a></li>
44             [% END %]
45         [% END %]
46
47         [% UNLESS ( patron.address or patron.address2 ) %]
48             <li><span class="empty" id="noaddressstored">No address stored.</span></li>
49         [% END %]
50         [% UNLESS ( patron.city ) %]
51             <li><span class="empty" id="nocitystored">No city stored.</span></li>
52         [% END %]
53         [% UNLESS ( patron.phone or patron.mobile or patron.phonepro) %]
54             <li> <span class="empty">No phone stored.</span></li>
55         [% END %]
56         [% UNLESS ( patron.email or patron.emailpro) %]
57             <li> <span class="empty">No email stored.</span></li>
58         [% END %]
59     [% END %]
60
61     [% IF ( ExtendedPatronAttributes ) %][% FOREACH extendedattribute IN extendedattributes %]
62         [% IF ( extendedattribute.display_checkout ) %]
63             [% IF ( extendedattribute.value ) %]
64                 <li class="patronattribute"><span class="patronattributelabel">[% extendedattribute.description %]</span> : [% IF ( extendedattribute.value_description ) %][% extendedattribute.value_description %][% ELSE %][% extendedattribute.value %][% END %]</li>
65             [% END %]
66         [% END %]
67     [% END %][% END %]
68     <li class="patroncategory">Category: [% patron.category.description %] ([% patron.categorycode %])</li>
69     <li class="patronlibrary">Home library: [% Branches.GetName( patron.branchcode ) %]</li>
70     <li class="patronborrowernumber">Borrowernumber: [% patron.borrowernumber %]</li>
71   </ul></div>
72 <div id="menu">
73 <ul>
74     [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
75         [% IF ( circview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% patron.borrowernumber %]">Check out</a></li>
76         [% IF Koha.Preference('BatchCheckouts') && Koha.Preference('BatchCheckoutsValidCategories').split('\|').grep('^' _ patron.categorycode _ '$').size > 0 %]
77           [% IF ( batch_checkout_view ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% patron.borrowernumber %]&amp;batch=1">Batch check out</a></li>
78         [% END %]
79     [% END %]
80     [% IF CAN_user_borrowers_edit_borrowers %]
81         [% IF ( detailview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber %]">Details</a></li>
82     [% END %]
83     [% IF ( CAN_user_updatecharges ) %]
84         [% IF ( finesview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber %]">Fines</a></li>
85     [% END %]
86     [% IF ( CAN_user_circulate_circulate_remaining_permissions  )  %]
87         [% IF Koha.Preference("RoutingSerials") %][% IF ( routinglistview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/routing-lists.pl?borrowernumber=[% patron.borrowernumber %]">Routing lists</a></li>[% END %]
88     [% END %]
89     [% IF CAN_user_borrowers_edit_borrowers %]
90         [% IF ( intranetreadinghistory ) %]
91             [% IF ( readingrecordview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/readingrec.pl?borrowernumber=[% patron.borrowernumber %]">Circulation history</a></li>
92         [% END %]
93     [% END %]
94     [% IF CAN_user_borrowers_edit_borrowers %]
95         [% IF ( intranetreadinghistory ) %]
96             [% IF ( holdshistoryview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/holdshistory.pl?borrowernumber=[% patron.borrowernumber %]">Holds history</a></li>
97         [% END %]
98     [% END %]
99     [% IF ( CAN_user_parameters ) %]
100         [% IF ( logview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/tools/viewlog.pl?do_it=1&amp;modules=MEMBERS&amp;modules=circulation&amp;object=[% patron.borrowernumber %]&amp;src=circ">Modification log</a></li>
101     [% END %]
102     [% IF CAN_user_borrowers_edit_borrowers %]
103     [% IF ( sentnotices ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/notices.pl?borrowernumber=[% patron.borrowernumber %]">Notices</a></li>
104     [% END %]
105     [% IF CAN_user_borrowers_edit_borrowers %]
106         [% IF (  statisticsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/statistics.pl?borrowernumber=[% patron.borrowernumber %]">Statistics</a></li>
107     [% END %]
108     [% IF CAN_user_borrowers_edit_borrowers %]
109         [% IF ( EnableBorrowerFiles ) %]
110             [% IF ( borrower_files ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% patron.borrowernumber %]">Files</a></li>
111         [% END %]
112     [% END %]
113
114     [% IF CAN_user_acquisition_suggestions_manage %]
115         [% IF ( suggestionsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/purchase-suggestions.pl?borrowernumber=[% patron.borrowernumber %]">Purchase suggestions</a></li>
116     [% END %]
117     [% IF CAN_user_borrowers_edit_borrowers && useDischarge %]
118         [% IF dischargeview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% patron.borrowernumber %]">Discharges</a></li>
119     [% END %]
120     [% IF Koha.Preference('HouseboundModule') %]
121         [% IF houseboundview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/housebound.pl?borrowernumber=[% patron.borrowernumber %]">Housebound</a></li>
122     [% END %]
123     [% IF Koha.Preference('ILLModule') && CAN_user_ill %]
124         <li><a href="/cgi-bin/koha/ill/ill-requests.pl?borrowernumber=[% patron.borrowernumber %]">Interlibrary loans</a></li>
125     [% END %]
126 </ul></div>
127 [% END %]