4 [% USE AuthorisedValues %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Koha › Acquisitions ›
11 [% IF ( suggestionid ) %]
12 Suggestions › Edit suggestion #[% suggestionid | html %]
14 Suggestions › Add suggestion
16 [% ELSIF ( op == 'show' ) %]
17 Suggestions › Show suggestion #[% suggestionid | html %]
19 Suggestions management
22 [% INCLUDE 'doc-head-close.inc' %]
27 h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief ol { display : none; }
28 .overlay { top: 180px; left: 50%; position: absolute; margin-left: -100px; width: 200px; text-align: center; display: none; margin-top: -10px; background: #eeffd4; padding: .5em; color: #000; } .note { -moz-border-radius: 3px; border-radius:3px; background: transparent url("[% interface | html %]/[% theme | html %]/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 | html %]
42 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Add suggestion
44 [% ELSIF ( op == 'show' ) %]
45 <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › Show suggestion #[% suggestionid | html %]
47 Suggestions management
51 [% IF ( op == 'show' ) %]
52 <div class="main container-fluid">
54 <div class="col-md-8 col-md-offset-2">
56 <div id="toolbar" class="btn-toolbar">
57 <a class="btn btn-default" id="editsuggestion" href="suggestion.pl?op=edit&suggestionid=[% suggestionid | html %]"><i class="fa fa-pencil"></i> Edit</a>
58 <a class="btn btn-default deletesuggestion" href="suggestion.pl?op=delete&edit_field=[% suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a>
61 <fieldset class="rows">
62 <legend>Bibliographic information</legend>
66 <span class="label">Title:</span>
72 <span class="label">Author:</span>
76 [% IF ( copyrightdate ) %]
78 <span class="label">Copyright date:</span>
79 [% copyrightdate | html %]
84 <span class="label">ISBN or ISSN or other standard number:</span>
88 [% IF ( publishercode ) %]
90 <span class="label">Publisher:</span>
91 [% publishercode | html %]
96 <span class="label">Publication place:</span>
100 [% IF ( collectiontitle ) %]
102 <span class="label">Collection title:</span>
103 [% collectiontitle | html %]
106 [% IF ( itemtype ) %]
108 <span class="label">Document type:</span>
109 [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', itemtype, 0 ) | html %]
112 [% IF ( patron_reason_loop ) %]
113 <li><span class="label">Reason for suggestion: </span>
114 [% FOREACH patron_reason_loo IN patron_reason_loop %]
115 [% IF patron_reason_loo.authorised_value == patronreason %][% patron_reason_loo.lib | html %][% END %]
121 <span class="label">Notes:</span>
127 <fieldset class="rows"> <legend>Suggestion management</legend>
130 <span class="label">Status:</span>
131 [% SET status_found = 0 %]
132 [% IF ( STATUS == 'ASKED' ) %]
134 [% SET status_found = 1 %]
135 [% ELSIF ( STATUS == 'ACCEPTED' ) %]
137 [% SET status_found = 1 %]
138 [% ELSIF ( STATUS == 'CHECKED' ) %]
140 [% SET status_found = 1 %]
141 [% ELSIF ( STATUS == 'REJECTED' ) %]
143 [% SET status_found = 1 %]
145 [% FOREACH s IN SuggestionStatuses %]
146 [% IF STATUS == s.authorised_value %]
148 [% SET status_found = 1 %]
156 <thead><tr><th> </th><th>Date</th><th>By</th></tr></thead>
160 <td>[% suggesteddate | $KohaDates %]</td>
162 [% IF ( suggestedby_borrowernumber ) %]
163 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber | uri %]">[% suggestedby_surname | html %], [% suggestedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
164 [% Branches.GetName( suggestedby_branchcode ) | html %] ([% suggestedby_description | html %])
170 <td>[% manageddate | $KohaDates %]</td>
172 [% IF ( managedby_borrowernumber ) %]
173 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber | uri %]">[% managedby_surname | html %], [% managedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
174 [% Branches.GetName( managedby_branchcode ) | html %] ([% managedby_description | html %])
179 <th>Accepted on:</th>
180 <td>[% accepteddate | $KohaDates %]</td>
182 [% IF ( acceptedby_borrowernumber ) %]
183 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber | uri %]">[% acceptedby_surname | html %], [% acceptedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
184 [% Branches.GetName( acceptedby_branchcode ) | html %] ([% acceptedby_description | html %])
191 <fieldset class="rows"> <legend>Acquisition information</legend>
194 <span class="label">Library:</span> [% Branches.GetName( branchcode ) | html %]
197 <span class="label">Fund:</span> [% budgetname | html %]
200 <span class="label">Copies:</span>[% quantity | html %]
203 <span class="label">Currency:</span>[% currency | html %]
206 <span class="label">Price:</span>[% price | $Price %]
209 <span class="label">Total</span>[% total | $Price %]
214 <fieldset class="action">
215 <a href="suggestion.pl"><< Back to suggestions</a>
224 <div class="main container-fluid">
226 <div class="col-md-8 col-md-offset-2">
228 <div class="main container-fluid">
230 <div class="col-sm-10 col-sm-push-2">
236 <form id="add_edit" action="suggestion.pl" method="post" class="validated">
237 <input type="hidden" name="redirect" id="redirect" value="[% redirect | html %]" />
238 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber | html %]" />
239 [% IF ( suggestionid ) %]
240 <h1>Edit purchase suggestion #[% suggestionid | html %]</h1>
241 <input type="hidden" name="suggestionid" value="[% suggestionid | html %]"/>
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 | html %]" selected="selected">[% patron_reason_loo.lib | html %]</option>
269 <option value="[% patron_reason_loo.authorised_value | html %]">[% patron_reason_loo.lib | html %]</option>
275 <li><label for="note">Notes:</label><textarea name="note" id="note" rows="5" cols="40">[% note | html %]</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 == suggestion.STATUS %]
312 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
314 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</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 | html %]" selected="selected">[% reasonsloo.lib | html %]</option>
327 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</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 | 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 %]
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 | 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>
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 | 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>
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 | html %]" selected="selected">[% budgetsloo.budget_name | html %]</option>[% ELSE %]<option value="[% budgetsloo.budget_id | html %]">[% budgetsloo.budget_name | html %]</option>[% END %][% END %]
381 </li><li><label for="quantity">Copies:</label>
382 <input type="text" size="10" id="quantity" name="quantity" value="[% quantity | html %]" />
385 <label for="currency">Currency:</label>
386 [% FOREACH c IN currencies %]
387 <input type="hidden" value="[% c.rate | html %]" id="currency_rate_[% c.currency | html %]" name="currency_rate_[% c.currency | html %]" />
388 <input type="hidden" id="[% c.currency | html %]" name="[% c.currency | html %]" value="[% c.rate | html %]" />
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 | html %]" selected="selected">[% c.currency | html %]</option>
395 [% ELSIF not c.archived %]
396 <option value="[% c.currency | html %]">[% c.currency | html %]</option>
401 <li><label for="price">Price:</label>
402 <input type="text" size="20" name="price" id="price" value="[% price | html %]" />
403 </li><li><label for="total">Total: </label>
404 <input type="text" readonly="readonly" id="total" name="total" size="10" value="[% total | html %]"/>
406 </fieldset><input type="hidden" id="returnsuggested" name="returnsuggested" value="[% IF ( returnsuggestedby ) %][% returnsuggestedby | html %][% ELSE %]noone[% END %]"/>
407 <fieldset class="action"><input type="hidden" name="op" value="[% op | html %]" />[% IF ( suggestionid ) %]<input type="submit" value="Save" /> <a class="cancel" href="[% IF ( returnsuggestedby ) %]/cgi-bin/koha/members/moremember.pl?borrowernumber=[% returnsuggestedby | uri %]#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" 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 | html %]">
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 | html %]&op=show'>suggestion #[% m.id | html %]</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 | uri %]">
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 | html %][% END %]
447 [% IF ( suggestion.suggestiontype ) %]
448 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.suggestiontype ) | html %]
453 ([% suggestion.suggestions_loop.size | html %])</a></li>
459 [% FOREACH suggestion IN suggestions %]
460 <div id="[% suggestion.suggestiontype | html %]">
461 <form class="update_suggestions" name="f[% suggestion.suggestiontype | html %]" method="post" action="/cgi-bin/koha/suggestion/suggestion.pl#[% suggestion.suggestiontype | html %]">
463 [% IF ( suggestion.suggestions_loop ) %]
464 <p><a id="CheckAll[% suggestion.suggestiontype | html %]" href="#">Check all</a> | <a id="UncheckAll[% suggestion.suggestiontype | html %]" href="#">Uncheck all</a></p>
465 <table id="[% suggestion.suggestiontype | html %]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 | html %]" />
485 <a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | uri %]&op=show" title="suggestion" >
486 [% suggestions_loo.title | html %][% IF ( suggestions_loo.author ) %], by [% suggestions_loo.author | html %][% 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 ) | html %] [% 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 | uri %]">[% suggestions_loo.surnamesuggestedby | html %][% IF ( suggestions_loo.firstnamesuggestedby ) %], [% suggestions_loo.firstnamesuggestedby | html %][% END %] [% IF (suggestions_loo.cardnumbersuggestedby ) %]([% suggestions_loo.cardnumbersuggestedby | html %])[% 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 | uri %]">[% suggestions_loo.surnamemanagedby | html %][% IF ( suggestions_loo.firstnamemanagedby ) %], [% suggestions_loo.firstnamemanagedby | html %][% END %]</a>
498 [% IF ( suggestions_loo.manageddate ) %] - [% suggestions_loo.manageddate | $KohaDates %][% END %]
501 [% Branches.GetName( suggestions_loo.branchcode ) | html %]
504 [% suggestions_loo.budget_name | html %]
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 ) | html %]
523 [% IF ( suggestions_loo.reason ) %]
524 <br />([% suggestions_loo.reason | html %])
528 <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>
529 <a class="btn btn-default btn-xs deletesuggestion" href="suggestion.pl?op=delete&edit_field=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a>
534 <div id="select-reason[% suggestion.suggestiontype | html %]">
535 <div id="status[% suggestion.suggestiontype | html %]">
536 <label for="STATUS[% suggestion.suggestiontype | html %]">Mark selected as: </label>
537 <select name="STATUS" id="STATUS[% suggestion.suggestiontype | html %]">
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 | html %]">[% s.lib | html %]</option>
569 <label for="reason[% suggestion.suggestiontype | html %]">with this reason:</label>
570 <select id="reason[% suggestion.suggestiontype | html %]" name="reason[% suggestion.suggestiontype | html %]">
571 <option value=""> -- Choose a reason -- </option>
572 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
573 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
575 <option value="other">Others...</option>
578 <span id="other_reason[% suggestion.suggestiontype | html %]">
579 <input type="text" size="31" id="select-other_reason[% suggestion.suggestiontype | html %]" name="other_reason[% suggestion.suggestiontype | html %]" placeholder="please note your reason here..." />
580 <a href="#back[% suggestion.suggestiontype | uri %]">Cancel</a>
583 <strong style="padding: 0 1em;">OR:</strong>
585 <label for="[% suggestion.suggestiontype | html %]delete">Delete selected</label>
586 <input type="checkbox" name="op" id="[% suggestion.suggestiontype | html %]delete" />
590 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
591 <input type="hidden" name="tabcode" value="[% suggestion.suggestiontype | html %]" />
592 <input type="hidden" name="op" value="change" />
594 <fieldset class="action">
595 <input type="submit" value="Submit" /></fieldset>
605 [% UNLESS ( op_save ) %]
606 [% UNLESS ( op == 'show' ) %]
609 </div> <!-- /.col-sm-10.col-sm-push-2 -->
611 <div class="col-sm-2 col-sm-pull-10">
614 <form name="suggestionfilter" action="suggestion.pl" method="get">
615 <fieldset class="brief"><ol style="display:block;"><li><label for="displayby">Organize by: </label>
616 <select name="displayby" id="displayby" style="width:auto;">
617 [% IF ( displayby == "STATUS" ) %]
618 <option value="STATUS" selected="selected">Status</option>
620 <option value="STATUS">Status</option>
622 [% IF ( displayby == "branchcode" ) %]
623 <option value="branchcode" selected="selected">Library</option>
625 <option value="branchcode">Library</option>
627 [% IF ( displayby == "itemtype" ) %]
628 <option value="itemtype" selected="selected">Item type</option>
630 <option value="itemtype">Item type</option>
632 [% IF ( displayby == "managedby" ) %]
633 <option value="managedby" selected="selected">Managed by</option>
635 <option value="managedby">Managed by</option>
637 [% IF ( displayby == "acceptedby" ) %]
638 <option value="acceptedby" selected="selected">Accepted by</option>
640 <option value="acceptedby">Accepted by</option>
642 </select> <input type="submit" value="Go" /></li></ol></fieldset>
643 <h4>Filter by: <a style="font-size:80%;font-weight:normal;" href="/cgi-bin/koha/suggestion/suggestion.pl">[clear]</a></h4>
644 <div style="display:block;" id="limits">
646 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Bibliographic information</a></h4>
647 <ol> <li><label for="title"> Title:</label><input type="text" id="title" name="title" value="[% title | html %]" /></li>
648 <li><label for="author"> Author:</label><input type="text" id="author" name="author" value="[% author | html %]" /></li>
649 <li><label for="isbn"> ISBN:</label><input type="text" id="isbn" name="isbn" value="[% isbn | html %]" /></li>
650 <li><label for="publishercode"> Publisher:</label><input type="text" id="publishercode" name="publishercode" value="[% publishercode | html %]" /></li>
651 <li><label for="copyrightdate_filter"> Copyright date:</label><input type="text" id="copyrightdate_filter" name="copyrightdate" value="[% copyrightdate | html %]" /></li>
652 <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>
654 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Suggestion information</a></h4>
657 <label for="STATUS"> Status:</label>
658 <select name="STATUS" id="STATUS">
659 <option value="">Any</option>
661 [% IF (statusselected_ASKED ) %]
662 <option value="ASKED" selected="selected">Pending</option>
664 <option value="ASKED">Pending</option>
667 [% IF (statusselected_ACCEPTED ) %]
668 <option value="ACCEPTED" selected="selected">Accepted</option>
670 <option value="ACCEPTED">Accepted</option>
673 [% IF (statusselected_CHECKED ) %]
674 <option value="CHECKED" selected="selected">Checked</option>
676 <option value="CHECKED">Checked</option>
679 [% IF ( statusselected_REJECTED ) %]
680 <option value="REJECTED" selected="selected">Rejected</option>
682 <option value="REJECTED">Rejected</option>
685 [% FOREACH s IN SuggestionStatuses %]
686 [% IF s.authorised_value == selected_status %]
687 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
689 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
695 <li><label for="suggestedby"> Suggested by:</label><select id="suggestedby" name="suggestedby"><option value="">Any</option>
696 [% 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 %]
699 <label for="suggesteddate_from">Suggested date from:</label>
700 <input type="text" id="suggesteddate_from" size="10" name="suggesteddate_from" value="[% suggesteddate_from | html %]" />
703 <label for="suggesteddate_to">To:</label>
704 <input type="text" id="suggesteddate_to" size="10" name="suggesteddate_to" value="[% suggesteddate_to | html %]" />
706 <li><label for="managedby"> Managed by:</label><select id="managedby" name="managedby"><option value="">Any</option>
707 [% 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 %]
710 <label for="manageddate_from">Management date from:</label>
711 <input type="text" id="manageddate_from" size="10" name="manageddate_from" value="[% manageddate_from | html %]" />
714 <label for="manageddate_to">To:</label>
715 <input type="text" id="manageddate_to" size="10" name="manageddate_to" value="[% manageddate_to | html %]" />
717 <li><label for="acceptedby"> Accepted by:</label><select id="acceptedby" name="acceptedby"><option value="">Any</option>
718 [% 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 %]
721 <label for="accepteddate_from">Accepted date from:</label>
722 <input type="text" id="accepteddate_from" size="10" name="accepteddate_from" value="[% accepteddate_from | html %]" />
725 <label for="accepteddate_to">To:</label>
726 <input type="text" id="accepteddate_to" size="10" name="accepteddate_to" value="[% accepteddate_to | html %]" />
728 <li><input type="submit" value="Go" /></li></ol>
731 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Acquisition information</a></h4>
732 <ol><li><label for="budgetid"> Book fund:</label>
733 <select name="budgetid" id="budgetid">
734 <option value="__ANY__">Any</option>
735 [% IF budgetid == '__NONE__' %]
736 <option value="__NONE__" selected="selected">None</option>
738 <option value="__NONE__">None</option>
740 [% FOREACH budgetid_loo IN budgetid_loop %]
741 [% IF ( budgetid_loo.selected ) %] <option value="[% budgetid_loo.code | html %]" selected="selected">[% budgetid_loo.desc | html %]</option>[% ELSE %]<option value="[% budgetid_loo.code | html %]">[% budgetid_loo.desc | html %]</option>[% END %]
744 <li><label for="branchcode">Library:</label>
745 <select name="branchcode" id="branchcode">
746 <option value="__ANY__">Any</option>
747 [% IF branchfilter %]
748 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
750 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
752 </select></li><li><input type="submit" value="Go" /></li></ol>
755 [% INCLUDE 'acquisitions-menu.inc' %]
758 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
759 </div> <!-- /.row -->
766 [% MACRO jsinclude BLOCK %]
767 [% INCLUDE 'calendar.inc' %]
768 [% IF ( op == 'show' || op_else ) %]
769 <script type="text/javascript">
770 $(document).ready(function(){
771 $(".deletesuggestion").on("click",function(){
772 return confirm(_("Are you sure you want to delete this suggestion?"));
778 [% INCLUDE 'datatables.inc' %]
779 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
780 <script type="text/javascript">
783 * This function display the select or an textaera to write a reason.
785 function displayOther(id,show,hide){
786 $("#"+hide+id).hide();
787 $("#"+show+id).show();
789 $(document).ready(function() {
790 $('#suggestiontabs').tabs({
791 // Correct table sizing for tables hidden in tabs
792 // http://www.datatables.net/examples/api/tabs_and_scrolling.html
793 "activate": function(event, ui) {
794 $( $.fn.dataTable.tables( true ) ).DataTable().columns.adjust();
797 $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
799 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
800 { "sType": "anti-the", "aTargets" : [ "anti-the" ] }
802 "sPaginationType": "four_button"
804 [% FOREACH suggestion IN suggestions %]
805 // functions for [% suggestion.suggestiontype | html %] interactions
806 $("#CheckAll[% suggestion.suggestiontype | html %]").click(function(e){
807 $("#[% suggestion.suggestiontype | html %]t").checkCheckboxes();
810 $("#UncheckAll[% suggestion.suggestiontype | html %]").click(function(e){
811 $("#[% suggestion.suggestiontype | html %]t").unCheckCheckboxes();
814 $("#other_reason[% suggestion.suggestiontype | html %]").hide();
815 $("#reason[% suggestion.suggestiontype | html %]").change(function(){
816 if($(this).val() == "other"){
818 $("#other_reason[% suggestion.suggestiontype | html %]").show();
821 $("#[% suggestion.suggestiontype | html %]delete").change(function(){
823 $("form[name='f[% suggestion.suggestiontype | html %]'] input[name=op]").attr("value","delete");
825 $("form[name='f[% suggestion.suggestiontype | html %]'] input[name=op]").attr("value","change");
830 $("a[href*=back]").click(function(){
831 var sid = $(this).attr("href").replace(/#back/,"");
832 $("#reason"+sid).show().find("option[value='']").attr("selected","selected");
833 $("#other_reason"+sid).hide();
835 $("h4.local_collapse a").click(function(){
836 $(this).parent().parent().find("ol").toggle();
839 // http://jqueryui.com/demos/datepicker/#date-range
840 var dates = $( "#suggesteddate_from, #suggesteddate_to" ).datepicker({
843 onSelect: function( selectedDate ) {
844 var option = this.id == "suggesteddate_from" ? "minDate" : "maxDate",
845 instance = $( this ).data( "datepicker" );
846 date = $.datepicker.parseDate(
847 instance.settings.dateFormat ||
848 $.datepicker._defaults.dateFormat,
849 selectedDate, instance.settings );
850 dates.not( this ).datepicker( "option", option, date );
853 var datesMD = $( "#manageddate_from, #manageddate_to" ).datepicker({
856 onSelect: function( selectedDate ) {
857 var option = this.id == "manageddate_from" ? "minDate" : "maxDate",
858 instance = $( this ).data( "datepicker" );
859 date = $.datepicker.parseDate(
860 instance.settings.dateFormat ||
861 $.datepicker._defaults.dateFormat,
862 selectedDate, instance.settings );
863 datesMD.not( this ).datepicker( "option", option, date );
866 var datesAD = $( "#accepteddate_from, #accepteddate_to" ).datepicker({
869 onSelect: function( selectedDate ) {
870 var option = this.id == "accepteddate_from" ? "minDate" : "maxDate",
871 instance = $( this ).data( "datepicker" );
872 date = $.datepicker.parseDate(
873 instance.settings.dateFormat ||
874 $.datepicker._defaults.dateFormat,
875 selectedDate, instance.settings );
876 datesAD.not( this ).datepicker( "option", option, date );
880 $("form.update_suggestions").on("submit", function(e){
882 var action_delete_selected = $(this).find("input[value='delete']").is(":checked");
883 if ( action_delete_selected ) {
884 var suggestions_to_delete = $(this).find("input[name='edit_field']:checked");
885 if ( suggestions_to_delete.length == 0 ) {
886 alert(_("Please select at least one suggestion to delete"));
889 } else if ( suggestions_to_delete.length == 1 ) {
890 if ( ! confirm(_("Are you sure you want to delete this suggestion?")) ) {
894 } else if ( suggestions_to_delete.length > 1 ) {
895 if ( ! confirm(_("Are you sure you want to delete these suggestions?")) ) {
907 <script type="text/javascript">
908 $(document).ready(function(){
910 $("#quantity,#price,#currency").on("change",function(){
914 [% IF other_reason %]
915 $(".select-reason").hide();
916 $(".select-reason").find("option[value='other']").attr("selected","selected");
917 $("#other_reason").show();
919 $("#other_reason").hide();
921 $(".select-reason").change(function(){
922 if($(this).val() == "other"){
924 $("#other_reason").show();
927 $("a[href*=back]").click(function(){
928 $(".select-reason").show().find("option[value='']").attr("selected","selected");
929 $("#other_reason").hide();
934 [% Asset.js("js/acq.js") | $raw %]
935 [% Asset.js("js/acquisitions-menu.js") | $raw %]
938 [% INCLUDE 'intranet-bottom.inc' %]