2 [% USE AuthorisedValues %]
3 [% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog ›
4 [% IF ( op_add ) %]Enter a new purchase suggestion[% END %]
5 [% IF ( op_else ) %]Purchase Suggestions[% END %]
6 [% INCLUDE 'doc-head-close.inc' %]
7 [% BLOCK cssinclude %][% END %]
9 [% IF ( loggedinusername ) %][% INCLUDE 'bodytag.inc' bodyid='opac-usersuggestions' bodyclass='scrollto' %][% ELSE %][% INCLUDE 'bodytag.inc' bodyid='opac-suggestions' bodyclass='scrollto' %][% END %]
10 [% INCLUDE 'masthead.inc' %]
13 <ul class="breadcrumb">
14 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
15 <li><a href="/cgi-bin/koha/opac-user.pl">[% FOREACH USER_INF IN USER_INFO %][% USER_INF.title %] [% USER_INF.firstname %] [% USER_INF.surname %][% END %]</a> <span class="divider">›</span></li>
16 <li><a href="#">Your purchase suggestions</a></li>
19 <div class="container-fluid">
20 <div class="row-fluid">
23 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
27 <div id="usersuggestions" class="maincontent">
29 <h1>Enter a new purchase suggestion</h1>
31 <p>Please fill out this form to make a purchase suggestion. You will receive an email when the library processes your suggestion</p>
32 <p>Only the title is required, but the more information you enter the easier it will be for the librarians to find the title you're requesting. The "Notes" field can be used to provide any additional information.</p>
34 <form action="/cgi-bin/koha/opac-suggestions.pl" method="post">
35 <fieldset class="rows">
37 <li><label class="required" for="title">Title:</label><input type="text" id="title" name="title" class="span6" maxlength="255" /></li>
38 <li><label for="author">Author:</label><input type="text" id="author" name="author" class="span6" maxlength="80" /></li>
39 <li><label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" /></li>
40 <li><label for="isbn">Standard number (ISBN, ISSN or other):</label><input type="text" id="isbn" name="isbn" maxlength="80" /></li>
41 <li><label for="publishercode">Publisher:</label><input type="text" id="publishercode" name="publishercode" class="span6" maxlength="80" /></li>
42 <li><label for="collectiontitle">Collection title:</label><input type="text" id="collectiontitle" name="collectiontitle" class="span6" maxlength="80" /></li>
43 <li><label for="place">Publication place:</label><input type="text" id="place" name="place" maxlength="80" /></li>
44 <li><label for="itemtype">Item type:</label>
45 <select name="itemtype" id="itemtype">
46 <option value="">Default</option>
47 [% FOREACH itemtypeloo IN itemtypeloop %]
48 [% IF ( itemtypeloo.selected ) %]
49 <option value="[% itemtypeloo.itemtype %]" selected="selected">
51 <option value="[% itemtypeloo.itemtype %]">
53 [% itemtypeloo.description %]
58 [% IF ( branchloop ) %]
59 <li><label for="branch">Library:</label>
60 <select name="branchcode" id="branch">
61 [% FOREACH branchloo IN branchloop %]
62 [% IF ( branchloo.selected ) %]
63 <option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
65 <option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
71 [% IF ( patron_reason_loop ) %]
73 <label for="patronreason">Reason for suggestion: </label>
74 <select name="patronreason" id="patronreason">
75 <option value="">-- Choose --</option>
76 [% FOREACH patron_reason_loo IN patron_reason_loop %]
77 <option value="[% patron_reason_loo.authorised_value %]">[% patron_reason_loo.lib %]</option>
83 <label for="note">Notes:</label>
84 <textarea name="note" id="note" rows="5" cols="40"></textarea>
87 <!-- Add a hidden 'negcap' field -->
88 <li id="negcap" style="position: absolute; left: -2000px;">
89 negcap <input type="text" name="negcap"/>
94 <fieldset class="action">
95 <input type="hidden" name="suggestedby" value="[% suggestedbyme %]" />
96 <input type="hidden" name="op" value="add_confirm" />
97 <input type="submit" onclick="Check(this.form); return false;" class="btn" value="Submit your suggestion" /> <a class="action" href="/cgi-bin/koha/opac-suggestions.pl">Cancel</a>
100 [% END # IF op_add %]
104 [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]
107 [% IF ( loggedinusername ) %]
108 Your purchase suggestions
114 [% FOR m IN messages %]
115 <div class="alert alert-[% m.type %]">
117 [% CASE 'already_exists' %]
118 The suggestion has not been added. A suggestion with this title already exists.
119 [% CASE 'success_on_inserted' %]
120 Your suggestion has been submitted.
127 [% IF ( deleted ) %]<div class="alert alert-info">The selected suggestions have been deleted.</div>[% END %]
129 [% IF ( suggestions_loop ) %]
130 [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]
131 <form action="/cgi-bin/koha/opac-suggestions.pl" class="form-inline" method="get">
133 <label for="title">Search for:</label>
134 <input type="text" name="title" id="title" value="[% title |html %]" />
135 <label for="suggestedby">Suggested by:</label>
136 <div class="input-append">
137 <select name="suggestedby" id="suggestedby">
138 <option value="0">Anyone</option>
139 <option value="1">Me</option>
141 <button type="submit" class="btn">Go</button>
146 <form action="/cgi-bin/koha/opac-suggestions.pl" method="post" id="myform">
147 <input type="hidden" name="op" value="delete_confirm" />
148 <div id="toolbar" class="toolbar clearfix">
149 [% IF ( loggedinusername || ( Koha.Preference( 'AnonSuggestions' ) == 1 ) ) %]
150 <a class="new" href="/cgi-bin/koha/opac-suggestions.pl?op=add">New purchase suggestion</a>
154 [% IF ( loggedinusername ) %]
155 <div id="selections-toolbar" class="toolbar">
156 <span class="checkall"></span> <span class="clearall"></span> <span class="sep">|</span>
157 <span class="links"><span id="selections">Select suggestions to: </span>
158 <span id="removeitems"></span>
162 <table id="suggestt" class="checkboxed table table-bordered table-striped">
165 [% IF ( loggedinusername ) %]<th> </th>[% END %]
168 [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]<th>Suggested for</th>[% END %]
169 [% IF Koha.Preference( 'OpacSuggestionManagedBy' ) %]<th>Managed by</th>[% END %]
174 [% FOREACH suggestions_loo IN suggestions_loop %]
176 [% IF ( loggedinusername ) %]
178 [% IF ( suggestions_loo.showcheckbox ) %]
179 <input type="checkbox" class="cb" name="delete_field" value="[% suggestions_loo.suggestionid %]" />
184 <p><strong>[% suggestions_loo.title |html %]</strong></p>
185 <p>[% IF ( suggestions_loo.author ) %][% suggestions_loo.author |html %],[% END %]
186 [% IF ( suggestions_loo.copyrightdate ) %] - [% suggestions_loo.copyrightdate |html %],[% END %]
187 [% IF ( suggestions_loo.publishercode ) %] - [% suggestions_loo.publishercode |html %][% END %]
188 [% IF ( suggestions_loo.place ) %]([% suggestions_loo.place |html %])[% END %]
189 [% IF ( suggestions_loo.collectiontitle ) %] , [% suggestions_loo.collectiontitle |html %][% END %]
190 [% IF ( suggestions_loo.itemtype ) %] - [% suggestions_loo.itemtype %][% END %]
194 [% IF ( suggestions_loo.note ) %]
195 <span class="tdlabel">Note: </span>
196 [% suggestions_loo.note |html %]
199 [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]
201 [% IF ( suggestions_loo.branchcodesuggestedby ) %]
202 <span class="tdlabel">Suggested for:</span>
203 [% suggestions_loo.branchcodesuggestedby %]
207 [% IF Koha.Preference( 'OpacSuggestionManagedBy' ) %]
209 [% IF ( suggestions_loo.surnamemanagedby ) %]
210 <span class="tdlabel">Managed by:</span>
211 [% suggestions_loo.surnamemanagedby %]
212 [% IF ( suggestions_loo.firstnamemanagedby ) %] , [% suggestions_loo.firstnamemanagedby %]
218 <span class="tdlabel">Status:</span>
219 [% IF ( suggestions_loo.ASKED ) %]Requested
220 [% ELSIF ( suggestions_loo.CHECKED ) %]Checked by the library
221 [% ELSIF ( suggestions_loo.ACCEPTED ) %]Accepted by the library
222 [% ELSIF ( suggestions_loo.ORDERED ) %]Ordered by the library
223 [% ELSIF ( suggestions_loo.REJECTED ) %]Suggestion declined
224 [% ELSIF ( suggestions_loo.AVAILABLE ) %]Available in the library
225 [% ELSE %] [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS, 1 ) %] [% END %]
226 [% IF ( suggestions_loo.reason ) %]([% suggestions_loo.reason |html %])[% END %]
229 [% END # / FOREACH suggestions_loo %]
233 [% IF ( loggedinusername ) %]
234 <fieldset class="action">
235 <input type="submit" class="btn btn-danger" value="Delete selected" />
240 <p>There are no pending purchase suggestions.</p>
241 [% IF ( loggedinusername || ( Koha.Preference( 'AnonSuggestions' ) == 1 ) ) %]
242 <p><a class="new" href="/cgi-bin/koha/opac-suggestions.pl?op=add">New purchase suggestion</a></p>
244 [% END # / IF suggestions_loop %]
246 [% END # IF op_else %]
247 </div> <!-- / #usersuggestions -->
248 </div> <!-- / .span10 -->
249 </div> <!-- / .row-fluid -->
250 </div> <!-- / .container-fluid -->
251 </div> <!-- / .main -->
253 [% INCLUDE 'opac-bottom.inc' %]
254 [% BLOCK jsinclude %]
255 <script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
256 [% INCLUDE 'datatables.inc' %]
257 <script type="text/javascript">
259 [% IF ( loggedinusername ) %]
260 function enableCheckboxActions(){
261 // Enable/disable controls if checkboxes are checked
262 var checkedBoxes = $(".checkboxed input:checkbox:checked");
263 if ($(checkedBoxes).size()) {
264 $("#selections").html(_("With selected suggestions: "));
265 $("#selections-toolbar .links a").removeClass("disabled");
267 $("#selections").html(_("Select suggestions to: "));
268 $("#selections-toolbar .links a").addClass("disabled");
274 $("#suggestt").dataTable($.extend(true, {}, dataTablesDefaults, {
275 "aaSorting": [[ 1, "asc" ]],
277 [% IF ( loggedinusername ) %]{ "aTargets": [ 0 ], "bSortable": false, "bSearchable": false }[% END %]
280 [% IF ( loggedinusername ) %]null,[% END %]
281 { "sType": "anti-the" },
283 [% IF ( OPACViewOthersSuggestions ) %]null,[% END %]
284 [% IF Koha.Preference( 'OpacSuggestionManagedBy' ) %]null,[% END %]
288 [% IF ( loggedinusername ) %]$("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_("Clear all")+"<\/a>");
289 $("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_("Select all")+"<\/a>");
290 $("#CheckAll").click(function(){
291 $(".checkboxed").checkCheckboxes();
292 enableCheckboxActions();
295 $("#CheckNone").click(function(){
296 $(".checkboxed").unCheckCheckboxes();
297 enableCheckboxActions();
300 $(".cb").click(function(){
301 enableCheckboxActions();
303 $("#removeitems").html("<a href=\"#\" class=\"removeitems tag_hides disabled\">"+_("Delete")+"</a>")
306 $("#myform").submit();
309 enableCheckboxActions();
310 $("#myform").on('submit', function() {
311 if ( $("input:checked").size() < 1 ) {
312 alert(MSG_NO_SUGGESTION_SELECTED);
324 if(f.title.value.length ==0){
325 _alertString += _("- You must enter a Title") + "\n";
328 if (_alertString.length==0) {
331 alertString2 = _("Form not submitted because of the following problem(s)");
332 alertString2 += "\n------------------------------------------------------------------------------------\n\n";
333 alertString2 += _alertString;