1 [% PROCESS 'i18n.inc' %]
5 [% USE AuthorisedValues %]
8 [% USE TablesSettings %]
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' %]
30 text-decoration: none;
53 <body id="acq_suggestion" class="acq">
54 [% INCLUDE 'header.inc' %]
55 [% INCLUDE 'cat-search.inc' %]
57 <div id="breadcrumbs">
58 <a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> ›
60 [% IF ( suggestionid ) %]
61 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Edit suggestion #[% suggestionid | html %]
63 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Add suggestion
65 [% ELSIF ( op == 'show' ) %]
66 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Show suggestion #[% suggestionid | html %]
68 Suggestions management
70 </div> <!-- /.breadcrumbs -->
72 [% IF ( op == 'show' ) %]
73 <div class="main container-fluid">
75 <div class="col-md-8 col-md-offset-2">
77 <div id="toolbar" class="btn-toolbar">
78 <a class="btn btn-default" id="editsuggestion" href="suggestion.pl?op=edit&suggestionid=[% suggestionid | html %]"><i class="fa fa-pencil"></i> Edit</a>
79 <a class="btn btn-default deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a>
82 <fieldset class="rows">
83 <legend>Bibliographic information</legend>
87 <span class="label">Title:</span>
88 [% IF suggestion.biblionumber %]
89 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% suggestion.biblionumber | uri %]">[% suggestion.title | html %]</a>
97 <span class="label">Author:</span>
101 [% IF ( copyrightdate ) %]
103 <span class="label">Copyright date:</span>
104 [% copyrightdate | html %]
109 <span class="label">ISBN or ISSN or other standard number:</span>
113 [% IF ( publishercode ) %]
115 <span class="label">Publisher:</span>
116 [% publishercode | html %]
121 <span class="label">Publication place:</span>
125 [% IF ( collectiontitle ) %]
127 <span class="label">Collection title:</span>
128 [% collectiontitle | html %]
131 [% IF ( itemtype ) %]
133 <span class="label">Document type:</span>
134 [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', itemtype, 0 ) | html %]
137 [% IF ( patron_reason_loop ) %]
139 <span class="label">Reason for suggestion: </span>
140 [% FOREACH patron_reason_loo IN patron_reason_loop %]
141 [% IF patron_reason_loo.authorised_value == patronreason %]
142 [% patron_reason_loo.lib | html %]
149 <span class="label">Notes:</span>
156 <fieldset class="rows">
157 <legend>Suggestion management</legend>
160 <span class="label">Status:</span>
161 [% SET status_found = 0 %]
162 [% IF ( STATUS == 'ASKED' ) %]
164 [% SET status_found = 1 %]
165 [% ELSIF ( STATUS == 'ACCEPTED' ) %]
167 [% SET status_found = 1 %]
168 [% ELSIF ( STATUS == 'CHECKED' ) %]
170 [% SET status_found = 1 %]
171 [% ELSIF ( STATUS == 'REJECTED' ) %]
173 [% SET status_found = 1 %]
174 [% ELSIF ( STATUS == 'ORDERED' ) %]
176 [% SET status_found = 1 %]
177 [% ELSIF ( STATUS == 'AVAILABLE' ) %]
179 [% SET status_found = 1 %]
181 [% FOREACH s IN SuggestionStatuses %]
182 [% IF STATUS == s.authorised_value %]
184 [% SET status_found = 1 %]
190 <span class="label">Reason:</span>
192 [% AuthorisedValues.GetByCode( 'SUGGEST', reason, 0 ) | html %]
207 <th>[% tp('purchase suggestion created by', 'Created by:') | html %]</th>
208 <td>[% suggesteddate | $KohaDates %]</td>
210 [% IF ( suggestedby_patron.borrowernumber ) %]
211 <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>
212 [% Branches.GetName( suggestedby_patron.branchcode ) | html %] ([% suggestedby_patron.category.description | html %])
218 <td>[% manageddate | $KohaDates %]</td>
220 [% IF ( managedby_patron.borrowernumber ) %]
221 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_patron.borrowernumber | uri %]">[% managedby_patron.surname | html %], [% managedby_patron.firstname | html %] ([% managedby_patron.cardnumber | html %])</a>
222 [% Branches.GetName( managedby_patron.branchcode ) | html %] ([% managedby_patron.category.description | html %])
227 <th>Accepted on:</th>
228 <td>[% accepteddate | $KohaDates %]</td>
230 [% IF ( acceptedby_patron.borrowernumber ) %]
231 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_patron.borrowernumber | uri %]">[% acceptedby_patron.surname | html %], [% acceptedby_patron.firstname | html %] ([% acceptedby_patron.cardnumber | html %])</a>
232 [% Branches.GetName( acceptedby_patron.branchcode ) | html %] ([% acceptedby_patron.category.description | html %])
237 <th>Last modification on:</th>
238 <td>[% lastmodificationdate | $KohaDates %]</td>
240 [% IF ( lastmodificationby_patron.borrowernumber ) %]
241 <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>
242 [% Branches.GetName( lastmodificationby_patron.branchcode ) | html %] ([% lastmodificationby_patron.category.description | html %])
250 <fieldset class="rows">
251 <legend>Acquisition information</legend>
254 <span class="label">Library:</span>
255 [% Branches.GetName( branchcode ) | html %]
258 <span class="label">Fund:</span>
259 [% budgetname | html %]
262 <span class="label">Copies:</span>
263 [% quantity | html %]
266 <span class="label">Currency:</span>
267 [% currency | html %]
270 <span class="label">Price:</span>
274 <span class="label">Total</span>
280 <fieldset class="action">
281 <a href="suggestion.pl"><< Back to suggestions</a>
284 </div> <!-- /.col-md-8 col-md-offset-2 -->
285 </div> <!-- /.row -->
286 [% ELSE # IF op == "show" %]
288 [% IF op == 'save' %]
289 <div class="main container-fluid">
291 <div class="col-md-8 col-md-offset-2">
293 <div class="main container-fluid">
295 <div class="col-sm-10 col-sm-push-2">
298 [% IF op == 'save' %]
299 [% FOR m IN messages %]
300 <div class="dialog [% m.type | html %]">
302 [% CASE 'biblio_exists' %]
303 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.
304 [% CASE 'manager_not_enough_permissions' %]
305 The manager you selected does not have sufficient permissions.
309 </div> <!-- /.dialog -->
312 <form id="add_edit" action="suggestion.pl" method="post" class="validated">
313 <input type="hidden" name="redirect" id="redirect" value="[% redirect | html %]" />
314 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber | html %]" />
315 [% IF ( suggestionid ) %]
316 <h1>Edit purchase suggestion #[% suggestionid | html %]</h1>
317 <input type="hidden" name="suggestionid" value="[% suggestionid | html %]"/>
319 <h1>Enter a new purchase suggestion</h1>
322 <fieldset class="rows">
323 <legend>Bibliographic information</legend>
326 <label for="title" class="required">Title:</label>
327 <input type="text" id="title" name="title" size="80" maxlength="255" value="[% title | html %]" required="required" class="required" />
328 <span class="required">Required</span>
331 <label for="author">Author:</label>
332 <input type="text" id="author" name="author" size="50" maxlength="80" value="[% author | html %]"/>
335 <label for="copyrightdate">Copyright date:</label>
336 <input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" value="[% copyrightdate | html %]" />
339 <label for="isbn">ISBN or ISSN or other standard number:</label>
340 <input type="text" id="isbn" name="isbn" size="50" maxlength="80" value="[% isbn | html %]"/>
343 <label for="publishercode">Publisher:</label>
344 <input type="text" id="publishercode" name="publishercode" size="50" maxlength="80" value="[% publishercode | html %]"/>
347 <label for="place">Publication place:</label>
348 <input type="text" id="place" name="place" size="50" maxlength="80" value="[% place | html %]"/>
351 <label for="collectiontitle">Collection title:</label>
352 <input type="text" id="collectiontitle" name="collectiontitle" size="50" maxlength="80" value="[% collectiontitle | html %]"/>
355 <label for="itemtype">Document type:</label>
356 [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20, default=itemtype %]
358 [% IF patron_reason_loop %]
360 <label for="patronreason">Reason for suggestion: </label>
361 <select name="patronreason" id="patronreason">
362 <option value=""> -- Choose -- </option>
363 [% FOREACH patron_reason_loo IN patron_reason_loop %]
364 [% IF patron_reason_loo.authorised_value == patronreason %]
365 <option value="[% patron_reason_loo.authorised_value | html %]" selected="selected">[% patron_reason_loo.lib | html %]</option>
367 <option value="[% patron_reason_loo.authorised_value | html %]">[% patron_reason_loo.lib | html %]</option>
372 [% END # /IF patron_reason_loop %]
374 <label for="note">Notes:</label>
375 <textarea name="note" id="note" rows="5" cols="40">[% note | html %]</textarea>
380 <fieldset class="rows">
381 <legend>Suggestion management</legend>
383 [% IF ( suggestionid ) %]
385 <label for="STATUS">Status:</label>
386 <select id="STATUS" name="STATUS">
387 <option value="">No status</option>
389 [% IF (statusselected_ASKED ) %]
390 <option value="ASKED" selected="selected">Pending</option>
392 <option value="ASKED">Pending</option>
395 [% IF (statusselected_ACCEPTED ) %]
396 <option value="ACCEPTED" selected="selected">Accepted</option>
398 <option value="ACCEPTED">Accepted</option>
401 [% IF (statusselected_CHECKED ) %]
402 <option value="CHECKED" selected="selected">Checked</option>
404 <option value="CHECKED">Checked</option>
407 [% IF ( statusselected_REJECTED ) %]
408 <option value="REJECTED" selected="selected">Rejected</option>
410 <option value="REJECTED">Rejected</option>
413 [% IF ( statusselected_ORDERED ) %]
414 <option value="ORDERED" selected="selected">Ordered</option>
416 <option value="ORDERED">Ordered</option>
419 [% FOREACH s IN SuggestionStatuses %]
420 [% IF s.authorised_value == suggestion.STATUS %]
421 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
423 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
429 <label for="reason">Reason</label>
430 <select class="select-reason" id="reason" name="reason">
431 <option value=""> -- Choose a reason -- </option>
432 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
433 [% IF (reasonsloo.lib == suggestion.reason) %]
434 <option value="[% reasonsloo.lib | html %]" selected="selected">[% reasonsloo.lib | html %]</option>
436 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
439 <option value="other">Others...</option>
442 <span id="other_reason" name="other_reason">
443 [% IF other_reason %]
444 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." value="[% suggestion.reason | html %]"/>
446 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." />
448 <a href="#back">Cancel</a>
465 <label for="suggesteddate">[% tp('purchase suggestion created by', 'Created by:') | html %]</label>
468 <input type="text" id="suggesteddate" name="suggesteddate" class="datepicker" size="10" maxlength="10" value="[% suggesteddate | $KohaDates %]"/>[% INCLUDE 'date-format.inc' %]
470 <td id="tdsuggestedby">
471 <input type="hidden" id="suggestedby" name="suggestedby" value="[% suggestedby | html %]"/>
472 [% IF ( suggestedby_patron.borrowernumber ) %]
473 <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 %])
477 <a href="#" id="edit_suggester" class="btn btn-default">Set to patron</a>
482 <label for="accepteddate">Accepted on:</label>
485 <input type="text" id="accepteddate" name="accepteddate" class="datepicker" size="10" maxlength="10" value="[% accepteddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]
488 <input type="hidden" id="acceptedby" name="acceptedby" value="[% acceptedby | html %]"/>
489 [% IF ( acceptedby_patron.borrowernumber ) %]
490 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_patron.borrowernumber | uri %]">[% acceptedby_patron.surname | html %], [% acceptedby_patron.firstname | html %] ([% acceptedby_patron.cardnumber | html %])</a>
491 [% Branches.GetName( acceptedby_patron.branchcode ) | html %] ([% acceptedby_patron.category.description | html %])
498 <label for="lastmodificationdate">Last modification on:</label>
501 [% lastmodificationdate | $KohaDates %]
504 [% IF lastmodificationby_patron %]
505 [% INCLUDE 'patron-title.inc' patron=lastmodificationby_patron hide_patron_infos_if_needed=1 %] [% Branches.GetName( lastmodificationby_patron.branchcode ) | html %] ([% lastmodificationby_patron.category.description | html %])
514 <label for="managedon">Managed on:</label>
515 <input type="text" id="managedon" name="manageddate" class="datepicker" size="10" maxlength="10" value="[% manageddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]
518 <label for="managedby_name">by:</label>
520 <span id="managedby_name" name="managedby_name">
521 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% logged_in_user.borrowernumber | uri %]">You</a>
523 [% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %]
524 | 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 %])
527 <a id="edit_manager" class="new_window" href="#"><i class="fa fa-search"></i> Select manager</a>
528 [% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %]
529 <a id="restore_previous_manager" href="#"><i class="fa fa-trash"></i> Keep existing manager</a>
531 <input type="hidden" name="managedby" id="managedby" value="[% logged_in_user.borrowernumber | html %]" />
534 <label for="notify">Notify manager:</label>
535 <input type="checkbox" id="notify" name="notify" value="notify" disabled="disabled" title="A NOTIFY_MANAGER 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." />
541 <fieldset class="rows">
542 <legend>Acquisition information</legend>
545 <label for="branchcode">Library:</label>
546 <select name="branchcode" id="branchcode">
547 <option value="">Any</option>
548 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter || branchcode ) %]
552 <label for="budgetid">Fund:</label>
553 <select name="budgetid" id="budgetid">
554 <option value="">Any</option>
555 [% FOREACH budget IN sugg_budgets %]
556 [% IF ( budget.selected ) %]
557 <option value="[% budget.b_id | html %]" selected="selected">[% budget.b_txt | html %] [% IF ( !budget.b_active ) %](inactive)[% END %]</option>
558 [% ELSIF ( budget.b_active ) %]
559 <option value="[% budget.b_id | html %]">[% budget.b_txt | html %]</option>
561 <option value="[% budget.b_id | html %]" class="b_inactive">[% budget.b_txt | html %] (inactive)</option>
565 <label for="showallfunds" style="float:none;width:auto;"> Show inactive:</label>
566 <input type="checkbox" id="showallfunds" />
569 <label for="quantity">Copies:</label>
570 <input type="text" size="10" id="quantity" name="quantity" value="[% quantity | html %]" />
573 <label for="currency">Currency:</label>
574 [% FOREACH c IN currencies %]
575 <input type="hidden" value="[% c.rate | html %]" id="currency_rate_[% c.currency | html %]" name="currency_rate_[% c.currency | html %]" />
576 <input type="hidden" id="[% c.currency | html %]" name="[% c.currency | html %]" value="[% c.rate | html %]" />
578 <select name="currency" id="currency">
579 [% FOREACH c IN currencies %]
580 [% IF suggestionid and suggestion.currency == c.currency or not suggestionid and c.active %]
581 <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
582 [% ELSIF not c.archived %]
583 <option value="[% c.currency | html %]">[% c.currency | html %]</option>
589 <label for="price">Price:</label>
590 <input type="text" size="20" name="price" id="price" value="[% price | html %]" />
593 <label for="total">Total: </label>
594 <input type="text" readonly="readonly" id="total" name="total" size="10" value="[% total | html %]"/>
597 </fieldset> <!-- /.rows -->
599 <input type="hidden" id="returnsuggested" name="returnsuggested" value="[% IF ( returnsuggestedby ) %][% returnsuggestedby | html %][% ELSE %]noone[% END %]"/>
601 <fieldset class="action">
602 <input type="hidden" name="op" value="[% op | html %]" />
603 [% IF ( suggestionid ) %]
604 [% IF ( need_confirm ) %]
605 <input type="hidden" name="save_confirmed" value="1" />
606 <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
608 <input type="submit" value="Save" />
610 <a class="cancel" href="[% IF ( returnsuggestedby ) %]/cgi-bin/koha/members/moremember.pl?borrowernumber=[% returnsuggestedby | uri %]#suggestions[% ELSE %]suggestion.pl[% END %]">Cancel</a>
612 [% IF ( need_confirm ) %]
613 <input type="hidden" name="save_confirmed" value="1" />
614 <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
616 <input type="submit" value="Submit your suggestion" />
618 <a class="cancel" href="suggestion.pl">Cancel</a>
620 </fieldset> <!-- /.action -->
621 </form> <!-- /#add_edit -->
622 [% END # /IF op == 'save' %]
624 [% IF op == 'else' %]
625 <div id="toolbar" class="btn-toolbar">
626 <a class="btn btn-default" id="newsuggestion" href="suggestion.pl?op=add"><i class="fa fa-plus"></i> New purchase suggestion</a>
629 <h1>Suggestions management</h1>
631 [% IF ( displayby != "branchcode" ) %]
632 <label for="branchcode">Viewing suggestions for library:</label>
633 <select name="branchcode" id="branchcode">
634 <option value="__ANY__">Any</option>
635 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter || branchcode ) %]
639 [% FOR m IN messages %]
640 <div class="dialog [% m.type | html %]">
642 [% CASE 'already_exists' %]
643 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>)
644 [% CASE 'biblio_exists' %]
645 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.
649 </div> <!-- /.dialog -->
652 [% UNLESS ( notabs ) %]
653 <div id="suggestiontabs" class="toptabs">
654 <ul class="ui-tabs-nav">
655 [% FOREACH suggestion IN suggestions %]
657 <a href="#[% suggestion.suggestiontype | uri %]">
658 [% IF ( suggestion.suggestiontypelabel ) %]
659 [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending
660 [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted
661 [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked
662 [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected
663 [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available
664 [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered
665 [% ELSIF (suggestion.suggestiontypelabel == "Unknown") %]Status unknown
666 [% ELSIF (suggestion.suggestiontypelabel == "__ANY__") %]Any
667 [% ELSE %][% suggestion.suggestiontypelabel | html %][% END %]
669 [% IF ( suggestion.suggestiontype ) %]
670 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.suggestiontype ) | html %]
675 ([% suggestion.suggestions_loop.size | html %])</a></li>
677 [% END # /FOREACH suggestion %]
678 </ul> <!-- /.ui-tabs-nav -->
679 [% END # /UNLESS notabs %]
681 [% FOREACH suggestion IN suggestions %]
682 <div id="[% suggestion.suggestiontype | html %]">
683 <form class="update_suggestions" name="f" method="post" action="/cgi-bin/koha/suggestion/suggestion.pl#[% suggestion.suggestiontype| uri %]">
685 [% IF ( suggestion.suggestions_loop ) %]
687 <a class="checkall" href="#">Check all</a> | <a class="uncheckall" href="#">Uncheck all</a>
690 <table id="table_[% loop.count | html %]" class="sorted">
693 <th class="NoSort noExport"> </th>
694 <th class="anti-the">Suggestion</th>
695 <th>Suggested by</th>
696 <th>Suggested on</th>
699 <th>Last modification by</th>
700 <th>Last modification on</th>
704 <th class="NoSort noExport"> </th>
708 [% FOREACH suggestions_loo IN suggestion.suggestions_loop %]
711 <input type="checkbox" name="suggestionid" value="[% suggestions_loo.suggestionid | html %]" />
714 <a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | uri %]&op=show" title="suggestion" >
715 [% suggestions_loo.title | html %][% IF ( suggestions_loo.author ) %], by [% suggestions_loo.author | html %][% END %]
718 [% IF ( suggestions_loo.copyrightdate ) %]
719 © <span class="suggestion_copyrightdate">[% suggestions_loo.copyrightdate | html %]</span>
721 [% IF ( suggestions_loo.volumedesc ) %]
722 ; <span class="suggestion_volume">Volume:<em>[% suggestions_loo.volumedesc | html %]</em></span>
724 [% IF ( suggestions_loo.isbn ) %]
725 ; <span class="suggestion_isbn">ISBN: <em>[% suggestions_loo.isbn | html %]</em></span>
727 [% IF ( suggestions_loo.publishercode ) %]
728 ; <span class="suggestion_publishercode">Published by [% suggestions_loo.publishercode | html %]</span>
730 [% IF ( suggestions_loo.publicationyear ) %]
731 in <span class="suggestion_publicationyear"><em>[% suggestions_loo.publicationyear | html %]</em></span>
733 [% IF ( suggestions_loo.place ) %]
734 in <span class="suggestion_place"><em>[% suggestions_loo.place | html %]</em></span>
736 [% IF ( suggestions_loo.collectiontitle ) %]
737 ; <span class="suggestion_collectiontitle">[% suggestions_loo.collectiontitle | html %]</span>
739 [% IF ( suggestions_loo.itemtype ) %]
740 ; <span class="suggestion_itype">[% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestions_loo.itemtype, 0 ) | html %]</span>
743 [% IF ( suggestions_loo.note ) %]
744 <div class="suggestion_note"><i class="fa fa-comment"></i> [% suggestions_loo.note | html %]</div>
746 [% IF suggestions_loo.archived %]
747 <br /><i class="fa fa-archive"></i> Archived
751 <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>
753 <td data-order="[% suggestions_loo.suggesteddate | html %]">
754 [% IF ( suggestions_loo.suggesteddate ) %][% suggestions_loo.suggesteddate | $KohaDates %][% END %]
757 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestions_loo.managedby | uri %]">[% suggestions_loo.surnamemanagedby | html %][% IF ( suggestions_loo.firstnamemanagedby ) %], [% suggestions_loo.firstnamemanagedby | html %][% END %]</a>
759 <td data-order="[% suggestions_loo.manageddate | html %]">
760 [% IF ( suggestions_loo.manageddate ) %][% suggestions_loo.manageddate | $KohaDates %][% END %]
763 <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>
765 <td data-order="[% suggestions_loo.lastmodificationdate | html %]">
766 [% IF ( suggestions_loo.lastmodificationdate ) %][% suggestions_loo.lastmodificationdate | $KohaDates %][% END %]
769 [% Branches.GetName( suggestions_loo.branchcode ) | html %]
772 [% suggestions_loo.budget_name | html %]
775 [% IF ( suggestions_loo.ASKED ) %]
777 [% ELSIF ( suggestions_loo.ACCEPTED ) %]
779 [% ELSIF ( suggestions_loo.ORDERED ) %]
781 [% ELSIF ( suggestions_loo.REJECTED ) %]
783 [% ELSIF ( suggestions_loo.CHECKED ) %]
785 [% ELSIF ( suggestions_loo.AVAILABLE ) %]
787 [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %]
788 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) | html %]
793 [% IF ( suggestions_loo.reason ) %]
794 <br />([% suggestions_loo.reason | html %])
798 <div class="btn-group dropup">
799 <a class="btn btn-default btn-xs" role="button" href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | html %]&op=edit"><i class="fa fa-pencil"></i> Edit</a><a class="btn btn-default btn-xs dropdown-toggle" id="more_actions_[% suggestions_loo.suggestionid | html %]" role="button" data-toggle="dropdown" href="#"><b class="caret"></b></a>
800 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="more_actions_[% suggestions_loo.suggestionid | html %]">
801 <li><a class="deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a></li>
802 [% UNLESS suggestions_loo.archived %]
803 <li><a class="archivesuggestion" href="suggestion.pl?op=archive&suggestionid=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-archive"></i> Archive</a></li>
805 <li><a class="unarchivesuggestion" href="suggestion.pl?op=unarchive&suggestionid=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-archive"></i> Unarchive</a></li>
811 [% END # /FOREACH suggestions_loo %]
813 </table> <!-- /#table_[% loop.count | html %] -->
816 <h2 style="padding-left:1em;">Change selected suggestions</h2>
817 <div class="col-sm-4">
819 <div id="select-reason[% loop.index | html %]">
820 <label for="STATUSreason[% loop.index | html %]">Mark selected as: </label>
821 <select name="STATUS" id="STATUSreason[% loop.index | html %]">
822 <option value=""> -- Choose a status --</option>
824 [% IF (statusselected_ASKED ) %]
825 <option value="ASKED" selected="selected">Pending</option>
827 <option value="ASKED">Pending</option>
830 [% IF (statusselected_ACCEPTED ) %]
831 <option value="ACCEPTED" selected="selected">Accepted</option>
833 <option value="ACCEPTED">Accepted</option>
836 [% IF (statusselected_CHECKED ) %]
837 <option value="CHECKED" selected="selected">Checked</option>
839 <option value="CHECKED">Checked</option>
842 [% IF ( statusselected_REJECTED ) %]
843 <option value="REJECTED" selected="selected">Rejected</option>
845 <option value="REJECTED">Rejected</option>
848 [% IF ( statusselected_ORDERED ) %]
849 <option value="ORDERED" selected="selected">Ordered</option>
851 <option value="ORDERED">Ordered</option>
854 [% FOREACH s IN SuggestionStatuses %]
855 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
859 <label for="choosereason[% loop.index | html %]">with this reason:</label>
860 <select name="reason" id="choosereason[% loop.index | html %]">
861 <option value=""> -- Choose a reason -- </option>
862 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
863 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
865 <option value="other">Others...</option>
868 <span class="other_reason">
869 <input type="text" size="31" name="other_reason" placeholder="please note your reason here..." />
870 <a href="#" class="cancel_note">Cancel</a>
874 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
875 <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
876 <fieldset class="action">
877 <button type="submit" class="btn btn-default btn-xs" value="update_status">Submit</button>
880 </div> <!-- /.col-sm-4 -->
882 <div class="col-sm-4">
885 Update item types with:
886 [% PROCESS 'av-build-dropbox.inc' name="suggestion_itemtype", category="SUGGEST_FORMAT", size = 20 %]
888 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
889 <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
890 <fieldset class="action">
891 <button type="submit" class="btn btn-default btn-xs" value="update_itemtype">Submit</button>
894 </div> <!-- /.col-sm-4 -->
896 <div class="col-sm-2">
898 <span class="label">Update manager</span><br/>
899 <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>
900 <span id="managedby_name[% loop.count | html %]"></span>
901 <input type="hidden" name="suggestion_managedby" id="managedby[% loop.count | html %]" value="[% logged_in_user.borrowernumber | html %]" />
902 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
903 <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
904 <fieldset class="action">
905 <button type="submit" class="btn btn-default btn-xs" value="update_manager">Submit</button>
908 </div> <!-- /.col-sm-2 -->
910 <div class="col-sm-2">
912 <span class="label">Delete selected</span>
913 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
914 <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
915 <fieldset class="action">
916 <button type="submit" class="btn btn-default btn-xs" value="delete">Delete</button>
919 </div> <!-- /.col-sm-2 -->
920 </div> <!-- /.row -->
923 <strong>No results.</strong>
924 [% END # /IF ( suggestion.suggestions_loop ) %]
925 </form> <!-- /.update_suggestions -->
926 </div> <!-- /#[% suggestion.suggestiontype | html %] -->
927 [% END # /FOREACH suggestion %]
928 [% UNLESS ( notabs ) %]
929 </div> <!-- /.notabs -->
930 [% END # /UNLESS notabs %]
931 [% END # /IF op == 'else' %]
933 [% UNLESS op == 'save' %]
934 [% UNLESS ( op == 'show' ) %]
935 </div> <!-- /.col-sm-10.col-sm-push-2 -->
937 <div class="col-sm-2 col-sm-pull-10">
939 <form name="suggestionfilter" action="suggestion.pl" method="get">
940 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
941 <fieldset class="brief">
942 <ol style="display:block;">
944 <label for="displayby">Organize by: </label>
945 <select name="displayby" id="displayby" style="width:auto;">
946 [% IF ( displayby == "STATUS" ) %]
947 <option value="STATUS" selected="selected">Status</option>
949 <option value="STATUS">Status</option>
951 [% IF ( displayby == "branchcode" ) %]
952 <option value="branchcode" selected="selected">Library</option>
954 <option value="branchcode">Library</option>
956 [% IF ( displayby == "itemtype" ) %]
957 <option value="itemtype" selected="selected">Item type</option>
959 <option value="itemtype">Item type</option>
961 [% IF ( displayby == "managedby" ) %]
962 <option value="managedby" selected="selected">Managed by</option>
964 <option value="managedby">Managed by</option>
966 [% IF ( displayby == "acceptedby" ) %]
967 <option value="acceptedby" selected="selected">Accepted by</option>
969 <option value="acceptedby">Accepted by</option>
972 <input type="submit" value="Go" />
975 </fieldset> <!-- /.brief -->
977 <h4>Filter by: <a style="font-size:80%;font-weight:normal;" href="/cgi-bin/koha/suggestion/suggestion.pl">[clear]</a></h4>
980 <fieldset class="brief">
981 <h4 class="local_collapse"><a href="#">Bibliographic information</a></h4>
984 <label for="title"> Title:</label>
985 <input type="text" id="title" name="title" value="[% title | html %]" />
988 <label for="author"> Author:</label>
989 <input type="text" id="author" name="author" value="[% author | html %]" />
992 <label for="isbn"> ISBN:</label>
993 <input type="text" id="isbn" name="isbn" value="[% isbn | html %]" />
996 <label for="publishercode"> Publisher:</label>
997 <input type="text" id="publishercode" name="publishercode" value="[% publishercode | html %]" />
1000 <label for="copyrightdate_filter"> Copyright date:</label>
1001 <input type="text" id="copyrightdate_filter" name="copyrightdate" value="[% copyrightdate | html %]" />
1004 <label for="collectiontitle"> Collection title:</label>
1005 <input type="text" id="collectiontitle" name="collectiontitle" value="[% collectiontitle | html %]" /></li><li><input type="submit" value="Go" />
1008 </fieldset> <!-- /.brief -->
1010 <fieldset class="brief">
1011 <h4 class="local_collapse"><a href="#">Suggestion information</a></h4>
1014 <label for="archived" style="display: inline;">Include archived:</label>
1015 [% IF filter_archived %]
1016 <input type="checkbox" id="archived" name="filter_archived" checked="checked" title="Include archived suggestions in the search" />
1018 <input type="checkbox" id="archived" name="filter_archived" title="Include archived suggestions in the search" />
1022 <label for="STATUS[% loop.index | html %]"> Status:</label>
1023 <select name="STATUS" id="STATUS[% loop.index | html %]">
1024 <option value="">Any</option>
1025 [% IF (statusselected_ASKED ) %]
1026 <option value="ASKED" selected="selected">Pending</option>
1028 <option value="ASKED">Pending</option>
1031 [% IF (statusselected_ACCEPTED ) %]
1032 <option value="ACCEPTED" selected="selected">Accepted</option>
1034 <option value="ACCEPTED">Accepted</option>
1037 [% IF (statusselected_CHECKED ) %]
1038 <option value="CHECKED" selected="selected">Checked</option>
1040 <option value="CHECKED">Checked</option>
1043 [% IF ( statusselected_REJECTED ) %]
1044 <option value="REJECTED" selected="selected">Rejected</option>
1046 <option value="REJECTED">Rejected</option>
1049 [% IF ( statusselected_ORDERED ) %]
1050 <option value="ORDERED" selected="selected">Ordered</option>
1052 <option value="ORDERED">Ordered</option>
1055 [% FOREACH s IN SuggestionStatuses %]
1056 [% IF s.authorised_value == selected_status %]
1057 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
1059 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
1066 <label for="suggestedby"> Suggested by:</label>
1067 <select id="suggestedby" name="suggestedby">
1068 <option value="">Any</option>
1069 [% FOREACH suggestedby_loo IN suggestedby_loop %]
1070 [% IF ( suggestedby_loo.selected ) %]
1071 <option value="[% suggestedby_loo.code | html %]" selected="selected">[% suggestedby_loo.desc | html %]</option>
1073 <option value="[% suggestedby_loo.code | html %]">[% suggestedby_loo.desc | html %]</option>
1079 <label for="suggesteddate_from">Suggested date from:</label>
1080 <input type="text" id="suggesteddate_from" size="10" name="suggesteddate_from" value="[% suggesteddate_from | html %]" />
1083 <label for="suggesteddate_to">To:</label>
1084 <input type="text" id="suggesteddate_to" size="10" name="suggesteddate_to" value="[% suggesteddate_to | html %]" />
1087 <label for="managedby"> Managed by:</label>
1088 <select id="managedby" name="managedby">
1089 <option value="">Any</option>
1090 [% FOREACH managedby_loo IN managedby_loop %]
1091 [% IF ( managedby_loo.selected ) %]
1092 <option value="[% managedby_loo.code | html %]" selected="selected">[% managedby_loo.desc | html %]</option>
1094 <option value="[% managedby_loo.code | html %]">[% managedby_loo.desc | html %]</option>
1100 <label for="manageddate_from">Management date from:</label>
1101 <input type="text" id="manageddate_from" size="10" name="manageddate_from" value="[% manageddate_from | html %]" />
1104 <label for="manageddate_to">To:</label>
1105 <input type="text" id="manageddate_to" size="10" name="manageddate_to" value="[% manageddate_to | html %]" />
1108 <label for="acceptedby"> Accepted by:</label>
1109 <select id="acceptedby" name="acceptedby">
1110 <option value="">Any</option>
1111 [% FOREACH acceptedby_loo IN acceptedby_loop %]
1112 [% IF ( acceptedby_loo.selected ) %]
1113 <option value="[% acceptedby_loo.code | html %]" selected="selected">[% acceptedby_loo.desc | html %]</option>
1115 <option value="[% acceptedby_loo.code | html %]">[% acceptedby_loo.desc | html %]</option>
1121 <label for="accepteddate_from">Accepted date from:</label>
1122 <input type="text" id="accepteddate_from" size="10" name="accepteddate_from" value="[% accepteddate_from | html %]" />
1125 <label for="accepteddate_to">To:</label>
1126 <input type="text" id="accepteddate_to" size="10" name="accepteddate_to" value="[% accepteddate_to | html %]" />
1129 <input type="submit" value="Go" />
1134 <fieldset class="brief">
1135 <h4 class="local_collapse">
1136 <a href="#">Acquisition information</a>
1140 <label for="budgetid"> Book fund:</label>
1141 <select name="budgetid" id="budgetid">
1142 <option value="__ANY__">Any</option>
1143 [% IF budgetid == '__NONE__' %]
1144 <option value="__NONE__" selected="selected">None</option>
1146 <option value="__NONE__">None</option>
1148 [% FOREACH budgetsloo IN budgetsloop %]
1149 [% IF ( budgetsloo.selected ) %]
1150 <option value="[% budgetsloo.budget_id | html %]" selected="selected">[% budgetsloo.budget_name | html %]</option>
1152 <option value="[% budgetsloo.budget_id | html %]">[% budgetsloo.budget_name | html %]</option>
1158 <input type="submit" value="Go" />
1162 </div> <!-- /#limits -->
1163 </form> <!-- /suggestionsfilter -->
1165 [% INCLUDE 'acquisitions-menu.inc' %]
1168 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1169 [% END # /UNLESS ( op == 'show' ) %]
1170 [% END # /UNLESS op == 'save' %]
1171 </div> <!-- /.row -->
1173 [% END # /IF op == "show" %]
1175 [% MACRO jsinclude BLOCK %]
1176 [% INCLUDE 'calendar.inc' %]
1180 function editManagerPopup(selected_tab) {
1182 window.open("/cgi-bin/koha/suggestion/add_user_search.pl?selection_type=select&callback=select_manager&permissions=suggestions.suggestions_manage",
1184 'width=740,height=450,location=yes,toolbar=no,'
1185 + 'scrollbars=yes,resize=yes'
1188 function select_manager(borrowernumber, borrower) {
1189 var managedby_name = $("#managedby_name"+tab);
1190 var managedby = $("#managedby"+tab);
1191 managedby_name.empty();
1193 var borrowername = borrower.firstname + ' ' + borrower.surname;
1194 if (borrowernumber) {
1195 var managerlink = '<a href="/cgi-bin/koha/members/moremember.pl'
1196 + '?borrowernumber=' + borrowernumber + '">'
1197 + borrowername + '</a>';
1198 managedby_name.html(managerlink);
1199 managedby.val(borrowernumber);
1202 [% IF op == "save" %]
1203 var notify = $('#notify');
1204 if ( notify.length ) {
1205 [% IF managedby_patron %]
1206 if ( borrowernumber == [% logged_in_user.borrowernumber | html %] || borrowernumber == [% managedby_patron.borrowernumber | html %] ) {
1208 if ( borrowernumber == [% logged_in_user.borrowernumber | html %] ) {
1210 $(notify).prop('checked', false).prop('disabled', true);
1212 $(notify).prop('disabled', false);
1218 function editSuggesterPopup() {
1219 window.open("/cgi-bin/koha/suggestion/add_user_search.pl?selection_type=select&callback=select_suggester",
1221 'width=740,height=450,location=yes,toolbar=no,'
1222 + 'scrollbars=yes,resize=yes'
1226 function select_suggester(borrowernumber, borrower) {
1227 var suggested = '<input type="hidden" id="suggestedby" name="suggestedby" value="' + borrowernumber + '" />';
1228 suggested += '<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=' + borrowernumber + '">';
1229 suggested += borrower.surname + ', ' + borrower.firstname + ' (' + borrower.cardnumber + ')';
1230 suggested += '</a> ';
1231 suggested += borrower.branchname + ' (' + borrower.category_description + ')';
1232 $("#tdsuggestedby").html(suggested);
1235 $(document).ready(function(){
1236 $("#edit_manager").on("click",function(e){
1238 editManagerPopup('');
1240 $(".set_manager").on("click",function(e){
1242 var selected_tab = $(this).data('tab');
1243 editManagerPopup(selected_tab);
1246 $("#edit_suggester").on("click", function(e){
1248 editSuggesterPopup();
1253 [% IF ( op == 'show' || op == 'else' ) %]
1255 $(document).ready(function(){
1256 $(".deletesuggestion").on("click",function(){
1257 return confirm(_("Are you sure you want to delete this suggestion?"));
1262 [% IF op == 'else' %]
1263 [% INCLUDE 'datatables.inc' %]
1264 [% INCLUDE 'columns_settings.inc' %]
1266 $(document).ready(function() {
1267 $('#suggestiontabs').tabs();
1269 columns_settings = [% TablesSettings.GetColumns( 'acqui', 'suggestions', 'suggestions', 'json' ) | $raw %]
1270 [% FOREACH suggestion IN suggestions %]
1271 [% IF ( suggestion.suggestions_loop ) %]
1272 KohaTable("table_[% loop.count| html %]", {
1273 "sorting": [[ 3, "asc" ]],
1275 }, columns_settings );
1279 $("#branchcode").on('change',function(){
1280 [%# Modify the hidden input in the filters block from the library %]
1281 [%# dropdown list at the top of suggestion list %]
1282 let branchcode = $(this).val();
1283 $('input[name="branchcode"]').val( branchcode );
1284 $('form[name="suggestionfilter"]').submit();
1287 $(".checkall").click(function(e){
1289 $(this).parents('form').find("input:checkbox").each(function(){
1290 $(this).prop("checked", true);
1293 $(".uncheckall").click(function(e){
1295 $(this).parents('form').find("input:checkbox").each(function(){
1296 $(this).prop("checked", false);
1299 $(".other_reason").hide();
1300 $("select[name='reason']").change(function(){
1301 if($(this).val() == "other"){
1303 $(this).siblings(".other_reason").show();
1307 $("a.cancel_note").click(function(e) {
1308 $(this).parent().siblings("select").show().find("option[value='']").attr("selected","selected");
1309 $(this).siblings("input[name='other_reason']").hide();
1312 $("h4.local_collapse a").click(function(){
1313 $(this).parent().parent().find("ol").toggle();
1316 // http://jqueryui.com/demos/datepicker/#date-range
1317 var dates = $( "#suggesteddate_from, #suggesteddate_to" ).datepicker({
1320 onSelect: function( selectedDate ) {
1321 var option = this.id == "suggesteddate_from" ? "minDate" : "maxDate",
1322 instance = $( this ).data( "datepicker" );
1323 date = $.datepicker.parseDate(
1324 instance.settings.dateFormat ||
1325 $.datepicker._defaults.dateFormat,
1326 selectedDate, instance.settings );
1327 dates.not( this ).datepicker( "option", option, date );
1330 var datesMD = $( "#manageddate_from, #manageddate_to" ).datepicker({
1333 onSelect: function( selectedDate ) {
1334 var option = this.id == "manageddate_from" ? "minDate" : "maxDate",
1335 instance = $( this ).data( "datepicker" );
1336 date = $.datepicker.parseDate(
1337 instance.settings.dateFormat ||
1338 $.datepicker._defaults.dateFormat,
1339 selectedDate, instance.settings );
1340 datesMD.not( this ).datepicker( "option", option, date );
1343 var datesAD = $( "#accepteddate_from, #accepteddate_to" ).datepicker({
1346 onSelect: function( selectedDate ) {
1347 var option = this.id == "accepteddate_from" ? "minDate" : "maxDate",
1348 instance = $( this ).data( "datepicker" );
1349 date = $.datepicker.parseDate(
1350 instance.settings.dateFormat ||
1351 $.datepicker._defaults.dateFormat,
1352 selectedDate, instance.settings );
1353 datesAD.not( this ).datepicker( "option", option, date );
1357 $("button[type='submit']").on("click", function(e) {
1358 var submit_button = this;
1359 var form = $(submit_button).parents("form");
1360 var action = $(submit_button).val();
1361 var selected_suggestions = $(form).find("input[name='suggestionid']:checked");
1362 if ( selected_suggestions.length == 0 ) {
1363 alert(_("Please select at least one suggestion"));
1367 if ( action == "delete" ) {
1368 if ( selected_suggestions.length == 1 ) {
1369 if ( ! confirm(_("Are you sure you want to delete this suggestion?")) ) {
1373 } else if ( selected_suggestions.length > 1 ) {
1374 if ( ! confirm(_("Are you sure you want to delete these suggestions?")) ) {
1379 } else if ( action == "update_manager" ) {
1380 var managedby = $(submit_button).siblings("suggestion_managedby");
1381 if ( managedby.val() == "" ) {
1382 alert(_("Please select a manager to assign to the selected suggestions"));
1388 $('<input />').attr('type', 'hidden')
1390 .attr('value', action)
1397 [% IF op == 'save' %]
1400 $(document).ready(function(){
1402 $("#quantity,#price,#currency").on("change",function(){
1406 [% IF other_reason %]
1407 $(".select-reason").hide();
1408 $(".select-reason").find("option[value='other']").attr("selected","selected");
1409 $("#other_reason").show();
1411 $("#other_reason").hide();
1413 $(".select-reason").change(function(){
1414 if($(this).val() == "other"){
1416 $("#other_reason").show();
1419 $("a[href*=back]").click(function(){
1420 $(".select-reason").show().find("option[value='']").attr("selected","selected");
1421 $("#other_reason").hide();
1424 $("#restore_previous_manager").on("click",function(e){
1427 $("#managedby_name").empty();
1428 $("#managedby").val('');
1429 var borrowername = "[% managedby_patron.firstname | html %] [% managedby_patron.surname | html %]";
1430 var managerlink = '<a href="/cgi-bin/koha/members/moremember.pl'
1431 + '?borrowernumber=[% managedby_patron.borrowernumber | html %]">'
1432 + borrowername + '</a>';
1433 $('#managedby_name').html(managerlink);
1434 $('#managedby').val([% managedby_patron.borrowernumber | html %]);
1435 $('#notify').prop('checked', false).prop('disabled', true);
1438 //keep a copy of all budgets before removing the inactives
1439 var budgetId = $("form#add_edit #budgetid");
1440 var disabledBudgetsCopy = budgetId.html();
1441 $('.b_inactive').remove();
1443 $('#showallfunds').click(function() {
1444 if ($(this).is(":checked")) {
1445 budgetId.html(disabledBudgetsCopy); //Puts back all the funds
1448 $('.b_inactive').remove();
1455 [% Asset.js("js/acq.js") | $raw %]
1456 [% Asset.js("js/acquisitions-menu.js") | $raw %]
1458 [% INCLUDE 'intranet-bottom.inc' %]