1 [% PROCESS 'i18n.inc' %]
5 [% USE AuthorisedValues %]
8 [% USE ColumnsSettings %]
10 [% INCLUDE 'doc-head-open.inc' %]
11 <title>Koha › Acquisitions ›
13 [% IF ( suggestionid ) %]
14 Suggestions › Edit suggestion #[% suggestionid | html %]
16 Suggestions › Add suggestion
18 [% ELSIF ( op == 'show' ) %]
19 Suggestions › Show suggestion #[% suggestionid | html %]
21 Suggestions management
24 [% INCLUDE 'doc-head-close.inc' %]
27 h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief ol { display : none; }
28 .overlay { top: 180px; left: 50%; position: absolute; margin-left: -100px; width: 200px; text-align: center; display: none; margin-top: -10px; background: #eeffd4; padding: .5em; color: #000; } div.note { background: transparent none; border-style: dotted; border-width: 1px 0 0 0; font-size : 90%; padding: 2px 0 0 0; } div.note i { color: #CCC; }
33 <body id="acq_suggestion" class="acq">
34 [% INCLUDE 'header.inc' %]
35 [% INCLUDE 'cat-search.inc' %]
36 <div id="breadcrumbs">
37 <a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> ›
39 [% IF ( suggestionid ) %]
40 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Edit suggestion #[% suggestionid | html %]
42 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Add suggestion
44 [% ELSIF ( op == 'show' ) %]
45 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Show suggestion #[% suggestionid | html %]
47 Suggestions management
51 [% IF ( op == 'show' ) %]
52 <div class="main container-fluid">
54 <div class="col-md-8 col-md-offset-2">
56 <div id="toolbar" class="btn-toolbar">
57 <a class="btn btn-default" id="editsuggestion" href="suggestion.pl?op=edit&suggestionid=[% suggestionid | html %]"><i class="fa fa-pencil"></i> Edit</a>
58 <a class="btn btn-default deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a>
61 <fieldset class="rows">
62 <legend>Bibliographic information</legend>
66 <span class="label">Title:</span>
67 [% IF suggestion.biblionumber %]
68 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% suggestion.biblionumber | uri %]">[% suggestion.title | html %]</a>
76 <span class="label">Author:</span>
80 [% IF ( copyrightdate ) %]
82 <span class="label">Copyright date:</span>
83 [% copyrightdate | html %]
88 <span class="label">ISBN or ISSN or other standard number:</span>
92 [% IF ( publishercode ) %]
94 <span class="label">Publisher:</span>
95 [% publishercode | html %]
100 <span class="label">Publication place:</span>
104 [% IF ( collectiontitle ) %]
106 <span class="label">Collection title:</span>
107 [% collectiontitle | html %]
110 [% IF ( itemtype ) %]
112 <span class="label">Document type:</span>
113 [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', itemtype, 0 ) | html %]
116 [% IF ( patron_reason_loop ) %]
117 <li><span class="label">Reason for suggestion: </span>
118 [% FOREACH patron_reason_loo IN patron_reason_loop %]
119 [% IF patron_reason_loo.authorised_value == patronreason %][% patron_reason_loo.lib | html %][% END %]
125 <span class="label">Notes:</span>
131 <fieldset class="rows"> <legend>Suggestion management</legend>
134 <span class="label">Status:</span>
135 [% SET status_found = 0 %]
136 [% IF ( STATUS == 'ASKED' ) %]
138 [% SET status_found = 1 %]
139 [% ELSIF ( STATUS == 'ACCEPTED' ) %]
141 [% SET status_found = 1 %]
142 [% ELSIF ( STATUS == 'CHECKED' ) %]
144 [% SET status_found = 1 %]
145 [% ELSIF ( STATUS == 'REJECTED' ) %]
147 [% SET status_found = 1 %]
148 [% ELSIF ( STATUS == 'ORDERED' ) %]
150 [% SET status_found = 1 %]
151 [% ELSIF ( STATUS == 'AVAILABLE' ) %]
153 [% SET status_found = 1 %]
155 [% FOREACH s IN SuggestionStatuses %]
156 [% IF STATUS == s.authorised_value %]
158 [% SET status_found = 1 %]
166 <thead><tr><th> </th><th>Date</th><th>By</th></tr></thead>
169 <th>[% tp('purchase suggestion created by', 'Created by:') | html %]</th>
170 <td>[% suggesteddate | $KohaDates %]</td>
172 [% IF ( suggestedby_patron.borrowernumber ) %]
173 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_patron.borrowernumber | uri %]">[% suggestedby_patron.surname | html %], [% suggestedby_patron.firstname | html %] ([% suggestedby_patron.cardnumber | html %])</a>
174 [% Branches.GetName( suggestedby_patron.branchcode ) | html %] ([% suggestedby_patron.category.description | html %])
180 <td>[% manageddate | $KohaDates %]</td>
182 [% IF ( managedby_patron.borrowernumber ) %]
183 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_patron.borrowernumber | uri %]">[% managedby_patron.surname | html %], [% managedby_patron.firstname | html %] ([% suggestedby_patron.cardnumber | html %])</a>
184 [% Branches.GetName( managedby_patron.branchcode ) | html %] ([% managedby_patron.category.description | html %])
189 <th>Accepted on:</th>
190 <td>[% accepteddate | $KohaDates %]</td>
192 [% IF ( acceptedby_patron.borrowernumber ) %]
193 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_patron.borrowernumber | uri %]">[% acceptedby_patron.surname | html %], [% acceptedby_patron.firstname | html %] ([% suggestedby_patron.cardnumber | html %])</a>
194 [% Branches.GetName( acceptedby_patron.branchcode ) | html %] ([% acceptedby_patron.category.description | html %])
199 <th>Last modification on:</th>
200 <td>[% lastmodificationdate | $KohaDates %]</td>
202 [% IF ( lastmodificationby_patron.borrowernumber ) %]
203 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% lastmodificationby_patron.borrowernumber | uri %]">[% lastmodificationby_patron.surname | html %], [% lastmodificationby_patron.firstname | html %] ([% lastmodificationby_patron.cardnumber | html %])</a>
204 [% Branches.GetName( lastmodificationby_patron.branchcode ) | html %] ([% lastmodificationby_patron.category.description | html %])
211 <fieldset class="rows"> <legend>Acquisition information</legend>
214 <span class="label">Library:</span> [% Branches.GetName( branchcode ) | html %]
217 <span class="label">Fund:</span> [% budgetname | html %]
220 <span class="label">Copies:</span>[% quantity | html %]
223 <span class="label">Currency:</span>[% currency | html %]
226 <span class="label">Price:</span>[% price | $Price %]
229 <span class="label">Total</span>[% total | $Price %]
234 <fieldset class="action">
235 <a href="suggestion.pl"><< Back to suggestions</a>
243 [% IF op == 'save' %]
244 <div class="main container-fluid">
246 <div class="col-md-8 col-md-offset-2">
248 <div class="main container-fluid">
250 <div class="col-sm-10 col-sm-push-2">
255 [% IF op == 'save' %]
256 [% FOR m IN messages %]
257 <div class="dialog [% m.type | html %]">
259 [% CASE 'biblio_exists' %]
260 A similar document already exists: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% m.id | uri %]">[% m.title | html %]</a>. Click on "Confirm your suggestion" to ignore this message.
266 <form id="add_edit" action="suggestion.pl" method="post" class="validated">
267 <input type="hidden" name="redirect" id="redirect" value="[% redirect | html %]" />
268 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber | html %]" />
269 [% IF ( suggestionid ) %]
270 <h1>Edit purchase suggestion #[% suggestionid | html %]</h1>
271 <input type="hidden" name="suggestionid" value="[% suggestionid | html %]"/>
273 <h1>Enter a new purchase suggestion</h1>
275 <fieldset class="rows"> <legend>Bibliographic information</legend><ol>
277 <label for="title" class="required">Title:</label>
278 <input type="text" id="title" name="title" size="80" maxlength="255" value="[% title | html %]" required="required" class="required" />
279 <span class="required">Required</span>
281 <li><label for="author">Author:</label><input type="text" id="author" name="author" size="50" maxlength="80" value="[% author | html %]"/></li>
282 <li><label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" value="[% copyrightdate | html %]" /></li>
283 <li><label for="isbn">ISBN or ISSN or other standard number:</label><input type="text" id="isbn" name="isbn" size="50" maxlength="80" value="[% isbn | html %]"/></li>
284 <li><label for="publishercode">Publisher:</label><input type="text" id="publishercode" name="publishercode" size="50" maxlength="80" value="[% publishercode | html %]"/></li>
285 <li><label for="place">Publication place:</label><input type="text" id="place" name="place" size="50" maxlength="80" value="[% place | html %]"/></li>
286 <li><label for="collectiontitle">Collection title:</label><input type="text" id="collectiontitle" name="collectiontitle" size="50" maxlength="80" value="[% collectiontitle | html %]"/></li>
287 <li><label for="itemtype">Document type:</label>
288 [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20, default=itemtype %]
290 [% IF patron_reason_loop %]
292 <label for="patronreason">Reason for suggestion: </label>
293 <select name="patronreason" id="patronreason">
294 <option value=""> -- Choose -- </option>
295 [% FOREACH patron_reason_loo IN patron_reason_loop %]
296 [% IF patron_reason_loo.authorised_value == patronreason %]
297 <option value="[% patron_reason_loo.authorised_value | html %]" selected="selected">[% patron_reason_loo.lib | html %]</option>
299 <option value="[% patron_reason_loo.authorised_value | html %]">[% patron_reason_loo.lib | html %]</option>
305 <li><label for="note">Notes:</label><textarea name="note" id="note" rows="5" cols="40">[% note | html %]</textarea></li>
308 <fieldset class="rows"> <legend>Suggestion management</legend>
310 [% IF ( suggestionid ) %]
312 <label for="STATUS">Status:</label>
313 <select id="STATUS" name="STATUS">
314 <option value="">No status</option>
316 [% IF (statusselected_ASKED ) %]
317 <option value="ASKED" selected="selected">Pending</option>
319 <option value="ASKED">Pending</option>
322 [% IF (statusselected_ACCEPTED ) %]
323 <option value="ACCEPTED" selected="selected">Accepted</option>
325 <option value="ACCEPTED">Accepted</option>
328 [% IF (statusselected_CHECKED ) %]
329 <option value="CHECKED" selected="selected">Checked</option>
331 <option value="CHECKED">Checked</option>
334 [% IF ( statusselected_REJECTED ) %]
335 <option value="REJECTED" selected="selected">Rejected</option>
337 <option value="REJECTED">Rejected</option>
340 [% FOREACH s IN SuggestionStatuses %]
341 [% IF s.authorised_value == suggestion.STATUS %]
342 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
344 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
350 <label for="reason">Reason</label>
351 <select class="select-reason" id="reason" name="reason">
352 <option value=""> -- Choose a reason -- </option>
353 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
354 [% IF (reasonsloo.lib == suggestion.reason) %]
355 <option value="[% reasonsloo.lib | html %]" selected="selected">[% reasonsloo.lib | html %]</option>
357 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
360 <option value="other">Others...</option>
363 <span id="other_reason" name="other_reason">
364 [% IF other_reason %]
365 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." value="[% suggestion.reason | html %]"/>
367 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." />
369 <a href="#back">Cancel</a>
374 <thead><tr><th> </th><th>Date</th><th>By</th></tr></thead>
377 <th><label for="suggesteddate">[% tp('purchase suggestion created by', 'Created by:') | html %]</label> </th>
378 <td><input type="text" id="suggesteddate" name="suggesteddate" class="datepicker" size="10" maxlength="10" value="[% suggesteddate | $KohaDates %]"/>[% INCLUDE 'date-format.inc' %]</td>
379 <td><input type="hidden" id="suggestedby" name="suggestedby" value="[% suggestedby | html %]"/>[% IF ( suggestedby_patron.borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_patron.borrowernumber | uri %]">[% suggestedby_patron.surname | html %], [% suggestedby_patron.firstname | html %] ([% suggestedby_patron.cardnumber | html %])</a> [% Branches.GetName( suggestedby_patron.branchcode ) | html %] ([% suggestedby_patron.category.description | html %])[% END %]
383 <th><label for="accepteddate">Accepted on:</label> </th>
384 <td><input type="text" id="accepteddate" name="accepteddate" class="datepicker" size="10" maxlength="10" value="[% accepteddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]</td>
385 <td><input type="hidden" id="acceptedby" name="acceptedby" value="[% acceptedby | html %]"/>[% IF ( acceptedby_patron.borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_patron.borrowernumber | uri %]">[% acceptedby_patron.surname | html %], [% acceptedby_patron.firstname | html %] ([% suggestedby_patron.cardnumber | html %])</a> [% Branches.GetName( acceptedby_patron.branchcode ) | html %] ([% acceptedby_patron.category.description | html %])[% END %]</td>
388 <th><label for="lastmodificationdate">Last modification on:</label> </th>
389 <td>[% lastmodificationdate | $KohaDates %]</td>
390 <td>[% INCLUDE 'patron-title.inc' patron=lastmodificationby_patron hide_patron_infos_if_needed=1 %] [% Branches.GetName( lastmodificationby_patron.branchcode ) | html %] ([% lastmodificationby_patron.category.description | html %])</td>
396 <label for="managedon">Managed on:</label>
397 <input type="text" id="managedon" name="manageddate" class="datepicker" size="10" maxlength="10" value="[% manageddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]
400 <label for="managedby_name">by:</label>
402 <span id="managedby_name" name="managedby_name">
403 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% logged_in_user.borrowernumber | uri %]">You</a>
405 [% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %]
406 | Previously was [% INCLUDE 'patron-title.inc' patron=managedby_patron hide_patron_infos_if_needed=1 %] [% Branches.GetName( managedby_patron.branchcode ) | html %] ([% managedby_patron.category.description | html %])
409 <a id="edit_manager" class="new_window" href="#"><i class="fa fa-search"></i> Select manager</a>
410 [% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %]
411 <a id="restore_previous_manager" href="#"><i class="fa fa-trash"></i> Keep existing manager</a>
413 <input type="hidden" name="managedby" id="managedby" value="[% logged_in_user.borrowernumber | html %]" />
416 <label for="notify">Notify manager:</label>
417 <input type="checkbox" id="notify" name="notify" value="notify" disabled="disabled" title="A TO_PROCESS notice will be generated and send to the manager if a valid email address is defined. This can be checked if a new manager has been selected." />
422 <fieldset class="rows"> <legend>Acquisition information</legend><ol>
423 <li><label for="branchcode">Library:</label>
424 <select name="branchcode" id="branchcode">
425 <option value="">Any</option>
426 [% IF branchfilter %]
427 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
429 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
433 <li><label for="budgetid">Fund:</label>
434 <select name="budgetid" id="budgetid">
435 <option value="">Any</option>[% FOREACH budgetsloo IN budgetsloop %]
436 [% IF ( budgetsloo.selected ) %]<option value="[% budgetsloo.budget_id | html %]" selected="selected">[% budgetsloo.budget_name | html %]</option>[% ELSE %]<option value="[% budgetsloo.budget_id | html %]">[% budgetsloo.budget_name | html %]</option>[% END %][% END %]
438 </li><li><label for="quantity">Copies:</label>
439 <input type="text" size="10" id="quantity" name="quantity" value="[% quantity | html %]" />
442 <label for="currency">Currency:</label>
443 [% FOREACH c IN currencies %]
444 <input type="hidden" value="[% c.rate | html %]" id="currency_rate_[% c.currency | html %]" name="currency_rate_[% c.currency | html %]" />
445 <input type="hidden" id="[% c.currency | html %]" name="[% c.currency | html %]" value="[% c.rate | html %]" />
448 <select name="currency" id="currency">
449 [% FOREACH c IN currencies %]
450 [% IF suggestionid and suggestion.currency == c.currency or not suggestionid and c.active %]
451 <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
452 [% ELSIF not c.archived %]
453 <option value="[% c.currency | html %]">[% c.currency | html %]</option>
458 <li><label for="price">Price:</label>
459 <input type="text" size="20" name="price" id="price" value="[% price | html %]" />
460 </li><li><label for="total">Total: </label>
461 <input type="text" readonly="readonly" id="total" name="total" size="10" value="[% total | html %]"/>
463 </fieldset><input type="hidden" id="returnsuggested" name="returnsuggested" value="[% IF ( returnsuggestedby ) %][% returnsuggestedby | html %][% ELSE %]noone[% END %]"/>
464 <fieldset class="action">
465 <input type="hidden" name="op" value="[% op | html %]" />
466 [% IF ( suggestionid ) %]
467 [% IF ( need_confirm ) %]
468 <input type="hidden" name="save_confirmed" value="1" />
469 <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
471 <input type="submit" value="Save" />
473 <a class="cancel" href="[% IF ( returnsuggestedby ) %]/cgi-bin/koha/members/moremember.pl?borrowernumber=[% returnsuggestedby | uri %]#suggestions[% ELSE %]suggestion.pl[% END %]">Cancel</a>
475 [% IF ( need_confirm ) %]
476 <input type="hidden" name="save_confirmed" value="1" />
477 <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
479 <input type="submit" value="Submit your suggestion" />
481 <a class="cancel" href="suggestion.pl">Cancel</a>
487 [% IF op == 'else' %]
488 <div id="toolbar" class="btn-toolbar">
489 <a class="btn btn-default" id="newsuggestion" href="suggestion.pl?op=add"><i class="fa fa-plus"></i> New purchase suggestion</a>
492 <h1>Suggestions management</h1>
495 [% FOR m IN messages %]
496 <div class="dialog [% m.type | html %]">
498 [% CASE 'already_exists' %]
499 The suggestion has not been added. A suggestion with this title already exists (<a href='/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% m.id | html %]&op=show'>suggestion #[% m.id | html %]</a>)
500 [% CASE 'biblio_exists' %]
501 A similar document already exists: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% m.id | uri %]">[% m.title | html %]</a>. Click on "Confirm your suggestion" to ignore this message.
508 [% UNLESS ( notabs ) %]
509 <div id="suggestiontabs" class="toptabs">
510 <ul class="ui-tabs-nav">
511 [% FOREACH suggestion IN suggestions %]
513 <a href="#tab_[% loop.count | uri %]">
514 [% IF ( suggestion.suggestiontypelabel ) %]
515 [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending
516 [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted
517 [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked
518 [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected
519 [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available
520 [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered
521 [% ELSIF (suggestion.suggestiontypelabel == "Unknown") %]Status unknown
522 [% ELSE %][% suggestion.suggestiontypelabel | html %][% END %]
524 [% IF ( suggestion.suggestiontype ) %]
525 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.suggestiontype ) | html %]
530 ([% suggestion.suggestions_loop.size | html %])</a></li>
536 [% FOREACH suggestion IN suggestions %]
537 <div id="tab_[% loop.count | html %]">
538 <form class="update_suggestions" name="f" method="post" action="/cgi-bin/koha/suggestion/suggestion.pl#tab_[% loop.count | html %]">
540 [% IF ( suggestion.suggestions_loop ) %]
541 <p><a class="checkall" href="#">Check all</a> | <a class="uncheckall" href="#">Uncheck all</a></p>
542 <table id="table_[% loop.count | html %]" class="sorted">
545 <th class="NoSort noExport"> </th>
546 <th class="anti-the">Suggestion</th>
547 <th>Suggested by</th>
548 <th>Suggested on</th>
551 <th>Last modification by</th>
552 <th>Last modification on</th>
556 <th class="NoSort noExport"> </th>
560 [% FOREACH suggestions_loo IN suggestion.suggestions_loop %]
563 <input type="checkbox" name="suggestionid" value="[% suggestions_loo.suggestionid | html %]" />
566 <a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | uri %]&op=show" title="suggestion" >
567 [% suggestions_loo.title | html %][% IF ( suggestions_loo.author ) %], by [% suggestions_loo.author | html %][% END %]</a>
569 [% IF ( suggestions_loo.copyrightdate ) %]© [% suggestions_loo.copyrightdate | html %] [% END %]
570 [% IF ( suggestions_loo.volumedesc ) %]; Volume:<i>[% suggestions_loo.volumedesc | html %]</i> [% END %]
571 [% IF ( suggestions_loo.isbn ) %]; ISBN:<i>[% suggestions_loo.isbn | html %]</i> [% END %][% IF ( suggestions_loo.publishercode ) %]; Published by [% suggestions_loo.publishercode | html %] [% END %][% IF ( suggestions_loo.publicationyear ) %] in <i>[% suggestions_loo.publicationyear | html %]</i> [% END %][% IF ( suggestions_loo.place ) %] in <i>[% suggestions_loo.place | html %]</i> [% END %][% IF ( suggestions_loo.collectiontitle ) %]; [% suggestions_loo.collectiontitle | html %] [% END %][% IF ( suggestions_loo.itemtype ) %]; [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestions_loo.itemtype, 0 ) | html %] [% END %]<br />[% IF ( suggestions_loo.note ) %]<div class="note"><i class="fa fa-comment"></i> [% suggestions_loo.note | html %]</div>[% END %]
574 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestions_loo.suggestedby | uri %]">[% suggestions_loo.surnamesuggestedby | html %][% IF ( suggestions_loo.firstnamesuggestedby ) %], [% suggestions_loo.firstnamesuggestedby | html %][% END %] [% IF (suggestions_loo.cardnumbersuggestedby ) %]([% suggestions_loo.cardnumbersuggestedby | html %])[% END %]</a>
576 <td data-order="[% suggestions_loo.suggesteddate | html %]">
577 [% IF ( suggestions_loo.suggesteddate ) %][% suggestions_loo.suggesteddate | $KohaDates %][% END %]
580 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestions_loo.suggestedby | uri %]">[% suggestions_loo.surnamemanagedby | html %][% IF ( suggestions_loo.firstnamemanagedby ) %], [% suggestions_loo.firstnamemanagedby | html %][% END %]</a>
582 <td data-order="[% suggestions_loo.manageddate | html %]">
583 [% IF ( suggestions_loo.manageddate ) %][% suggestions_loo.manageddate | $KohaDates %][% END %]
586 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestions_loo.lastmodificationby | uri %]">[% suggestions_loo.surnamelastmodificationby | html %][% IF ( suggestions_loo.firstnamelastmodificationby ) %], [% suggestions_loo.firstnamelastmodificationby | html %][% END %]</a>
588 <td data-order="[% suggestions_loo.lastmodificationdate | html %]">
589 [% IF ( suggestions_loo.lastmodificationdate ) %] - [% suggestions_loo.lastmodificationdate | $KohaDates %][% END %]
592 [% Branches.GetName( suggestions_loo.branchcode ) | html %]
595 [% suggestions_loo.budget_name | html %]
598 [% IF ( suggestions_loo.ASKED ) %]
600 [% ELSIF ( suggestions_loo.ACCEPTED ) %]
602 [% ELSIF ( suggestions_loo.ORDERED ) %]
604 [% ELSIF ( suggestions_loo.REJECTED ) %]
606 [% ELSIF ( suggestions_loo.CHECKED ) %]
608 [% ELSIF ( suggestions_loo.AVAILABLE ) %]
610 [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %]
611 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) | html %]
616 [% IF ( suggestions_loo.reason ) %]
617 <br />([% suggestions_loo.reason | html %])
621 <a class="btn btn-xs btn-default" href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | html %]&op=edit"><i class="fa fa-pencil"></i> Edit</a>
622 <a class="btn btn-default btn-xs deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a>
629 <h2 style="padding-left:1em;">Change selected suggestions</h3>
630 <div class="col-sm-4">
632 <div id="select-reason">
633 <label for="STATUS">Mark selected as: </label>
634 <select name="STATUS" id="STATUS">
635 <option value=""> -- Choose a status --</option>
637 [% IF (statusselected_ASKED ) %]
638 <option value="ASKED" selected="selected">Pending</option>
640 <option value="ASKED">Pending</option>
643 [% IF (statusselected_ACCEPTED ) %]
644 <option value="ACCEPTED" selected="selected">Accepted</option>
646 <option value="ACCEPTED">Accepted</option>
649 [% IF (statusselected_CHECKED ) %]
650 <option value="CHECKED" selected="selected">Checked</option>
652 <option value="CHECKED">Checked</option>
655 [% IF ( statusselected_REJECTED ) %]
656 <option value="REJECTED" selected="selected">Rejected</option>
658 <option value="REJECTED">Rejected</option>
661 [% FOREACH s IN SuggestionStatuses %]
662 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
666 <label for="reason">with this reason:</label>
667 <select name="reason">
668 <option value=""> -- Choose a reason -- </option>
669 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
670 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
672 <option value="other">Others...</option>
675 <span class="other_reason">
676 <input type="text" size="31" name="other_reason" placeholder="please note your reason here..." />
677 <a href="#" class="cancel_note">Cancel</a>
681 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
682 <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="update_status"/>Submit</button></fieldset>
685 <div class="col-sm-4">
687 <label for="itemtype">Update item types with: </label>
688 [% PROCESS 'av-build-dropbox.inc' name="suggestion_itemtype", category="SUGGEST_FORMAT", size = 20 %]
689 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
690 <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="update_itemtype"/>Submit</button></fieldset>
694 <div class="col-sm-2">
696 <label for="set_manager_[% loop.count | html %]">Update manager</label><br/>
697 <a id="set_manager_[% loop.count | html %]" data-tab="[% loop.count | html %]" class="set_manager" href="#"><i class="fa fa-search"></i> Select manager</a>
698 <span id="managedby_name[% loop.count | html %]"></span>
699 <input type="hidden" name="suggestion_managedby" id="managedby[% loop.count | html %]" value="[% logged_in_user.borrowernumber | html %]" />
700 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
701 <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="update_manager"/>Submit</button></fieldset>
705 <div class="col-sm-2">
707 <label for="delete_[% loop.count | html %]">Delete selected</label>
708 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
709 <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="delete"/>Delete</button></fieldset>
723 [% UNLESS op == 'save' %]
724 [% UNLESS ( op == 'show' ) %]
727 </div> <!-- /.col-sm-10.col-sm-push-2 -->
729 <div class="col-sm-2 col-sm-pull-10">
732 <form name="suggestionfilter" action="suggestion.pl" method="get">
733 <fieldset class="brief"><ol style="display:block;"><li><label for="displayby">Organize by: </label>
734 <select name="displayby" id="displayby" style="width:auto;">
735 [% IF ( displayby == "STATUS" ) %]
736 <option value="STATUS" selected="selected">Status</option>
738 <option value="STATUS">Status</option>
740 [% IF ( displayby == "branchcode" ) %]
741 <option value="branchcode" selected="selected">Library</option>
743 <option value="branchcode">Library</option>
745 [% IF ( displayby == "itemtype" ) %]
746 <option value="itemtype" selected="selected">Item type</option>
748 <option value="itemtype">Item type</option>
750 [% IF ( displayby == "managedby" ) %]
751 <option value="managedby" selected="selected">Managed by</option>
753 <option value="managedby">Managed by</option>
755 [% IF ( displayby == "acceptedby" ) %]
756 <option value="acceptedby" selected="selected">Accepted by</option>
758 <option value="acceptedby">Accepted by</option>
760 </select> <input type="submit" value="Go" /></li></ol></fieldset>
761 <h4>Filter by: <a style="font-size:80%;font-weight:normal;" href="/cgi-bin/koha/suggestion/suggestion.pl">[clear]</a></h4>
762 <div style="display:block;" id="limits">
764 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Bibliographic information</a></h4>
765 <ol> <li><label for="title"> Title:</label><input type="text" id="title" name="title" value="[% title | html %]" /></li>
766 <li><label for="author"> Author:</label><input type="text" id="author" name="author" value="[% author | html %]" /></li>
767 <li><label for="isbn"> ISBN:</label><input type="text" id="isbn" name="isbn" value="[% isbn | html %]" /></li>
768 <li><label for="publishercode"> Publisher:</label><input type="text" id="publishercode" name="publishercode" value="[% publishercode | html %]" /></li>
769 <li><label for="copyrightdate_filter"> Copyright date:</label><input type="text" id="copyrightdate_filter" name="copyrightdate" value="[% copyrightdate | html %]" /></li>
770 <li><label for="collectiontitle"> Collection title:</label><input type="text" id="collectiontitle" name="collectiontitle" value="[% collectiontitle | html %]" /></li><li><input type="submit" value="Go" /></li></ol>
772 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Suggestion information</a></h4>
775 <label for="STATUS"> Status:</label>
777 <select name="STATUS" id="STATUS">
778 <option value="">Any</option>
780 [% IF (statusselected_ASKED ) %]
781 <option value="ASKED" selected="selected">Pending</option>
783 <option value="ASKED">Pending</option>
786 [% IF (statusselected_ACCEPTED ) %]
787 <option value="ACCEPTED" selected="selected">Accepted</option>
789 <option value="ACCEPTED">Accepted</option>
792 [% IF (statusselected_CHECKED ) %]
793 <option value="CHECKED" selected="selected">Checked</option>
795 <option value="CHECKED">Checked</option>
798 [% IF ( statusselected_REJECTED ) %]
799 <option value="REJECTED" selected="selected">Rejected</option>
801 <option value="REJECTED">Rejected</option>
804 [% FOREACH s IN SuggestionStatuses %]
805 [% IF s.authorised_value == selected_status %]
806 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
808 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
814 <li><label for="suggestedby"> Suggested by:</label><select id="suggestedby" name="suggestedby"><option value="">Any</option>
815 [% FOREACH suggestedby_loo IN suggestedby_loop %][% IF ( suggestedby_loo.selected ) %]<option value="[% suggestedby_loo.code | html %]" selected="selected">[% suggestedby_loo.desc | html %]</option>[% ELSE %]<option value="[% suggestedby_loo.code | html %]">[% suggestedby_loo.desc | html %]</option>[% END %][% END %]
818 <label for="suggesteddate_from">Suggested date from:</label>
819 <input type="text" id="suggesteddate_from" size="10" name="suggesteddate_from" value="[% suggesteddate_from | html %]" />
822 <label for="suggesteddate_to">To:</label>
823 <input type="text" id="suggesteddate_to" size="10" name="suggesteddate_to" value="[% suggesteddate_to | html %]" />
825 <li><label for="managedby"> Managed by:</label><select id="managedby" name="managedby"><option value="">Any</option>
826 [% FOREACH managedby_loo IN managedby_loop %][% IF ( managedby_loo.selected ) %]<option value="[% managedby_loo.code | html %]" selected="selected">[% managedby_loo.desc | html %]</option>[% ELSE %]<option value="[% managedby_loo.code | html %]">[% managedby_loo.desc | html %]</option>[% END %][% END %]
829 <label for="manageddate_from">Management date from:</label>
830 <input type="text" id="manageddate_from" size="10" name="manageddate_from" value="[% manageddate_from | html %]" />
833 <label for="manageddate_to">To:</label>
834 <input type="text" id="manageddate_to" size="10" name="manageddate_to" value="[% manageddate_to | html %]" />
836 <li><label for="acceptedby"> Accepted by:</label><select id="acceptedby" name="acceptedby"><option value="">Any</option>
837 [% FOREACH acceptedby_loo IN acceptedby_loop %][% IF ( acceptedby_loo.selected ) %] <option value="[% acceptedby_loo.code | html %]" selected="selected">[% acceptedby_loo.desc | html %]</option>[% ELSE %]<option value="[% acceptedby_loo.code | html %]">[% acceptedby_loo.desc | html %]</option>[% END %][% END %]
840 <label for="accepteddate_from">Accepted date from:</label>
841 <input type="text" id="accepteddate_from" size="10" name="accepteddate_from" value="[% accepteddate_from | html %]" />
844 <label for="accepteddate_to">To:</label>
845 <input type="text" id="accepteddate_to" size="10" name="accepteddate_to" value="[% accepteddate_to | html %]" />
847 <li><input type="submit" value="Go" /></li></ol>
850 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Acquisition information</a></h4>
851 <ol><li><label for="budgetid"> Book fund:</label>
852 <select name="budgetid" id="budgetid">
853 <option value="__ANY__">Any</option>
854 [% IF budgetid == '__NONE__' %]
855 <option value="__NONE__" selected="selected">None</option>
857 <option value="__NONE__">None</option>
859 [% FOREACH budgetsloo IN budgetsloop %]
860 [% IF ( budgetsloo.selected ) %]<option value="[% budgetsloo.budget_id | html %]" selected="selected">[% budgetsloo.budget_name | html %]</option>[% ELSE %]<option value="[% budgetsloo.budget_id | html %]">[% budgetsloo.budget_name | html %]</option>[% END %]
863 <li><label for="branchcode">Library:</label>
864 <select name="branchcode" id="branchcode">
865 <option value="__ANY__">Any</option>
866 [% IF branchfilter %]
867 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
869 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
871 </select></li><li><input type="submit" value="Go" /></li></ol>
874 [% INCLUDE 'acquisitions-menu.inc' %]
877 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
878 </div> <!-- /.row -->
885 [% MACRO jsinclude BLOCK %]
886 [% INCLUDE 'calendar.inc' %]
890 function editManagerPopup(selected_tab) {
892 window.open("/cgi-bin/koha/suggestion/add_user_search.pl?selection_type=select",
894 'width=740,height=450,location=yes,toolbar=no,'
895 + 'scrollbars=yes,resize=yes'
898 function select_user(borrowernumber, borrower) {
899 var managedby_name = $("#managedby_name"+tab);
900 var managedby = $("#managedby"+tab);
901 managedby_name.empty();
903 var borrowername = borrower.firstname + ' ' + borrower.surname;
904 if (borrowernumber) {
905 var managerlink = '<a href="/cgi-bin/koha/members/moremember.pl'
906 + '?borrowernumber=' + borrowernumber + '">'
907 + borrowername + '</a>';
908 managedby_name.html(managerlink);
909 managedby.val(borrowernumber);
912 [% IF op == "save" %]
913 var notify = $('#notify');
914 if ( notify.length ) {
915 if ( borrowernumber == [% logged_in_user.borrowernumber | html %] || borrowernumber == [% managedby_patron.borrowernumber | html %] ) {
916 $(notify).prop('checked', false).prop('disabled', true);
918 $(notify).prop('disabled', false);
924 $(document).ready(function(){
925 $("#edit_manager").on("click",function(e){
927 editManagerPopup('');
929 $(".set_manager").on("click",function(e){
931 var selected_tab = $(this).data('tab');
932 editManagerPopup(selected_tab);
938 [% IF ( op == 'show' || op == 'else' ) %]
940 $(document).ready(function(){
941 $(".deletesuggestion").on("click",function(){
942 return confirm(_("Are you sure you want to delete this suggestion?"));
947 [% IF op == 'else' %]
948 [% INCLUDE 'datatables.inc' %]
949 [% INCLUDE 'columns_settings.inc' %]
950 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
953 $(document).ready(function() {
954 $('#suggestiontabs').tabs();
956 columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'suggestions', 'suggestions', 'json' ) | $raw %]
957 [% FOREACH suggestion IN suggestions %]
958 [% IF ( suggestion.suggestions_loop ) %]
959 KohaTable("table_[% loop.count| html %]", {
960 "sorting": [[ 1, "asc" ]],
963 { "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] },
964 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
966 }, columns_settings );
970 $(".checkall").click(function(e){
972 $(this).parents('form').checkCheckboxes();
975 $(".uncheckall").click(function(e){
977 $(this).parents('form').unCheckCheckboxes();
980 $(".other_reason").hide();
981 $("select[name='reason']").change(function(){
982 if($(this).val() == "other"){
984 $(this).siblings(".other_reason").show();
988 $("a.cancel_note").click(function(e) {
989 $(this).parent().siblings("select").show().find("option[value='']").attr("selected","selected");
990 $(this).siblings("input[name='other_reason']").hide();
993 $("h4.local_collapse a").click(function(){
994 $(this).parent().parent().find("ol").toggle();
997 // http://jqueryui.com/demos/datepicker/#date-range
998 var dates = $( "#suggesteddate_from, #suggesteddate_to" ).datepicker({
1001 onSelect: function( selectedDate ) {
1002 var option = this.id == "suggesteddate_from" ? "minDate" : "maxDate",
1003 instance = $( this ).data( "datepicker" );
1004 date = $.datepicker.parseDate(
1005 instance.settings.dateFormat ||
1006 $.datepicker._defaults.dateFormat,
1007 selectedDate, instance.settings );
1008 dates.not( this ).datepicker( "option", option, date );
1011 var datesMD = $( "#manageddate_from, #manageddate_to" ).datepicker({
1014 onSelect: function( selectedDate ) {
1015 var option = this.id == "manageddate_from" ? "minDate" : "maxDate",
1016 instance = $( this ).data( "datepicker" );
1017 date = $.datepicker.parseDate(
1018 instance.settings.dateFormat ||
1019 $.datepicker._defaults.dateFormat,
1020 selectedDate, instance.settings );
1021 datesMD.not( this ).datepicker( "option", option, date );
1024 var datesAD = $( "#accepteddate_from, #accepteddate_to" ).datepicker({
1027 onSelect: function( selectedDate ) {
1028 var option = this.id == "accepteddate_from" ? "minDate" : "maxDate",
1029 instance = $( this ).data( "datepicker" );
1030 date = $.datepicker.parseDate(
1031 instance.settings.dateFormat ||
1032 $.datepicker._defaults.dateFormat,
1033 selectedDate, instance.settings );
1034 datesAD.not( this ).datepicker( "option", option, date );
1038 $("button[type='submit']").on("click", function(e) {
1039 var submit_button = this;
1040 var form = $(submit_button).parents("form");
1041 var action = $(submit_button).val();
1042 var selected_suggestions = $(form).find("input[name='suggestionid']:checked");
1043 if ( selected_suggestions.length == 0 ) {
1044 alert(_("Please select at least one suggestion"));
1048 if ( action == "delete" ) {
1049 if ( selected_suggestions.length == 1 ) {
1050 if ( ! confirm(_("Are you sure you want to delete this suggestion?")) ) {
1054 } else if ( selected_suggestions.length > 1 ) {
1055 if ( ! confirm(_("Are you sure you want to delete these suggestions?")) ) {
1060 } else if ( action == "update_manager" ) {
1061 var managedby = $(submit_button).siblings("suggestion_managedby");
1062 if ( managedby.val() == "" ) {
1063 alert(_("Please select a manager to assign to the selected suggestions"));
1069 $('<input />').attr('type', 'hidden')
1071 .attr('value', action)
1078 [% IF op == 'save' %]
1081 $(document).ready(function(){
1083 $("#quantity,#price,#currency").on("change",function(){
1087 [% IF other_reason %]
1088 $(".select-reason").hide();
1089 $(".select-reason").find("option[value='other']").attr("selected","selected");
1090 $("#other_reason").show();
1092 $("#other_reason").hide();
1094 $(".select-reason").change(function(){
1095 if($(this).val() == "other"){
1097 $("#other_reason").show();
1100 $("a[href*=back]").click(function(){
1101 $(".select-reason").show().find("option[value='']").attr("selected","selected");
1102 $("#other_reason").hide();
1105 $("#restore_previous_manager").on("click",function(e){
1108 $("#managedby_name").empty();
1109 $("#managedby").val('');
1110 var borrowername = "[% managedby_patron.firstname | html %] [% managedby_patron.surname | html %]";
1111 var managerlink = '<a href="/cgi-bin/koha/members/moremember.pl'
1112 + '?borrowernumber=[% managedby_patron.borrowernumber | html %]">'
1113 + borrowername + '</a>';
1114 $('#managedby_name').html(managerlink);
1115 $('#managedby').val([% managedby_patron.borrowernumber | html %]);
1116 $('#notify').prop('checked', false).prop('disabled', true);
1122 [% Asset.js("js/acq.js") | $raw %]
1123 [% Asset.js("js/acquisitions-menu.js") | $raw %]
1126 [% INCLUDE 'intranet-bottom.inc' %]