Bug 21526: Remove duplicated USE raw statement
[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         [% SWITCH Koha.Preference( 'AddressFormat' ) %]
22             [% CASE 'de' %]
23                 [% INCLUDE 'member-display-address-style-de.inc' %]
24             [% CASE # us %]
25                 [% INCLUDE 'member-display-address-style-us.inc' %]
26         [% END %]
27
28         [% IF ( patron.phone || patron.mobile || patron.phonepro ) %]<li class="patronphone">
29         [% IF ( patron.phone ) %]
30             <a href="tel:[% patron.phone | url %]">[% patron.phone | html %]</a>
31         [% ELSE %]
32             [% IF ( patron.mobile ) %]
33                 <a href="tel:[% patron.mobile | url %]">[% patron.mobile | html %]</a>
34             [% ELSE %]
35                 [% IF ( patron.phonepro ) %]
36                     <a href="tel:[% patron.phonepro | url %]">[% patron.phonepro | html %]</a>
37                 [% END %]
38             [% END %]
39         [% END %]</li>[% END %]
40         [% IF ( patron.email ) %]
41             <li class="email"> <a href="mailto:[% patron.email | url %]" title="[% patron.email | html %]">[% patron.email | html %]</a></li>
42         [% ELSE %]
43             [% IF ( patron.emailpro ) %]
44                 <li class="email"> <a href="mailto:[% patron.emailpro | url %]" title="[% patron.emailpro | html %]">[% patron.emailpro | html %]</a></li>
45             [% END %]
46         [% END %]
47
48         [% UNLESS ( patron.address or patron.address2 ) %]
49             <li><span class="empty" id="noaddressstored">No address stored.</span></li>
50         [% END %]
51         [% UNLESS ( patron.city ) %]
52             <li><span class="empty" id="nocitystored">No city stored.</span></li>
53         [% END %]
54         [% UNLESS ( patron.phone or patron.mobile or patron.phonepro) %]
55             <li> <span class="empty">No phone stored.</span></li>
56         [% END %]
57         [% UNLESS ( patron.email or patron.emailpro) %]
58             <li> <span class="empty">No email stored.</span></li>
59         [% END %]
60     [% END %]
61
62     [% IF ( ExtendedPatronAttributes ) %][% FOREACH extendedattribute IN extendedattributes %]
63         [% IF ( extendedattribute.display_checkout ) %]
64             [% IF ( extendedattribute.value ) %]
65                 <li class="patronattribute"><span class="patronattributelabel">[% extendedattribute.description | html %]</span> : [% IF ( extendedattribute.value_description ) %][% extendedattribute.value_description | html %][% ELSE %][% extendedattribute.value | html %][% END %]</li>
66             [% END %]
67         [% END %]
68     [% END %][% END %]
69     <li class="patroncategory">Category: [% patron.category.description | html %] ([% patron.categorycode | html %])</li>
70     <li class="patronlibrary">Home library: [% Branches.GetName( patron.branchcode ) | html %]</li>
71     <li class="patronborrowernumber">Borrowernumber: [% patron.borrowernumber | html %]</li>
72   </ul></div>
73 <div id="menu">
74 <ul>
75     [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
76         [% IF ( circview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% patron.borrowernumber | uri %]">Check out</a></li>
77         [% IF Koha.Preference('BatchCheckouts') && Koha.Preference('BatchCheckoutsValidCategories').split('\|').grep('^' _ patron.categorycode _ '$').size > 0 %]
78           [% IF ( batch_checkout_view ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% patron.borrowernumber | uri %]&amp;batch=1">Batch check out</a></li>
79         [% END %]
80     [% END %]
81     [% IF CAN_user_borrowers_edit_borrowers %]
82         [% IF ( detailview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">Details</a></li>
83     [% END %]
84     [% IF ( CAN_user_updatecharges ) %]
85         [% IF ( finesview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber | uri %]">Fines</a></li>
86     [% END %]
87     [% IF ( CAN_user_circulate_circulate_remaining_permissions  )  %]
88         [% IF Koha.Preference("RoutingSerials") %][% IF ( routinglistview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/routing-lists.pl?borrowernumber=[% patron.borrowernumber | uri %]">Routing lists</a></li>[% END %]
89     [% END %]
90     [% IF CAN_user_borrowers_edit_borrowers %]
91         [% IF ( intranetreadinghistory ) %]
92             [% IF ( readingrecordview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/readingrec.pl?borrowernumber=[% patron.borrowernumber | uri %]">Circulation history</a></li>
93         [% END %]
94     [% END %]
95     [% IF CAN_user_borrowers_edit_borrowers %]
96         [% IF ( intranetreadinghistory ) %]
97             [% IF ( holdshistoryview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/holdshistory.pl?borrowernumber=[% patron.borrowernumber | uri %]">Holds history</a></li>
98         [% END %]
99     [% END %]
100     [% IF ( CAN_user_tools_view_system_logs ) %]
101         [% 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 | uri %]&amp;src=circ">Modification log</a></li>
102     [% END %]
103     [% IF CAN_user_borrowers_edit_borrowers %]
104     [% IF ( sentnotices ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/notices.pl?borrowernumber=[% patron.borrowernumber | uri %]">Notices</a></li>
105     [% END %]
106     [% IF CAN_user_borrowers_edit_borrowers %]
107         [% IF (  statisticsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/statistics.pl?borrowernumber=[% patron.borrowernumber | uri %]">Statistics</a></li>
108     [% END %]
109     [% IF CAN_user_borrowers_edit_borrowers %]
110         [% IF ( EnableBorrowerFiles ) %]
111             [% IF ( borrower_files ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% patron.borrowernumber | uri %]">Files</a></li>
112         [% END %]
113     [% END %]
114
115     [% IF CAN_user_acquisition_suggestions_manage %]
116         [% IF ( suggestionsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/purchase-suggestions.pl?borrowernumber=[% patron.borrowernumber | uri %]">Purchase suggestions</a></li>
117     [% END %]
118     [% IF CAN_user_borrowers_edit_borrowers && useDischarge %]
119         [% IF dischargeview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% patron.borrowernumber | uri %]">Discharges</a></li>
120     [% END %]
121     [% IF Koha.Preference('HouseboundModule') %]
122         [% IF houseboundview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/housebound.pl?borrowernumber=[% patron.borrowernumber | uri %]">Housebound</a></li>
123     [% END %]
124     [% IF Koha.Preference('ILLModule') && CAN_user_ill %]
125         <li><a href="/cgi-bin/koha/ill/ill-requests.pl?borrowernumber=[% patron.borrowernumber | uri %]">Interlibrary loans</a></li>
126     [% END %]
127 </ul></div>
128 [% END %]