f6c3d5e284e66cc1b10196e20468551ba73b04df
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / circ-menu.inc
1 [% USE Koha %]
2 [% USE KohaDates %]
3 [% IF ( patron.borrowernumber ) %]
4 <div class="patroninfo"><h5>[% INCLUDE 'patron-title.inc' %]</h5>
5
6 <input type="hidden" id="hiddenborrowernumber" value="[% patron.borrowernumber | html %]">
7 <input type="hidden" id="hiddenborrowername" value="[% patron.surname | html %] [% patron.firstname | html %]">
8 <input type="hidden" id="hiddenborrowercard" value="[% patron.cardnumber | html %]">
9
10 [% IF ( patronimages ) %]
11     <div>
12         <div class="patronimage-container">
13             [% IF ( patron.image ) %]
14                 <img src="/cgi-bin/koha/members/patronimage.pl?borrowernumber=[% patron.borrowernumber | uri %]" class="patronimage" alt="[% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])" />
15                 <div class="patronimage-controls">
16                     <div class="patronimage-control"><a data-borrowernumber="[% patron.borrowernumber | uri %]" class="btn btn-default btn-sm edit-patronimage" title="Edit patron image" href="#"><i class="fa fa-pencil"></i> Edit</a></div>
17                 </div>
18             [% ELSE %]
19                 <div class="patronimage empty"></div>
20                 <div class="patronimage-controls">
21                     <div class="patronimage-control"><a data-borrowernumber="[% patron.borrowernumber | uri %]" class="btn btn-default btn-sm edit-patronimage" title="Add patron image" href="#"><i class="fa fa-plus"></i> Add</a></div>
22                 </div>
23             [% END %]
24         </div>
25     </div>
26 [% END %]
27
28 <ul class="patronbriefinfo">
29     [% IF !(Koha.Preference('HidePersonalPatronDetailOnCirculation')) %]
30         [% SWITCH Koha.Preference( 'AddressFormat' ) %]
31             [% CASE 'de' %]
32                 [% INCLUDE 'member-display-address-style-de.inc' %]
33             [% CASE # us %]
34                 [% INCLUDE 'member-display-address-style-us.inc' %]
35         [% END %]
36
37         [% IF ( patron.phone || patron.mobile || patron.phonepro ) %]<li class="patronphone">
38         [% IF ( patron.phone ) %]
39             <a href="tel:[% patron.phone | url %]">[% patron.phone | html %]</a>
40         [% ELSE %]
41             [% IF ( patron.mobile ) %]
42                 <a href="tel:[% patron.mobile | url %]">[% patron.mobile | html %]</a>
43             [% ELSE %]
44                 [% IF ( patron.phonepro ) %]
45                     <a href="tel:[% patron.phonepro | url %]">[% patron.phonepro | html %]</a>
46                 [% END %]
47             [% END %]
48         [% END %]</li>[% END %]
49         [% IF ( patron.email ) %]
50             <li class="email"> <a href="mailto:[% patron.email | url %]" title="[% patron.email | html %]">[% patron.email | html %]</a></li>
51         [% ELSE %]
52             [% IF ( patron.emailpro ) %]
53                 <li class="email"> <a href="mailto:[% patron.emailpro | url %]" title="[% patron.emailpro | html %]">[% patron.emailpro | html %]</a></li>
54             [% END %]
55         [% END %]
56
57         [% UNLESS ( patron.address or patron.address2 ) %]
58             <li><span class="empty" id="noaddressstored">No address stored.</span></li>
59         [% END %]
60         [% UNLESS ( patron.city ) %]
61             <li><span class="empty" id="nocitystored">No city stored.</span></li>
62         [% END %]
63         [% UNLESS ( patron.phone or patron.mobile or patron.phonepro) %]
64             <li> <span class="empty">No phone stored.</span></li>
65         [% END %]
66         [% UNLESS ( patron.email or patron.emailpro) %]
67             <li> <span class="empty">No email stored.</span></li>
68         [% END %]
69     [% END %]
70
71     [% IF ( ExtendedPatronAttributes ) %][% FOREACH extendedattribute IN extendedattributes %]
72         [% IF ( extendedattribute.display_checkout ) %]
73             [% IF ( extendedattribute.value ) %]
74                 <li class="patronattribute"><span class="patronattributelabel">[% extendedattribute.description | html %]</span> : [% IF ( extendedattribute.value_description ) %][% extendedattribute.value_description | html %][% ELSE %][% extendedattribute.value | html %][% END %]</li>
75             [% END %]
76         [% END %]
77     [% END %][% END %]
78     <li class="patroncategory">Category: [% patron.category.description | html %] ([% patron.categorycode | html %])</li>
79     <li class="patronlibrary">Home library: [% Branches.GetName( patron.branchcode ) | html %]</li>
80     <li class="patronborrowernumber">Borrowernumber: [% patron.borrowernumber | html %]</li>
81     <li><span class="patronupdatedon">Updated on [% patron.updated_on | $KohaDates with_hours => 1 %]</span></li>
82   </ul></div>
83 <div id="menu">
84 <ul>
85     [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
86         [% IF ( circview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% patron.borrowernumber | uri %]">Check out</a></li>
87         [% IF Koha.Preference('BatchCheckouts') && Koha.Preference('BatchCheckoutsValidCategories').split('\|').grep('^' _ patron.categorycode _ '$').size > 0 %]
88           [% 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>
89         [% END %]
90     [% END %]
91     [% IF CAN_user_borrowers_edit_borrowers %]
92         [% IF ( detailview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">Details</a></li>
93     [% END %]
94     [% IF ( CAN_user_updatecharges ) %]
95         [% IF ( finesview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber | uri %]">Accounting</a></li>
96     [% END %]
97     [% IF ( CAN_user_circulate_circulate_remaining_permissions  )  %]
98         [% 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 %]
99     [% END %]
100     [% IF CAN_user_borrowers_edit_borrowers %]
101         [% IF ( intranetreadinghistory ) %]
102             [% IF ( readingrecordview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/readingrec.pl?borrowernumber=[% patron.borrowernumber | uri %]">Circulation history</a></li>
103         [% END %]
104     [% END %]
105     [% IF CAN_user_borrowers_edit_borrowers %]
106         [% IF ( intranetreadinghistory ) %]
107             [% IF ( holdshistoryview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/holdshistory.pl?borrowernumber=[% patron.borrowernumber | uri %]">Holds history</a></li>
108         [% END %]
109     [% END %]
110     [% IF ( CAN_user_tools_view_system_logs ) %]
111         [% 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>
112     [% END %]
113     [% IF CAN_user_borrowers_edit_borrowers %]
114     [% IF ( sentnotices ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/notices.pl?borrowernumber=[% patron.borrowernumber | uri %]">Notices</a></li>
115     [% END %]
116     [% IF CAN_user_borrowers_edit_borrowers %]
117         [% IF (  statisticsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/statistics.pl?borrowernumber=[% patron.borrowernumber | uri %]">Statistics</a></li>
118     [% END %]
119     [% IF CAN_user_borrowers_edit_borrowers %]
120         [% IF ( EnableBorrowerFiles ) %]
121             [% IF ( borrower_files ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% patron.borrowernumber | uri %]">Files</a></li>
122         [% END %]
123     [% END %]
124
125     [% IF CAN_user_acquisition_suggestions_manage %]
126         [% 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>
127     [% END %]
128     [% IF CAN_user_borrowers_edit_borrowers && useDischarge %]
129         [% IF dischargeview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% patron.borrowernumber | uri %]">Discharges</a></li>
130     [% END %]
131     [% IF Koha.Preference('HouseboundModule') %]
132         [% IF houseboundview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/housebound.pl?borrowernumber=[% patron.borrowernumber | uri %]">Housebound</a></li>
133     [% END %]
134     [% IF Koha.Preference('ILLModule') && CAN_user_ill %]
135         <li><a href="/cgi-bin/koha/ill/ill-requests.pl?borrowernumber=[% patron.borrowernumber | uri %]">Interlibrary loans</a></li>
136     [% END %]
137 </ul></div>
138
139 <!-- Modal -->
140 <div class="modal" id="patronImageEdit" tabindex="-1" role="dialog" aria-labelledby="patronImageEditLabel">
141     <div class="modal-dialog" role="document">
142         <div class="modal-content">
143             <div class="modal-header">
144                 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
145                 <h4 class="modal-title" id="patronImageEditLabel">Modal title</h4>
146             </div>
147             <div class="modal-body">
148                 <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" />
149             </div>
150             <div class="modal-footer">
151                 <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
152             </div>
153         </div>
154     </div>
155 </div>
156
157 [% END %]