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