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; } 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; }
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 %]
144 [% ELSIF ( STATUS == 'ORDERED' ) %]
146 [% SET status_found = 1 %]
147 [% ELSIF ( STATUS == 'AVAILABLE' ) %]
149 [% SET status_found = 1 %]
151 [% FOREACH s IN SuggestionStatuses %]
152 [% IF STATUS == s.authorised_value %]
154 [% SET status_found = 1 %]
162 <thead><tr><th> </th><th>Date</th><th>By</th></tr></thead>
166 <td>[% suggesteddate | $KohaDates %]</td>
168 [% IF ( suggestedby_borrowernumber ) %]
169 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber | uri %]">[% suggestedby_surname | html %], [% suggestedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
170 [% Branches.GetName( suggestedby_branchcode ) | html %] ([% suggestedby_description | html %])
176 <td>[% manageddate | $KohaDates %]</td>
178 [% IF ( managedby_borrowernumber ) %]
179 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber | uri %]">[% managedby_surname | html %], [% managedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
180 [% Branches.GetName( managedby_branchcode ) | html %] ([% managedby_description | html %])
185 <th>Accepted on:</th>
186 <td>[% accepteddate | $KohaDates %]</td>
188 [% IF ( acceptedby_borrowernumber ) %]
189 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber | uri %]">[% acceptedby_surname | html %], [% acceptedby_firstname | html %] ([% suggestedby_cardnumber | html %])</a>
190 [% Branches.GetName( acceptedby_branchcode ) | html %] ([% acceptedby_description | html %])
197 <fieldset class="rows"> <legend>Acquisition information</legend>
200 <span class="label">Library:</span> [% Branches.GetName( branchcode ) | html %]
203 <span class="label">Fund:</span> [% budgetname | html %]
206 <span class="label">Copies:</span>[% quantity | html %]
209 <span class="label">Currency:</span>[% currency | html %]
212 <span class="label">Price:</span>[% price | $Price %]
215 <span class="label">Total</span>[% total | $Price %]
220 <fieldset class="action">
221 <a href="suggestion.pl"><< Back to suggestions</a>
230 <div class="main container-fluid">
232 <div class="col-md-8 col-md-offset-2">
234 <div class="main container-fluid">
236 <div class="col-sm-10 col-sm-push-2">
242 <form id="add_edit" action="suggestion.pl" method="post" class="validated">
243 <input type="hidden" name="redirect" id="redirect" value="[% redirect | html %]" />
244 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber | html %]" />
245 [% IF ( suggestionid ) %]
246 <h1>Edit purchase suggestion #[% suggestionid | html %]</h1>
247 <input type="hidden" name="suggestionid" value="[% suggestionid | html %]"/>
249 <h1>Enter a new purchase suggestion</h1>
251 <fieldset class="rows"> <legend>Bibliographic information</legend><ol>
253 <label for="title" class="required">Title:</label>
254 <input type="text" id="title" name="title" size="80" maxlength="255" value="[% title | html %]" required="required" class="required" />
255 <span class="required">Required</span>
257 <li><label for="author">Author:</label><input type="text" id="author" name="author" size="50" maxlength="80" value="[% author | html %]"/></li>
258 <li><label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" value="[% copyrightdate | html %]" /></li>
259 <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>
260 <li><label for="publishercode">Publisher:</label><input type="text" id="publishercode" name="publishercode" size="50" maxlength="80" value="[% publishercode | html %]"/></li>
261 <li><label for="place">Publication place:</label><input type="text" id="place" name="place" size="50" maxlength="80" value="[% place | html %]"/></li>
262 <li><label for="collectiontitle">Collection title:</label><input type="text" id="collectiontitle" name="collectiontitle" size="50" maxlength="80" value="[% collectiontitle | html %]"/></li>
263 <li><label for="itemtype">Document type:</label>
264 [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20, default=itemtype %]
266 [% IF patron_reason_loop %]
268 <label for="patronreason">Reason for suggestion: </label>
269 <select name="patronreason" id="patronreason">
270 <option value=""> -- Choose -- </option>
271 [% FOREACH patron_reason_loo IN patron_reason_loop %]
272 [% IF patron_reason_loo.authorised_value == patronreason %]
273 <option value="[% patron_reason_loo.authorised_value | html %]" selected="selected">[% patron_reason_loo.lib | html %]</option>
275 <option value="[% patron_reason_loo.authorised_value | html %]">[% patron_reason_loo.lib | html %]</option>
281 <li><label for="note">Notes:</label><textarea name="note" id="note" rows="5" cols="40">[% note | html %]</textarea></li>
284 <fieldset class="rows"> <legend>Suggestion management</legend>
286 [% IF ( suggestionid ) %]
288 <label for="STATUS">Status:</label>
289 <select id="STATUS" name="STATUS">
290 <option value="">No Status</option>
292 [% IF (statusselected_ASKED ) %]
293 <option value="ASKED" selected="selected">Pending</option>
295 <option value="ASKED">Pending</option>
298 [% IF (statusselected_ACCEPTED ) %]
299 <option value="ACCEPTED" selected="selected">Accepted</option>
301 <option value="ACCEPTED">Accepted</option>
304 [% IF (statusselected_CHECKED ) %]
305 <option value="CHECKED" selected="selected">Checked</option>
307 <option value="CHECKED">Checked</option>
310 [% IF ( statusselected_REJECTED ) %]
311 <option value="REJECTED" selected="selected">Rejected</option>
313 <option value="REJECTED">Rejected</option>
316 [% FOREACH s IN SuggestionStatuses %]
317 [% IF s.authorised_value == suggestion.STATUS %]
318 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
320 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
326 <label for="reason">Reason</label>
327 <select class="select-reason" id="reason" name="reason">
328 <option value=""> -- Choose a reason -- </option>
329 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
330 [% IF (reasonsloo.lib == suggestion.reason) %]
331 <option value="[% reasonsloo.lib | html %]" selected="selected">[% reasonsloo.lib | html %]</option>
333 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
336 <option value="other">Others...</option>
339 <span id="other_reason" name="other_reason">
340 [% IF other_reason %]
341 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." value="[% suggestion.reason | html %]"/>
343 <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." />
345 <a href="#back">Cancel</a>
350 <thead><tr><th> </th><th>Date</th><th>By</th></tr></thead>
353 <th><label for="suggesteddate">Created by:</label> </th>
354 <td><input type="text" id="suggesteddate" name="suggesteddate" class="datepicker" size="10" maxlength="10" value="[% suggesteddate | $KohaDates %]"/>[% INCLUDE 'date-format.inc' %]</td>
355 <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 %]
359 <th><label for="managedon">Managed by:</label> </th>
360 <td><input type="text" id="managedon" name="manageddate" class="datepicker" size="10" maxlength="10" value="[% manageddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]</td>
361 <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>
364 <th><label for="accepteddate">Accepted on:</label> </th>
365 <td><input type="text" id="accepteddate" name="accepteddate" class="datepicker" size="10" maxlength="10" value="[% accepteddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]</td>
366 <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>
371 <fieldset class="rows"> <legend>Acquisition information</legend><ol>
372 <li><label for="branchcode">Library:</label>
373 <select name="branchcode" id="branchcode">
374 <option value="">Any</option>
375 [% IF branchfilter %]
376 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
378 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
382 <li><label for="budgetid">Fund:</label>
383 <select name="budgetid" id="budgetid">
384 <option value="">Any</option>[% FOREACH budgetsloo IN budgetsloop %]
385 [% 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 %]
387 </li><li><label for="quantity">Copies:</label>
388 <input type="text" size="10" id="quantity" name="quantity" value="[% quantity | html %]" />
391 <label for="currency">Currency:</label>
392 [% FOREACH c IN currencies %]
393 <input type="hidden" value="[% c.rate | html %]" id="currency_rate_[% c.currency | html %]" name="currency_rate_[% c.currency | html %]" />
394 <input type="hidden" id="[% c.currency | html %]" name="[% c.currency | html %]" value="[% c.rate | html %]" />
397 <select name="currency" id="currency">
398 [% FOREACH c IN currencies %]
399 [% IF suggestionid and suggestion.currency == c.currency or not suggestionid and c.active %]
400 <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
401 [% ELSIF not c.archived %]
402 <option value="[% c.currency | html %]">[% c.currency | html %]</option>
407 <li><label for="price">Price:</label>
408 <input type="text" size="20" name="price" id="price" value="[% price | html %]" />
409 </li><li><label for="total">Total: </label>
410 <input type="text" readonly="readonly" id="total" name="total" size="10" value="[% total | html %]"/>
412 </fieldset><input type="hidden" id="returnsuggested" name="returnsuggested" value="[% IF ( returnsuggestedby ) %][% returnsuggestedby | html %][% ELSE %]noone[% END %]"/>
413 <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 %]
419 <div id="toolbar" class="btn-toolbar">
420 <a class="btn btn-default" id="newsuggestion" href="suggestion.pl?op=add"><i class="fa fa-plus"></i> New purchase suggestion</a>
423 <h1>Suggestions management</h1>
426 [% FOR m IN messages %]
427 <div class="dialog [% m.type | html %]">
429 [% CASE 'already_exists' %]
430 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>)
437 [% UNLESS ( notabs ) %]
438 <div id="suggestiontabs" class="toptabs">
439 <ul class="ui-tabs-nav">
440 [% FOREACH suggestion IN suggestions %]
442 <a href="#[% suggestion.suggestiontype | uri %]">
443 [% IF ( suggestion.suggestiontypelabel ) %]
444 [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending
445 [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted
446 [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked
447 [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected
448 [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available
449 [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered
450 [% ELSIF (suggestion.suggestiontypelabel == "Unknown") %]Status unknown
451 [% ELSE %][% suggestion.suggestiontypelabel | html %][% END %]
453 [% IF ( suggestion.suggestiontype ) %]
454 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.suggestiontype ) | html %]
459 ([% suggestion.suggestions_loop.size | html %])</a></li>
465 [% FOREACH suggestion IN suggestions %]
466 <div id="[% suggestion.suggestiontype | html %]">
467 <form class="update_suggestions" name="f[% suggestion.suggestiontype | html %]" method="post" action="/cgi-bin/koha/suggestion/suggestion.pl#[% suggestion.suggestiontype | html %]">
469 [% IF ( suggestion.suggestions_loop ) %]
470 <p><a id="CheckAll[% suggestion.suggestiontype | html %]" href="#">Check all</a> | <a id="UncheckAll[% suggestion.suggestiontype | html %]" href="#">Uncheck all</a></p>
471 <table id="[% suggestion.suggestiontype | html %]t" class="sorted">
474 <th class="NoSort"> </th>
475 <th class="anti-the">Suggestion</th>
476 <th>Suggested by - on</th>
477 <th>Managed by - on</th>
481 <th class="NoSort"> </th>
485 [% FOREACH suggestions_loo IN suggestion.suggestions_loop %]
488 <input type="checkbox" name="edit_field" value="[% suggestions_loo.suggestionid | html %]" />
491 <a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | uri %]&op=show" title="suggestion" >
492 [% suggestions_loo.title | html %][% IF ( suggestions_loo.author ) %], by [% suggestions_loo.author | html %][% END %]</a>
494 [% IF ( suggestions_loo.copyrightdate ) %]© [% suggestions_loo.copyrightdate | html %] [% END %]
495 [% IF ( suggestions_loo.volumedesc ) %]; Volume:<i>[% suggestions_loo.volumedesc | html %]</i> [% END %]
496 [% 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 %]
499 <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>
500 [% IF ( suggestions_loo.suggesteddate ) %] - [% suggestions_loo.suggesteddate | $KohaDates %][% END %]
503 <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>
504 [% IF ( suggestions_loo.manageddate ) %] - [% suggestions_loo.manageddate | $KohaDates %][% END %]
507 [% Branches.GetName( suggestions_loo.branchcode ) | html %]
510 [% suggestions_loo.budget_name | html %]
513 [% IF ( suggestions_loo.ASKED ) %]
515 [% ELSIF ( suggestions_loo.ACCEPTED ) %]
517 [% ELSIF ( suggestions_loo.ORDERED ) %]
519 [% ELSIF ( suggestions_loo.REJECTED ) %]
521 [% ELSIF ( suggestions_loo.CHECKED ) %]
523 [% ELSIF ( suggestions_loo.AVAILABLE ) %]
525 [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %]
526 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) | html %]
531 [% IF ( suggestions_loo.reason ) %]
532 <br />([% suggestions_loo.reason | html %])
536 <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>
537 <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>
542 <div id="select-reason[% suggestion.suggestiontype | html %]">
543 <div id="status[% suggestion.suggestiontype | html %]">
544 <label for="STATUS[% suggestion.suggestiontype | html %]">Mark selected as: </label>
545 <select name="STATUS" id="STATUS[% suggestion.suggestiontype | html %]">
546 <option value=""> -- Choose a status --</option>
548 [% IF (statusselected_ASKED ) %]
549 <option value="ASKED" selected="selected">Pending</option>
551 <option value="ASKED">Pending</option>
554 [% IF (statusselected_ACCEPTED ) %]
555 <option value="ACCEPTED" selected="selected">Accepted</option>
557 <option value="ACCEPTED">Accepted</option>
560 [% IF (statusselected_CHECKED ) %]
561 <option value="CHECKED" selected="selected">Checked</option>
563 <option value="CHECKED">Checked</option>
566 [% IF ( statusselected_REJECTED ) %]
567 <option value="REJECTED" selected="selected">Rejected</option>
569 <option value="REJECTED">Rejected</option>
572 [% FOREACH s IN SuggestionStatuses %]
573 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
577 <label for="reason[% suggestion.suggestiontype | html %]">with this reason:</label>
578 <select id="reason[% suggestion.suggestiontype | html %]" name="reason[% suggestion.suggestiontype | html %]">
579 <option value=""> -- Choose a reason -- </option>
580 [% FOREACH reasonsloo IN suggestion.reasonsloop %]
581 <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
583 <option value="other">Others...</option>
586 <span id="other_reason[% suggestion.suggestiontype | html %]">
587 <input type="text" size="31" id="select-other_reason[% suggestion.suggestiontype | html %]" name="other_reason[% suggestion.suggestiontype | html %]" placeholder="please note your reason here..." />
588 <a href="#back[% suggestion.suggestiontype | uri %]">Cancel</a>
591 <strong style="padding: 0 1em;">OR:</strong>
593 <label for="[% suggestion.suggestiontype | html %]delete">Delete selected</label>
594 <input type="checkbox" name="op" id="[% suggestion.suggestiontype | html %]delete" />
598 <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
599 <input type="hidden" name="tabcode" value="[% suggestion.suggestiontype | html %]" />
600 <input type="hidden" name="op" value="change" />
602 <fieldset class="action">
603 <input type="submit" value="Submit" /></fieldset>
613 [% UNLESS ( op_save ) %]
614 [% UNLESS ( op == 'show' ) %]
617 </div> <!-- /.col-sm-10.col-sm-push-2 -->
619 <div class="col-sm-2 col-sm-pull-10">
622 <form name="suggestionfilter" action="suggestion.pl" method="get">
623 <fieldset class="brief"><ol style="display:block;"><li><label for="displayby">Organize by: </label>
624 <select name="displayby" id="displayby" style="width:auto;">
625 [% IF ( displayby == "STATUS" ) %]
626 <option value="STATUS" selected="selected">Status</option>
628 <option value="STATUS">Status</option>
630 [% IF ( displayby == "branchcode" ) %]
631 <option value="branchcode" selected="selected">Library</option>
633 <option value="branchcode">Library</option>
635 [% IF ( displayby == "itemtype" ) %]
636 <option value="itemtype" selected="selected">Item type</option>
638 <option value="itemtype">Item type</option>
640 [% IF ( displayby == "managedby" ) %]
641 <option value="managedby" selected="selected">Managed by</option>
643 <option value="managedby">Managed by</option>
645 [% IF ( displayby == "acceptedby" ) %]
646 <option value="acceptedby" selected="selected">Accepted by</option>
648 <option value="acceptedby">Accepted by</option>
650 </select> <input type="submit" value="Go" /></li></ol></fieldset>
651 <h4>Filter by: <a style="font-size:80%;font-weight:normal;" href="/cgi-bin/koha/suggestion/suggestion.pl">[clear]</a></h4>
652 <div style="display:block;" id="limits">
654 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Bibliographic information</a></h4>
655 <ol> <li><label for="title"> Title:</label><input type="text" id="title" name="title" value="[% title | html %]" /></li>
656 <li><label for="author"> Author:</label><input type="text" id="author" name="author" value="[% author | html %]" /></li>
657 <li><label for="isbn"> ISBN:</label><input type="text" id="isbn" name="isbn" value="[% isbn | html %]" /></li>
658 <li><label for="publishercode"> Publisher:</label><input type="text" id="publishercode" name="publishercode" value="[% publishercode | html %]" /></li>
659 <li><label for="copyrightdate_filter"> Copyright date:</label><input type="text" id="copyrightdate_filter" name="copyrightdate" value="[% copyrightdate | html %]" /></li>
660 <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>
662 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Suggestion information</a></h4>
665 <label for="STATUS"> Status:</label>
666 <select name="STATUS" id="STATUS">
667 <option value="">Any</option>
669 [% IF (statusselected_ASKED ) %]
670 <option value="ASKED" selected="selected">Pending</option>
672 <option value="ASKED">Pending</option>
675 [% IF (statusselected_ACCEPTED ) %]
676 <option value="ACCEPTED" selected="selected">Accepted</option>
678 <option value="ACCEPTED">Accepted</option>
681 [% IF (statusselected_CHECKED ) %]
682 <option value="CHECKED" selected="selected">Checked</option>
684 <option value="CHECKED">Checked</option>
687 [% IF ( statusselected_REJECTED ) %]
688 <option value="REJECTED" selected="selected">Rejected</option>
690 <option value="REJECTED">Rejected</option>
693 [% FOREACH s IN SuggestionStatuses %]
694 [% IF s.authorised_value == selected_status %]
695 <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
697 <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
703 <li><label for="suggestedby"> Suggested by:</label><select id="suggestedby" name="suggestedby"><option value="">Any</option>
704 [% 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 %]
707 <label for="suggesteddate_from">Suggested date from:</label>
708 <input type="text" id="suggesteddate_from" size="10" name="suggesteddate_from" value="[% suggesteddate_from | html %]" />
711 <label for="suggesteddate_to">To:</label>
712 <input type="text" id="suggesteddate_to" size="10" name="suggesteddate_to" value="[% suggesteddate_to | html %]" />
714 <li><label for="managedby"> Managed by:</label><select id="managedby" name="managedby"><option value="">Any</option>
715 [% 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 %]
718 <label for="manageddate_from">Management date from:</label>
719 <input type="text" id="manageddate_from" size="10" name="manageddate_from" value="[% manageddate_from | html %]" />
722 <label for="manageddate_to">To:</label>
723 <input type="text" id="manageddate_to" size="10" name="manageddate_to" value="[% manageddate_to | html %]" />
725 <li><label for="acceptedby"> Accepted by:</label><select id="acceptedby" name="acceptedby"><option value="">Any</option>
726 [% 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 %]
729 <label for="accepteddate_from">Accepted date from:</label>
730 <input type="text" id="accepteddate_from" size="10" name="accepteddate_from" value="[% accepteddate_from | html %]" />
733 <label for="accepteddate_to">To:</label>
734 <input type="text" id="accepteddate_to" size="10" name="accepteddate_to" value="[% accepteddate_to | html %]" />
736 <li><input type="submit" value="Go" /></li></ol>
739 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Acquisition information</a></h4>
740 <ol><li><label for="budgetid"> Book fund:</label>
741 <select name="budgetid" id="budgetid">
742 <option value="__ANY__">Any</option>
743 [% IF budgetid == '__NONE__' %]
744 <option value="__NONE__" selected="selected">None</option>
746 <option value="__NONE__">None</option>
748 [% FOREACH budgetid_loo IN budgetid_loop %]
749 [% 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 %]
752 <li><label for="branchcode">Library:</label>
753 <select name="branchcode" id="branchcode">
754 <option value="__ANY__">Any</option>
755 [% IF branchfilter %]
756 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter ) %]
758 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
760 </select></li><li><input type="submit" value="Go" /></li></ol>
763 [% INCLUDE 'acquisitions-menu.inc' %]
766 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
767 </div> <!-- /.row -->
774 [% MACRO jsinclude BLOCK %]
775 [% INCLUDE 'calendar.inc' %]
776 [% IF ( op == 'show' || op_else ) %]
777 <script type="text/javascript">
778 $(document).ready(function(){
779 $(".deletesuggestion").on("click",function(){
780 return confirm(_("Are you sure you want to delete this suggestion?"));
786 [% INCLUDE 'datatables.inc' %]
787 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
788 <script type="text/javascript">
791 * This function display the select or an textaera to write a reason.
793 function displayOther(id,show,hide){
794 $("#"+hide+id).hide();
795 $("#"+show+id).show();
797 $(document).ready(function() {
798 $('#suggestiontabs').tabs({
799 // Correct table sizing for tables hidden in tabs
800 // http://www.datatables.net/examples/api/tabs_and_scrolling.html
801 "activate": function(event, ui) {
802 $( $.fn.dataTable.tables( true ) ).DataTable().columns.adjust();
805 $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
807 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
808 { "sType": "anti-the", "aTargets" : [ "anti-the" ] }
810 "sPaginationType": "full"
812 [% FOREACH suggestion IN suggestions %]
813 // functions for [% suggestion.suggestiontype | html %] interactions
814 $("#CheckAll[% suggestion.suggestiontype | html %]").click(function(e){
815 $("#[% suggestion.suggestiontype | html %]t").checkCheckboxes();
818 $("#UncheckAll[% suggestion.suggestiontype | html %]").click(function(e){
819 $("#[% suggestion.suggestiontype | html %]t").unCheckCheckboxes();
822 $("#other_reason[% suggestion.suggestiontype | html %]").hide();
823 $("#reason[% suggestion.suggestiontype | html %]").change(function(){
824 if($(this).val() == "other"){
826 $("#other_reason[% suggestion.suggestiontype | html %]").show();
829 $("#[% suggestion.suggestiontype | html %]delete").change(function(){
831 $("form[name='f[% suggestion.suggestiontype | html %]'] input[name=op]").attr("value","delete");
833 $("form[name='f[% suggestion.suggestiontype | html %]'] input[name=op]").attr("value","change");
838 $("a[href*=back]").click(function(){
839 var sid = $(this).attr("href").replace(/#back/,"");
840 $("#reason"+sid).show().find("option[value='']").attr("selected","selected");
841 $("#other_reason"+sid).hide();
843 $("h4.local_collapse a").click(function(){
844 $(this).parent().parent().find("ol").toggle();
847 // http://jqueryui.com/demos/datepicker/#date-range
848 var dates = $( "#suggesteddate_from, #suggesteddate_to" ).datepicker({
851 onSelect: function( selectedDate ) {
852 var option = this.id == "suggesteddate_from" ? "minDate" : "maxDate",
853 instance = $( this ).data( "datepicker" );
854 date = $.datepicker.parseDate(
855 instance.settings.dateFormat ||
856 $.datepicker._defaults.dateFormat,
857 selectedDate, instance.settings );
858 dates.not( this ).datepicker( "option", option, date );
861 var datesMD = $( "#manageddate_from, #manageddate_to" ).datepicker({
864 onSelect: function( selectedDate ) {
865 var option = this.id == "manageddate_from" ? "minDate" : "maxDate",
866 instance = $( this ).data( "datepicker" );
867 date = $.datepicker.parseDate(
868 instance.settings.dateFormat ||
869 $.datepicker._defaults.dateFormat,
870 selectedDate, instance.settings );
871 datesMD.not( this ).datepicker( "option", option, date );
874 var datesAD = $( "#accepteddate_from, #accepteddate_to" ).datepicker({
877 onSelect: function( selectedDate ) {
878 var option = this.id == "accepteddate_from" ? "minDate" : "maxDate",
879 instance = $( this ).data( "datepicker" );
880 date = $.datepicker.parseDate(
881 instance.settings.dateFormat ||
882 $.datepicker._defaults.dateFormat,
883 selectedDate, instance.settings );
884 datesAD.not( this ).datepicker( "option", option, date );
888 $("form.update_suggestions").on("submit", function(e){
890 var action_delete_selected = $(this).find("input[value='delete']").is(":checked");
891 if ( action_delete_selected ) {
892 var suggestions_to_delete = $(this).find("input[name='edit_field']:checked");
893 if ( suggestions_to_delete.length == 0 ) {
894 alert(_("Please select at least one suggestion to delete"));
897 } else if ( suggestions_to_delete.length == 1 ) {
898 if ( ! confirm(_("Are you sure you want to delete this suggestion?")) ) {
902 } else if ( suggestions_to_delete.length > 1 ) {
903 if ( ! confirm(_("Are you sure you want to delete these suggestions?")) ) {
915 <script type="text/javascript">
916 $(document).ready(function(){
918 $("#quantity,#price,#currency").on("change",function(){
922 [% IF other_reason %]
923 $(".select-reason").hide();
924 $(".select-reason").find("option[value='other']").attr("selected","selected");
925 $("#other_reason").show();
927 $("#other_reason").hide();
929 $(".select-reason").change(function(){
930 if($(this).val() == "other"){
932 $("#other_reason").show();
935 $("a[href*=back]").click(function(){
936 $(".select-reason").show().find("option[value='']").attr("selected","selected");
937 $("#other_reason").hide();
942 [% Asset.js("js/acq.js") | $raw %]
943 [% Asset.js("js/acquisitions-menu.js") | $raw %]
946 [% INCLUDE 'intranet-bottom.inc' %]