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' %]
29 h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief ol { display : none; }
30 .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; }
35 <body id="acq_suggestion" class="acq">
36 [% INCLUDE 'header.inc' %]
37 [% INCLUDE 'cat-search.inc' %]
38 <div id="breadcrumbs">
39 <a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> ›
41 [% IF ( suggestionid ) %]
42 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Edit suggestion #[% suggestionid | html %]
44 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Add suggestion
46 [% ELSIF ( op == 'show' ) %]
47 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Show suggestion #[% suggestionid | html %]
49 Suggestions management
53 [% IF ( op == 'show' ) %]
54 <div class="main container-fluid">
56 <div class="col-md-8 col-md-offset-2">
58 <div id="toolbar" class="btn-toolbar">
59 <a class="btn btn-default" id="editsuggestion" href="suggestion.pl?op=edit&suggestionid=[% suggestionid | html %]"><i class="fa fa-pencil"></i> Edit</a>
60 <a class="btn btn-default deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a>
63 <fieldset class="rows">
64 <legend>Bibliographic information</legend>
68 <span class="label">Title:</span>
69 [% IF suggestion.biblionumber %]
70 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% suggestion.biblionumber | uri %]">[% suggestion.title | html %]</a>
78 <span class="label">Author:</span>
82 [% IF ( copyrightdate ) %]
84 <span class="label">Copyright date:</span>
85 [% copyrightdate | html %]
90 <span class="label">ISBN or ISSN or other standard number:</span>
94 [% IF ( publishercode ) %]
96 <span class="label">Publisher:</span>
97 [% publishercode | html %]
102 <span class="label">Publication place:</span>
106 [% IF ( collectiontitle ) %]
108 <span class="label">Collection title:</span>
109 [% collectiontitle | html %]
112 [% IF ( itemtype ) %]
114 <span class="label">Document type:</span>
115 [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', itemtype, 0 ) | html %]
118 [% IF ( patron_reason_loop ) %]
119 <li><span class="label">Reason for suggestion: </span>
120 [% FOREACH patron_reason_loo IN patron_reason_loop %]
121 [% IF patron_reason_loo.authorised_value == patronreason %][% patron_reason_loo.lib | html %][% END %]
127 <span class="label">Notes:</span>
133 <fieldset class="rows"> <legend>Suggestion management</legend>
136 <span class="label">Status:</span>
137 [% SET status_found = 0 %]
138 [% IF ( STATUS == 'ASKED' ) %]
140 [% SET status_found = 1 %]
141 [% ELSIF ( STATUS == 'ACCEPTED' ) %]
143 [% SET status_found = 1 %]
144 [% ELSIF ( STATUS == 'CHECKED' ) %]
146 [% SET status_found = 1 %]
147 [% ELSIF ( STATUS == 'REJECTED' ) %]
149 [% SET status_found = 1 %]
150 [% ELSIF ( STATUS == 'ORDERED' ) %]
152 [% SET status_found = 1 %]
153 [% ELSIF ( STATUS == 'AVAILABLE' ) %]
155 [% SET status_found = 1 %]
157 [% FOREACH s IN SuggestionStatuses %]
158 [% IF STATUS == s.authorised_value %]
160 [% SET status_found = 1 %]
168 <thead><tr><th> </th><th>Date</th><th>By</th></tr></thead>
171 <th>[% tp('purchase suggestion created by', 'Created by:') | html %]</th>
172 <td>[% suggesteddate | $KohaDates %]</td>
174 [% IF ( suggestedby_borrowernumber ) %]
175 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber | uri %]">[% suggestedby_surname | html %], [% suggestedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
176 [% Branches.GetName( suggestedby_branchcode ) | html %] ([% suggestedby_description | html %])
182 <td>[% manageddate | $KohaDates %]</td>
184 [% IF ( managedby_borrowernumber ) %]
185 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber | uri %]">[% managedby_surname | html %], [% managedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
186 [% Branches.GetName( managedby_branchcode ) | html %] ([% managedby_description | html %])
191 <th>Accepted on:</th>
192 <td>[% accepteddate | $KohaDates %]</td>
194 [% IF ( acceptedby_borrowernumber ) %]
195 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber | uri %]">[% acceptedby_surname | html %], [% acceptedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
196 [% Branches.GetName( acceptedby_branchcode ) | html %] ([% acceptedby_description | html %])
203 <fieldset class="rows"> <legend>Acquisition information</legend>
206 <span class="label">Library:</span> [% Branches.GetName( branchcode ) | html %]
209 <span class="label">Fund:</span> [% budgetname | html %]
212 <span class="label">Copies:</span>[% quantity | html %]
215 <span class="label">Currency:</span>[% currency | html %]
218 <span class="label">Price:</span>[% price | $Price %]
221 <span class="label">Total</span>[% total | $Price %]
226 <fieldset class="action">
227 <a href="suggestion.pl"><< Back to suggestions</a>
236 <div class="main container-fluid">
238 <div class="col-md-8 col-md-offset-2">
240 <div class="main container-fluid">
242 <div class="col-sm-10 col-sm-push-2">
248 [% FOR m IN messages %]
249 <div class="dialog [% m.type | html %]">
251 [% CASE 'biblio_exists' %]
252 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.
258 <form id="add_edit" action="suggestion.pl" method="post" class="validated">
259 <input type="hidden" name="redirect" id="redirect" value="[% redirect | html %]" />
260 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber | html %]" />
261 [% IF ( suggestionid ) %]
262 <h1>Edit purchase suggestion #[% suggestionid | html %]</h1>
263 <input type="hidden" name="suggestionid" value="[% suggestionid | html %]"/>
265 <h1>Enter a new purchase suggestion</h1>
267 <fieldset class="rows"> <legend>Bibliographic information</legend><ol>
269 <label for="title" class="required">Title:</label>
270 <input type="text" id="title" name="title" size="80" maxlength="255" value="[% title | html %]" required="required" class="required" />
271 <span class="required">Required</span>
273 <li><label for="author">Author:</label><input type="text" id="author" name="author" size="50" maxlength="80" value="[% author | html %]"/></li>
274 <li><label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" value="[% copyrightdate | html %]" /></li>
275 <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>
276 <li><label for="publishercode">Publisher:</label><input type="text" id="publishercode" name="publishercode" size="50" maxlength="80" value="[% publishercode | html %]"/></li>
277 <li><label for="place">Publication place:</label><input type="text" id="place" name="place" size="50" maxlength="80" value="[% place | html %]"/></li>
278 <li><label for="collectiontitle">Collection title:</label><input type="text" id="collectiontitle" name="collectiontitle" size="50" maxlength="80" value="[% collectiontitle | html %]"/></li>
279 <li><label for="itemtype">Document type:</label>
280 [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20, default=itemtype %]
282 [% IF patron_reason_loop %]
284 <label for="patronreason">Reason for suggestion: </label>
285 <select name="patronreason" id="patronreason">
286 <option value=""> -- Choose -- </option>
287 [% FOREACH patron_reason_loo IN patron_reason_loop %]
288 [% IF patron_reason_loo.authorised_value == patronreason %]
289 <option value="[% patron_reason_loo.authorised_value | html %]" selected="selected">[% patron_reason_loo.lib | html %]</option>
291 <option value="[% patron_reason_loo.authorised_value | html %]">[% patron_reason_loo.lib | html %]</option>
297 <li><label for="note">Notes:</label><textarea name="note" id="note" rows="5" cols="40">[% note | html %]</textarea></li>
300 <fieldset class="rows"> <legend>Suggestion management</legend>
302 [% IF ( suggestionid ) %]
304 <label for="STATUS">Status:</label>
305 <select id="STATUS" name="STATUS">
306 <option value="">No status</option>
308 [% IF (statusselected_ASKED ) %]
309 <option value="ASKED" selected="selected">Pending</option>
311 <option value="ASKED">Pending</option>
314 [% IF (statusselected_ACCEPTED ) %]
315 <option value="ACCEPTED" selected="selected">Accepted</option>
317 <option value="ACCEPTED">Accepted</option>
320 [% IF (statusselected_CHECKED ) %]
321 <option value="CHECKED" selected="selected">Checked</option>
323 <option value="CHECKED">Checked</option>
326 [% IF ( statusselected_REJECTED ) %]
327 <option value="REJECTED" selected="selected">Rejected</option>
329 <option value="REJECTED">Rejected</option>
332 [% FOREACH s IN SuggestionStatuses %]
333 [% IF s.authorised_value == suggestion.STATUS %]
334 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
336 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
342 <label for="reason">Reason</label>
343 <select class="select-reason" id="reason" name="reason">
344 <option value=""> -- Choose a reason -- </option>
345 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
346 [% IF (reasonsloo.lib == suggestion.reason) %]
347 <option value="[% reasonsloo.lib | html %]" selected="selected">[% reasonsloo.lib | html %]</option>
349 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
352 <option value="other">Others...</option>
355 <span id="other_reason" name="other_reason">
356 [% IF other_reason %]
357 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." value="[% suggestion.reason | html %]"/>
359 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." />
361 <a href="#back">Cancel</a>
366 <thead><tr><th> </th><th>Date</th><th>By</th></tr></thead>
369 <th><label for="suggesteddate">[% tp('purchase suggestion created by', 'Created by:') | html %]</label> </th>
370 <td><input type="text" id="suggesteddate" name="suggesteddate" class="datepicker" size="10" maxlength="10" value="[% suggesteddate | $KohaDates %]"/>[% INCLUDE 'date-format.inc' %]</td>
371 <td><input type="hidden" id="suggestedby" name="suggestedby" value="[% suggestedby | html %]"/>[% IF ( suggestedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber | uri %]">[% suggestedby_surname | html %], [% suggestedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a> [% Branches.GetName( suggestedby_branchcode ) | html %] ([% suggestedby_description | html %])[% END %]
375 <th><label for="accepteddate">Accepted on:</label> </th>
376 <td><input type="text" id="accepteddate" name="accepteddate" class="datepicker" size="10" maxlength="10" value="[% accepteddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]</td>
377 <td><input type="hidden" id="acceptedby" name="acceptedby" value="[% acceptedby | html %]"/>[% IF ( acceptedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber | uri %]">[% acceptedby_surname | html %], [% acceptedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a> [% Branches.GetName( acceptedby_branchcode ) | html %] ([% acceptedby_description | html %])[% END %]</td>
383 <label for="managedon">Managed on:</label>
384 <input type="text" id="managedon" name="manageddate" class="datepicker" size="10" maxlength="10" value="[% manageddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]
387 <label for="managedby_name">by:</label>
389 <span id="managedby_name">
390 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% logged_in_user.borrowernumber | uri %]">You</a>
392 [% IF managedby_borrowernumber && logged_in_user.borrowernumber != managedby_borrowernumber %]
393 | Previously was [% INCLUDE 'patron-title.inc' patron=managedby_patron hide_patron_infos_if_needed=1 %] [% Branches.GetName( managedby_branchcode ) | html %] ([% managedby_description | html %])
396 <a id="edit_manager" class="new_window" href="#"><i class="fa fa-search"></i> Select manager</a>
397 [% IF managedby_borrowernumber && logged_in_user.borrowernumber != managedby_borrowernumber %]
398 <a id="restore_previous_manager" href="#"><i class="fa fa-trash"></i> Keep existing manager</a>
400 <input type="hidden" name="managedby" id="managedby" value="[% logged_in_user.borrowernumber | html %]" />
405 <fieldset class="rows"> <legend>Acquisition information</legend><ol>
406 <li><label for="branchcode">Library:</label>
407 <select name="branchcode" id="branchcode">
408 <option value="">Any</option>
409 [% IF branchfilter %]
410 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
412 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
416 <li><label for="budgetid">Fund:</label>
417 <select name="budgetid" id="budgetid">
418 <option value="">Any</option>[% FOREACH budgetsloo IN budgetsloop %]
419 [% 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 %]
421 </li><li><label for="quantity">Copies:</label>
422 <input type="text" size="10" id="quantity" name="quantity" value="[% quantity | html %]" />
425 <label for="currency">Currency:</label>
426 [% FOREACH c IN currencies %]
427 <input type="hidden" value="[% c.rate | html %]" id="currency_rate_[% c.currency | html %]" name="currency_rate_[% c.currency | html %]" />
428 <input type="hidden" id="[% c.currency | html %]" name="[% c.currency | html %]" value="[% c.rate | html %]" />
431 <select name="currency" id="currency">
432 [% FOREACH c IN currencies %]
433 [% IF suggestionid and suggestion.currency == c.currency or not suggestionid and c.active %]
434 <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
435 [% ELSIF not c.archived %]
436 <option value="[% c.currency | html %]">[% c.currency | html %]</option>
441 <li><label for="price">Price:</label>
442 <input type="text" size="20" name="price" id="price" value="[% price | html %]" />
443 </li><li><label for="total">Total: </label>
444 <input type="text" readonly="readonly" id="total" name="total" size="10" value="[% total | html %]"/>
446 </fieldset><input type="hidden" id="returnsuggested" name="returnsuggested" value="[% IF ( returnsuggestedby ) %][% returnsuggestedby | html %][% ELSE %]noone[% END %]"/>
447 <fieldset class="action">
448 <input type="hidden" name="op" value="[% op | html %]" />
449 [% IF ( suggestionid ) %]
450 [% IF ( need_confirm ) %]
451 <input type="hidden" name="save_confirmed" value="1" />
452 <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
454 <input type="submit" value="Save" />
456 <a class="cancel" href="[% IF ( returnsuggestedby ) %]/cgi-bin/koha/members/moremember.pl?borrowernumber=[% returnsuggestedby | uri %]#suggestions[% ELSE %]suggestion.pl[% END %]">Cancel</a>
458 [% IF ( need_confirm ) %]
459 <input type="hidden" name="save_confirmed" value="1" />
460 <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
462 <input type="submit" value="Submit your suggestion" />
464 <a class="cancel" href="suggestion.pl">Cancel</a>
471 <div id="toolbar" class="btn-toolbar">
472 <a class="btn btn-default" id="newsuggestion" href="suggestion.pl?op=add"><i class="fa fa-plus"></i> New purchase suggestion</a>
475 <h1>Suggestions management</h1>
478 [% FOR m IN messages %]
479 <div class="dialog [% m.type | html %]">
481 [% CASE 'already_exists' %]
482 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>)
483 [% CASE 'biblio_exists' %]
484 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.
491 [% UNLESS ( notabs ) %]
492 <div id="suggestiontabs" class="toptabs">
493 <ul class="ui-tabs-nav">
494 [% FOREACH suggestion IN suggestions %]
496 <a href="#tab_[% loop.count | uri %]">
497 [% IF ( suggestion.suggestiontypelabel ) %]
498 [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending
499 [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted
500 [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked
501 [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected
502 [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available
503 [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered
504 [% ELSIF (suggestion.suggestiontypelabel == "Unknown") %]Status unknown
505 [% ELSE %][% suggestion.suggestiontypelabel | html %][% END %]
507 [% IF ( suggestion.suggestiontype ) %]
508 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.suggestiontype ) | html %]
513 ([% suggestion.suggestions_loop.size | html %])</a></li>
519 [% FOREACH suggestion IN suggestions %]
520 <div id="tab_[% loop.count | html %]">
521 <form class="update_suggestions" name="f" method="post" action="/cgi-bin/koha/suggestion/suggestion.pl#tab_[% loop.count | html %]">
523 [% IF ( suggestion.suggestions_loop ) %]
524 <p><a class="checkall" href="#">Check all</a> | <a class="uncheckall" href="#">Uncheck all</a></p>
525 <table id="table_[% loop.count | html %]" class="sorted">
528 <th class="NoSort noExport"> </th>
529 <th class="anti-the">Suggestion</th>
530 <th>Suggested by</th>
531 <th>Suggested on</th>
537 <th class="NoSort noExport"> </th>
541 [% FOREACH suggestions_loo IN suggestion.suggestions_loop %]
544 <input type="checkbox" name="suggestionid" value="[% suggestions_loo.suggestionid | html %]" />
547 <a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | uri %]&op=show" title="suggestion" >
548 [% suggestions_loo.title | html %][% IF ( suggestions_loo.author ) %], by [% suggestions_loo.author | html %][% END %]</a>
550 [% IF ( suggestions_loo.copyrightdate ) %]© [% suggestions_loo.copyrightdate | html %] [% END %]
551 [% IF ( suggestions_loo.volumedesc ) %]; Volume:<i>[% suggestions_loo.volumedesc | html %]</i> [% END %]
552 [% 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 %]
555 <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>
557 <td data-order="[% suggestions_loo.suggesteddate | html %]">
558 [% IF ( suggestions_loo.suggesteddate ) %][% suggestions_loo.suggesteddate | $KohaDates %][% END %]
561 <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>
563 <td data-order="[% suggestions_loo.manageddate | html %]">
564 [% IF ( suggestions_loo.manageddate ) %][% suggestions_loo.manageddate | $KohaDates %][% END %]
567 [% Branches.GetName( suggestions_loo.branchcode ) | html %]
570 [% suggestions_loo.budget_name | html %]
573 [% IF ( suggestions_loo.ASKED ) %]
575 [% ELSIF ( suggestions_loo.ACCEPTED ) %]
577 [% ELSIF ( suggestions_loo.ORDERED ) %]
579 [% ELSIF ( suggestions_loo.REJECTED ) %]
581 [% ELSIF ( suggestions_loo.CHECKED ) %]
583 [% ELSIF ( suggestions_loo.AVAILABLE ) %]
585 [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %]
586 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) | html %]
591 [% IF ( suggestions_loo.reason ) %]
592 <br />([% suggestions_loo.reason | html %])
596 <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>
597 <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>
604 <h2 style="padding-left:1em;">Change selected suggestions</h3>
605 <div class="col-sm-4">
607 <div id="select-reason">
608 <label for="STATUS">Mark selected as: </label>
609 <select name="STATUS" id="STATUS">
610 <option value=""> -- Choose a status --</option>
612 [% IF (statusselected_ASKED ) %]
613 <option value="ASKED" selected="selected">Pending</option>
615 <option value="ASKED">Pending</option>
618 [% IF (statusselected_ACCEPTED ) %]
619 <option value="ACCEPTED" selected="selected">Accepted</option>
621 <option value="ACCEPTED">Accepted</option>
624 [% IF (statusselected_CHECKED ) %]
625 <option value="CHECKED" selected="selected">Checked</option>
627 <option value="CHECKED">Checked</option>
630 [% IF ( statusselected_REJECTED ) %]
631 <option value="REJECTED" selected="selected">Rejected</option>
633 <option value="REJECTED">Rejected</option>
636 [% FOREACH s IN SuggestionStatuses %]
637 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
641 <label for="reason">with this reason:</label>
642 <select name="reason">
643 <option value=""> -- Choose a reason -- </option>
644 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
645 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
647 <option value="other">Others...</option>
650 <span class="other_reason">
651 <input type="text" size="31" name="other_reason" placeholder="please note your reason here..." />
652 <a href="#" class="cancel_note">Cancel</a>
656 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
657 <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="update_status"/>Submit</button></fieldset>
660 <div class="col-sm-4">
662 <label for="itemtype">Update item types with: </label>
663 [% PROCESS 'av-build-dropbox.inc' name="suggestion_itemtype", category="SUGGEST_FORMAT", size = 20 %]
664 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
665 <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="update_itemtype"/>Submit</button></fieldset>
669 <div class="col-sm-4">
671 <label for="delete_[% loop.count | html %]">Delete selected</label>
672 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
673 <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="delete"/>Delete</button></fieldset>
686 [% UNLESS ( op_save ) %]
687 [% UNLESS ( op == 'show' ) %]
690 </div> <!-- /.col-sm-10.col-sm-push-2 -->
692 <div class="col-sm-2 col-sm-pull-10">
695 <form name="suggestionfilter" action="suggestion.pl" method="get">
696 <fieldset class="brief"><ol style="display:block;"><li><label for="displayby">Organize by: </label>
697 <select name="displayby" id="displayby" style="width:auto;">
698 [% IF ( displayby == "STATUS" ) %]
699 <option value="STATUS" selected="selected">Status</option>
701 <option value="STATUS">Status</option>
703 [% IF ( displayby == "branchcode" ) %]
704 <option value="branchcode" selected="selected">Library</option>
706 <option value="branchcode">Library</option>
708 [% IF ( displayby == "itemtype" ) %]
709 <option value="itemtype" selected="selected">Item type</option>
711 <option value="itemtype">Item type</option>
713 [% IF ( displayby == "managedby" ) %]
714 <option value="managedby" selected="selected">Managed by</option>
716 <option value="managedby">Managed by</option>
718 [% IF ( displayby == "acceptedby" ) %]
719 <option value="acceptedby" selected="selected">Accepted by</option>
721 <option value="acceptedby">Accepted by</option>
723 </select> <input type="submit" value="Go" /></li></ol></fieldset>
724 <h4>Filter by: <a style="font-size:80%;font-weight:normal;" href="/cgi-bin/koha/suggestion/suggestion.pl">[clear]</a></h4>
725 <div style="display:block;" id="limits">
727 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Bibliographic information</a></h4>
728 <ol> <li><label for="title"> Title:</label><input type="text" id="title" name="title" value="[% title | html %]" /></li>
729 <li><label for="author"> Author:</label><input type="text" id="author" name="author" value="[% author | html %]" /></li>
730 <li><label for="isbn"> ISBN:</label><input type="text" id="isbn" name="isbn" value="[% isbn | html %]" /></li>
731 <li><label for="publishercode"> Publisher:</label><input type="text" id="publishercode" name="publishercode" value="[% publishercode | html %]" /></li>
732 <li><label for="copyrightdate_filter"> Copyright date:</label><input type="text" id="copyrightdate_filter" name="copyrightdate" value="[% copyrightdate | html %]" /></li>
733 <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>
735 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Suggestion information</a></h4>
738 <label for="STATUS"> Status:</label>
739 <select name="STATUS" id="STATUS">
740 <option value="">Any</option>
742 [% IF (statusselected_ASKED ) %]
743 <option value="ASKED" selected="selected">Pending</option>
745 <option value="ASKED">Pending</option>
748 [% IF (statusselected_ACCEPTED ) %]
749 <option value="ACCEPTED" selected="selected">Accepted</option>
751 <option value="ACCEPTED">Accepted</option>
754 [% IF (statusselected_CHECKED ) %]
755 <option value="CHECKED" selected="selected">Checked</option>
757 <option value="CHECKED">Checked</option>
760 [% IF ( statusselected_REJECTED ) %]
761 <option value="REJECTED" selected="selected">Rejected</option>
763 <option value="REJECTED">Rejected</option>
766 [% FOREACH s IN SuggestionStatuses %]
767 [% IF s.authorised_value == selected_status %]
768 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
770 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
776 <li><label for="suggestedby"> Suggested by:</label><select id="suggestedby" name="suggestedby"><option value="">Any</option>
777 [% 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 %]
780 <label for="suggesteddate_from">Suggested date from:</label>
781 <input type="text" id="suggesteddate_from" size="10" name="suggesteddate_from" value="[% suggesteddate_from | html %]" />
784 <label for="suggesteddate_to">To:</label>
785 <input type="text" id="suggesteddate_to" size="10" name="suggesteddate_to" value="[% suggesteddate_to | html %]" />
787 <li><label for="managedby"> Managed by:</label><select id="managedby" name="managedby"><option value="">Any</option>
788 [% 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 %]
791 <label for="manageddate_from">Management date from:</label>
792 <input type="text" id="manageddate_from" size="10" name="manageddate_from" value="[% manageddate_from | html %]" />
795 <label for="manageddate_to">To:</label>
796 <input type="text" id="manageddate_to" size="10" name="manageddate_to" value="[% manageddate_to | html %]" />
798 <li><label for="acceptedby"> Accepted by:</label><select id="acceptedby" name="acceptedby"><option value="">Any</option>
799 [% 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 %]
802 <label for="accepteddate_from">Accepted date from:</label>
803 <input type="text" id="accepteddate_from" size="10" name="accepteddate_from" value="[% accepteddate_from | html %]" />
806 <label for="accepteddate_to">To:</label>
807 <input type="text" id="accepteddate_to" size="10" name="accepteddate_to" value="[% accepteddate_to | html %]" />
809 <li><input type="submit" value="Go" /></li></ol>
812 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Acquisition information</a></h4>
813 <ol><li><label for="budgetid"> Book fund:</label>
814 <select name="budgetid" id="budgetid">
815 <option value="__ANY__">Any</option>
816 [% IF budgetid == '__NONE__' %]
817 <option value="__NONE__" selected="selected">None</option>
819 <option value="__NONE__">None</option>
821 [% FOREACH budgetsloo IN budgetsloop %]
822 [% 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 %]
825 <li><label for="branchcode">Library:</label>
826 <select name="branchcode" id="branchcode">
827 <option value="__ANY__">Any</option>
828 [% IF branchfilter %]
829 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
831 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
833 </select></li><li><input type="submit" value="Go" /></li></ol>
836 [% INCLUDE 'acquisitions-menu.inc' %]
839 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
840 </div> <!-- /.row -->
847 [% MACRO jsinclude BLOCK %]
848 [% INCLUDE 'calendar.inc' %]
849 [% IF ( op == 'show' || op_else ) %]
851 $(document).ready(function(){
852 $(".deletesuggestion").on("click",function(){
853 return confirm(_("Are you sure you want to delete this suggestion?"));
859 [% INCLUDE 'datatables.inc' %]
860 [% INCLUDE 'columns_settings.inc' %]
861 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
864 $(document).ready(function() {
865 $('#suggestiontabs').tabs();
867 columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'suggestions', 'suggestions', 'json' ) | $raw %]
868 [% FOREACH suggestion IN suggestions %]
869 [% IF ( suggestion.suggestions_loop ) %]
870 KohaTable("table_[% loop.count| html %]", {
871 "sorting": [[ 1, "asc" ]],
874 { "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] },
875 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
877 }, columns_settings );
881 $(".checkall").click(function(e){
883 $(this).parents('form').checkCheckboxes();
886 $(".uncheckall").click(function(e){
888 $(this).parents('form').unCheckCheckboxes();
891 $(".other_reason").hide();
892 $("select[name='reason']").change(function(){
893 if($(this).val() == "other"){
895 $(this).siblings(".other_reason").show();
899 $("a.cancel_note").click(function(e) {
900 $(this).parent().siblings("select").show().find("option[value='']").attr("selected","selected");
901 $(this).siblings("input[name='other_reason']").hide();
904 $("h4.local_collapse a").click(function(){
905 $(this).parent().parent().find("ol").toggle();
908 // http://jqueryui.com/demos/datepicker/#date-range
909 var dates = $( "#suggesteddate_from, #suggesteddate_to" ).datepicker({
912 onSelect: function( selectedDate ) {
913 var option = this.id == "suggesteddate_from" ? "minDate" : "maxDate",
914 instance = $( this ).data( "datepicker" );
915 date = $.datepicker.parseDate(
916 instance.settings.dateFormat ||
917 $.datepicker._defaults.dateFormat,
918 selectedDate, instance.settings );
919 dates.not( this ).datepicker( "option", option, date );
922 var datesMD = $( "#manageddate_from, #manageddate_to" ).datepicker({
925 onSelect: function( selectedDate ) {
926 var option = this.id == "manageddate_from" ? "minDate" : "maxDate",
927 instance = $( this ).data( "datepicker" );
928 date = $.datepicker.parseDate(
929 instance.settings.dateFormat ||
930 $.datepicker._defaults.dateFormat,
931 selectedDate, instance.settings );
932 datesMD.not( this ).datepicker( "option", option, date );
935 var datesAD = $( "#accepteddate_from, #accepteddate_to" ).datepicker({
938 onSelect: function( selectedDate ) {
939 var option = this.id == "accepteddate_from" ? "minDate" : "maxDate",
940 instance = $( this ).data( "datepicker" );
941 date = $.datepicker.parseDate(
942 instance.settings.dateFormat ||
943 $.datepicker._defaults.dateFormat,
944 selectedDate, instance.settings );
945 datesAD.not( this ).datepicker( "option", option, date );
949 $("button[type='submit']").on("click", function(e) {
950 var form = $(this).parents("form");
951 var action = $(this).val();
952 var selected_suggestions = $(form).find("input[name='suggestionid']:checked");
953 if ( selected_suggestions.length == 0 ) {
954 alert(_("Please select at least one suggestion"));
958 if ( action == "delete" ) {
959 if ( selected_suggestions.length == 1 ) {
960 if ( ! confirm(_("Are you sure you want to delete this suggestion?")) ) {
964 } else if ( selected_suggestions.length > 1 ) {
965 if ( ! confirm(_("Are you sure you want to delete these suggestions?")) ) {
972 $('<input />').attr('type', 'hidden')
974 .attr('value', action)
984 function editManagerPopup() {
985 window.open("/cgi-bin/koha/admin/add_user_search.pl?selection_type=select",
987 'width=740,height=450,location=yes,toolbar=no,'
988 + 'scrollbars=yes,resize=yes'
991 function select_user(borrowernumber, borrower) {
992 $("#managedby_name").empty();
993 $("#managedby").val('');
994 var borrowername = borrower.firstname + ' ' + borrower.surname;
995 if (borrowernumber) {
996 var managerlink = '<a href="/cgi-bin/koha/members/moremember.pl'
997 + '?borrowernumber=' + borrowernumber + '">'
998 + borrowername + '</a>';
999 $('#managedby_name').html(managerlink);
1000 $('#managedby').val(borrowernumber);
1004 $(document).ready(function(){
1006 $("#quantity,#price,#currency").on("change",function(){
1010 [% IF other_reason %]
1011 $(".select-reason").hide();
1012 $(".select-reason").find("option[value='other']").attr("selected","selected");
1013 $("#other_reason").show();
1015 $("#other_reason").hide();
1017 $(".select-reason").change(function(){
1018 if($(this).val() == "other"){
1020 $("#other_reason").show();
1023 $("a[href*=back]").click(function(){
1024 $(".select-reason").show().find("option[value='']").attr("selected","selected");
1025 $("#other_reason").hide();
1028 $("#edit_manager").on("click",function(e){
1032 $("#restore_previous_manager").on("click",function(e){
1035 $("#managedby_name").empty();
1036 $("#managedby").val('');
1037 var borrowername = "[% managedby_firstname | html %] [% managedby_surname | html %]";
1038 var managerlink = '<a href="/cgi-bin/koha/members/moremember.pl'
1039 + '?borrowernumber=[% managedby_borrowernumber | html %]">'
1040 + borrowername + '</a>';
1041 $('#managedby_name').html(managerlink);
1042 $('#managedby').val([% managedby_borrowernumber | html %]);
1047 [% Asset.js("js/acq.js") | $raw %]
1048 [% Asset.js("js/acquisitions-menu.js") | $raw %]
1051 [% INCLUDE 'intranet-bottom.inc' %]