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>
73 <span class="label">Author:</span>
77 [% IF ( copyrightdate ) %]
79 <span class="label">Copyright date:</span>
80 [% copyrightdate | html %]
85 <span class="label">ISBN or ISSN or other standard number:</span>
89 [% IF ( publishercode ) %]
91 <span class="label">Publisher:</span>
92 [% publishercode | html %]
97 <span class="label">Publication place:</span>
101 [% IF ( collectiontitle ) %]
103 <span class="label">Collection title:</span>
104 [% collectiontitle | html %]
107 [% IF ( itemtype ) %]
109 <span class="label">Document type:</span>
110 [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', itemtype, 0 ) | html %]
113 [% IF ( patron_reason_loop ) %]
114 <li><span class="label">Reason for suggestion: </span>
115 [% FOREACH patron_reason_loo IN patron_reason_loop %]
116 [% IF patron_reason_loo.authorised_value == patronreason %][% patron_reason_loo.lib | html %][% END %]
122 <span class="label">Notes:</span>
128 <fieldset class="rows"> <legend>Suggestion management</legend>
131 <span class="label">Status:</span>
132 [% SET status_found = 0 %]
133 [% IF ( STATUS == 'ASKED' ) %]
135 [% SET status_found = 1 %]
136 [% ELSIF ( STATUS == 'ACCEPTED' ) %]
138 [% SET status_found = 1 %]
139 [% ELSIF ( STATUS == 'CHECKED' ) %]
141 [% SET status_found = 1 %]
142 [% ELSIF ( STATUS == 'REJECTED' ) %]
144 [% SET status_found = 1 %]
145 [% ELSIF ( STATUS == 'ORDERED' ) %]
147 [% SET status_found = 1 %]
148 [% ELSIF ( STATUS == 'AVAILABLE' ) %]
150 [% SET status_found = 1 %]
152 [% FOREACH s IN SuggestionStatuses %]
153 [% IF STATUS == s.authorised_value %]
155 [% SET status_found = 1 %]
163 <thead><tr><th> </th><th>Date</th><th>By</th></tr></thead>
167 <td>[% suggesteddate | $KohaDates %]</td>
169 [% IF ( suggestedby_borrowernumber ) %]
170 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber | uri %]">[% suggestedby_surname | html %], [% suggestedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
171 [% Branches.GetName( suggestedby_branchcode ) | html %] ([% suggestedby_description | html %])
177 <td>[% manageddate | $KohaDates %]</td>
179 [% IF ( managedby_borrowernumber ) %]
180 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber | uri %]">[% managedby_surname | html %], [% managedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
181 [% Branches.GetName( managedby_branchcode ) | html %] ([% managedby_description | html %])
186 <th>Accepted on:</th>
187 <td>[% accepteddate | $KohaDates %]</td>
189 [% IF ( acceptedby_borrowernumber ) %]
190 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber | uri %]">[% acceptedby_surname | html %], [% acceptedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
191 [% Branches.GetName( acceptedby_branchcode ) | html %] ([% acceptedby_description | html %])
198 <fieldset class="rows"> <legend>Acquisition information</legend>
201 <span class="label">Library:</span> [% Branches.GetName( branchcode ) | html %]
204 <span class="label">Fund:</span> [% budgetname | html %]
207 <span class="label">Copies:</span>[% quantity | html %]
210 <span class="label">Currency:</span>[% currency | html %]
213 <span class="label">Price:</span>[% price | $Price %]
216 <span class="label">Total</span>[% total | $Price %]
221 <fieldset class="action">
222 <a href="suggestion.pl"><< Back to suggestions</a>
231 <div class="main container-fluid">
233 <div class="col-md-8 col-md-offset-2">
235 <div class="main container-fluid">
237 <div class="col-sm-10 col-sm-push-2">
243 [% FOR m IN messages %]
244 <div class="dialog [% m.type | html %]">
246 [% CASE 'biblio_exists' %]
247 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.
253 <form id="add_edit" action="suggestion.pl" method="post" class="validated">
254 <input type="hidden" name="redirect" id="redirect" value="[% redirect | html %]" />
255 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber | html %]" />
256 [% IF ( suggestionid ) %]
257 <h1>Edit purchase suggestion #[% suggestionid | html %]</h1>
258 <input type="hidden" name="suggestionid" value="[% suggestionid | html %]"/>
260 <h1>Enter a new purchase suggestion</h1>
262 <fieldset class="rows"> <legend>Bibliographic information</legend><ol>
264 <label for="title" class="required">Title:</label>
265 <input type="text" id="title" name="title" size="80" maxlength="255" value="[% title | html %]" required="required" class="required" />
266 <span class="required">Required</span>
268 <li><label for="author">Author:</label><input type="text" id="author" name="author" size="50" maxlength="80" value="[% author | html %]"/></li>
269 <li><label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" value="[% copyrightdate | html %]" /></li>
270 <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>
271 <li><label for="publishercode">Publisher:</label><input type="text" id="publishercode" name="publishercode" size="50" maxlength="80" value="[% publishercode | html %]"/></li>
272 <li><label for="place">Publication place:</label><input type="text" id="place" name="place" size="50" maxlength="80" value="[% place | html %]"/></li>
273 <li><label for="collectiontitle">Collection title:</label><input type="text" id="collectiontitle" name="collectiontitle" size="50" maxlength="80" value="[% collectiontitle | html %]"/></li>
274 <li><label for="itemtype">Document type:</label>
275 [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20, default=itemtype %]
277 [% IF patron_reason_loop %]
279 <label for="patronreason">Reason for suggestion: </label>
280 <select name="patronreason" id="patronreason">
281 <option value=""> -- Choose -- </option>
282 [% FOREACH patron_reason_loo IN patron_reason_loop %]
283 [% IF patron_reason_loo.authorised_value == patronreason %]
284 <option value="[% patron_reason_loo.authorised_value | html %]" selected="selected">[% patron_reason_loo.lib | html %]</option>
286 <option value="[% patron_reason_loo.authorised_value | html %]">[% patron_reason_loo.lib | html %]</option>
292 <li><label for="note">Notes:</label><textarea name="note" id="note" rows="5" cols="40">[% note | html %]</textarea></li>
295 <fieldset class="rows"> <legend>Suggestion management</legend>
297 [% IF ( suggestionid ) %]
299 <label for="STATUS">Status:</label>
300 <select id="STATUS" name="STATUS">
301 <option value="">No status</option>
303 [% IF (statusselected_ASKED ) %]
304 <option value="ASKED" selected="selected">Pending</option>
306 <option value="ASKED">Pending</option>
309 [% IF (statusselected_ACCEPTED ) %]
310 <option value="ACCEPTED" selected="selected">Accepted</option>
312 <option value="ACCEPTED">Accepted</option>
315 [% IF (statusselected_CHECKED ) %]
316 <option value="CHECKED" selected="selected">Checked</option>
318 <option value="CHECKED">Checked</option>
321 [% IF ( statusselected_REJECTED ) %]
322 <option value="REJECTED" selected="selected">Rejected</option>
324 <option value="REJECTED">Rejected</option>
327 [% FOREACH s IN SuggestionStatuses %]
328 [% IF s.authorised_value == suggestion.STATUS %]
329 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
331 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
337 <label for="reason">Reason</label>
338 <select class="select-reason" id="reason" name="reason">
339 <option value=""> -- Choose a reason -- </option>
340 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
341 [% IF (reasonsloo.lib == suggestion.reason) %]
342 <option value="[% reasonsloo.lib | html %]" selected="selected">[% reasonsloo.lib | html %]</option>
344 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
347 <option value="other">Others...</option>
350 <span id="other_reason" name="other_reason">
351 [% IF other_reason %]
352 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." value="[% suggestion.reason | html %]"/>
354 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." />
356 <a href="#back">Cancel</a>
361 <thead><tr><th> </th><th>Date</th><th>By</th></tr></thead>
364 <th><label for="suggesteddate">Created by:</label> </th>
365 <td><input type="text" id="suggesteddate" name="suggesteddate" class="datepicker" size="10" maxlength="10" value="[% suggesteddate | $KohaDates %]"/>[% INCLUDE 'date-format.inc' %]</td>
366 <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 %]
370 <th><label for="managedon">Managed by:</label> </th>
371 <td><input type="text" id="managedon" name="manageddate" class="datepicker" size="10" maxlength="10" value="[% manageddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]</td>
372 <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>
375 <th><label for="accepteddate">Accepted on:</label> </th>
376 <td><input type="text" id="accepteddate" name="accepteddate" class="datepicker" size="10" maxlength="10" value="[% accepteddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]</td>
377 <td><input type="hidden" id="acceptedby" name="acceptedby" value="[% acceptedby | html %]"/>[% IF ( acceptedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber | uri %]">[% acceptedby_surname | html %], [% acceptedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a> [% Branches.GetName( acceptedby_branchcode ) | html %] ([% acceptedby_description | html %])[% END %]</td>
382 <fieldset class="rows"> <legend>Acquisition information</legend><ol>
383 <li><label for="branchcode">Library:</label>
384 <select name="branchcode" id="branchcode">
385 <option value="">Any</option>
386 [% IF branchfilter %]
387 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
389 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
393 <li><label for="budgetid">Fund:</label>
394 <select name="budgetid" id="budgetid">
395 <option value="">Any</option>[% FOREACH budgetsloo IN budgetsloop %]
396 [% 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 %]
398 </li><li><label for="quantity">Copies:</label>
399 <input type="text" size="10" id="quantity" name="quantity" value="[% quantity | html %]" />
402 <label for="currency">Currency:</label>
403 [% FOREACH c IN currencies %]
404 <input type="hidden" value="[% c.rate | html %]" id="currency_rate_[% c.currency | html %]" name="currency_rate_[% c.currency | html %]" />
405 <input type="hidden" id="[% c.currency | html %]" name="[% c.currency | html %]" value="[% c.rate | html %]" />
408 <select name="currency" id="currency">
409 [% FOREACH c IN currencies %]
410 [% IF suggestionid and suggestion.currency == c.currency or not suggestionid and c.active %]
411 <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
412 [% ELSIF not c.archived %]
413 <option value="[% c.currency | html %]">[% c.currency | html %]</option>
418 <li><label for="price">Price:</label>
419 <input type="text" size="20" name="price" id="price" value="[% price | html %]" />
420 </li><li><label for="total">Total: </label>
421 <input type="text" readonly="readonly" id="total" name="total" size="10" value="[% total | html %]"/>
423 </fieldset><input type="hidden" id="returnsuggested" name="returnsuggested" value="[% IF ( returnsuggestedby ) %][% returnsuggestedby | html %][% ELSE %]noone[% END %]"/>
424 <fieldset class="action">
425 <input type="hidden" name="op" value="[% op | html %]" />
426 [% IF ( suggestionid ) %]
427 [% IF ( need_confirm ) %]
428 <input type="hidden" name="save_confirmed" value="1" />
429 <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
431 <input type="submit" value="Save" />
433 <a class="cancel" href="[% IF ( returnsuggestedby ) %]/cgi-bin/koha/members/moremember.pl?borrowernumber=[% returnsuggestedby | uri %]#suggestions[% ELSE %]suggestion.pl[% END %]">Cancel</a>
435 [% IF ( need_confirm ) %]
436 <input type="hidden" name="save_confirmed" value="1" />
437 <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
439 <input type="submit" value="Submit your suggestion" />
441 <a class="cancel" href="suggestion.pl">Cancel</a>
448 <div id="toolbar" class="btn-toolbar">
449 <a class="btn btn-default" id="newsuggestion" href="suggestion.pl?op=add"><i class="fa fa-plus"></i> New purchase suggestion</a>
452 <h1>Suggestions management</h1>
455 [% FOR m IN messages %]
456 <div class="dialog [% m.type | html %]">
458 [% CASE 'already_exists' %]
459 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>)
460 [% CASE 'biblio_exists' %]
461 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.
468 [% UNLESS ( notabs ) %]
469 <div id="suggestiontabs" class="toptabs">
470 <ul class="ui-tabs-nav">
471 [% FOREACH suggestion IN suggestions %]
473 <a href="#tab_[% loop.count | uri %]">
474 [% IF ( suggestion.suggestiontypelabel ) %]
475 [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending
476 [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted
477 [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked
478 [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected
479 [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available
480 [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered
481 [% ELSIF (suggestion.suggestiontypelabel == "Unknown") %]Status unknown
482 [% ELSE %][% suggestion.suggestiontypelabel | html %][% END %]
484 [% IF ( suggestion.suggestiontype ) %]
485 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.suggestiontype ) | html %]
490 ([% suggestion.suggestions_loop.size | html %])</a></li>
496 [% FOREACH suggestion IN suggestions %]
497 <div id="tab_[% loop.count | html %]">
498 <form class="update_suggestions" name="f" method="post" action="/cgi-bin/koha/suggestion/suggestion.pl#tab_[% loop.count | html %]">
500 [% IF ( suggestion.suggestions_loop ) %]
501 <p><a class="checkall" href="#">Check all</a> | <a class="uncheckall" href="#">Uncheck all</a></p>
502 <table id="table_[% loop.count | html %]" class="sorted">
505 <th class="NoSort noExport"> </th>
506 <th class="anti-the">Suggestion</th>
507 <th>Suggested by</th>
508 <th>Suggested on</th>
514 <th class="NoSort noExport"> </th>
518 [% FOREACH suggestions_loo IN suggestion.suggestions_loop %]
521 <input type="checkbox" name="suggestionid" value="[% suggestions_loo.suggestionid | html %]" />
524 <a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | uri %]&op=show" title="suggestion" >
525 [% suggestions_loo.title | html %][% IF ( suggestions_loo.author ) %], by [% suggestions_loo.author | html %][% END %]</a>
527 [% IF ( suggestions_loo.copyrightdate ) %]© [% suggestions_loo.copyrightdate | html %] [% END %]
528 [% IF ( suggestions_loo.volumedesc ) %]; Volume:<i>[% suggestions_loo.volumedesc | html %]</i> [% END %]
529 [% 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 %]
532 <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>
534 <td data-order="[% suggestions_loo.suggesteddate | html %]">
535 [% IF ( suggestions_loo.suggesteddate ) %][% suggestions_loo.suggesteddate | $KohaDates %][% END %]
538 <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>
540 <td data-order="[% suggestions_loo.manageddate | html %]">
541 [% IF ( suggestions_loo.manageddate ) %][% suggestions_loo.manageddate | $KohaDates %][% END %]
544 [% Branches.GetName( suggestions_loo.branchcode ) | html %]
547 [% suggestions_loo.budget_name | html %]
550 [% IF ( suggestions_loo.ASKED ) %]
552 [% ELSIF ( suggestions_loo.ACCEPTED ) %]
554 [% ELSIF ( suggestions_loo.ORDERED ) %]
556 [% ELSIF ( suggestions_loo.REJECTED ) %]
558 [% ELSIF ( suggestions_loo.CHECKED ) %]
560 [% ELSIF ( suggestions_loo.AVAILABLE ) %]
562 [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %]
563 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) | html %]
568 [% IF ( suggestions_loo.reason ) %]
569 <br />([% suggestions_loo.reason | html %])
573 <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>
574 <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>
581 <h2 style="padding-left:1em;">Change selected suggestions</h3>
582 <div class="col-sm-4">
584 <div id="select-reason">
585 <label for="STATUS">Mark selected as: </label>
586 <select name="STATUS" id="STATUS">
587 <option value=""> -- Choose a status --</option>
589 [% IF (statusselected_ASKED ) %]
590 <option value="ASKED" selected="selected">Pending</option>
592 <option value="ASKED">Pending</option>
595 [% IF (statusselected_ACCEPTED ) %]
596 <option value="ACCEPTED" selected="selected">Accepted</option>
598 <option value="ACCEPTED">Accepted</option>
601 [% IF (statusselected_CHECKED ) %]
602 <option value="CHECKED" selected="selected">Checked</option>
604 <option value="CHECKED">Checked</option>
607 [% IF ( statusselected_REJECTED ) %]
608 <option value="REJECTED" selected="selected">Rejected</option>
610 <option value="REJECTED">Rejected</option>
613 [% FOREACH s IN SuggestionStatuses %]
614 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
618 <label for="reason">with this reason:</label>
619 <select name="reason">
620 <option value=""> -- Choose a reason -- </option>
621 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
622 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
624 <option value="other">Others...</option>
627 <span class="other_reason">
628 <input type="text" size="31" name="other_reason" placeholder="please note your reason here..." />
629 <a href="#" class="cancel_note">Cancel</a>
633 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
634 <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="update_status"/>Submit</button></fieldset>
637 <div class="col-sm-4">
639 <label for="itemtype">Update item types with: </label>
640 [% PROCESS 'av-build-dropbox.inc' name="suggestion_itemtype", category="SUGGEST_FORMAT", size = 20 %]
641 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
642 <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="update_itemtype"/>Submit</button></fieldset>
646 <div class="col-sm-4">
648 <label for="delete_[% loop.count | html %]">Delete selected</label>
649 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
650 <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="delete"/>Delete</button></fieldset>
663 [% UNLESS ( op_save ) %]
664 [% UNLESS ( op == 'show' ) %]
667 </div> <!-- /.col-sm-10.col-sm-push-2 -->
669 <div class="col-sm-2 col-sm-pull-10">
672 <form name="suggestionfilter" action="suggestion.pl" method="get">
673 <fieldset class="brief"><ol style="display:block;"><li><label for="displayby">Organize by: </label>
674 <select name="displayby" id="displayby" style="width:auto;">
675 [% IF ( displayby == "STATUS" ) %]
676 <option value="STATUS" selected="selected">Status</option>
678 <option value="STATUS">Status</option>
680 [% IF ( displayby == "branchcode" ) %]
681 <option value="branchcode" selected="selected">Library</option>
683 <option value="branchcode">Library</option>
685 [% IF ( displayby == "itemtype" ) %]
686 <option value="itemtype" selected="selected">Item type</option>
688 <option value="itemtype">Item type</option>
690 [% IF ( displayby == "managedby" ) %]
691 <option value="managedby" selected="selected">Managed by</option>
693 <option value="managedby">Managed by</option>
695 [% IF ( displayby == "acceptedby" ) %]
696 <option value="acceptedby" selected="selected">Accepted by</option>
698 <option value="acceptedby">Accepted by</option>
700 </select> <input type="submit" value="Go" /></li></ol></fieldset>
701 <h4>Filter by: <a style="font-size:80%;font-weight:normal;" href="/cgi-bin/koha/suggestion/suggestion.pl">[clear]</a></h4>
702 <div style="display:block;" id="limits">
704 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Bibliographic information</a></h4>
705 <ol> <li><label for="title"> Title:</label><input type="text" id="title" name="title" value="[% title | html %]" /></li>
706 <li><label for="author"> Author:</label><input type="text" id="author" name="author" value="[% author | html %]" /></li>
707 <li><label for="isbn"> ISBN:</label><input type="text" id="isbn" name="isbn" value="[% isbn | html %]" /></li>
708 <li><label for="publishercode"> Publisher:</label><input type="text" id="publishercode" name="publishercode" value="[% publishercode | html %]" /></li>
709 <li><label for="copyrightdate_filter"> Copyright date:</label><input type="text" id="copyrightdate_filter" name="copyrightdate" value="[% copyrightdate | html %]" /></li>
710 <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>
712 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Suggestion information</a></h4>
715 <label for="STATUS"> Status:</label>
716 <select name="STATUS" id="STATUS">
717 <option value="">Any</option>
719 [% IF (statusselected_ASKED ) %]
720 <option value="ASKED" selected="selected">Pending</option>
722 <option value="ASKED">Pending</option>
725 [% IF (statusselected_ACCEPTED ) %]
726 <option value="ACCEPTED" selected="selected">Accepted</option>
728 <option value="ACCEPTED">Accepted</option>
731 [% IF (statusselected_CHECKED ) %]
732 <option value="CHECKED" selected="selected">Checked</option>
734 <option value="CHECKED">Checked</option>
737 [% IF ( statusselected_REJECTED ) %]
738 <option value="REJECTED" selected="selected">Rejected</option>
740 <option value="REJECTED">Rejected</option>
743 [% FOREACH s IN SuggestionStatuses %]
744 [% IF s.authorised_value == selected_status %]
745 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
747 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
753 <li><label for="suggestedby"> Suggested by:</label><select id="suggestedby" name="suggestedby"><option value="">Any</option>
754 [% 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 %]
757 <label for="suggesteddate_from">Suggested date from:</label>
758 <input type="text" id="suggesteddate_from" size="10" name="suggesteddate_from" value="[% suggesteddate_from | html %]" />
761 <label for="suggesteddate_to">To:</label>
762 <input type="text" id="suggesteddate_to" size="10" name="suggesteddate_to" value="[% suggesteddate_to | html %]" />
764 <li><label for="managedby"> Managed by:</label><select id="managedby" name="managedby"><option value="">Any</option>
765 [% 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 %]
768 <label for="manageddate_from">Management date from:</label>
769 <input type="text" id="manageddate_from" size="10" name="manageddate_from" value="[% manageddate_from | html %]" />
772 <label for="manageddate_to">To:</label>
773 <input type="text" id="manageddate_to" size="10" name="manageddate_to" value="[% manageddate_to | html %]" />
775 <li><label for="acceptedby"> Accepted by:</label><select id="acceptedby" name="acceptedby"><option value="">Any</option>
776 [% 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 %]
779 <label for="accepteddate_from">Accepted date from:</label>
780 <input type="text" id="accepteddate_from" size="10" name="accepteddate_from" value="[% accepteddate_from | html %]" />
783 <label for="accepteddate_to">To:</label>
784 <input type="text" id="accepteddate_to" size="10" name="accepteddate_to" value="[% accepteddate_to | html %]" />
786 <li><input type="submit" value="Go" /></li></ol>
789 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Acquisition information</a></h4>
790 <ol><li><label for="budgetid"> Book fund:</label>
791 <select name="budgetid" id="budgetid">
792 <option value="__ANY__">Any</option>
793 [% IF budgetid == '__NONE__' %]
794 <option value="__NONE__" selected="selected">None</option>
796 <option value="__NONE__">None</option>
798 [% FOREACH budgetsloo IN budgetsloop %]
799 [% 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 %]
802 <li><label for="branchcode">Library:</label>
803 <select name="branchcode" id="branchcode">
804 <option value="__ANY__">Any</option>
805 [% IF branchfilter %]
806 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
808 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
810 </select></li><li><input type="submit" value="Go" /></li></ol>
813 [% INCLUDE 'acquisitions-menu.inc' %]
816 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
817 </div> <!-- /.row -->
824 [% MACRO jsinclude BLOCK %]
825 [% INCLUDE 'calendar.inc' %]
826 [% IF ( op == 'show' || op_else ) %]
828 $(document).ready(function(){
829 $(".deletesuggestion").on("click",function(){
830 return confirm(_("Are you sure you want to delete this suggestion?"));
836 [% INCLUDE 'datatables.inc' %]
837 [% INCLUDE 'columns_settings.inc' %]
838 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
841 $(document).ready(function() {
842 $('#suggestiontabs').tabs();
844 columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'suggestions', 'suggestions', 'json' ) | $raw %]
845 [% FOREACH suggestion IN suggestions %]
846 [% IF ( suggestion.suggestions_loop ) %]
847 KohaTable("table_[% loop.count| html %]", {
848 "sorting": [[ 1, "asc" ]],
851 { "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] },
852 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
854 }, columns_settings );
858 $(".checkall").click(function(e){
860 $(this).parents('form').checkCheckboxes();
863 $(".uncheckall").click(function(e){
865 $(this).parents('form').unCheckCheckboxes();
868 $(".other_reason").hide();
869 $("select[name='reason']").change(function(){
870 if($(this).val() == "other"){
872 $(this).siblings(".other_reason").show();
876 $("a.cancel_note").click(function(e) {
877 $(this).parent().siblings("select").show().find("option[value='']").attr("selected","selected");
878 $(this).siblings("input[name='other_reason']").hide();
881 $("h4.local_collapse a").click(function(){
882 $(this).parent().parent().find("ol").toggle();
885 // http://jqueryui.com/demos/datepicker/#date-range
886 var dates = $( "#suggesteddate_from, #suggesteddate_to" ).datepicker({
889 onSelect: function( selectedDate ) {
890 var option = this.id == "suggesteddate_from" ? "minDate" : "maxDate",
891 instance = $( this ).data( "datepicker" );
892 date = $.datepicker.parseDate(
893 instance.settings.dateFormat ||
894 $.datepicker._defaults.dateFormat,
895 selectedDate, instance.settings );
896 dates.not( this ).datepicker( "option", option, date );
899 var datesMD = $( "#manageddate_from, #manageddate_to" ).datepicker({
902 onSelect: function( selectedDate ) {
903 var option = this.id == "manageddate_from" ? "minDate" : "maxDate",
904 instance = $( this ).data( "datepicker" );
905 date = $.datepicker.parseDate(
906 instance.settings.dateFormat ||
907 $.datepicker._defaults.dateFormat,
908 selectedDate, instance.settings );
909 datesMD.not( this ).datepicker( "option", option, date );
912 var datesAD = $( "#accepteddate_from, #accepteddate_to" ).datepicker({
915 onSelect: function( selectedDate ) {
916 var option = this.id == "accepteddate_from" ? "minDate" : "maxDate",
917 instance = $( this ).data( "datepicker" );
918 date = $.datepicker.parseDate(
919 instance.settings.dateFormat ||
920 $.datepicker._defaults.dateFormat,
921 selectedDate, instance.settings );
922 datesAD.not( this ).datepicker( "option", option, date );
926 $("button[type='submit']").on("click", function(e) {
927 var form = $(this).parents("form");
928 var action = $(this).val();
929 var selected_suggestions = $(form).find("input[name='suggestionid']:checked");
930 if ( selected_suggestions.length == 0 ) {
931 alert(_("Please select at least one suggestion"));
935 if ( action == "delete" ) {
936 if ( selected_suggestions.length == 1 ) {
937 if ( ! confirm(_("Are you sure you want to delete this suggestion?")) ) {
941 } else if ( selected_suggestions.length > 1 ) {
942 if ( ! confirm(_("Are you sure you want to delete these suggestions?")) ) {
949 $('<input />').attr('type', 'hidden')
951 .attr('value', action)
960 $(document).ready(function(){
962 $("#quantity,#price,#currency").on("change",function(){
966 [% IF other_reason %]
967 $(".select-reason").hide();
968 $(".select-reason").find("option[value='other']").attr("selected","selected");
969 $("#other_reason").show();
971 $("#other_reason").hide();
973 $(".select-reason").change(function(){
974 if($(this).val() == "other"){
976 $("#other_reason").show();
979 $("a[href*=back]").click(function(){
980 $(".select-reason").show().find("option[value='']").attr("selected","selected");
981 $("#other_reason").hide();
986 [% Asset.js("js/acq.js") | $raw %]
987 [% Asset.js("js/acquisitions-menu.js") | $raw %]
990 [% INCLUDE 'intranet-bottom.inc' %]