1 [% PROCESS 'i18n.inc' %]
5 [% USE AuthorisedValues %]
8 [% USE ColumnsSettings %]
10 [% INCLUDE 'doc-head-open.inc' %]
11 <title>Koha › Acquisitions ›
13 [% IF ( suggestionid ) %]
14 Suggestions › Edit suggestion #[% suggestionid | html %]
16 Suggestions › Add suggestion
18 [% ELSIF ( op == 'show' ) %]
19 Suggestions › Show suggestion #[% suggestionid | html %]
21 Suggestions management
24 [% INCLUDE 'doc-head-close.inc' %]
27 h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief ol { display : none; }
28 .overlay { top: 180px; left: 50%; position: absolute; margin-left: -100px; width: 200px; text-align: center; display: none; margin-top: -10px; background: #eeffd4; padding: .5em; color: #000; } div.note { background: transparent none; border-style: dotted; border-width: 1px 0 0 0; font-size : 90%; padding: 2px 0 0 0; } div.note i { color: #CCC; }
33 <body id="acq_suggestion" class="acq">
34 [% INCLUDE 'header.inc' %]
35 [% INCLUDE 'cat-search.inc' %]
36 <div id="breadcrumbs">
37 <a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> ›
39 [% IF ( suggestionid ) %]
40 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Edit suggestion #[% suggestionid | html %]
42 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Add suggestion
44 [% ELSIF ( op == 'show' ) %]
45 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Show suggestion #[% suggestionid | html %]
47 Suggestions management
51 [% IF ( op == 'show' ) %]
52 <div class="main container-fluid">
54 <div class="col-md-8 col-md-offset-2">
56 <div id="toolbar" class="btn-toolbar">
57 <a class="btn btn-default" id="editsuggestion" href="suggestion.pl?op=edit&suggestionid=[% suggestionid | html %]"><i class="fa fa-pencil"></i> Edit</a>
58 <a class="btn btn-default deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a>
61 <fieldset class="rows">
62 <legend>Bibliographic information</legend>
66 <span class="label">Title:</span>
67 [% IF suggestion.biblionumber %]
68 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% suggestion.biblionumber | uri %]">[% suggestion.title | html %]</a>
76 <span class="label">Author:</span>
80 [% IF ( copyrightdate ) %]
82 <span class="label">Copyright date:</span>
83 [% copyrightdate | html %]
88 <span class="label">ISBN or ISSN or other standard number:</span>
92 [% IF ( publishercode ) %]
94 <span class="label">Publisher:</span>
95 [% publishercode | html %]
100 <span class="label">Publication place:</span>
104 [% IF ( collectiontitle ) %]
106 <span class="label">Collection title:</span>
107 [% collectiontitle | html %]
110 [% IF ( itemtype ) %]
112 <span class="label">Document type:</span>
113 [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', itemtype, 0 ) | html %]
116 [% IF ( patron_reason_loop ) %]
117 <li><span class="label">Reason for suggestion: </span>
118 [% FOREACH patron_reason_loo IN patron_reason_loop %]
119 [% IF patron_reason_loo.authorised_value == patronreason %][% patron_reason_loo.lib | html %][% END %]
125 <span class="label">Notes:</span>
131 <fieldset class="rows"> <legend>Suggestion management</legend>
134 <span class="label">Status:</span>
135 [% SET status_found = 0 %]
136 [% IF ( STATUS == 'ASKED' ) %]
138 [% SET status_found = 1 %]
139 [% ELSIF ( STATUS == 'ACCEPTED' ) %]
141 [% SET status_found = 1 %]
142 [% ELSIF ( STATUS == 'CHECKED' ) %]
144 [% SET status_found = 1 %]
145 [% ELSIF ( STATUS == 'REJECTED' ) %]
147 [% SET status_found = 1 %]
148 [% ELSIF ( STATUS == 'ORDERED' ) %]
150 [% SET status_found = 1 %]
151 [% ELSIF ( STATUS == 'AVAILABLE' ) %]
153 [% SET status_found = 1 %]
155 [% FOREACH s IN SuggestionStatuses %]
156 [% IF STATUS == s.authorised_value %]
158 [% SET status_found = 1 %]
166 <thead><tr><th> </th><th>Date</th><th>By</th></tr></thead>
169 <th>[% tp('purchase suggestion created by', 'Created by:') | html %]</th>
170 <td>[% suggesteddate | $KohaDates %]</td>
172 [% IF ( suggestedby_patron.borrowernumber ) %]
173 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_patron.borrowernumber | uri %]">[% suggestedby_patron.surname | html %], [% suggestedby_patron.firstname | html %] ([% suggestedby_patron.cardnumber | html %])</a>
174 [% Branches.GetName( suggestedby_patron.branchcode ) | html %] ([% suggestedby_patron.category.description | html %])
180 <td>[% manageddate | $KohaDates %]</td>
182 [% IF ( managedby_patron.borrowernumber ) %]
183 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_patron.borrowernumber | uri %]">[% managedby_patron.surname | html %], [% managedby_patron.firstname | html %] ([% suggestedby_patron.cardnumber | html %])</a>
184 [% Branches.GetName( managedby_patron.branchcode ) | html %] ([% managedby_patron.category.description | html %])
189 <th>Accepted on:</th>
190 <td>[% accepteddate | $KohaDates %]</td>
192 [% IF ( acceptedby_patron.borrowernumber ) %]
193 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_patron.borrowernumber | uri %]">[% acceptedby_patron.surname | html %], [% acceptedby_patron.firstname | html %] ([% suggestedby_patron.cardnumber | html %])</a>
194 [% Branches.GetName( acceptedby_patron.branchcode ) | html %] ([% acceptedby_patron.category.description | html %])
201 <fieldset class="rows"> <legend>Acquisition information</legend>
204 <span class="label">Library:</span> [% Branches.GetName( branchcode ) | html %]
207 <span class="label">Fund:</span> [% budgetname | html %]
210 <span class="label">Copies:</span>[% quantity | html %]
213 <span class="label">Currency:</span>[% currency | html %]
216 <span class="label">Price:</span>[% price | $Price %]
219 <span class="label">Total</span>[% total | $Price %]
224 <fieldset class="action">
225 <a href="suggestion.pl"><< Back to suggestions</a>
233 [% IF op == 'save' %]
234 <div class="main container-fluid">
236 <div class="col-md-8 col-md-offset-2">
238 <div class="main container-fluid">
240 <div class="col-sm-10 col-sm-push-2">
245 [% IF op == 'save' %]
246 [% FOR m IN messages %]
247 <div class="dialog [% m.type | html %]">
249 [% CASE 'biblio_exists' %]
250 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.
256 <form id="add_edit" action="suggestion.pl" method="post" class="validated">
257 <input type="hidden" name="redirect" id="redirect" value="[% redirect | html %]" />
258 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber | html %]" />
259 [% IF ( suggestionid ) %]
260 <h1>Edit purchase suggestion #[% suggestionid | html %]</h1>
261 <input type="hidden" name="suggestionid" value="[% suggestionid | html %]"/>
263 <h1>Enter a new purchase suggestion</h1>
265 <fieldset class="rows"> <legend>Bibliographic information</legend><ol>
267 <label for="title" class="required">Title:</label>
268 <input type="text" id="title" name="title" size="80" maxlength="255" value="[% title | html %]" required="required" class="required" />
269 <span class="required">Required</span>
271 <li><label for="author">Author:</label><input type="text" id="author" name="author" size="50" maxlength="80" value="[% author | html %]"/></li>
272 <li><label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" value="[% copyrightdate | html %]" /></li>
273 <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>
274 <li><label for="publishercode">Publisher:</label><input type="text" id="publishercode" name="publishercode" size="50" maxlength="80" value="[% publishercode | html %]"/></li>
275 <li><label for="place">Publication place:</label><input type="text" id="place" name="place" size="50" maxlength="80" value="[% place | html %]"/></li>
276 <li><label for="collectiontitle">Collection title:</label><input type="text" id="collectiontitle" name="collectiontitle" size="50" maxlength="80" value="[% collectiontitle | html %]"/></li>
277 <li><label for="itemtype">Document type:</label>
278 [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20, default=itemtype %]
280 [% IF patron_reason_loop %]
282 <label for="patronreason">Reason for suggestion: </label>
283 <select name="patronreason" id="patronreason">
284 <option value=""> -- Choose -- </option>
285 [% FOREACH patron_reason_loo IN patron_reason_loop %]
286 [% IF patron_reason_loo.authorised_value == patronreason %]
287 <option value="[% patron_reason_loo.authorised_value | html %]" selected="selected">[% patron_reason_loo.lib | html %]</option>
289 <option value="[% patron_reason_loo.authorised_value | html %]">[% patron_reason_loo.lib | html %]</option>
295 <li><label for="note">Notes:</label><textarea name="note" id="note" rows="5" cols="40">[% note | html %]</textarea></li>
298 <fieldset class="rows"> <legend>Suggestion management</legend>
300 [% IF ( suggestionid ) %]
302 <label for="STATUS">Status:</label>
303 <select id="STATUS" name="STATUS">
304 <option value="">No status</option>
306 [% IF (statusselected_ASKED ) %]
307 <option value="ASKED" selected="selected">Pending</option>
309 <option value="ASKED">Pending</option>
312 [% IF (statusselected_ACCEPTED ) %]
313 <option value="ACCEPTED" selected="selected">Accepted</option>
315 <option value="ACCEPTED">Accepted</option>
318 [% IF (statusselected_CHECKED ) %]
319 <option value="CHECKED" selected="selected">Checked</option>
321 <option value="CHECKED">Checked</option>
324 [% IF ( statusselected_REJECTED ) %]
325 <option value="REJECTED" selected="selected">Rejected</option>
327 <option value="REJECTED">Rejected</option>
330 [% FOREACH s IN SuggestionStatuses %]
331 [% IF s.authorised_value == suggestion.STATUS %]
332 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
334 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
340 <label for="reason">Reason</label>
341 <select class="select-reason" id="reason" name="reason">
342 <option value=""> -- Choose a reason -- </option>
343 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
344 [% IF (reasonsloo.lib == suggestion.reason) %]
345 <option value="[% reasonsloo.lib | html %]" selected="selected">[% reasonsloo.lib | html %]</option>
347 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
350 <option value="other">Others...</option>
353 <span id="other_reason" name="other_reason">
354 [% IF other_reason %]
355 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." value="[% suggestion.reason | html %]"/>
357 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." />
359 <a href="#back">Cancel</a>
364 <thead><tr><th> </th><th>Date</th><th>By</th></tr></thead>
367 <th><label for="suggesteddate">[% tp('purchase suggestion created by', 'Created by:') | html %]</label> </th>
368 <td><input type="text" id="suggesteddate" name="suggesteddate" class="datepicker" size="10" maxlength="10" value="[% suggesteddate | $KohaDates %]"/>[% INCLUDE 'date-format.inc' %]</td>
369 <td><input type="hidden" id="suggestedby" name="suggestedby" value="[% suggestedby | html %]"/>[% IF ( suggestedby_patron.borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_patron.borrowernumber | uri %]">[% suggestedby_patron.surname | html %], [% suggestedby_patron.firstname | html %] ([% suggestedby_patron.cardnumber | html %])</a> [% Branches.GetName( suggestedby_patron.branchcode ) | html %] ([% suggestedby_patron.category.description | html %])[% END %]
373 <th><label for="accepteddate">Accepted on:</label> </th>
374 <td><input type="text" id="accepteddate" name="accepteddate" class="datepicker" size="10" maxlength="10" value="[% accepteddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]</td>
375 <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>
381 <label for="managedon">Managed on:</label>
382 <input type="text" id="managedon" name="manageddate" class="datepicker" size="10" maxlength="10" value="[% manageddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]
385 <label for="managedby_name">by:</label>
387 <span id="managedby_name">
388 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% logged_in_user.borrowernumber | uri %]">You</a>
390 [% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %]
391 | 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 %])
394 <a id="edit_manager" class="new_window" href="#"><i class="fa fa-search"></i> Select manager</a>
395 [% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %]
396 <a id="restore_previous_manager" href="#"><i class="fa fa-trash"></i> Keep existing manager</a>
398 <input type="hidden" name="managedby" id="managedby" value="[% logged_in_user.borrowernumber | html %]" />
403 <fieldset class="rows"> <legend>Acquisition information</legend><ol>
404 <li><label for="branchcode">Library:</label>
405 <select name="branchcode" id="branchcode">
406 <option value="">Any</option>
407 [% IF branchfilter %]
408 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
410 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
414 <li><label for="budgetid">Fund:</label>
415 <select name="budgetid" id="budgetid">
416 <option value="">Any</option>[% FOREACH budgetsloo IN budgetsloop %]
417 [% 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 %]
419 </li><li><label for="quantity">Copies:</label>
420 <input type="text" size="10" id="quantity" name="quantity" value="[% quantity | html %]" />
423 <label for="currency">Currency:</label>
424 [% FOREACH c IN currencies %]
425 <input type="hidden" value="[% c.rate | html %]" id="currency_rate_[% c.currency | html %]" name="currency_rate_[% c.currency | html %]" />
426 <input type="hidden" id="[% c.currency | html %]" name="[% c.currency | html %]" value="[% c.rate | html %]" />
429 <select name="currency" id="currency">
430 [% FOREACH c IN currencies %]
431 [% IF suggestionid and suggestion.currency == c.currency or not suggestionid and c.active %]
432 <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
433 [% ELSIF not c.archived %]
434 <option value="[% c.currency | html %]">[% c.currency | html %]</option>
439 <li><label for="price">Price:</label>
440 <input type="text" size="20" name="price" id="price" value="[% price | html %]" />
441 </li><li><label for="total">Total: </label>
442 <input type="text" readonly="readonly" id="total" name="total" size="10" value="[% total | html %]"/>
444 </fieldset><input type="hidden" id="returnsuggested" name="returnsuggested" value="[% IF ( returnsuggestedby ) %][% returnsuggestedby | html %][% ELSE %]noone[% END %]"/>
445 <fieldset class="action">
446 <input type="hidden" name="op" value="[% op | html %]" />
447 [% IF ( suggestionid ) %]
448 [% IF ( need_confirm ) %]
449 <input type="hidden" name="save_confirmed" value="1" />
450 <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
452 <input type="submit" value="Save" />
454 <a class="cancel" href="[% IF ( returnsuggestedby ) %]/cgi-bin/koha/members/moremember.pl?borrowernumber=[% returnsuggestedby | uri %]#suggestions[% ELSE %]suggestion.pl[% END %]">Cancel</a>
456 [% IF ( need_confirm ) %]
457 <input type="hidden" name="save_confirmed" value="1" />
458 <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
460 <input type="submit" value="Submit your suggestion" />
462 <a class="cancel" href="suggestion.pl">Cancel</a>
468 [% IF op == 'else' %]
469 <div id="toolbar" class="btn-toolbar">
470 <a class="btn btn-default" id="newsuggestion" href="suggestion.pl?op=add"><i class="fa fa-plus"></i> New purchase suggestion</a>
473 <h1>Suggestions management</h1>
476 [% FOR m IN messages %]
477 <div class="dialog [% m.type | html %]">
479 [% CASE 'already_exists' %]
480 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>)
481 [% CASE 'biblio_exists' %]
482 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.
489 [% UNLESS ( notabs ) %]
490 <div id="suggestiontabs" class="toptabs">
491 <ul class="ui-tabs-nav">
492 [% FOREACH suggestion IN suggestions %]
494 <a href="#tab_[% loop.count | uri %]">
495 [% IF ( suggestion.suggestiontypelabel ) %]
496 [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending
497 [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted
498 [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked
499 [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected
500 [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available
501 [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered
502 [% ELSIF (suggestion.suggestiontypelabel == "Unknown") %]Status unknown
503 [% ELSE %][% suggestion.suggestiontypelabel | html %][% END %]
505 [% IF ( suggestion.suggestiontype ) %]
506 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.suggestiontype ) | html %]
511 ([% suggestion.suggestions_loop.size | html %])</a></li>
517 [% FOREACH suggestion IN suggestions %]
518 <div id="tab_[% loop.count | html %]">
519 <form class="update_suggestions" name="f" method="post" action="/cgi-bin/koha/suggestion/suggestion.pl#tab_[% loop.count | html %]">
521 [% IF ( suggestion.suggestions_loop ) %]
522 <p><a class="checkall" href="#">Check all</a> | <a class="uncheckall" href="#">Uncheck all</a></p>
523 <table id="table_[% loop.count | html %]" class="sorted">
526 <th class="NoSort noExport"> </th>
527 <th class="anti-the">Suggestion</th>
528 <th>Suggested by</th>
529 <th>Suggested on</th>
535 <th class="NoSort noExport"> </th>
539 [% FOREACH suggestions_loo IN suggestion.suggestions_loop %]
542 <input type="checkbox" name="suggestionid" value="[% suggestions_loo.suggestionid | html %]" />
545 <a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | uri %]&op=show" title="suggestion" >
546 [% suggestions_loo.title | html %][% IF ( suggestions_loo.author ) %], by [% suggestions_loo.author | html %][% END %]</a>
548 [% IF ( suggestions_loo.copyrightdate ) %]© [% suggestions_loo.copyrightdate | html %] [% END %]
549 [% IF ( suggestions_loo.volumedesc ) %]; Volume:<i>[% suggestions_loo.volumedesc | html %]</i> [% END %]
550 [% 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 %]
553 <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>
555 <td data-order="[% suggestions_loo.suggesteddate | html %]">
556 [% IF ( suggestions_loo.suggesteddate ) %][% suggestions_loo.suggesteddate | $KohaDates %][% END %]
559 <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>
561 <td data-order="[% suggestions_loo.manageddate | html %]">
562 [% IF ( suggestions_loo.manageddate ) %][% suggestions_loo.manageddate | $KohaDates %][% END %]
565 [% Branches.GetName( suggestions_loo.branchcode ) | html %]
568 [% suggestions_loo.budget_name | html %]
571 [% IF ( suggestions_loo.ASKED ) %]
573 [% ELSIF ( suggestions_loo.ACCEPTED ) %]
575 [% ELSIF ( suggestions_loo.ORDERED ) %]
577 [% ELSIF ( suggestions_loo.REJECTED ) %]
579 [% ELSIF ( suggestions_loo.CHECKED ) %]
581 [% ELSIF ( suggestions_loo.AVAILABLE ) %]
583 [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %]
584 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) | html %]
589 [% IF ( suggestions_loo.reason ) %]
590 <br />([% suggestions_loo.reason | html %])
594 <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>
595 <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>
602 <h2 style="padding-left:1em;">Change selected suggestions</h3>
603 <div class="col-sm-4">
605 <div id="select-reason">
606 <label for="STATUS">Mark selected as: </label>
607 <select name="STATUS" id="STATUS">
608 <option value=""> -- Choose a status --</option>
610 [% IF (statusselected_ASKED ) %]
611 <option value="ASKED" selected="selected">Pending</option>
613 <option value="ASKED">Pending</option>
616 [% IF (statusselected_ACCEPTED ) %]
617 <option value="ACCEPTED" selected="selected">Accepted</option>
619 <option value="ACCEPTED">Accepted</option>
622 [% IF (statusselected_CHECKED ) %]
623 <option value="CHECKED" selected="selected">Checked</option>
625 <option value="CHECKED">Checked</option>
628 [% IF ( statusselected_REJECTED ) %]
629 <option value="REJECTED" selected="selected">Rejected</option>
631 <option value="REJECTED">Rejected</option>
634 [% FOREACH s IN SuggestionStatuses %]
635 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
639 <label for="reason">with this reason:</label>
640 <select name="reason">
641 <option value=""> -- Choose a reason -- </option>
642 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
643 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
645 <option value="other">Others...</option>
648 <span class="other_reason">
649 <input type="text" size="31" name="other_reason" placeholder="please note your reason here..." />
650 <a href="#" class="cancel_note">Cancel</a>
654 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
655 <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="update_status"/>Submit</button></fieldset>
658 <div class="col-sm-4">
660 <label for="itemtype">Update item types with: </label>
661 [% PROCESS 'av-build-dropbox.inc' name="suggestion_itemtype", category="SUGGEST_FORMAT", size = 20 %]
662 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
663 <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="update_itemtype"/>Submit</button></fieldset>
667 <div class="col-sm-2">
669 <label for="set_manager_[% loop.count %]">Update manager</label><br/>
670 <a id="edit_manager" class="new_window" href="#"><i class="fa fa-search"></i> Select manager</a>
671 <span id="managedby_name"></span>
672 <input type="hidden" name="suggestion_managedby" id="managedby" value="[% logged_in_user.borrowernumber | html %]" />
673 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
674 <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="update_manager"/>Submit</button></fieldset>
678 <div class="col-sm-2">
680 <label for="delete_[% loop.count | html %]">Delete selected</label>
681 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
682 <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="delete"/>Delete</button></fieldset>
696 [% UNLESS op == 'save' %]
697 [% UNLESS ( op == 'show' ) %]
700 </div> <!-- /.col-sm-10.col-sm-push-2 -->
702 <div class="col-sm-2 col-sm-pull-10">
705 <form name="suggestionfilter" action="suggestion.pl" method="get">
706 <fieldset class="brief"><ol style="display:block;"><li><label for="displayby">Organize by: </label>
707 <select name="displayby" id="displayby" style="width:auto;">
708 [% IF ( displayby == "STATUS" ) %]
709 <option value="STATUS" selected="selected">Status</option>
711 <option value="STATUS">Status</option>
713 [% IF ( displayby == "branchcode" ) %]
714 <option value="branchcode" selected="selected">Library</option>
716 <option value="branchcode">Library</option>
718 [% IF ( displayby == "itemtype" ) %]
719 <option value="itemtype" selected="selected">Item type</option>
721 <option value="itemtype">Item type</option>
723 [% IF ( displayby == "managedby" ) %]
724 <option value="managedby" selected="selected">Managed by</option>
726 <option value="managedby">Managed by</option>
728 [% IF ( displayby == "acceptedby" ) %]
729 <option value="acceptedby" selected="selected">Accepted by</option>
731 <option value="acceptedby">Accepted by</option>
733 </select> <input type="submit" value="Go" /></li></ol></fieldset>
734 <h4>Filter by: <a style="font-size:80%;font-weight:normal;" href="/cgi-bin/koha/suggestion/suggestion.pl">[clear]</a></h4>
735 <div style="display:block;" id="limits">
737 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Bibliographic information</a></h4>
738 <ol> <li><label for="title"> Title:</label><input type="text" id="title" name="title" value="[% title | html %]" /></li>
739 <li><label for="author"> Author:</label><input type="text" id="author" name="author" value="[% author | html %]" /></li>
740 <li><label for="isbn"> ISBN:</label><input type="text" id="isbn" name="isbn" value="[% isbn | html %]" /></li>
741 <li><label for="publishercode"> Publisher:</label><input type="text" id="publishercode" name="publishercode" value="[% publishercode | html %]" /></li>
742 <li><label for="copyrightdate_filter"> Copyright date:</label><input type="text" id="copyrightdate_filter" name="copyrightdate" value="[% copyrightdate | html %]" /></li>
743 <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>
745 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Suggestion information</a></h4>
748 <label for="STATUS"> Status:</label>
749 <select name="STATUS" id="STATUS">
750 <option value="">Any</option>
752 [% IF (statusselected_ASKED ) %]
753 <option value="ASKED" selected="selected">Pending</option>
755 <option value="ASKED">Pending</option>
758 [% IF (statusselected_ACCEPTED ) %]
759 <option value="ACCEPTED" selected="selected">Accepted</option>
761 <option value="ACCEPTED">Accepted</option>
764 [% IF (statusselected_CHECKED ) %]
765 <option value="CHECKED" selected="selected">Checked</option>
767 <option value="CHECKED">Checked</option>
770 [% IF ( statusselected_REJECTED ) %]
771 <option value="REJECTED" selected="selected">Rejected</option>
773 <option value="REJECTED">Rejected</option>
776 [% FOREACH s IN SuggestionStatuses %]
777 [% IF s.authorised_value == selected_status %]
778 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
780 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
786 <li><label for="suggestedby"> Suggested by:</label><select id="suggestedby" name="suggestedby"><option value="">Any</option>
787 [% 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 %]
790 <label for="suggesteddate_from">Suggested date from:</label>
791 <input type="text" id="suggesteddate_from" size="10" name="suggesteddate_from" value="[% suggesteddate_from | html %]" />
794 <label for="suggesteddate_to">To:</label>
795 <input type="text" id="suggesteddate_to" size="10" name="suggesteddate_to" value="[% suggesteddate_to | html %]" />
797 <li><label for="managedby"> Managed by:</label><select id="managedby" name="managedby"><option value="">Any</option>
798 [% 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 %]
801 <label for="manageddate_from">Management date from:</label>
802 <input type="text" id="manageddate_from" size="10" name="manageddate_from" value="[% manageddate_from | html %]" />
805 <label for="manageddate_to">To:</label>
806 <input type="text" id="manageddate_to" size="10" name="manageddate_to" value="[% manageddate_to | html %]" />
808 <li><label for="acceptedby"> Accepted by:</label><select id="acceptedby" name="acceptedby"><option value="">Any</option>
809 [% 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 %]
812 <label for="accepteddate_from">Accepted date from:</label>
813 <input type="text" id="accepteddate_from" size="10" name="accepteddate_from" value="[% accepteddate_from | html %]" />
816 <label for="accepteddate_to">To:</label>
817 <input type="text" id="accepteddate_to" size="10" name="accepteddate_to" value="[% accepteddate_to | html %]" />
819 <li><input type="submit" value="Go" /></li></ol>
822 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Acquisition information</a></h4>
823 <ol><li><label for="budgetid"> Book fund:</label>
824 <select name="budgetid" id="budgetid">
825 <option value="__ANY__">Any</option>
826 [% IF budgetid == '__NONE__' %]
827 <option value="__NONE__" selected="selected">None</option>
829 <option value="__NONE__">None</option>
831 [% FOREACH budgetsloo IN budgetsloop %]
832 [% 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 %]
835 <li><label for="branchcode">Library:</label>
836 <select name="branchcode" id="branchcode">
837 <option value="__ANY__">Any</option>
838 [% IF branchfilter %]
839 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
841 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
843 </select></li><li><input type="submit" value="Go" /></li></ol>
846 [% INCLUDE 'acquisitions-menu.inc' %]
849 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
850 </div> <!-- /.row -->
857 [% MACRO jsinclude BLOCK %]
858 [% INCLUDE 'calendar.inc' %]
860 <script type="text/javascript">
861 function editManagerPopup() {
862 window.open("/cgi-bin/koha/suggestion/add_user_search.pl?selection_type=select",
864 'width=740,height=450,location=yes,toolbar=no,'
865 + 'scrollbars=yes,resize=yes'
868 function select_user(borrowernumber, borrower) {
869 $("#managedby_name").empty();
870 $("#managedby").val('');
871 var borrowername = borrower.firstname + ' ' + borrower.surname;
872 if (borrowernumber) {
873 var managerlink = '<a href="/cgi-bin/koha/members/moremember.pl'
874 + '?borrowernumber=' + borrowernumber + '">'
875 + borrowername + '</a>';
876 $('#managedby_name').html(managerlink);
877 $('#managedby').val(borrowernumber);
881 $(document).ready(function(){
882 $("#edit_manager").on("click",function(e){
889 [% IF ( op == 'show' || op == 'else' ) %]
891 $(document).ready(function(){
892 $(".deletesuggestion").on("click",function(){
893 return confirm(_("Are you sure you want to delete this suggestion?"));
898 [% IF op == 'else' %]
899 [% INCLUDE 'datatables.inc' %]
900 [% INCLUDE 'columns_settings.inc' %]
901 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
904 $(document).ready(function() {
905 $('#suggestiontabs').tabs();
907 columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'suggestions', 'suggestions', 'json' ) | $raw %]
908 [% FOREACH suggestion IN suggestions %]
909 [% IF ( suggestion.suggestions_loop ) %]
910 KohaTable("table_[% loop.count| html %]", {
911 "sorting": [[ 1, "asc" ]],
914 { "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] },
915 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
917 }, columns_settings );
921 $(".checkall").click(function(e){
923 $(this).parents('form').checkCheckboxes();
926 $(".uncheckall").click(function(e){
928 $(this).parents('form').unCheckCheckboxes();
931 $(".other_reason").hide();
932 $("select[name='reason']").change(function(){
933 if($(this).val() == "other"){
935 $(this).siblings(".other_reason").show();
939 $("a.cancel_note").click(function(e) {
940 $(this).parent().siblings("select").show().find("option[value='']").attr("selected","selected");
941 $(this).siblings("input[name='other_reason']").hide();
944 $("h4.local_collapse a").click(function(){
945 $(this).parent().parent().find("ol").toggle();
948 // http://jqueryui.com/demos/datepicker/#date-range
949 var dates = $( "#suggesteddate_from, #suggesteddate_to" ).datepicker({
952 onSelect: function( selectedDate ) {
953 var option = this.id == "suggesteddate_from" ? "minDate" : "maxDate",
954 instance = $( this ).data( "datepicker" );
955 date = $.datepicker.parseDate(
956 instance.settings.dateFormat ||
957 $.datepicker._defaults.dateFormat,
958 selectedDate, instance.settings );
959 dates.not( this ).datepicker( "option", option, date );
962 var datesMD = $( "#manageddate_from, #manageddate_to" ).datepicker({
965 onSelect: function( selectedDate ) {
966 var option = this.id == "manageddate_from" ? "minDate" : "maxDate",
967 instance = $( this ).data( "datepicker" );
968 date = $.datepicker.parseDate(
969 instance.settings.dateFormat ||
970 $.datepicker._defaults.dateFormat,
971 selectedDate, instance.settings );
972 datesMD.not( this ).datepicker( "option", option, date );
975 var datesAD = $( "#accepteddate_from, #accepteddate_to" ).datepicker({
978 onSelect: function( selectedDate ) {
979 var option = this.id == "accepteddate_from" ? "minDate" : "maxDate",
980 instance = $( this ).data( "datepicker" );
981 date = $.datepicker.parseDate(
982 instance.settings.dateFormat ||
983 $.datepicker._defaults.dateFormat,
984 selectedDate, instance.settings );
985 datesAD.not( this ).datepicker( "option", option, date );
989 $("button[type='submit']").on("click", function(e) {
990 var form = $(this).parents("form");
991 var action = $(this).val();
992 var selected_suggestions = $(form).find("input[name='suggestionid']:checked");
993 if ( selected_suggestions.length == 0 ) {
994 alert(_("Please select at least one suggestion"));
998 if ( action == "delete" ) {
999 if ( selected_suggestions.length == 1 ) {
1000 if ( ! confirm(_("Are you sure you want to delete this suggestion?")) ) {
1004 } else if ( selected_suggestions.length > 1 ) {
1005 if ( ! confirm(_("Are you sure you want to delete these suggestions?")) ) {
1010 } else if ( action == "update_manager" ) {
1011 if ( $("#managedby").val() == "" ) {
1012 alert(_("Please select a manager to assign to the selected suggestions"));
1018 $('<input />').attr('type', 'hidden')
1020 .attr('value', action)
1027 [% IF op == 'save' %]
1030 $(document).ready(function(){
1032 $("#quantity,#price,#currency").on("change",function(){
1036 [% IF other_reason %]
1037 $(".select-reason").hide();
1038 $(".select-reason").find("option[value='other']").attr("selected","selected");
1039 $("#other_reason").show();
1041 $("#other_reason").hide();
1043 $(".select-reason").change(function(){
1044 if($(this).val() == "other"){
1046 $("#other_reason").show();
1049 $("a[href*=back]").click(function(){
1050 $(".select-reason").show().find("option[value='']").attr("selected","selected");
1051 $("#other_reason").hide();
1054 $("#restore_previous_manager").on("click",function(e){
1057 $("#managedby_name").empty();
1058 $("#managedby").val('');
1059 var borrowername = "[% managedby_patron.firstname | html %] [% managedby_patron.surname | html %]";
1060 var managerlink = '<a href="/cgi-bin/koha/members/moremember.pl'
1061 + '?borrowernumber=[% managedby_patron.borrowernumber | html %]">'
1062 + borrowername + '</a>';
1063 $('#managedby_name').html(managerlink);
1064 $('#managedby').val([% managedby_patron.borrowernumber | html %]);
1070 [% Asset.js("js/acq.js") | $raw %]
1071 [% Asset.js("js/acquisitions-menu.js") | $raw %]
1074 [% INCLUDE 'intranet-bottom.inc' %]