4 [% USE AuthorisedValues %]
7 [% USE ColumnsSettings %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>Koha › Acquisitions ›
12 [% IF ( suggestionid ) %]
13 Suggestions › Edit suggestion #[% suggestionid | html %]
15 Suggestions › Add suggestion
17 [% ELSIF ( op == 'show' ) %]
18 Suggestions › Show suggestion #[% suggestionid | html %]
20 Suggestions management
23 [% INCLUDE 'doc-head-close.inc' %]
28 h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief ol { display : none; }
29 .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; }
34 <body id="acq_suggestion" class="acq">
35 [% INCLUDE 'header.inc' %]
36 [% INCLUDE 'cat-search.inc' %]
37 <div id="breadcrumbs">
38 <a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> ›
40 [% IF ( suggestionid ) %]
41 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Edit suggestion #[% suggestionid | html %]
43 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Add suggestion
45 [% ELSIF ( op == 'show' ) %]
46 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Show suggestion #[% suggestionid | html %]
48 Suggestions management
52 [% IF ( op == 'show' ) %]
53 <div class="main container-fluid">
55 <div class="col-md-8 col-md-offset-2">
57 <div id="toolbar" class="btn-toolbar">
58 <a class="btn btn-default" id="editsuggestion" href="suggestion.pl?op=edit&suggestionid=[% suggestionid | html %]"><i class="fa fa-pencil"></i> Edit</a>
59 <a class="btn btn-default deletesuggestion" href="suggestion.pl?op=delete&suggestionid=[% suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a>
62 <fieldset class="rows">
63 <legend>Bibliographic information</legend>
67 <span class="label">Title:</span>
68 [% IF suggestion.biblionumber %]
69 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% suggestion.biblionumber | uri %]">[% suggestion.title | html %]</a>
77 <span class="label">Author:</span>
81 [% IF ( copyrightdate ) %]
83 <span class="label">Copyright date:</span>
84 [% copyrightdate | html %]
89 <span class="label">ISBN or ISSN or other standard number:</span>
93 [% IF ( publishercode ) %]
95 <span class="label">Publisher:</span>
96 [% publishercode | html %]
101 <span class="label">Publication place:</span>
105 [% IF ( collectiontitle ) %]
107 <span class="label">Collection title:</span>
108 [% collectiontitle | html %]
111 [% IF ( itemtype ) %]
113 <span class="label">Document type:</span>
114 [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', itemtype, 0 ) | html %]
117 [% IF ( patron_reason_loop ) %]
118 <li><span class="label">Reason for suggestion: </span>
119 [% FOREACH patron_reason_loo IN patron_reason_loop %]
120 [% IF patron_reason_loo.authorised_value == patronreason %][% patron_reason_loo.lib | html %][% END %]
126 <span class="label">Notes:</span>
132 <fieldset class="rows"> <legend>Suggestion management</legend>
135 <span class="label">Status:</span>
136 [% SET status_found = 0 %]
137 [% IF ( STATUS == 'ASKED' ) %]
139 [% SET status_found = 1 %]
140 [% ELSIF ( STATUS == 'ACCEPTED' ) %]
142 [% SET status_found = 1 %]
143 [% ELSIF ( STATUS == 'CHECKED' ) %]
145 [% SET status_found = 1 %]
146 [% ELSIF ( STATUS == 'REJECTED' ) %]
148 [% SET status_found = 1 %]
149 [% ELSIF ( STATUS == 'ORDERED' ) %]
151 [% SET status_found = 1 %]
152 [% ELSIF ( STATUS == 'AVAILABLE' ) %]
154 [% SET status_found = 1 %]
156 [% FOREACH s IN SuggestionStatuses %]
157 [% IF STATUS == s.authorised_value %]
159 [% SET status_found = 1 %]
167 <thead><tr><th> </th><th>Date</th><th>By</th></tr></thead>
171 <td>[% suggesteddate | $KohaDates %]</td>
173 [% IF ( suggestedby_borrowernumber ) %]
174 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber | uri %]">[% suggestedby_surname | html %], [% suggestedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
175 [% Branches.GetName( suggestedby_branchcode ) | html %] ([% suggestedby_description | html %])
181 <td>[% manageddate | $KohaDates %]</td>
183 [% IF ( managedby_borrowernumber ) %]
184 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber | uri %]">[% managedby_surname | html %], [% managedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
185 [% Branches.GetName( managedby_branchcode ) | html %] ([% managedby_description | html %])
190 <th>Accepted on:</th>
191 <td>[% accepteddate | $KohaDates %]</td>
193 [% IF ( acceptedby_borrowernumber ) %]
194 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber | uri %]">[% acceptedby_surname | html %], [% acceptedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
195 [% Branches.GetName( acceptedby_branchcode ) | html %] ([% acceptedby_description | html %])
202 <fieldset class="rows"> <legend>Acquisition information</legend>
205 <span class="label">Library:</span> [% Branches.GetName( branchcode ) | html %]
208 <span class="label">Fund:</span> [% budgetname | html %]
211 <span class="label">Copies:</span>[% quantity | html %]
214 <span class="label">Currency:</span>[% currency | html %]
217 <span class="label">Price:</span>[% price | $Price %]
220 <span class="label">Total</span>[% total | $Price %]
225 <fieldset class="action">
226 <a href="suggestion.pl"><< Back to suggestions</a>
235 <div class="main container-fluid">
237 <div class="col-md-8 col-md-offset-2">
239 <div class="main container-fluid">
241 <div class="col-sm-10 col-sm-push-2">
247 [% FOR m IN messages %]
248 <div class="dialog [% m.type | html %]">
250 [% CASE 'biblio_exists' %]
251 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.
257 <form id="add_edit" action="suggestion.pl" method="post" class="validated">
258 <input type="hidden" name="redirect" id="redirect" value="[% redirect | html %]" />
259 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber | html %]" />
260 [% IF ( suggestionid ) %]
261 <h1>Edit purchase suggestion #[% suggestionid | html %]</h1>
262 <input type="hidden" name="suggestionid" value="[% suggestionid | html %]"/>
264 <h1>Enter a new purchase suggestion</h1>
266 <fieldset class="rows"> <legend>Bibliographic information</legend><ol>
268 <label for="title" class="required">Title:</label>
269 <input type="text" id="title" name="title" size="80" maxlength="255" value="[% title | html %]" required="required" class="required" />
270 <span class="required">Required</span>
272 <li><label for="author">Author:</label><input type="text" id="author" name="author" size="50" maxlength="80" value="[% author | html %]"/></li>
273 <li><label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" value="[% copyrightdate | html %]" /></li>
274 <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>
275 <li><label for="publishercode">Publisher:</label><input type="text" id="publishercode" name="publishercode" size="50" maxlength="80" value="[% publishercode | html %]"/></li>
276 <li><label for="place">Publication place:</label><input type="text" id="place" name="place" size="50" maxlength="80" value="[% place | html %]"/></li>
277 <li><label for="collectiontitle">Collection title:</label><input type="text" id="collectiontitle" name="collectiontitle" size="50" maxlength="80" value="[% collectiontitle | html %]"/></li>
278 <li><label for="itemtype">Document type:</label>
279 [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20, default=itemtype %]
281 [% IF patron_reason_loop %]
283 <label for="patronreason">Reason for suggestion: </label>
284 <select name="patronreason" id="patronreason">
285 <option value=""> -- Choose -- </option>
286 [% FOREACH patron_reason_loo IN patron_reason_loop %]
287 [% IF patron_reason_loo.authorised_value == patronreason %]
288 <option value="[% patron_reason_loo.authorised_value | html %]" selected="selected">[% patron_reason_loo.lib | html %]</option>
290 <option value="[% patron_reason_loo.authorised_value | html %]">[% patron_reason_loo.lib | html %]</option>
296 <li><label for="note">Notes:</label><textarea name="note" id="note" rows="5" cols="40">[% note | html %]</textarea></li>
299 <fieldset class="rows"> <legend>Suggestion management</legend>
301 [% IF ( suggestionid ) %]
303 <label for="STATUS">Status:</label>
304 <select id="STATUS" name="STATUS">
305 <option value="">No status</option>
307 [% IF (statusselected_ASKED ) %]
308 <option value="ASKED" selected="selected">Pending</option>
310 <option value="ASKED">Pending</option>
313 [% IF (statusselected_ACCEPTED ) %]
314 <option value="ACCEPTED" selected="selected">Accepted</option>
316 <option value="ACCEPTED">Accepted</option>
319 [% IF (statusselected_CHECKED ) %]
320 <option value="CHECKED" selected="selected">Checked</option>
322 <option value="CHECKED">Checked</option>
325 [% IF ( statusselected_REJECTED ) %]
326 <option value="REJECTED" selected="selected">Rejected</option>
328 <option value="REJECTED">Rejected</option>
331 [% FOREACH s IN SuggestionStatuses %]
332 [% IF s.authorised_value == suggestion.STATUS %]
333 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
335 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
341 <label for="reason">Reason</label>
342 <select class="select-reason" id="reason" name="reason">
343 <option value=""> -- Choose a reason -- </option>
344 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
345 [% IF (reasonsloo.lib == suggestion.reason) %]
346 <option value="[% reasonsloo.lib | html %]" selected="selected">[% reasonsloo.lib | html %]</option>
348 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
351 <option value="other">Others...</option>
354 <span id="other_reason" name="other_reason">
355 [% IF other_reason %]
356 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." value="[% suggestion.reason | html %]"/>
358 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." />
360 <a href="#back">Cancel</a>
365 <thead><tr><th> </th><th>Date</th><th>By</th></tr></thead>
368 <th><label for="suggesteddate">Created by:</label> </th>
369 <td><input type="text" id="suggesteddate" name="suggesteddate" class="datepicker" size="10" maxlength="10" value="[% suggesteddate | $KohaDates %]"/>[% INCLUDE 'date-format.inc' %]</td>
370 <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 %]
374 <th><label for="managedon">Managed by:</label> </th>
375 <td><input type="text" id="managedon" name="manageddate" class="datepicker" size="10" maxlength="10" value="[% manageddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]</td>
376 <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>
379 <th><label for="accepteddate">Accepted on:</label> </th>
380 <td><input type="text" id="accepteddate" name="accepteddate" class="datepicker" size="10" maxlength="10" value="[% accepteddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]</td>
381 <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>
386 <fieldset class="rows"> <legend>Acquisition information</legend><ol>
387 <li><label for="branchcode">Library:</label>
388 <select name="branchcode" id="branchcode">
389 <option value="">Any</option>
390 [% IF branchfilter %]
391 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
393 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
397 <li><label for="budgetid">Fund:</label>
398 <select name="budgetid" id="budgetid">
399 <option value="">Any</option>[% FOREACH budgetsloo IN budgetsloop %]
400 [% 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 %]
402 </li><li><label for="quantity">Copies:</label>
403 <input type="text" size="10" id="quantity" name="quantity" value="[% quantity | html %]" />
406 <label for="currency">Currency:</label>
407 [% FOREACH c IN currencies %]
408 <input type="hidden" value="[% c.rate | html %]" id="currency_rate_[% c.currency | html %]" name="currency_rate_[% c.currency | html %]" />
409 <input type="hidden" id="[% c.currency | html %]" name="[% c.currency | html %]" value="[% c.rate | html %]" />
412 <select name="currency" id="currency">
413 [% FOREACH c IN currencies %]
414 [% IF suggestionid and suggestion.currency == c.currency or not suggestionid and c.active %]
415 <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
416 [% ELSIF not c.archived %]
417 <option value="[% c.currency | html %]">[% c.currency | html %]</option>
422 <li><label for="price">Price:</label>
423 <input type="text" size="20" name="price" id="price" value="[% price | html %]" />
424 </li><li><label for="total">Total: </label>
425 <input type="text" readonly="readonly" id="total" name="total" size="10" value="[% total | html %]"/>
427 </fieldset><input type="hidden" id="returnsuggested" name="returnsuggested" value="[% IF ( returnsuggestedby ) %][% returnsuggestedby | html %][% ELSE %]noone[% END %]"/>
428 <fieldset class="action">
429 <input type="hidden" name="op" value="[% op | html %]" />
430 [% IF ( suggestionid ) %]
431 [% IF ( need_confirm ) %]
432 <input type="hidden" name="save_confirmed" value="1" />
433 <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
435 <input type="submit" value="Save" />
437 <a class="cancel" href="[% IF ( returnsuggestedby ) %]/cgi-bin/koha/members/moremember.pl?borrowernumber=[% returnsuggestedby | uri %]#suggestions[% ELSE %]suggestion.pl[% END %]">Cancel</a>
439 [% IF ( need_confirm ) %]
440 <input type="hidden" name="save_confirmed" value="1" />
441 <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
443 <input type="submit" value="Submit your suggestion" />
445 <a class="cancel" href="suggestion.pl">Cancel</a>
452 <div id="toolbar" class="btn-toolbar">
453 <a class="btn btn-default" id="newsuggestion" href="suggestion.pl?op=add"><i class="fa fa-plus"></i> New purchase suggestion</a>
456 <h1>Suggestions management</h1>
459 [% FOR m IN messages %]
460 <div class="dialog [% m.type | html %]">
462 [% CASE 'already_exists' %]
463 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>)
464 [% CASE 'biblio_exists' %]
465 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.
472 [% UNLESS ( notabs ) %]
473 <div id="suggestiontabs" class="toptabs">
474 <ul class="ui-tabs-nav">
475 [% FOREACH suggestion IN suggestions %]
477 <a href="#tab_[% loop.count | uri %]">
478 [% IF ( suggestion.suggestiontypelabel ) %]
479 [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending
480 [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted
481 [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked
482 [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected
483 [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available
484 [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered
485 [% ELSIF (suggestion.suggestiontypelabel == "Unknown") %]Status unknown
486 [% ELSE %][% suggestion.suggestiontypelabel | html %][% END %]
488 [% IF ( suggestion.suggestiontype ) %]
489 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.suggestiontype ) | html %]
494 ([% suggestion.suggestions_loop.size | html %])</a></li>
500 [% FOREACH suggestion IN suggestions %]
501 <div id="tab_[% loop.count | html %]">
502 <form class="update_suggestions" name="f" method="post" action="/cgi-bin/koha/suggestion/suggestion.pl#tab_[% loop.count | html %]">
504 [% IF ( suggestion.suggestions_loop ) %]
505 <p><a class="checkall" href="#">Check all</a> | <a class="uncheckall" href="#">Uncheck all</a></p>
506 <table id="table_[% loop.count | html %]" class="sorted">
509 <th class="NoSort noExport"> </th>
510 <th class="anti-the">Suggestion</th>
511 <th>Suggested by</th>
512 <th>Suggested on</th>
518 <th class="NoSort noExport"> </th>
522 [% FOREACH suggestions_loo IN suggestion.suggestions_loop %]
525 <input type="checkbox" name="suggestionid" value="[% suggestions_loo.suggestionid | html %]" />
528 <a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | uri %]&op=show" title="suggestion" >
529 [% suggestions_loo.title | html %][% IF ( suggestions_loo.author ) %], by [% suggestions_loo.author | html %][% END %]</a>
531 [% IF ( suggestions_loo.copyrightdate ) %]© [% suggestions_loo.copyrightdate | html %] [% END %]
532 [% IF ( suggestions_loo.volumedesc ) %]; Volume:<i>[% suggestions_loo.volumedesc | html %]</i> [% END %]
533 [% 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 %]
536 <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>
538 <td data-order="[% suggestions_loo.suggesteddate | html %]">
539 [% IF ( suggestions_loo.suggesteddate ) %][% suggestions_loo.suggesteddate | $KohaDates %][% END %]
542 <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>
544 <td data-order="[% suggestions_loo.manageddate | html %]">
545 [% IF ( suggestions_loo.manageddate ) %][% suggestions_loo.manageddate | $KohaDates %][% END %]
548 [% Branches.GetName( suggestions_loo.branchcode ) | html %]
551 [% suggestions_loo.budget_name | html %]
554 [% IF ( suggestions_loo.ASKED ) %]
556 [% ELSIF ( suggestions_loo.ACCEPTED ) %]
558 [% ELSIF ( suggestions_loo.ORDERED ) %]
560 [% ELSIF ( suggestions_loo.REJECTED ) %]
562 [% ELSIF ( suggestions_loo.CHECKED ) %]
564 [% ELSIF ( suggestions_loo.AVAILABLE ) %]
566 [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %]
567 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) | html %]
572 [% IF ( suggestions_loo.reason ) %]
573 <br />([% suggestions_loo.reason | html %])
577 <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>
578 <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>
585 <h2 style="padding-left:1em;">Change selected suggestions</h3>
586 <div class="col-sm-4">
588 <div id="select-reason">
589 <label for="STATUS">Mark selected as: </label>
590 <select name="STATUS" id="STATUS">
591 <option value=""> -- Choose a status --</option>
593 [% IF (statusselected_ASKED ) %]
594 <option value="ASKED" selected="selected">Pending</option>
596 <option value="ASKED">Pending</option>
599 [% IF (statusselected_ACCEPTED ) %]
600 <option value="ACCEPTED" selected="selected">Accepted</option>
602 <option value="ACCEPTED">Accepted</option>
605 [% IF (statusselected_CHECKED ) %]
606 <option value="CHECKED" selected="selected">Checked</option>
608 <option value="CHECKED">Checked</option>
611 [% IF ( statusselected_REJECTED ) %]
612 <option value="REJECTED" selected="selected">Rejected</option>
614 <option value="REJECTED">Rejected</option>
617 [% FOREACH s IN SuggestionStatuses %]
618 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
622 <label for="reason">with this reason:</label>
623 <select name="reason">
624 <option value=""> -- Choose a reason -- </option>
625 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
626 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
628 <option value="other">Others...</option>
631 <span class="other_reason">
632 <input type="text" size="31" name="other_reason" placeholder="please note your reason here..." />
633 <a href="#" class="cancel_note">Cancel</a>
637 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
638 <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="update_status"/>Submit</button></fieldset>
641 <div class="col-sm-4">
643 <label for="itemtype">Update item types with: </label>
644 [% PROCESS 'av-build-dropbox.inc' name="suggestion_itemtype", category="SUGGEST_FORMAT", size = 20 %]
645 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
646 <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="update_itemtype"/>Submit</button></fieldset>
650 <div class="col-sm-4">
652 <label for="delete_[% loop.count | html %]">Delete selected</label>
653 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
654 <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="delete"/>Delete</button></fieldset>
667 [% UNLESS ( op_save ) %]
668 [% UNLESS ( op == 'show' ) %]
671 </div> <!-- /.col-sm-10.col-sm-push-2 -->
673 <div class="col-sm-2 col-sm-pull-10">
676 <form name="suggestionfilter" action="suggestion.pl" method="get">
677 <fieldset class="brief"><ol style="display:block;"><li><label for="displayby">Organize by: </label>
678 <select name="displayby" id="displayby" style="width:auto;">
679 [% IF ( displayby == "STATUS" ) %]
680 <option value="STATUS" selected="selected">Status</option>
682 <option value="STATUS">Status</option>
684 [% IF ( displayby == "branchcode" ) %]
685 <option value="branchcode" selected="selected">Library</option>
687 <option value="branchcode">Library</option>
689 [% IF ( displayby == "itemtype" ) %]
690 <option value="itemtype" selected="selected">Item type</option>
692 <option value="itemtype">Item type</option>
694 [% IF ( displayby == "managedby" ) %]
695 <option value="managedby" selected="selected">Managed by</option>
697 <option value="managedby">Managed by</option>
699 [% IF ( displayby == "acceptedby" ) %]
700 <option value="acceptedby" selected="selected">Accepted by</option>
702 <option value="acceptedby">Accepted by</option>
704 </select> <input type="submit" value="Go" /></li></ol></fieldset>
705 <h4>Filter by: <a style="font-size:80%;font-weight:normal;" href="/cgi-bin/koha/suggestion/suggestion.pl">[clear]</a></h4>
706 <div style="display:block;" id="limits">
708 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Bibliographic information</a></h4>
709 <ol> <li><label for="title"> Title:</label><input type="text" id="title" name="title" value="[% title | html %]" /></li>
710 <li><label for="author"> Author:</label><input type="text" id="author" name="author" value="[% author | html %]" /></li>
711 <li><label for="isbn"> ISBN:</label><input type="text" id="isbn" name="isbn" value="[% isbn | html %]" /></li>
712 <li><label for="publishercode"> Publisher:</label><input type="text" id="publishercode" name="publishercode" value="[% publishercode | html %]" /></li>
713 <li><label for="copyrightdate_filter"> Copyright date:</label><input type="text" id="copyrightdate_filter" name="copyrightdate" value="[% copyrightdate | html %]" /></li>
714 <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>
716 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Suggestion information</a></h4>
719 <label for="STATUS"> Status:</label>
720 <select name="STATUS" id="STATUS">
721 <option value="">Any</option>
723 [% IF (statusselected_ASKED ) %]
724 <option value="ASKED" selected="selected">Pending</option>
726 <option value="ASKED">Pending</option>
729 [% IF (statusselected_ACCEPTED ) %]
730 <option value="ACCEPTED" selected="selected">Accepted</option>
732 <option value="ACCEPTED">Accepted</option>
735 [% IF (statusselected_CHECKED ) %]
736 <option value="CHECKED" selected="selected">Checked</option>
738 <option value="CHECKED">Checked</option>
741 [% IF ( statusselected_REJECTED ) %]
742 <option value="REJECTED" selected="selected">Rejected</option>
744 <option value="REJECTED">Rejected</option>
747 [% FOREACH s IN SuggestionStatuses %]
748 [% IF s.authorised_value == selected_status %]
749 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
751 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
757 <li><label for="suggestedby"> Suggested by:</label><select id="suggestedby" name="suggestedby"><option value="">Any</option>
758 [% 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 %]
761 <label for="suggesteddate_from">Suggested date from:</label>
762 <input type="text" id="suggesteddate_from" size="10" name="suggesteddate_from" value="[% suggesteddate_from | html %]" />
765 <label for="suggesteddate_to">To:</label>
766 <input type="text" id="suggesteddate_to" size="10" name="suggesteddate_to" value="[% suggesteddate_to | html %]" />
768 <li><label for="managedby"> Managed by:</label><select id="managedby" name="managedby"><option value="">Any</option>
769 [% 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 %]
772 <label for="manageddate_from">Management date from:</label>
773 <input type="text" id="manageddate_from" size="10" name="manageddate_from" value="[% manageddate_from | html %]" />
776 <label for="manageddate_to">To:</label>
777 <input type="text" id="manageddate_to" size="10" name="manageddate_to" value="[% manageddate_to | html %]" />
779 <li><label for="acceptedby"> Accepted by:</label><select id="acceptedby" name="acceptedby"><option value="">Any</option>
780 [% 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 %]
783 <label for="accepteddate_from">Accepted date from:</label>
784 <input type="text" id="accepteddate_from" size="10" name="accepteddate_from" value="[% accepteddate_from | html %]" />
787 <label for="accepteddate_to">To:</label>
788 <input type="text" id="accepteddate_to" size="10" name="accepteddate_to" value="[% accepteddate_to | html %]" />
790 <li><input type="submit" value="Go" /></li></ol>
793 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Acquisition information</a></h4>
794 <ol><li><label for="budgetid"> Book fund:</label>
795 <select name="budgetid" id="budgetid">
796 <option value="__ANY__">Any</option>
797 [% IF budgetid == '__NONE__' %]
798 <option value="__NONE__" selected="selected">None</option>
800 <option value="__NONE__">None</option>
802 [% FOREACH budgetsloo IN budgetsloop %]
803 [% 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 %]
806 <li><label for="branchcode">Library:</label>
807 <select name="branchcode" id="branchcode">
808 <option value="__ANY__">Any</option>
809 [% IF branchfilter %]
810 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
812 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
814 </select></li><li><input type="submit" value="Go" /></li></ol>
817 [% INCLUDE 'acquisitions-menu.inc' %]
820 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
821 </div> <!-- /.row -->
828 [% MACRO jsinclude BLOCK %]
829 [% INCLUDE 'calendar.inc' %]
830 [% IF ( op == 'show' || op_else ) %]
832 $(document).ready(function(){
833 $(".deletesuggestion").on("click",function(){
834 return confirm(_("Are you sure you want to delete this suggestion?"));
840 [% INCLUDE 'datatables.inc' %]
841 [% INCLUDE 'columns_settings.inc' %]
842 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
845 $(document).ready(function() {
846 $('#suggestiontabs').tabs();
848 columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'suggestions', 'suggestions', 'json' ) | $raw %]
849 [% FOREACH suggestion IN suggestions %]
850 [% IF ( suggestion.suggestions_loop ) %]
851 KohaTable("table_[% loop.count| html %]", {
852 "sorting": [[ 1, "asc" ]],
855 { "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] },
856 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
858 }, columns_settings );
862 $(".checkall").click(function(e){
864 $(this).parents('form').checkCheckboxes();
867 $(".uncheckall").click(function(e){
869 $(this).parents('form').unCheckCheckboxes();
872 $(".other_reason").hide();
873 $("select[name='reason']").change(function(){
874 if($(this).val() == "other"){
876 $(this).siblings(".other_reason").show();
880 $("a.cancel_note").click(function(e) {
881 $(this).parent().siblings("select").show().find("option[value='']").attr("selected","selected");
882 $(this).siblings("input[name='other_reason']").hide();
885 $("h4.local_collapse a").click(function(){
886 $(this).parent().parent().find("ol").toggle();
889 // http://jqueryui.com/demos/datepicker/#date-range
890 var dates = $( "#suggesteddate_from, #suggesteddate_to" ).datepicker({
893 onSelect: function( selectedDate ) {
894 var option = this.id == "suggesteddate_from" ? "minDate" : "maxDate",
895 instance = $( this ).data( "datepicker" );
896 date = $.datepicker.parseDate(
897 instance.settings.dateFormat ||
898 $.datepicker._defaults.dateFormat,
899 selectedDate, instance.settings );
900 dates.not( this ).datepicker( "option", option, date );
903 var datesMD = $( "#manageddate_from, #manageddate_to" ).datepicker({
906 onSelect: function( selectedDate ) {
907 var option = this.id == "manageddate_from" ? "minDate" : "maxDate",
908 instance = $( this ).data( "datepicker" );
909 date = $.datepicker.parseDate(
910 instance.settings.dateFormat ||
911 $.datepicker._defaults.dateFormat,
912 selectedDate, instance.settings );
913 datesMD.not( this ).datepicker( "option", option, date );
916 var datesAD = $( "#accepteddate_from, #accepteddate_to" ).datepicker({
919 onSelect: function( selectedDate ) {
920 var option = this.id == "accepteddate_from" ? "minDate" : "maxDate",
921 instance = $( this ).data( "datepicker" );
922 date = $.datepicker.parseDate(
923 instance.settings.dateFormat ||
924 $.datepicker._defaults.dateFormat,
925 selectedDate, instance.settings );
926 datesAD.not( this ).datepicker( "option", option, date );
930 $("button[type='submit']").on("click", function(e) {
931 var form = $(this).parents("form");
932 var action = $(this).val();
933 var selected_suggestions = $(form).find("input[name='suggestionid']:checked");
934 if ( selected_suggestions.length == 0 ) {
935 alert(_("Please select at least one suggestion"));
939 if ( action == "delete" ) {
940 if ( selected_suggestions.length == 1 ) {
941 if ( ! confirm(_("Are you sure you want to delete this suggestion?")) ) {
945 } else if ( selected_suggestions.length > 1 ) {
946 if ( ! confirm(_("Are you sure you want to delete these suggestions?")) ) {
953 $('<input />').attr('type', 'hidden')
955 .attr('value', action)
964 $(document).ready(function(){
966 $("#quantity,#price,#currency").on("change",function(){
970 [% IF other_reason %]
971 $(".select-reason").hide();
972 $(".select-reason").find("option[value='other']").attr("selected","selected");
973 $("#other_reason").show();
975 $("#other_reason").hide();
977 $(".select-reason").change(function(){
978 if($(this).val() == "other"){
980 $("#other_reason").show();
983 $("a[href*=back]").click(function(){
984 $(".select-reason").show().find("option[value='']").attr("selected","selected");
985 $("#other_reason").hide();
990 [% Asset.js("js/acq.js") | $raw %]
991 [% Asset.js("js/acquisitions-menu.js") | $raw %]
994 [% INCLUDE 'intranet-bottom.inc' %]