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' %]
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; }
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 %]
165 <span class="label">Reason:</span>
167 [% AuthorisedValues.GetByCode( 'SUGGEST', reason, 0 ) | html %]
172 <thead><tr><th> </th><th>Date</th><th>By</th></tr></thead>
175 <th>[% tp('purchase suggestion created by', 'Created by:') | html %]</th>
176 <td>[% suggesteddate | $KohaDates %]</td>
178 [% IF ( suggestedby_patron.borrowernumber ) %]
179 <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>
180 [% Branches.GetName( suggestedby_patron.branchcode ) | html %] ([% suggestedby_patron.category.description | html %])
186 <td>[% manageddate | $KohaDates %]</td>
188 [% IF ( managedby_patron.borrowernumber ) %]
189 <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>
190 [% Branches.GetName( managedby_patron.branchcode ) | html %] ([% managedby_patron.category.description | html %])
195 <th>Accepted on:</th>
196 <td>[% accepteddate | $KohaDates %]</td>
198 [% IF ( acceptedby_patron.borrowernumber ) %]
199 <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>
200 [% Branches.GetName( acceptedby_patron.branchcode ) | html %] ([% acceptedby_patron.category.description | html %])
205 <th>Last modification on:</th>
206 <td>[% lastmodificationdate | $KohaDates %]</td>
208 [% IF ( lastmodificationby_patron.borrowernumber ) %]
209 <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>
210 [% Branches.GetName( lastmodificationby_patron.branchcode ) | html %] ([% lastmodificationby_patron.category.description | html %])
217 <fieldset class="rows"> <legend>Acquisition information</legend>
220 <span class="label">Library:</span> [% Branches.GetName( branchcode ) | html %]
223 <span class="label">Fund:</span> [% budgetname | html %]
226 <span class="label">Copies:</span>[% quantity | html %]
229 <span class="label">Currency:</span>[% currency | html %]
232 <span class="label">Price:</span>[% price | $Price %]
235 <span class="label">Total</span>[% total | $Price %]
240 <fieldset class="action">
241 <a href="suggestion.pl"><< Back to suggestions</a>
249 [% IF op == 'save' %]
250 <div class="main container-fluid">
252 <div class="col-md-8 col-md-offset-2">
254 <div class="main container-fluid">
256 <div class="col-sm-10 col-sm-push-2">
261 [% IF op == 'save' %]
262 [% FOR m IN messages %]
263 <div class="dialog [% m.type | html %]">
265 [% CASE 'biblio_exists' %]
266 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.
272 <form id="add_edit" action="suggestion.pl" method="post" class="validated">
273 <input type="hidden" name="redirect" id="redirect" value="[% redirect | html %]" />
274 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber | html %]" />
275 [% IF ( suggestionid ) %]
276 <h1>Edit purchase suggestion #[% suggestionid | html %]</h1>
277 <input type="hidden" name="suggestionid" value="[% suggestionid | html %]"/>
279 <h1>Enter a new purchase suggestion</h1>
281 <fieldset class="rows"> <legend>Bibliographic information</legend><ol>
283 <label for="title" class="required">Title:</label>
284 <input type="text" id="title" name="title" size="80" maxlength="255" value="[% title | html %]" required="required" class="required" />
285 <span class="required">Required</span>
287 <li><label for="author">Author:</label><input type="text" id="author" name="author" size="50" maxlength="80" value="[% author | html %]"/></li>
288 <li><label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" value="[% copyrightdate | html %]" /></li>
289 <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>
290 <li><label for="publishercode">Publisher:</label><input type="text" id="publishercode" name="publishercode" size="50" maxlength="80" value="[% publishercode | html %]"/></li>
291 <li><label for="place">Publication place:</label><input type="text" id="place" name="place" size="50" maxlength="80" value="[% place | html %]"/></li>
292 <li><label for="collectiontitle">Collection title:</label><input type="text" id="collectiontitle" name="collectiontitle" size="50" maxlength="80" value="[% collectiontitle | html %]"/></li>
293 <li><label for="itemtype">Document type:</label>
294 [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20, default=itemtype %]
296 [% IF patron_reason_loop %]
298 <label for="patronreason">Reason for suggestion: </label>
299 <select name="patronreason" id="patronreason">
300 <option value=""> -- Choose -- </option>
301 [% FOREACH patron_reason_loo IN patron_reason_loop %]
302 [% IF patron_reason_loo.authorised_value == patronreason %]
303 <option value="[% patron_reason_loo.authorised_value | html %]" selected="selected">[% patron_reason_loo.lib | html %]</option>
305 <option value="[% patron_reason_loo.authorised_value | html %]">[% patron_reason_loo.lib | html %]</option>
311 <li><label for="note">Notes:</label><textarea name="note" id="note" rows="5" cols="40">[% note | html %]</textarea></li>
314 <fieldset class="rows"> <legend>Suggestion management</legend>
316 [% IF ( suggestionid ) %]
318 <label for="STATUS">Status:</label>
319 <select id="STATUS" name="STATUS">
320 <option value="">No status</option>
322 [% IF (statusselected_ASKED ) %]
323 <option value="ASKED" selected="selected">Pending</option>
325 <option value="ASKED">Pending</option>
328 [% IF (statusselected_ACCEPTED ) %]
329 <option value="ACCEPTED" selected="selected">Accepted</option>
331 <option value="ACCEPTED">Accepted</option>
334 [% IF (statusselected_CHECKED ) %]
335 <option value="CHECKED" selected="selected">Checked</option>
337 <option value="CHECKED">Checked</option>
340 [% IF ( statusselected_REJECTED ) %]
341 <option value="REJECTED" selected="selected">Rejected</option>
343 <option value="REJECTED">Rejected</option>
346 [% IF ( statusselected_ORDERED ) %]
347 <option value="ORDERED" selected="selected">Ordered</option>
349 <option value="ORDERED">Ordered</option>
352 [% FOREACH s IN SuggestionStatuses %]
353 [% IF s.authorised_value == suggestion.STATUS %]
354 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
356 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
362 <label for="reason">Reason</label>
363 <select class="select-reason" id="reason" name="reason">
364 <option value=""> -- Choose a reason -- </option>
365 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
366 [% IF (reasonsloo.lib == suggestion.reason) %]
367 <option value="[% reasonsloo.lib | html %]" selected="selected">[% reasonsloo.lib | html %]</option>
369 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
372 <option value="other">Others...</option>
375 <span id="other_reason" name="other_reason">
376 [% IF other_reason %]
377 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." value="[% suggestion.reason | html %]"/>
379 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." />
381 <a href="#back">Cancel</a>
386 <thead><tr><th> </th><th>Date</th><th>By</th><th>Action</th></tr></thead>
389 <th><label for="suggesteddate">[% tp('purchase suggestion created by', 'Created by:') | html %]</label> </th>
390 <td><input type="text" id="suggesteddate" name="suggesteddate" class="datepicker" size="10" maxlength="10" value="[% suggesteddate | $KohaDates %]"/>[% INCLUDE 'date-format.inc' %]</td>
391 <td id="tdsuggestedby"><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 %]
393 <td><a href="#" id="suggester_search" class="btn btn-default">Set to patron</a></td>
396 <th><label for="accepteddate">Accepted on:</label> </th>
397 <td><input type="text" id="accepteddate" name="accepteddate" class="datepicker" size="10" maxlength="10" value="[% accepteddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]</td>
398 <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>
402 <th><label for="lastmodificationdate">Last modification on:</label> </th>
403 <td>[% lastmodificationdate | $KohaDates %]</td>
405 [% IF lastmodificationby_patron %]
406 [% INCLUDE 'patron-title.inc' patron=lastmodificationby_patron hide_patron_infos_if_needed=1 %] [% Branches.GetName( lastmodificationby_patron.branchcode ) | html %] ([% lastmodificationby_patron.category.description | html %])
415 <label for="managedon">Managed on:</label>
416 <input type="text" id="managedon" name="manageddate" class="datepicker" size="10" maxlength="10" value="[% manageddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]
419 <label for="managedby_name">by:</label>
421 <span id="managedby_name" name="managedby_name">
422 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% logged_in_user.borrowernumber | uri %]">You</a>
424 [% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %]
425 | 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 %])
428 <a id="edit_manager" class="new_window" href="#"><i class="fa fa-search"></i> Select manager</a>
429 [% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %]
430 <a id="restore_previous_manager" href="#"><i class="fa fa-trash"></i> Keep existing manager</a>
432 <input type="hidden" name="managedby" id="managedby" value="[% logged_in_user.borrowernumber | html %]" />
435 <label for="notify">Notify manager:</label>
436 <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." />
441 <fieldset class="rows"> <legend>Acquisition information</legend><ol>
442 <li><label for="branchcode">Library:</label>
443 <select name="branchcode" id="branchcode">
444 <option value="">Any</option>
445 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter || branchcode ) %]
448 <li><label for="budgetid">Fund:</label>
449 <select name="budgetid" id="budgetid">
450 <option value="">Any</option>
451 [% FOREACH budget IN sugg_budgets %]
452 [% IF ( budget.selected ) %]
453 <option value="[% budget.b_id | html %]" selected="selected">[% budget.b_txt | html %] [% IF ( !budget.b_active ) %](inactive)[% END %]</option>
454 [% ELSIF ( budget.b_active ) %]
455 <option value="[% budget.b_id | html %]">[% budget.b_txt | html %]</option>
457 <option value="[% budget.b_id | html %]" class="b_inactive">[% budget.b_txt | html %] (inactive)</option>
461 <label for="showallfunds" style="float:none;width:auto;"> Show inactive:</label>
462 <input type="checkbox" id="showallfunds" />
464 <li><label for="quantity">Copies:</label>
465 <input type="text" size="10" id="quantity" name="quantity" value="[% quantity | html %]" />
468 <label for="currency">Currency:</label>
469 [% FOREACH c IN currencies %]
470 <input type="hidden" value="[% c.rate | html %]" id="currency_rate_[% c.currency | html %]" name="currency_rate_[% c.currency | html %]" />
471 <input type="hidden" id="[% c.currency | html %]" name="[% c.currency | html %]" value="[% c.rate | html %]" />
474 <select name="currency" id="currency">
475 [% FOREACH c IN currencies %]
476 [% IF suggestionid and suggestion.currency == c.currency or not suggestionid and c.active %]
477 <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
478 [% ELSIF not c.archived %]
479 <option value="[% c.currency | html %]">[% c.currency | html %]</option>
484 <li><label for="price">Price:</label>
485 <input type="text" size="20" name="price" id="price" value="[% price | html %]" />
486 </li><li><label for="total">Total: </label>
487 <input type="text" readonly="readonly" id="total" name="total" size="10" value="[% total | html %]"/>
489 </fieldset><input type="hidden" id="returnsuggested" name="returnsuggested" value="[% IF ( returnsuggestedby ) %][% returnsuggestedby | html %][% ELSE %]noone[% END %]"/>
490 <fieldset class="action">
491 <input type="hidden" name="op" value="[% op | html %]" />
492 [% IF ( suggestionid ) %]
493 [% IF ( need_confirm ) %]
494 <input type="hidden" name="save_confirmed" value="1" />
495 <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
497 <input type="submit" value="Save" />
499 <a class="cancel" href="[% IF ( returnsuggestedby ) %]/cgi-bin/koha/members/moremember.pl?borrowernumber=[% returnsuggestedby | uri %]#suggestions[% ELSE %]suggestion.pl[% END %]">Cancel</a>
501 [% IF ( need_confirm ) %]
502 <input type="hidden" name="save_confirmed" value="1" />
503 <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
505 <input type="submit" value="Submit your suggestion" />
507 <a class="cancel" href="suggestion.pl">Cancel</a>
513 [% IF op == 'else' %]
514 <div id="toolbar" class="btn-toolbar">
515 <a class="btn btn-default" id="newsuggestion" href="suggestion.pl?op=add"><i class="fa fa-plus"></i> New purchase suggestion</a>
518 <h1>Suggestions management</h1>
520 [% IF ( displayby != "branchcode" ) %]
521 <label for="branchcode">Viewing suggestions for library:</label>
522 <select name="branchcode" id="branchcode">
523 <option value="__ANY__">Any</option>
524 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter || branchcode ) %]
529 [% FOR m IN messages %]
530 <div class="dialog [% m.type | html %]">
532 [% CASE 'already_exists' %]
533 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>)
534 [% CASE 'biblio_exists' %]
535 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.
542 [% UNLESS ( notabs ) %]
543 <div id="suggestiontabs" class="toptabs">
544 <ul class="ui-tabs-nav">
545 [% FOREACH suggestion IN suggestions %]
547 <a href="#[% suggestion.suggestiontype | uri %]">
548 [% IF ( suggestion.suggestiontypelabel ) %]
549 [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending
550 [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted
551 [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked
552 [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected
553 [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available
554 [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered
555 [% ELSIF (suggestion.suggestiontypelabel == "Unknown") %]Status unknown
556 [% ELSIF (suggestion.suggestiontypelabel == "__ANY__") %]Any
557 [% ELSE %][% suggestion.suggestiontypelabel | html %][% END %]
559 [% IF ( suggestion.suggestiontype ) %]
560 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.suggestiontype ) | html %]
565 ([% suggestion.suggestions_loop.size | html %])</a></li>
571 [% FOREACH suggestion IN suggestions %]
572 <div id="[% suggestion.suggestiontype | html %]">
573 <form class="update_suggestions" name="f" method="post" action="/cgi-bin/koha/suggestion/suggestion.pl#[% suggestion.suggestiontype| uri %]">
575 [% IF ( suggestion.suggestions_loop ) %]
576 <p><a class="checkall" href="#">Check all</a> | <a class="uncheckall" href="#">Uncheck all</a></p>
577 <table id="table_[% loop.count | html %]" class="sorted">
580 <th class="NoSort noExport"> </th>
581 <th class="anti-the">Suggestion</th>
582 <th>Suggested by</th>
583 <th>Suggested on</th>
586 <th>Last modification by</th>
587 <th>Last modification on</th>
591 <th class="NoSort noExport"> </th>
595 [% FOREACH suggestions_loo IN suggestion.suggestions_loop %]
598 <input type="checkbox" name="suggestionid" value="[% suggestions_loo.suggestionid | html %]" />
601 <a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | uri %]&op=show" title="suggestion" >
602 [% suggestions_loo.title | html %][% IF ( suggestions_loo.author ) %], by [% suggestions_loo.author | html %][% END %]</a>
604 [% IF ( suggestions_loo.copyrightdate ) %]© [% suggestions_loo.copyrightdate | html %] [% END %]
605 [% IF ( suggestions_loo.volumedesc ) %]; Volume:<em>[% suggestions_loo.volumedesc | html %]</em> [% END %]
606 [% IF ( suggestions_loo.isbn ) %]; ISBN:<em>[% suggestions_loo.isbn | html %]</em> [% END %][% IF ( suggestions_loo.publishercode ) %]; Published by [% suggestions_loo.publishercode | html %] [% END %][% IF ( suggestions_loo.publicationyear ) %] in <em>[% suggestions_loo.publicationyear | html %]</em> [% END %][% IF ( suggestions_loo.place ) %] in <em>[% suggestions_loo.place | html %]</em> [% 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="suggestion_note"><i class="fa fa-comment"></i> [% suggestions_loo.note | html %]</div>[% END %]
607 [% IF suggestions_loo.archived %]<br /><i class="fa fa-archive"></i> Archived[% END %]
610 <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>
612 <td data-order="[% suggestions_loo.suggesteddate | html %]">
613 [% IF ( suggestions_loo.suggesteddate ) %][% suggestions_loo.suggesteddate | $KohaDates %][% END %]
616 <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>
618 <td data-order="[% suggestions_loo.manageddate | html %]">
619 [% IF ( suggestions_loo.manageddate ) %][% suggestions_loo.manageddate | $KohaDates %][% END %]
622 <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>
624 <td data-order="[% suggestions_loo.lastmodificationdate | html %]">
625 [% IF ( suggestions_loo.lastmodificationdate ) %][% suggestions_loo.lastmodificationdate | $KohaDates %][% END %]
628 [% Branches.GetName( suggestions_loo.branchcode ) | html %]
631 [% suggestions_loo.budget_name | html %]
634 [% IF ( suggestions_loo.ASKED ) %]
636 [% ELSIF ( suggestions_loo.ACCEPTED ) %]
638 [% ELSIF ( suggestions_loo.ORDERED ) %]
640 [% ELSIF ( suggestions_loo.REJECTED ) %]
642 [% ELSIF ( suggestions_loo.CHECKED ) %]
644 [% ELSIF ( suggestions_loo.AVAILABLE ) %]
646 [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %]
647 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) | html %]
652 [% IF ( suggestions_loo.reason ) %]
653 <br />([% suggestions_loo.reason | html %])
657 <div class="btn-group dropup">
658 <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>
659 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="more_actions_[% suggestions_loo.suggestionid | html %]">
660 <li><a class="deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a></li>
661 [% UNLESS suggestions_loo.archived %]
662 <li><a class="archivesuggestion" href="suggestion.pl?op=archive&suggestionid=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-archive"></i> Archive</a></li>
664 <li><a class="unarchivesuggestion" href="suggestion.pl?op=unarchive&suggestionid=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-archive"></i> Unarchive</a></li>
674 <h2 style="padding-left:1em;">Change selected suggestions</h3>
675 <div class="col-sm-4">
677 <div id="select-reason">
678 <label for="STATUS">Mark selected as: </label>
679 <select name="STATUS" id="STATUS">
680 <option value=""> -- Choose a status --</option>
682 [% IF (statusselected_ASKED ) %]
683 <option value="ASKED" selected="selected">Pending</option>
685 <option value="ASKED">Pending</option>
688 [% IF (statusselected_ACCEPTED ) %]
689 <option value="ACCEPTED" selected="selected">Accepted</option>
691 <option value="ACCEPTED">Accepted</option>
694 [% IF (statusselected_CHECKED ) %]
695 <option value="CHECKED" selected="selected">Checked</option>
697 <option value="CHECKED">Checked</option>
700 [% IF ( statusselected_REJECTED ) %]
701 <option value="REJECTED" selected="selected">Rejected</option>
703 <option value="REJECTED">Rejected</option>
706 [% IF ( statusselected_ORDERED ) %]
707 <option value="ORDERED" selected="selected">Ordered</option>
709 <option value="ORDERED">Ordered</option>
712 [% FOREACH s IN SuggestionStatuses %]
713 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
717 <label for="reason">with this reason:</label>
718 <select name="reason">
719 <option value=""> -- Choose a reason -- </option>
720 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
721 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
723 <option value="other">Others...</option>
726 <span class="other_reason">
727 <input type="text" size="31" name="other_reason" placeholder="please note your reason here..." />
728 <a href="#" class="cancel_note">Cancel</a>
732 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
733 <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
734 <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="update_status"/>Submit</button></fieldset>
737 <div class="col-sm-4">
739 <label for="itemtype">Update item types with: </label>
740 [% PROCESS 'av-build-dropbox.inc' name="suggestion_itemtype", category="SUGGEST_FORMAT", size = 20 %]
741 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
742 <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
743 <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="update_itemtype"/>Submit</button></fieldset>
747 <div class="col-sm-2">
749 <label for="set_manager_[% loop.count | html %]">Update manager</label><br/>
750 <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>
751 <span id="managedby_name[% loop.count | html %]"></span>
752 <input type="hidden" name="suggestion_managedby" id="managedby[% loop.count | html %]" value="[% logged_in_user.borrowernumber | html %]" />
753 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
754 <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
755 <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="update_manager"/>Submit</button></fieldset>
759 <div class="col-sm-2">
761 <label for="delete_[% loop.count | html %]">Delete selected</label>
762 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
763 <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
764 <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="delete"/>Delete</button></fieldset>
771 <strong>No results.</strong>
778 [% UNLESS op == 'save' %]
779 [% UNLESS ( op == 'show' ) %]
782 </div> <!-- /.col-sm-10.col-sm-push-2 -->
784 <div class="col-sm-2 col-sm-pull-10">
787 <form name="suggestionfilter" action="suggestion.pl" method="get">
788 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
789 <fieldset class="brief"><ol style="display:block;"><li><label for="displayby">Organize by: </label>
790 <select name="displayby" id="displayby" style="width:auto;">
791 [% IF ( displayby == "STATUS" ) %]
792 <option value="STATUS" selected="selected">Status</option>
794 <option value="STATUS">Status</option>
796 [% IF ( displayby == "branchcode" ) %]
797 <option value="branchcode" selected="selected">Library</option>
799 <option value="branchcode">Library</option>
801 [% IF ( displayby == "itemtype" ) %]
802 <option value="itemtype" selected="selected">Item type</option>
804 <option value="itemtype">Item type</option>
806 [% IF ( displayby == "managedby" ) %]
807 <option value="managedby" selected="selected">Managed by</option>
809 <option value="managedby">Managed by</option>
811 [% IF ( displayby == "acceptedby" ) %]
812 <option value="acceptedby" selected="selected">Accepted by</option>
814 <option value="acceptedby">Accepted by</option>
817 <input type="submit" value="Go" />
822 <h4>Filter by: <a style="font-size:80%;font-weight:normal;" href="/cgi-bin/koha/suggestion/suggestion.pl">[clear]</a></h4>
823 <div style="display:block;" id="limits">
825 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Bibliographic information</a></h4>
826 <ol> <li><label for="title"> Title:</label><input type="text" id="title" name="title" value="[% title | html %]" /></li>
827 <li><label for="author"> Author:</label><input type="text" id="author" name="author" value="[% author | html %]" /></li>
828 <li><label for="isbn"> ISBN:</label><input type="text" id="isbn" name="isbn" value="[% isbn | html %]" /></li>
829 <li><label for="publishercode"> Publisher:</label><input type="text" id="publishercode" name="publishercode" value="[% publishercode | html %]" /></li>
830 <li><label for="copyrightdate_filter"> Copyright date:</label><input type="text" id="copyrightdate_filter" name="copyrightdate" value="[% copyrightdate | html %]" /></li>
831 <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>
833 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Suggestion information</a></h4>
836 <label for="archived" style="display: inline;">Include archived:</label>
837 [% IF filter_archived %]
838 <input type="checkbox" id="archived" name="filter_archived" checked="checked" title="Include archived suggestions in the search" />
840 <input type="checkbox" id="archived" name="filter_archived" title="Include archived suggestions in the search" />
844 <label for="STATUS"> Status:</label>
846 <select name="STATUS" id="STATUS">
847 <option value="">Any</option>
849 [% IF (statusselected_ASKED ) %]
850 <option value="ASKED" selected="selected">Pending</option>
852 <option value="ASKED">Pending</option>
855 [% IF (statusselected_ACCEPTED ) %]
856 <option value="ACCEPTED" selected="selected">Accepted</option>
858 <option value="ACCEPTED">Accepted</option>
861 [% IF (statusselected_CHECKED ) %]
862 <option value="CHECKED" selected="selected">Checked</option>
864 <option value="CHECKED">Checked</option>
867 [% IF ( statusselected_REJECTED ) %]
868 <option value="REJECTED" selected="selected">Rejected</option>
870 <option value="REJECTED">Rejected</option>
873 [% IF ( statusselected_ORDERED ) %]
874 <option value="ORDERED" selected="selected">Ordered</option>
876 <option value="ORDERED">Ordered</option>
879 [% FOREACH s IN SuggestionStatuses %]
880 [% IF s.authorised_value == selected_status %]
881 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
883 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
889 <li><label for="suggestedby"> Suggested by:</label><select id="suggestedby" name="suggestedby"><option value="">Any</option>
890 [% 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 %]
893 <label for="suggesteddate_from">Suggested date from:</label>
894 <input type="text" id="suggesteddate_from" size="10" name="suggesteddate_from" value="[% suggesteddate_from | html %]" />
897 <label for="suggesteddate_to">To:</label>
898 <input type="text" id="suggesteddate_to" size="10" name="suggesteddate_to" value="[% suggesteddate_to | html %]" />
900 <li><label for="managedby"> Managed by:</label><select id="managedby" name="managedby"><option value="">Any</option>
901 [% 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 %]
904 <label for="manageddate_from">Management date from:</label>
905 <input type="text" id="manageddate_from" size="10" name="manageddate_from" value="[% manageddate_from | html %]" />
908 <label for="manageddate_to">To:</label>
909 <input type="text" id="manageddate_to" size="10" name="manageddate_to" value="[% manageddate_to | html %]" />
911 <li><label for="acceptedby"> Accepted by:</label><select id="acceptedby" name="acceptedby"><option value="">Any</option>
912 [% 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 %]
915 <label for="accepteddate_from">Accepted date from:</label>
916 <input type="text" id="accepteddate_from" size="10" name="accepteddate_from" value="[% accepteddate_from | html %]" />
919 <label for="accepteddate_to">To:</label>
920 <input type="text" id="accepteddate_to" size="10" name="accepteddate_to" value="[% accepteddate_to | html %]" />
923 <input type="submit" value="Go" />
928 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Acquisition information</a></h4>
929 <ol><li><label for="budgetid"> Book fund:</label>
930 <select name="budgetid" id="budgetid">
931 <option value="__ANY__">Any</option>
932 [% IF budgetid == '__NONE__' %]
933 <option value="__NONE__" selected="selected">None</option>
935 <option value="__NONE__">None</option>
937 [% FOREACH budgetsloo IN budgetsloop %]
938 [% 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 %]
942 <input type="submit" value="Go" />
947 [% INCLUDE 'acquisitions-menu.inc' %]
950 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
951 </div> <!-- /.row -->
958 [% MACRO jsinclude BLOCK %]
959 [% INCLUDE 'calendar.inc' %]
963 function editManagerPopup(selected_tab) {
965 window.open("/cgi-bin/koha/suggestion/add_user_search.pl?selection_type=select",
967 'width=740,height=450,location=yes,toolbar=no,'
968 + 'scrollbars=yes,resize=yes'
971 function select_user(borrowernumber, borrower) {
972 var managedby_name = $("#managedby_name"+tab);
973 var managedby = $("#managedby"+tab);
974 managedby_name.empty();
976 var borrowername = borrower.firstname + ' ' + borrower.surname;
977 if (borrowernumber) {
978 var managerlink = '<a href="/cgi-bin/koha/members/moremember.pl'
979 + '?borrowernumber=' + borrowernumber + '">'
980 + borrowername + '</a>';
981 managedby_name.html(managerlink);
982 managedby.val(borrowernumber);
985 [% IF op == "save" %]
986 var notify = $('#notify');
987 if ( notify.length ) {
988 [% IF managedby_patron %]
989 if ( borrowernumber == [% logged_in_user.borrowernumber | html %] || borrowernumber == [% managedby_patron.borrowernumber | html %] ) {
991 if ( borrowernumber == [% logged_in_user.borrowernumber | html %] ) {
993 $(notify).prop('checked', false).prop('disabled', true);
995 $(notify).prop('disabled', false);
1001 $(document).ready(function(){
1002 $("#edit_manager").on("click",function(e){
1004 editManagerPopup('');
1006 $(".set_manager").on("click",function(e){
1008 var selected_tab = $(this).data('tab');
1009 editManagerPopup(selected_tab);
1015 [% IF ( op == 'show' || op == 'else' ) %]
1017 $(document).ready(function(){
1018 $(".deletesuggestion").on("click",function(){
1019 return confirm(_("Are you sure you want to delete this suggestion?"));
1024 [% IF op == 'else' %]
1025 [% INCLUDE 'datatables.inc' %]
1026 [% INCLUDE 'columns_settings.inc' %]
1028 $(document).ready(function() {
1029 $('#suggestiontabs').tabs();
1031 columns_settings = [% TablesSettings.GetColumns( 'acqui', 'suggestions', 'suggestions', 'json' ) | $raw %]
1032 [% FOREACH suggestion IN suggestions %]
1033 [% IF ( suggestion.suggestions_loop ) %]
1034 KohaTable("table_[% loop.count| html %]", {
1035 "sorting": [[ 1, "asc" ]],
1037 }, columns_settings );
1041 $("#branchcode").on('change',function(){
1042 [%# Modify the hidden input in the filters block from the library %]
1043 [%# dropdown list at the top of suggestion list %]
1044 let branchcode = $(this).val();
1045 $('input[name="branchcode"]').val( branchcode );
1046 $('form[name="suggestionfilter"]').submit();
1049 $(".checkall").click(function(e){
1051 $(this).parents('form').find("input:checkbox").each(function(){
1052 $(this).prop("checked", true);
1055 $(".uncheckall").click(function(e){
1057 $(this).parents('form').find("input:checkbox").each(function(){
1058 $(this).prop("checked", false);
1061 $(".other_reason").hide();
1062 $("select[name='reason']").change(function(){
1063 if($(this).val() == "other"){
1065 $(this).siblings(".other_reason").show();
1069 $("a.cancel_note").click(function(e) {
1070 $(this).parent().siblings("select").show().find("option[value='']").attr("selected","selected");
1071 $(this).siblings("input[name='other_reason']").hide();
1074 $("h4.local_collapse a").click(function(){
1075 $(this).parent().parent().find("ol").toggle();
1078 // http://jqueryui.com/demos/datepicker/#date-range
1079 var dates = $( "#suggesteddate_from, #suggesteddate_to" ).datepicker({
1082 onSelect: function( selectedDate ) {
1083 var option = this.id == "suggesteddate_from" ? "minDate" : "maxDate",
1084 instance = $( this ).data( "datepicker" );
1085 date = $.datepicker.parseDate(
1086 instance.settings.dateFormat ||
1087 $.datepicker._defaults.dateFormat,
1088 selectedDate, instance.settings );
1089 dates.not( this ).datepicker( "option", option, date );
1092 var datesMD = $( "#manageddate_from, #manageddate_to" ).datepicker({
1095 onSelect: function( selectedDate ) {
1096 var option = this.id == "manageddate_from" ? "minDate" : "maxDate",
1097 instance = $( this ).data( "datepicker" );
1098 date = $.datepicker.parseDate(
1099 instance.settings.dateFormat ||
1100 $.datepicker._defaults.dateFormat,
1101 selectedDate, instance.settings );
1102 datesMD.not( this ).datepicker( "option", option, date );
1105 var datesAD = $( "#accepteddate_from, #accepteddate_to" ).datepicker({
1108 onSelect: function( selectedDate ) {
1109 var option = this.id == "accepteddate_from" ? "minDate" : "maxDate",
1110 instance = $( this ).data( "datepicker" );
1111 date = $.datepicker.parseDate(
1112 instance.settings.dateFormat ||
1113 $.datepicker._defaults.dateFormat,
1114 selectedDate, instance.settings );
1115 datesAD.not( this ).datepicker( "option", option, date );
1119 $("button[type='submit']").on("click", function(e) {
1120 var submit_button = this;
1121 var form = $(submit_button).parents("form");
1122 var action = $(submit_button).val();
1123 var selected_suggestions = $(form).find("input[name='suggestionid']:checked");
1124 if ( selected_suggestions.length == 0 ) {
1125 alert(_("Please select at least one suggestion"));
1129 if ( action == "delete" ) {
1130 if ( selected_suggestions.length == 1 ) {
1131 if ( ! confirm(_("Are you sure you want to delete this suggestion?")) ) {
1135 } else if ( selected_suggestions.length > 1 ) {
1136 if ( ! confirm(_("Are you sure you want to delete these suggestions?")) ) {
1141 } else if ( action == "update_manager" ) {
1142 var managedby = $(submit_button).siblings("suggestion_managedby");
1143 if ( managedby.val() == "" ) {
1144 alert(_("Please select a manager to assign to the selected suggestions"));
1150 $('<input />').attr('type', 'hidden')
1152 .attr('value', action)
1159 [% IF op == 'save' %]
1162 $(document).ready(function(){
1164 $("#quantity,#price,#currency").on("change",function(){
1168 [% IF other_reason %]
1169 $(".select-reason").hide();
1170 $(".select-reason").find("option[value='other']").attr("selected","selected");
1171 $("#other_reason").show();
1173 $("#other_reason").hide();
1175 $(".select-reason").change(function(){
1176 if($(this).val() == "other"){
1178 $("#other_reason").show();
1181 $("a[href*=back]").click(function(){
1182 $(".select-reason").show().find("option[value='']").attr("selected","selected");
1183 $("#other_reason").hide();
1186 $("#restore_previous_manager").on("click",function(e){
1189 $("#managedby_name").empty();
1190 $("#managedby").val('');
1191 var borrowername = "[% managedby_patron.firstname | html %] [% managedby_patron.surname | html %]";
1192 var managerlink = '<a href="/cgi-bin/koha/members/moremember.pl'
1193 + '?borrowernumber=[% managedby_patron.borrowernumber | html %]">'
1194 + borrowername + '</a>';
1195 $('#managedby_name').html(managerlink);
1196 $('#managedby').val([% managedby_patron.borrowernumber | html %]);
1197 $('#notify').prop('checked', false).prop('disabled', true);
1200 //keep a copy of all budgets before removing the inactives
1201 var budgetId = $("form#add_edit #budgetid");
1202 var disabledBudgetsCopy = budgetId.html();
1203 $('.b_inactive').remove();
1205 $('#showallfunds').click(function() {
1206 if ($(this).is(":checked")) {
1207 budgetId.html(disabledBudgetsCopy); //Puts back all the funds
1210 $('.b_inactive').remove();
1217 [% Asset.js("js/acq.js") | $raw %]
1218 [% Asset.js("js/acquisitions-menu.js") | $raw %]
1219 [% Asset.js("js/suggestions.js") | $raw %]
1221 [% INCLUDE 'intranet-bottom.inc' %]