3 [% USE AuthorisedValues %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha › Acquisitions ›
10 [% IF ( suggestionid ) %]
11 Suggestions › Edit suggestion #[% suggestionid %]
13 Suggestions › Add suggestion
15 [% ELSIF ( op == 'show' ) %]
16 Suggestions › Show suggestion #[% suggestionid %]
18 Suggestions management
21 [% INCLUDE 'doc-head-close.inc' %]
23 [% Asset.css("css/datatables.css") %]
26 <style type="text/css">
27 h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief ol { display : none; }
28 .overlay { top: 180px; left: 50%; position: absolute; margin-left: -100px; width: 200px; text-align: center; display: none; margin-top: -10px; background: #eeffd4; padding: .5em; color: #000; } .note { -moz-border-radius: 3px; border-radius:3px; background: transparent url("[% interface %]/[% theme %]/img/famfamfam/silk/comment.png") top left no-repeat; padding : 1px 3px 1px 18px; font-size : 90%; }
33 <body id="acq_suggestion" class="acq">
34 [% INCLUDE 'header.inc' %]
35 [% INCLUDE 'cat-search.inc' %]
36 <div id="breadcrumbs">
37 <a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> ›
39 [% IF ( suggestionid ) %]
40 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Edit suggestion #[% suggestionid %]
42 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Add suggestion
44 [% ELSIF ( op == 'show' ) %]
45 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Show suggestion #[% suggestionid %]
47 Suggestions management
51 [% IF ( op == 'show' ) %]
52 <div id="doc" class="yui-t7"> <!-- <div id="doc3" class="yui-t2"> -->
57 <div id="toolbar" class="btn-toolbar">
58 <a class="btn btn-default btn-sm" id="editsuggestion" href="suggestion.pl?op=edit&suggestionid=[% suggestionid %]"><i class="fa fa-pencil"></i> Edit</a>
59 <a class="btn btn-default btn-sm deletesuggestion" href="suggestion.pl?op=delete&edit_field=[% suggestionid %]"><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 ) %]
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 %][% 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 %]
146 [% FOREACH s IN SuggestionStatuses %]
147 [% IF STATUS == s.authorised_value %]
149 [% SET status_found = 1 %]
157 <thead><tr><th> </th><th>Date</th><th>By</th></tr></thead>
161 <td>[% suggesteddate | $KohaDates %]</td>
163 [% IF ( suggestedby_borrowernumber ) %]
164 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber %]">[% suggestedby_surname %], [% suggestedby_firstname %] ([% suggestedby_cardnumber %])</a>
165 [% Branches.GetName( suggestedby_branchcode ) %] ([% suggestedby_description %])
171 <td>[% manageddate | $KohaDates %]</td>
173 [% IF ( managedby_borrowernumber ) %]
174 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber %]">[% managedby_surname %], [% managedby_firstname %] ([% suggestedby_cardnumber %])</a>
175 [% Branches.GetName( managedby_branchcode ) %] ([% managedby_description %])
180 <th>Accepted on:</th>
181 <td>[% accepteddate | $KohaDates %]</td>
183 [% IF ( acceptedby_borrowernumber ) %]
184 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber %]">[% acceptedby_surname %], [% acceptedby_firstname %] ([% suggestedby_cardnumber %])</a>
185 [% Branches.GetName( acceptedby_branchcode ) %] ([% acceptedby_description %])
192 <fieldset class="rows"> <legend>Acquisition information</legend>
195 <span class="label">Library:</span> [% Branches.GetName( branchcode ) %]
198 <span class="label">Fund:</span> [% budgetname %]
201 <span class="label">Copies:</span>[% quantity %]
204 <span class="label">Currency:</span>[% currency %]
207 <span class="label">Price:</span>[% price | $Price %]
210 <span class="label">Total</span>[% total | $Price %]
215 <fieldset class="action">
216 <a href="suggestion.pl"><< Back to suggestions</a>
225 <div class="main container-fluid">
227 <div class="col-md-8 col-md-offset-2">
229 <div id="doc3" class="yui-t2">
236 <form id="add_edit" action="suggestion.pl" method="post" class="validated">
237 <input type="hidden" name="redirect" id="redirect" value="[% redirect %]" />
238 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
239 [% IF ( suggestionid ) %]
240 <h1>Edit purchase suggestion #[% suggestionid %]</h1>
241 <input type="hidden" name="suggestionid" value="[% suggestionid %]"/>
243 <h1>Enter a new purchase suggestion</h1>
245 <fieldset class="rows"> <legend>Bibliographic information</legend><ol>
247 <label for="title" class="required">Title:</label>
248 <input type="text" id="title" name="title" size="80" maxlength="255" value="[% title |html %]" required="required" class="required" />
249 <span class="required">Required</span>
251 <li><label for="author">Author:</label><input type="text" id="author" name="author" size="50" maxlength="80" value="[% author | html %]"/></li>
252 <li><label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" value="[% copyrightdate | html %]" /></li>
253 <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>
254 <li><label for="publishercode">Publisher:</label><input type="text" id="publishercode" name="publishercode" size="50" maxlength="80" value="[% publishercode | html %]"/></li>
255 <li><label for="place">Publication place:</label><input type="text" id="place" name="place" size="50" maxlength="80" value="[% place | html %]"/></li>
256 <li><label for="collectiontitle">Collection title:</label><input type="text" id="collectiontitle" name="collectiontitle" size="50" maxlength="80" value="[% collectiontitle | html %]"/></li>
257 <li><label for="itemtype">Document type:</label>
258 [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20, default=itemtype %]
260 [% IF patron_reason_loop %]
262 <label for="patronreason">Reason for suggestion: </label>
263 <select name="patronreason" id="patronreason">
264 <option value=""> -- Choose -- </option>
265 [% FOREACH patron_reason_loo IN patron_reason_loop %]
266 [% IF patron_reason_loo.authorised_value == patronreason %]
267 <option value="[% patron_reason_loo.authorised_value %]" selected="selected">[% patron_reason_loo.lib %]</option>
269 <option value="[% patron_reason_loo.authorised_value %]">[% patron_reason_loo.lib %]</option>
275 <li><label for="note">Notes:</label><textarea name="note" id="note" rows="5" cols="40">[% note %]</textarea></li>
278 <fieldset class="rows"> <legend>Suggestion management</legend>
280 [% IF ( suggestionid ) %]
282 <label for="STATUS">Status:</label>
283 <select id="STATUS" name="STATUS">
284 <option value="">No Status</option>
286 [% IF (statusselected_ASKED ) %]
287 <option value="ASKED" selected="selected">Pending</option>
289 <option value="ASKED">Pending</option>
292 [% IF (statusselected_ACCEPTED ) %]
293 <option value="ACCEPTED" selected="selected">Accepted</option>
295 <option value="ACCEPTED">Accepted</option>
298 [% IF (statusselected_CHECKED ) %]
299 <option value="CHECKED" selected="selected">Checked</option>
301 <option value="CHECKED">Checked</option>
304 [% IF ( statusselected_REJECTED ) %]
305 <option value="REJECTED" selected="selected">Rejected</option>
307 <option value="REJECTED">Rejected</option>
310 [% FOREACH s IN SuggestionStatuses %]
311 [% IF s.authorised_value == selected_status %]
312 <option value="[% s.authorised_value %]" selected="selected">[% s.lib %]</option>
314 <option value="[% s.authorised_value %]">[% s.lib %]</option>
320 <label for="reason">Reason</label>
321 <select class="select-reason" id="reason" name="reason">
322 <option value=""> -- Choose a reason -- </option>
323 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
324 [% IF (reasonsloo.lib == suggestion.reason) %]
325 <option value="[% reasonsloo.lib %]" selected="selected">[% reasonsloo.lib %]</option>
327 <option value="[% reasonsloo.lib %]">[% reasonsloo.lib %]</option>
330 <option value="other">Others...</option>
333 <span id="other_reason" name="other_reason">
334 [% IF other_reason %]
335 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." value="[% suggestion.reason | html %]"/>
337 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." />
339 <a href="#back">Cancel</a>
344 <thead><tr><th> </th><th>Date</th><th>By</th></tr></thead>
347 <th><label for="suggesteddate">Created by:</label> </th>
348 <td><input type="text" id="suggesteddate" name="suggesteddate" class="datepicker" size="10" maxlength="10" value="[% suggesteddate | $KohaDates %]"/>[% INCLUDE 'date-format.inc' %]</td>
349 <td><input type="hidden" id="suggestedby" name="suggestedby" value="[% suggestedby %]"/>[% IF ( suggestedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber %]">[% suggestedby_surname %], [% suggestedby_firstname %] ([% suggestedby_cardnumber %])</a> [% Branches.GetName( suggestedby_branchcode ) %] ([% suggestedby_description %])[% END %]
353 <th><label for="managedon">Managed by:</label> </th>
354 <td><input type="text" id="managedon" name="manageddate" class="datepicker" size="10" maxlength="10" value="[% manageddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]</td>
355 <td><input type="hidden" id="managedby" name="managedby" value="[% managedby %]"/>[% IF ( managedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber %]">[% managedby_surname %], [% managedby_firstname %] ([% suggestedby_cardnumber %])</a> [% Branches.GetName( managedby_branchcode ) %] ([% managedby_description %])[% END %]</td>
358 <th><label for="accepteddate">Accepted on:</label> </th>
359 <td><input type="text" id="accepteddate" name="accepteddate" class="datepicker" size="10" maxlength="10" value="[% accepteddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]</td>
360 <td><input type="hidden" id="acceptedby" name="acceptedby" value="[% acceptedby %]"/>[% IF ( acceptedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber %]">[% acceptedby_surname %], [% acceptedby_firstname %] ([% suggestedby_cardnumber %])</a> [% Branches.GetName( acceptedby_branchcode ) %] ([% acceptedby_description %])[% END %]</td>
365 <fieldset class="rows"> <legend>Acquisition information</legend><ol>
366 <li><label for="branchcode">Library:</label>
367 <select name="branchcode" id="branchcode">
368 <option value="">Any</option>
369 [% IF branchfilter %]
370 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
372 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
376 <li><label for="budgetid">Fund:</label>
377 <select name="budgetid" id="budgetid">
378 <option value="">Any</option>[% FOREACH budgetsloo IN budgetsloop %]
379 [% IF ( budgetsloo.selected ) %]<option value="[% budgetsloo.budget_id %]" selected="selected">[% budgetsloo.budget_name %]</option>[% ELSE %]<option value="[% budgetsloo.budget_id %]">[% budgetsloo.budget_name %]</option>[% END %][% END %]
381 </li><li><label for="quantity">Copies:</label>
382 <input type="text" size="10" id="quantity" name="quantity" value="[% quantity %]" />
385 <label for="currency">Currency:</label>
386 [% FOREACH c IN currencies %]
387 <input type="hidden" value="[% c.rate %]" id="currency_rate_[% c.currency %]" name="currency_rate_[% c.currency %]" />
388 <input type="hidden" id="[% c.currency %]" name="[% c.currency %]" value="[% c.rate %]" />
391 <select name="currency" id="currency">
392 [% FOREACH c IN currencies %]
393 [% IF suggestionid and suggestion.currency == c.currency or not suggestionid and c.active %]
394 <option value="[% c.currency %]" selected="selected">[% c.currency %]</option>
395 [% ELSIF not c.archived %]
396 <option value="[% c.currency %]">[% c.currency %]</option>
401 <li><label for="price">Price:</label>
402 <input type="text" size="20" name="price" id="price" value="[% price %]" />
403 </li><li><label for="total">Total: </label>
404 <input type="text" readonly="readonly" id="total" name="total" size="10" value="[% total %]"/>
406 </fieldset><input type="hidden" id="returnsuggested" name="returnsuggested" value="[% IF ( returnsuggestedby ) %][% returnsuggestedby %][% ELSE %]noone[% END %]"/>
407 <fieldset class="action"><input type="hidden" name="op" value="[% op %]" />[% IF ( suggestionid ) %]<input type="submit" value="Save" /> <a class="cancel" href="[% IF ( returnsuggestedby ) %]/cgi-bin/koha/members/moremember.pl?borrowernumber=[% returnsuggestedby %]#suggestions[% ELSE %]suggestion.pl[% END %]">Cancel</a>[% ELSE %]<input type="submit" value="Submit your suggestion" /> <a class="cancel" href="suggestion.pl">Cancel</a>[% END %]
413 <div id="toolbar" class="btn-toolbar">
414 <a class="btn btn-default btn-sm" id="newsuggestion" href="suggestion.pl?op=add"><i class="fa fa-plus"></i> New purchase suggestion</a>
417 <h1>Suggestions management</h1>
420 [% FOR m IN messages %]
421 <div class="dialog [% m.type %]">
423 [% CASE 'already_exists' %]
424 The suggestion has not been added. A suggestion with this title already exists (<a href='/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% m.id %]&op=show'>suggestion #[% m.id %]</a>)
431 [% UNLESS ( notabs ) %]
432 <div id="suggestiontabs" class="toptabs">
433 <ul class="ui-tabs-nav">
434 [% FOREACH suggestion IN suggestions %]
436 <a href="#[% suggestion.suggestiontype %]">
437 [% IF ( suggestion.suggestiontypelabel ) %]
438 [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending
439 [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted
440 [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked
441 [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected
442 [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available
443 [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered
444 [% ELSIF (suggestion.suggestiontypelabel == "Unknown") %]Status unknown
445 [% ELSE %][% suggestion.suggestiontypelabel %][% END %]
447 [% IF ( suggestion.suggestiontype ) %]
448 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.suggestiontype ) %]
453 ([% suggestion.suggestions_loop.size %])</a></li>
459 [% FOREACH suggestion IN suggestions %]
460 <div id="[% suggestion.suggestiontype %]">
461 <form class="update_suggestions" name="f[% suggestion.suggestiontype %]" method="post" action="/cgi-bin/koha/suggestion/suggestion.pl#[% suggestion.suggestiontype %]">
463 [% IF ( suggestion.suggestions_loop ) %]
464 <p><a id="CheckAll[% suggestion.suggestiontype %]" href="#">Check all</a> | <a id="UncheckAll[% suggestion.suggestiontype %]" href="#">Uncheck all</a></p>
465 <table id="[% suggestion.suggestiontype %]t" class="sorted">
468 <th class="NoSort"> </th>
469 <th class="anti-the">Suggestion</th>
470 <th>Suggested by - on</th>
471 <th>Managed by - on</th>
475 <th class="NoSort"> </th>
479 [% FOREACH suggestions_loo IN suggestion.suggestions_loop %]
482 <input type="checkbox" name="edit_field" value="[% suggestions_loo.suggestionid %]" />
485 <a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid %]&op=show" title="suggestion" >
486 [% suggestions_loo.title |html %][% IF ( suggestions_loo.author ) %], by [% suggestions_loo.author %][% END %]</a>
488 [% IF ( suggestions_loo.copyrightdate ) %]© [% suggestions_loo.copyrightdate |html %] [% END %]
489 [% IF ( suggestions_loo.volumedesc ) %]; Volume:<i>[% suggestions_loo.volumedesc |html %]</i> [% END %]
490 [% 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 ) %] [% END %]<br />[% IF ( suggestions_loo.note ) %]<span class="note">[% suggestions_loo.note |html%]</span>[% END %]
493 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestions_loo.suggestedby %]">[% suggestions_loo.surnamesuggestedby %][% IF ( suggestions_loo.firstnamesuggestedby ) %], [% suggestions_loo.firstnamesuggestedby %][% END %] [% IF (suggestions_loo.cardnumbersuggestedby ) %]([% suggestions_loo.cardnumbersuggestedby %])[% END %]</a>
494 [% IF ( suggestions_loo.suggesteddate ) %] - [% suggestions_loo.suggesteddate | $KohaDates %][% END %]
497 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestions_loo.suggestedby %]">[% suggestions_loo.surnamemanagedby %][% IF ( suggestions_loo.firstnamemanagedby ) %], [% suggestions_loo.firstnamemanagedby %][% END %]</a>
498 [% IF ( suggestions_loo.manageddate ) %] - [% suggestions_loo.manageddate | $KohaDates %][% END %]
501 [% Branches.GetName( suggestions_loo.branchcode ) %]
504 [% suggestions_loo.budget_name %]
507 [% IF ( suggestions_loo.ASKED ) %]
509 [% ELSIF ( suggestions_loo.ACCEPTED ) %]
511 [% ELSIF ( suggestions_loo.ORDERED ) %]
513 [% ELSIF ( suggestions_loo.REJECTED ) %]
515 [% ELSIF ( suggestions_loo.CHECKED ) %]
517 [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %]
518 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %]
523 [% IF ( suggestions_loo.reason ) %]
524 <br />([% suggestions_loo.reason %])
528 <a class="btn btn-xs btn-default" href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid %]&op=edit"><i class="fa fa-pencil"></i> Edit</a>
529 <a class="btn btn-default btn-xs deletesuggestion" href="suggestion.pl?op=delete&edit_field=[% suggestions_loo.suggestionid %]"><i class="fa fa-trash"></i> Delete</a>
534 <div id="select-reason[% suggestion.suggestiontype %]">
535 <div id="status[% suggestion.suggestiontype %]">
536 <label for="STATUS[% suggestion.suggestiontype %]">Mark selected as: </label>
537 <select name="STATUS" id="STATUS[% suggestion.suggestiontype %]">
538 <option value=""> -- Choose a status --</option>
540 [% IF (statusselected_ASKED ) %]
541 <option value="ASKED" selected="selected">Pending</option>
543 <option value="ASKED">Pending</option>
546 [% IF (statusselected_ACCEPTED ) %]
547 <option value="ACCEPTED" selected="selected">Accepted</option>
549 <option value="ACCEPTED">Accepted</option>
552 [% IF (statusselected_CHECKED ) %]
553 <option value="CHECKED" selected="selected">Checked</option>
555 <option value="CHECKED">Checked</option>
558 [% IF ( statusselected_REJECTED ) %]
559 <option value="REJECTED" selected="selected">Rejected</option>
561 <option value="REJECTED">Rejected</option>
564 [% FOREACH s IN SuggestionStatuses %]
565 <option value="[% s.authorised_value %]">[% s.lib %]</option>
569 <label for="reason[% suggestion.suggestiontype %]">with this reason:</label>
570 <select id="reason[% suggestion.suggestiontype %]" name="reason[% suggestion.suggestiontype %]">
571 <option value=""> -- Choose a reason -- </option>
572 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
573 <option value="[% reasonsloo.lib %]">[% reasonsloo.lib %]</option>
575 <option value="other">Others...</option>
578 <span id="other_reason[% suggestion.suggestiontype %]">
579 <input type="text" size="31" id="select-other_reason[% suggestion.suggestiontype %]" name="other_reason[% suggestion.suggestiontype %]" placeholder="please note your reason here..." />
580 <a href="#back[% suggestion.suggestiontype %]">Cancel</a>
583 <strong style="padding: 0 1em;">OR:</strong>
585 <label for="[% suggestion.suggestiontype %]delete">Delete selected</label>
586 <input type="checkbox" name="op" id="[% suggestion.suggestiontype %]delete" />
590 <input type="hidden" name="branchcode" value="[% branchfilter %]" />
591 <input type="hidden" name="tabcode" value="[% suggestion.suggestiontype %]" />
592 <input type="hidden" name="op" value="change" />
594 <fieldset class="action">
595 <input type="submit" value="Submit" /></fieldset>
607 [% UNLESS ( op_save ) %] [% UNLESS ( op == 'show' ) %]<div class="yui-b">
608 <form name="suggestionfilter" action="suggestion.pl" method="get">
609 <fieldset class="brief"><ol style="display:block;"><li><label for="displayby">Organize by: </label>
610 <select name="displayby" id="displayby" style="width:auto;">
611 [% IF ( displayby == "STATUS" ) %]
612 <option value="STATUS" selected="selected">Status</option>
614 <option value="STATUS">Status</option>
616 [% IF ( displayby == "branchcode" ) %]
617 <option value="branchcode" selected="selected">Library</option>
619 <option value="branchcode">Library</option>
621 [% IF ( displayby == "itemtype" ) %]
622 <option value="itemtype" selected="selected">Item type</option>
624 <option value="itemtype">Item type</option>
626 [% IF ( displayby == "managedby" ) %]
627 <option value="managedby" selected="selected">Managed by</option>
629 <option value="managedby">Managed by</option>
631 [% IF ( displayby == "acceptedby" ) %]
632 <option value="acceptedby" selected="selected">Accepted by</option>
634 <option value="acceptedby">Accepted by</option>
636 </select> <input type="submit" value="Go" /></li></ol></fieldset>
637 <h4>Filter by: <a style="font-size:80%;font-weight:normal;" href="/cgi-bin/koha/suggestion/suggestion.pl">[clear]</a></h4>
638 <div style="display:block;" id="limits">
640 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Bibliographic information</a></h4>
641 <ol> <li><label for="title"> Title:</label><input type="text" id="title" name="title" value="[% title |html %]" /></li>
642 <li><label for="author"> Author:</label><input type="text" id="author" name="author" value="[% author | html %]" /></li>
643 <li><label for="isbn"> ISBN:</label><input type="text" id="isbn" name="isbn" value="[% isbn | html %]" /></li>
644 <li><label for="publishercode"> Publisher:</label><input type="text" id="publishercode" name="publishercode" value="[% publishercode | html %]" /></li>
645 <li><label for="copyrightdate_filter"> Copyright date:</label><input type="text" id="copyrightdate_filter" name="copyrightdate" value="[% copyrightdate | html %]" /></li>
646 <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>
648 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Suggestion information</a></h4>
651 <label for="STATUS"> Status:</label>
652 <select name="STATUS" id="STATUS">
653 <option value="">Any</option>
655 [% IF (statusselected_ASKED ) %]
656 <option value="ASKED" selected="selected">Pending</option>
658 <option value="ASKED">Pending</option>
661 [% IF (statusselected_ACCEPTED ) %]
662 <option value="ACCEPTED" selected="selected">Accepted</option>
664 <option value="ACCEPTED">Accepted</option>
667 [% IF (statusselected_CHECKED ) %]
668 <option value="CHECKED" selected="selected">Checked</option>
670 <option value="CHECKED">Checked</option>
673 [% IF ( statusselected_REJECTED ) %]
674 <option value="REJECTED" selected="selected">Rejected</option>
676 <option value="REJECTED">Rejected</option>
679 [% FOREACH s IN SuggestionStatuses %]
680 [% IF s.authorised_value == selected_status %]
681 <option value="[% s.authorised_value %]" selected="selected">[% s.lib %]</option>
683 <option value="[% s.authorised_value %]">[% s.lib %]</option>
689 <li><label for="suggestedby"> Suggested by:</label><select id="suggestedby" name="suggestedby"><option value="">Any</option>
690 [% FOREACH suggestedby_loo IN suggestedby_loop %][% IF ( suggestedby_loo.selected ) %]<option value="[% suggestedby_loo.code %]" selected="selected">[% suggestedby_loo.desc %]</option>[% ELSE %]<option value="[% suggestedby_loo.code %]">[% suggestedby_loo.desc %]</option>[% END %][% END %]
693 <label for="suggesteddate_from">Suggested date from:</label>
694 <input type="text" id="suggesteddate_from" size="10" name="suggesteddate_from" value="[% suggesteddate_from %]" />
697 <label for="suggesteddate_to">To:</label>
698 <input type="text" id="suggesteddate_to" size="10" name="suggesteddate_to" value="[% suggesteddate_to %]" />
700 <li><label for="managedby"> Managed by:</label><select id="managedby" name="managedby"><option value="">Any</option>
701 [% FOREACH managedby_loo IN managedby_loop %][% IF ( managedby_loo.selected ) %]<option value="[% managedby_loo.code %]" selected="selected">[% managedby_loo.desc %]</option>[% ELSE %]<option value="[% managedby_loo.code %]">[% managedby_loo.desc %]</option>[% END %][% END %]
704 <label for="manageddate_from">Management date from:</label>
705 <input type="text" id="manageddate_from" size="10" name="manageddate_from" value="[% manageddate_from %]" />
708 <label for="manageddate_to">To:</label>
709 <input type="text" id="manageddate_to" size="10" name="manageddate_to" value="[% manageddate_to %]" />
711 <li><label for="acceptedby"> Accepted by:</label><select id="acceptedby" name="acceptedby"><option value="">Any</option>
712 [% FOREACH acceptedby_loo IN acceptedby_loop %][% IF ( acceptedby_loo.selected ) %] <option value="[% acceptedby_loo.code %]" selected="selected">[% acceptedby_loo.desc %]</option>[% ELSE %]<option value="[% acceptedby_loo.code %]">[% acceptedby_loo.desc %]</option>[% END %][% END %]
715 <label for="accepteddate_from">Accepted date from:</label>
716 <input type="text" id="accepteddate_from" size="10" name="accepteddate_from" value="[% accepteddate_from %]" />
719 <label for="accepteddate_to">To:</label>
720 <input type="text" id="accepteddate_to" size="10" name="accepteddate_to" value="[% accepteddate_to %]" />
722 <li><input type="submit" value="Go" /></li></ol>
725 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Acquisition information</a></h4>
726 <ol><li><label for="budgetid"> Book fund:</label>
727 <select name="budgetid" id="budgetid">
728 <option value="__ANY__">Any</option>
729 [% IF budgetid == '__NONE__' %]
730 <option value="__NONE__" selected="selected">None</option>
732 <option value="__NONE__">None</option>
734 [% FOREACH budgetid_loo IN budgetid_loop %]
735 [% IF ( budgetid_loo.selected ) %] <option value="[% budgetid_loo.code %]" selected="selected">[% budgetid_loo.desc %]</option>[% ELSE %]<option value="[% budgetid_loo.code %]">[% budgetid_loo.desc %]</option>[% END %]
738 <li><label for="branchcode">Library:</label>
739 <select name="branchcode" id="branchcode">
740 <option value="__ANY__">Any</option>
741 [% IF branchfilter %]
742 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
744 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
746 </select></li><li><input type="submit" value="Go" /></li></ol>
750 [% INCLUDE 'acquisitions-menu.inc' %]
757 [% MACRO jsinclude BLOCK %]
758 [% INCLUDE 'calendar.inc' %]
759 [% IF ( op == 'show' || op_else ) %]
760 <script type="text/javascript">
761 $(document).ready(function(){
762 $(".deletesuggestion").on("click",function(){
763 return confirm(_("Are you sure you want to delete this suggestion?"));
769 [% INCLUDE 'datatables.inc' %]
770 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
771 <script type="text/javascript">
774 * This function display the select or an textaera to write a reason.
776 function displayOther(id,show,hide){
777 $("#"+hide+id).hide();
778 $("#"+show+id).show();
780 $(document).ready(function() {
781 $('#suggestiontabs').tabs({
782 // Correct table sizing for tables hidden in tabs
783 // http://www.datatables.net/examples/api/tabs_and_scrolling.html
784 "activate": function(event, ui) {
785 $( $.fn.dataTable.tables( true ) ).DataTable().columns.adjust();
788 $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
790 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
791 { "sType": "anti-the", "aTargets" : [ "anti-the" ] }
793 "sPaginationType": "four_button"
795 [% FOREACH suggestion IN suggestions %]
796 // functions for [% suggestion.suggestiontype %] interactions
797 $("#CheckAll[% suggestion.suggestiontype %]").click(function(e){
798 $("#[% suggestion.suggestiontype %]t").checkCheckboxes();
801 $("#UncheckAll[% suggestion.suggestiontype %]").click(function(e){
802 $("#[% suggestion.suggestiontype %]t").unCheckCheckboxes();
805 $("#other_reason[% suggestion.suggestiontype %]").hide();
806 $("#reason[% suggestion.suggestiontype %]").change(function(){
807 if($(this).val() == "other"){
809 $("#other_reason[% suggestion.suggestiontype %]").show();
812 $("#[% suggestion.suggestiontype %]delete").change(function(){
814 $("form[name='f[% suggestion.suggestiontype %]'] input[name=op]").attr("value","delete");
816 $("form[name='f[% suggestion.suggestiontype %]'] input[name=op]").attr("value","change");
821 $("a[href*=back]").click(function(){
822 var sid = $(this).attr("href").replace(/#back/,"");
823 $("#reason"+sid).show().find("option[value='']").attr("selected","selected");
824 $("#other_reason"+sid).hide();
826 $("h4.local_collapse a").click(function(){
827 $(this).parent().parent().find("ol").toggle();
830 // http://jqueryui.com/demos/datepicker/#date-range
831 var dates = $( "#suggesteddate_from, #suggesteddate_to" ).datepicker({
834 onSelect: function( selectedDate ) {
835 var option = this.id == "suggesteddate_from" ? "minDate" : "maxDate",
836 instance = $( this ).data( "datepicker" );
837 date = $.datepicker.parseDate(
838 instance.settings.dateFormat ||
839 $.datepicker._defaults.dateFormat,
840 selectedDate, instance.settings );
841 dates.not( this ).datepicker( "option", option, date );
844 var datesMD = $( "#manageddate_from, #manageddate_to" ).datepicker({
847 onSelect: function( selectedDate ) {
848 var option = this.id == "manageddate_from" ? "minDate" : "maxDate",
849 instance = $( this ).data( "datepicker" );
850 date = $.datepicker.parseDate(
851 instance.settings.dateFormat ||
852 $.datepicker._defaults.dateFormat,
853 selectedDate, instance.settings );
854 datesMD.not( this ).datepicker( "option", option, date );
857 var datesAD = $( "#accepteddate_from, #accepteddate_to" ).datepicker({
860 onSelect: function( selectedDate ) {
861 var option = this.id == "accepteddate_from" ? "minDate" : "maxDate",
862 instance = $( this ).data( "datepicker" );
863 date = $.datepicker.parseDate(
864 instance.settings.dateFormat ||
865 $.datepicker._defaults.dateFormat,
866 selectedDate, instance.settings );
867 datesAD.not( this ).datepicker( "option", option, date );
871 $("form.update_suggestions").on("submit", function(e){
873 var action_delete_selected = $(this).find("input[value='delete']").is(":checked");
874 if ( action_delete_selected ) {
875 var suggestions_to_delete = $(this).find("input[name='edit_field']:checked");
876 if ( suggestions_to_delete.length == 0 ) {
877 alert(_("Please select at least one suggestion to delete"));
880 } else if ( suggestions_to_delete.length == 1 ) {
881 if ( ! confirm(_("Are you sure you want to delete this suggestion?")) ) {
885 } else if ( suggestions_to_delete.length > 1 ) {
886 if ( ! confirm(_("Are you sure you want to delete these suggestions?")) ) {
898 <script type="text/javascript">
899 $(document).ready(function(){
901 $("#quantity,#price,#currency").on("change",function(){
905 [% IF other_reason %]
906 $(".select-reason").hide();
907 $(".select-reason").find("option[value='other']").attr("selected","selected");
908 $("#other_reason").show();
910 $("#other_reason").hide();
912 $(".select-reason").change(function(){
913 if($(this).val() == "other"){
915 $("#other_reason").show();
918 $("a[href*=back]").click(function(){
919 $(".select-reason").show().find("option[value='']").attr("selected","selected");
920 $("#other_reason").hide();
925 [% Asset.js("js/acq.js") %]
926 [% Asset.js("js/acquisitions-menu.js") %]
929 [% INCLUDE 'intranet-bottom.inc' %]