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="managedon">Managed by:</label> </th>
376 <td><input type="text" id="managedon" name="manageddate" class="datepicker" size="10" maxlength="10" value="[% manageddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]</td>
377 <td><input type="hidden" id="managedby" name="managedby" value="[% managedby | html %]"/>[% IF ( managedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber | uri %]">[% managedby_surname | html %], [% managedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a> [% Branches.GetName( managedby_branchcode ) | html %] ([% managedby_description | html %])[% END %]</td>
380 <th><label for="accepteddate">Accepted on:</label> </th>
381 <td><input type="text" id="accepteddate" name="accepteddate" class="datepicker" size="10" maxlength="10" value="[% accepteddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]</td>
382 <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>
387 <fieldset class="rows"> <legend>Acquisition information</legend><ol>
388 <li><label for="branchcode">Library:</label>
389 <select name="branchcode" id="branchcode">
390 <option value="">Any</option>
391 [% IF branchfilter %]
392 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
394 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
398 <li><label for="budgetid">Fund:</label>
399 <select name="budgetid" id="budgetid">
400 <option value="">Any</option>[% FOREACH budgetsloo IN budgetsloop %]
401 [% 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 %]
403 </li><li><label for="quantity">Copies:</label>
404 <input type="text" size="10" id="quantity" name="quantity" value="[% quantity | html %]" />
407 <label for="currency">Currency:</label>
408 [% FOREACH c IN currencies %]
409 <input type="hidden" value="[% c.rate | html %]" id="currency_rate_[% c.currency | html %]" name="currency_rate_[% c.currency | html %]" />
410 <input type="hidden" id="[% c.currency | html %]" name="[% c.currency | html %]" value="[% c.rate | html %]" />
413 <select name="currency" id="currency">
414 [% FOREACH c IN currencies %]
415 [% IF suggestionid and suggestion.currency == c.currency or not suggestionid and c.active %]
416 <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
417 [% ELSIF not c.archived %]
418 <option value="[% c.currency | html %]">[% c.currency | html %]</option>
423 <li><label for="price">Price:</label>
424 <input type="text" size="20" name="price" id="price" value="[% price | html %]" />
425 </li><li><label for="total">Total: </label>
426 <input type="text" readonly="readonly" id="total" name="total" size="10" value="[% total | html %]"/>
428 </fieldset><input type="hidden" id="returnsuggested" name="returnsuggested" value="[% IF ( returnsuggestedby ) %][% returnsuggestedby | html %][% ELSE %]noone[% END %]"/>
429 <fieldset class="action">
430 <input type="hidden" name="op" value="[% op | html %]" />
431 [% IF ( suggestionid ) %]
432 [% IF ( need_confirm ) %]
433 <input type="hidden" name="save_confirmed" value="1" />
434 <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
436 <input type="submit" value="Save" />
438 <a class="cancel" href="[% IF ( returnsuggestedby ) %]/cgi-bin/koha/members/moremember.pl?borrowernumber=[% returnsuggestedby | uri %]#suggestions[% ELSE %]suggestion.pl[% END %]">Cancel</a>
440 [% IF ( need_confirm ) %]
441 <input type="hidden" name="save_confirmed" value="1" />
442 <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
444 <input type="submit" value="Submit your suggestion" />
446 <a class="cancel" href="suggestion.pl">Cancel</a>
453 <div id="toolbar" class="btn-toolbar">
454 <a class="btn btn-default" id="newsuggestion" href="suggestion.pl?op=add"><i class="fa fa-plus"></i> New purchase suggestion</a>
457 <h1>Suggestions management</h1>
460 [% FOR m IN messages %]
461 <div class="dialog [% m.type | html %]">
463 [% CASE 'already_exists' %]
464 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>)
465 [% CASE 'biblio_exists' %]
466 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.
473 [% UNLESS ( notabs ) %]
474 <div id="suggestiontabs" class="toptabs">
475 <ul class="ui-tabs-nav">
476 [% FOREACH suggestion IN suggestions %]
478 <a href="#tab_[% loop.count | uri %]">
479 [% IF ( suggestion.suggestiontypelabel ) %]
480 [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending
481 [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted
482 [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked
483 [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected
484 [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available
485 [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered
486 [% ELSIF (suggestion.suggestiontypelabel == "Unknown") %]Status unknown
487 [% ELSE %][% suggestion.suggestiontypelabel | html %][% END %]
489 [% IF ( suggestion.suggestiontype ) %]
490 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.suggestiontype ) | html %]
495 ([% suggestion.suggestions_loop.size | html %])</a></li>
501 [% FOREACH suggestion IN suggestions %]
502 <div id="tab_[% loop.count | html %]">
503 <form class="update_suggestions" name="f" method="post" action="/cgi-bin/koha/suggestion/suggestion.pl#tab_[% loop.count | html %]">
505 [% IF ( suggestion.suggestions_loop ) %]
506 <p><a class="checkall" href="#">Check all</a> | <a class="uncheckall" href="#">Uncheck all</a></p>
507 <table id="table_[% loop.count | html %]" class="sorted">
510 <th class="NoSort noExport"> </th>
511 <th class="anti-the">Suggestion</th>
512 <th>Suggested by</th>
513 <th>Suggested on</th>
519 <th class="NoSort noExport"> </th>
523 [% FOREACH suggestions_loo IN suggestion.suggestions_loop %]
526 <input type="checkbox" name="suggestionid" value="[% suggestions_loo.suggestionid | html %]" />
529 <a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | uri %]&op=show" title="suggestion" >
530 [% suggestions_loo.title | html %][% IF ( suggestions_loo.author ) %], by [% suggestions_loo.author | html %][% END %]</a>
532 [% IF ( suggestions_loo.copyrightdate ) %]© [% suggestions_loo.copyrightdate | html %] [% END %]
533 [% IF ( suggestions_loo.volumedesc ) %]; Volume:<i>[% suggestions_loo.volumedesc | html %]</i> [% END %]
534 [% 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 %]
537 <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>
539 <td data-order="[% suggestions_loo.suggesteddate | html %]">
540 [% IF ( suggestions_loo.suggesteddate ) %][% suggestions_loo.suggesteddate | $KohaDates %][% END %]
543 <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>
545 <td data-order="[% suggestions_loo.manageddate | html %]">
546 [% IF ( suggestions_loo.manageddate ) %][% suggestions_loo.manageddate | $KohaDates %][% END %]
549 [% Branches.GetName( suggestions_loo.branchcode ) | html %]
552 [% suggestions_loo.budget_name | html %]
555 [% IF ( suggestions_loo.ASKED ) %]
557 [% ELSIF ( suggestions_loo.ACCEPTED ) %]
559 [% ELSIF ( suggestions_loo.ORDERED ) %]
561 [% ELSIF ( suggestions_loo.REJECTED ) %]
563 [% ELSIF ( suggestions_loo.CHECKED ) %]
565 [% ELSIF ( suggestions_loo.AVAILABLE ) %]
567 [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %]
568 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) | html %]
573 [% IF ( suggestions_loo.reason ) %]
574 <br />([% suggestions_loo.reason | html %])
578 <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>
579 <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>
586 <h2 style="padding-left:1em;">Change selected suggestions</h3>
587 <div class="col-sm-4">
589 <div id="select-reason">
590 <label for="STATUS">Mark selected as: </label>
591 <select name="STATUS" id="STATUS">
592 <option value=""> -- Choose a status --</option>
594 [% IF (statusselected_ASKED ) %]
595 <option value="ASKED" selected="selected">Pending</option>
597 <option value="ASKED">Pending</option>
600 [% IF (statusselected_ACCEPTED ) %]
601 <option value="ACCEPTED" selected="selected">Accepted</option>
603 <option value="ACCEPTED">Accepted</option>
606 [% IF (statusselected_CHECKED ) %]
607 <option value="CHECKED" selected="selected">Checked</option>
609 <option value="CHECKED">Checked</option>
612 [% IF ( statusselected_REJECTED ) %]
613 <option value="REJECTED" selected="selected">Rejected</option>
615 <option value="REJECTED">Rejected</option>
618 [% FOREACH s IN SuggestionStatuses %]
619 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
623 <label for="reason">with this reason:</label>
624 <select name="reason">
625 <option value=""> -- Choose a reason -- </option>
626 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
627 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
629 <option value="other">Others...</option>
632 <span class="other_reason">
633 <input type="text" size="31" name="other_reason" placeholder="please note your reason here..." />
634 <a href="#" class="cancel_note">Cancel</a>
638 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
639 <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="update_status"/>Submit</button></fieldset>
642 <div class="col-sm-4">
644 <label for="itemtype">Update item types with: </label>
645 [% PROCESS 'av-build-dropbox.inc' name="suggestion_itemtype", category="SUGGEST_FORMAT", size = 20 %]
646 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
647 <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="update_itemtype"/>Submit</button></fieldset>
651 <div class="col-sm-4">
653 <label for="delete_[% loop.count | html %]">Delete selected</label>
654 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
655 <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="delete"/>Delete</button></fieldset>
668 [% UNLESS ( op_save ) %]
669 [% UNLESS ( op == 'show' ) %]
672 </div> <!-- /.col-sm-10.col-sm-push-2 -->
674 <div class="col-sm-2 col-sm-pull-10">
677 <form name="suggestionfilter" action="suggestion.pl" method="get">
678 <fieldset class="brief"><ol style="display:block;"><li><label for="displayby">Organize by: </label>
679 <select name="displayby" id="displayby" style="width:auto;">
680 [% IF ( displayby == "STATUS" ) %]
681 <option value="STATUS" selected="selected">Status</option>
683 <option value="STATUS">Status</option>
685 [% IF ( displayby == "branchcode" ) %]
686 <option value="branchcode" selected="selected">Library</option>
688 <option value="branchcode">Library</option>
690 [% IF ( displayby == "itemtype" ) %]
691 <option value="itemtype" selected="selected">Item type</option>
693 <option value="itemtype">Item type</option>
695 [% IF ( displayby == "managedby" ) %]
696 <option value="managedby" selected="selected">Managed by</option>
698 <option value="managedby">Managed by</option>
700 [% IF ( displayby == "acceptedby" ) %]
701 <option value="acceptedby" selected="selected">Accepted by</option>
703 <option value="acceptedby">Accepted by</option>
705 </select> <input type="submit" value="Go" /></li></ol></fieldset>
706 <h4>Filter by: <a style="font-size:80%;font-weight:normal;" href="/cgi-bin/koha/suggestion/suggestion.pl">[clear]</a></h4>
707 <div style="display:block;" id="limits">
709 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Bibliographic information</a></h4>
710 <ol> <li><label for="title"> Title:</label><input type="text" id="title" name="title" value="[% title | html %]" /></li>
711 <li><label for="author"> Author:</label><input type="text" id="author" name="author" value="[% author | html %]" /></li>
712 <li><label for="isbn"> ISBN:</label><input type="text" id="isbn" name="isbn" value="[% isbn | html %]" /></li>
713 <li><label for="publishercode"> Publisher:</label><input type="text" id="publishercode" name="publishercode" value="[% publishercode | html %]" /></li>
714 <li><label for="copyrightdate_filter"> Copyright date:</label><input type="text" id="copyrightdate_filter" name="copyrightdate" value="[% copyrightdate | html %]" /></li>
715 <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>
717 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Suggestion information</a></h4>
720 <label for="STATUS"> Status:</label>
721 <select name="STATUS" id="STATUS">
722 <option value="">Any</option>
724 [% IF (statusselected_ASKED ) %]
725 <option value="ASKED" selected="selected">Pending</option>
727 <option value="ASKED">Pending</option>
730 [% IF (statusselected_ACCEPTED ) %]
731 <option value="ACCEPTED" selected="selected">Accepted</option>
733 <option value="ACCEPTED">Accepted</option>
736 [% IF (statusselected_CHECKED ) %]
737 <option value="CHECKED" selected="selected">Checked</option>
739 <option value="CHECKED">Checked</option>
742 [% IF ( statusselected_REJECTED ) %]
743 <option value="REJECTED" selected="selected">Rejected</option>
745 <option value="REJECTED">Rejected</option>
748 [% FOREACH s IN SuggestionStatuses %]
749 [% IF s.authorised_value == selected_status %]
750 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
752 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
758 <li><label for="suggestedby"> Suggested by:</label><select id="suggestedby" name="suggestedby"><option value="">Any</option>
759 [% 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 %]
762 <label for="suggesteddate_from">Suggested date from:</label>
763 <input type="text" id="suggesteddate_from" size="10" name="suggesteddate_from" value="[% suggesteddate_from | html %]" />
766 <label for="suggesteddate_to">To:</label>
767 <input type="text" id="suggesteddate_to" size="10" name="suggesteddate_to" value="[% suggesteddate_to | html %]" />
769 <li><label for="managedby"> Managed by:</label><select id="managedby" name="managedby"><option value="">Any</option>
770 [% 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 %]
773 <label for="manageddate_from">Management date from:</label>
774 <input type="text" id="manageddate_from" size="10" name="manageddate_from" value="[% manageddate_from | html %]" />
777 <label for="manageddate_to">To:</label>
778 <input type="text" id="manageddate_to" size="10" name="manageddate_to" value="[% manageddate_to | html %]" />
780 <li><label for="acceptedby"> Accepted by:</label><select id="acceptedby" name="acceptedby"><option value="">Any</option>
781 [% 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 %]
784 <label for="accepteddate_from">Accepted date from:</label>
785 <input type="text" id="accepteddate_from" size="10" name="accepteddate_from" value="[% accepteddate_from | html %]" />
788 <label for="accepteddate_to">To:</label>
789 <input type="text" id="accepteddate_to" size="10" name="accepteddate_to" value="[% accepteddate_to | html %]" />
791 <li><input type="submit" value="Go" /></li></ol>
794 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Acquisition information</a></h4>
795 <ol><li><label for="budgetid"> Book fund:</label>
796 <select name="budgetid" id="budgetid">
797 <option value="__ANY__">Any</option>
798 [% IF budgetid == '__NONE__' %]
799 <option value="__NONE__" selected="selected">None</option>
801 <option value="__NONE__">None</option>
803 [% FOREACH budgetsloo IN budgetsloop %]
804 [% 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 %]
807 <li><label for="branchcode">Library:</label>
808 <select name="branchcode" id="branchcode">
809 <option value="__ANY__">Any</option>
810 [% IF branchfilter %]
811 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
813 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
815 </select></li><li><input type="submit" value="Go" /></li></ol>
818 [% INCLUDE 'acquisitions-menu.inc' %]
821 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
822 </div> <!-- /.row -->
829 [% MACRO jsinclude BLOCK %]
830 [% INCLUDE 'calendar.inc' %]
831 [% IF ( op == 'show' || op_else ) %]
833 $(document).ready(function(){
834 $(".deletesuggestion").on("click",function(){
835 return confirm(_("Are you sure you want to delete this suggestion?"));
841 [% INCLUDE 'datatables.inc' %]
842 [% INCLUDE 'columns_settings.inc' %]
843 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
846 $(document).ready(function() {
847 $('#suggestiontabs').tabs();
849 columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'suggestions', 'suggestions', 'json' ) | $raw %]
850 [% FOREACH suggestion IN suggestions %]
851 [% IF ( suggestion.suggestions_loop ) %]
852 KohaTable("table_[% loop.count| html %]", {
853 "sorting": [[ 1, "asc" ]],
856 { "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] },
857 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
859 }, columns_settings );
863 $(".checkall").click(function(e){
865 $(this).parents('form').checkCheckboxes();
868 $(".uncheckall").click(function(e){
870 $(this).parents('form').unCheckCheckboxes();
873 $(".other_reason").hide();
874 $("select[name='reason']").change(function(){
875 if($(this).val() == "other"){
877 $(this).siblings(".other_reason").show();
881 $("a.cancel_note").click(function(e) {
882 $(this).parent().siblings("select").show().find("option[value='']").attr("selected","selected");
883 $(this).siblings("input[name='other_reason']").hide();
886 $("h4.local_collapse a").click(function(){
887 $(this).parent().parent().find("ol").toggle();
890 // http://jqueryui.com/demos/datepicker/#date-range
891 var dates = $( "#suggesteddate_from, #suggesteddate_to" ).datepicker({
894 onSelect: function( selectedDate ) {
895 var option = this.id == "suggesteddate_from" ? "minDate" : "maxDate",
896 instance = $( this ).data( "datepicker" );
897 date = $.datepicker.parseDate(
898 instance.settings.dateFormat ||
899 $.datepicker._defaults.dateFormat,
900 selectedDate, instance.settings );
901 dates.not( this ).datepicker( "option", option, date );
904 var datesMD = $( "#manageddate_from, #manageddate_to" ).datepicker({
907 onSelect: function( selectedDate ) {
908 var option = this.id == "manageddate_from" ? "minDate" : "maxDate",
909 instance = $( this ).data( "datepicker" );
910 date = $.datepicker.parseDate(
911 instance.settings.dateFormat ||
912 $.datepicker._defaults.dateFormat,
913 selectedDate, instance.settings );
914 datesMD.not( this ).datepicker( "option", option, date );
917 var datesAD = $( "#accepteddate_from, #accepteddate_to" ).datepicker({
920 onSelect: function( selectedDate ) {
921 var option = this.id == "accepteddate_from" ? "minDate" : "maxDate",
922 instance = $( this ).data( "datepicker" );
923 date = $.datepicker.parseDate(
924 instance.settings.dateFormat ||
925 $.datepicker._defaults.dateFormat,
926 selectedDate, instance.settings );
927 datesAD.not( this ).datepicker( "option", option, date );
931 $("button[type='submit']").on("click", function(e) {
932 var form = $(this).parents("form");
933 var action = $(this).val();
934 var selected_suggestions = $(form).find("input[name='suggestionid']:checked");
935 if ( selected_suggestions.length == 0 ) {
936 alert(_("Please select at least one suggestion"));
940 if ( action == "delete" ) {
941 if ( selected_suggestions.length == 1 ) {
942 if ( ! confirm(_("Are you sure you want to delete this suggestion?")) ) {
946 } else if ( selected_suggestions.length > 1 ) {
947 if ( ! confirm(_("Are you sure you want to delete these suggestions?")) ) {
954 $('<input />').attr('type', 'hidden')
956 .attr('value', action)
965 $(document).ready(function(){
967 $("#quantity,#price,#currency").on("change",function(){
971 [% IF other_reason %]
972 $(".select-reason").hide();
973 $(".select-reason").find("option[value='other']").attr("selected","selected");
974 $("#other_reason").show();
976 $("#other_reason").hide();
978 $(".select-reason").change(function(){
979 if($(this).val() == "other"){
981 $("#other_reason").show();
984 $("a[href*=back]").click(function(){
985 $(".select-reason").show().find("option[value='']").attr("selected","selected");
986 $("#other_reason").hide();
991 [% Asset.js("js/acq.js") | $raw %]
992 [% Asset.js("js/acquisitions-menu.js") | $raw %]
995 [% INCLUDE 'intranet-bottom.inc' %]