Bug 5928 :wr77152 : AllowPurchaseSuggestionBranchChoice sys pref
[koha.git] / koha-tmpl / opac-tmpl / prog / en / modules / opac-suggestions.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog &rsaquo;  
2 <!-- TMPL_IF name="op_add" -->Enter a new purchase suggestion<!-- /TMPL_IF -->
3 <!-- TMPL_IF name="op_else" -->Purchase Suggestions<!-- /TMPL_IF -->
4 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
5 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
6 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
7 <script type="text/JavaScript" language="JavaScript">
8 //<![CDATA[
9 $.tablesorter.addParser({
10     id: 'articles', 
11     is: function(s) {return false;  }, 
12     format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); }, 
13     type: 'text' 
14 });
15
16        $(function() {
17                         $("#suggestt").tablesorter({
18                                 widgets : ['zebra'],
19                                 <!-- TMPL_IF NAME="loggedinusername" -->sortList: [[1,0]],<!-- TMPL_ELSE -->sortList: [[0,0]],<!-- /TMPL_IF -->
20                         headers: {
21                                 <!-- TMPL_IF NAME="loggedinusername" -->
22                                         <!-- TMPL_IF NAME="OPACViewOthersSuggestions" -->
23                                         0: { sorter: false },2: { sorter: 'articles' },2: {sorter: false },4: {sorter: false},5:{sorter:false}
24                                         <!-- TMPL_ELSE -->
25                                         0: { sorter: false },2: { sorter: 'articles' },2: {sorter: false },3: {sorter: false},4:{sorter:false}
26                                         <!-- /TMPL_IF -->
27                                 <!-- TMPL_ELSE -->
28                                 <!-- TMPL_IF NAME="OPACViewOthersSuggestions" -->
29                                         0: { sorter: 'articles' },1: {sorter: false },3: {sorter: false},4:{sorter:false}
30                                         <!-- TMPL_ELSE -->
31                                         0: { sorter: 'articles' },1: {sorter: false },2: {sorter: false},3:{sorter:false}
32                                         <!-- /TMPL_IF -->
33                                 <!-- /TMPL_IF -->
34                                 }
35                         }); 
36                         $("#CheckAll").click(function(){
37                         $(".checkboxed").checkCheckboxes();
38                         return false;
39                     });
40                     $("#CheckNone").click(function(){
41                         $(".checkboxed").unCheckCheckboxes();
42                         return false;
43                     }); 
44        });
45         
46       function Check(f) {
47                 var _alertString="";
48                 var alertString2;
49
50             if(f.title.value.length ==0){
51                         _alertString += _("- You must enter a Title") + "\n";
52                 }
53
54                 if (_alertString.length==0) {
55                         f.submit();
56                 } else {
57                         alertString2 = _("Form not submitted because of the following problem(s)");
58                         alertString2 += "\n------------------------------------------------------------------------------------\n\n";
59                         alertString2 += _alertString;
60                         alert(alertString2);
61                 }
62         }
63 //]]>
64 </script>
65 </head>
66 <!-- TMPL_IF NAME="loggedinusername" --><body id="opac-usersuggestions"><!-- TMPL_ELSE --><body id="opac-suggestions"><!-- /TMPL_IF -->
67
68 <div id="doc3" class="yui-t1">
69    <div id="bd">
70 <!-- TMPL_INCLUDE name="masthead.inc" -->
71         <div id="yui-main">
72         <div class="yui-b"><div class="yui-g">
73 <div id="usersuggestions" class="container">
74 <!-- TMPL_IF name="op_add" -->
75     <h1>Enter a new purchase suggestion</h1>
76
77     <p>Please fill out this form to make a purchase suggestion. You will receive an email when the library processes your suggestion</p>
78     <p>Only the title is required, but the more information you enter the easier it will be for the librarians to find title you're requesting. The "Notes" field can be used to provide any additional information.</p>
79     <form action="/cgi-bin/koha/opac-suggestions.pl" method="post">
80    <fieldset class="rows"> <ol>
81     <li><label class="required" for="title">Title:</label><input type="text" id="title" name="title" size="50" maxlength="80" /></li>
82     <li><label for="author">Author:</label><input type="text" id="author" name="author" size="50" maxlength="80" /></li>
83     <li><label for="copyrightdate">Copyright Date:</label><input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" /></li>
84     <li><label for="isbn">Standard Number (ISBN, ISSN or Other):</label><input type="text" id="isbn" name="isbn" size="50" maxlength="80" /></li>
85     <li><label for="publishercode">Publisher:</label><input type="text" id="publishercode" name="publishercode" size="50" maxlength="80" /></li>
86     <li><label for="collectiontitle">Collection Title:</label><input type="text" id="collectiontitle" name="collectiontitle" size="50" maxlength="80" /></li>
87     <li><label for="place">Publication Place:</label><input type="text" id="place" name="place" size="50" maxlength="80" /></li>
88     <li><label for="itemtype">Item Type:</label><select name="itemtype" id="itemtype">
89             <option value="">Default</option>
90         <!-- TMPL_LOOP name="itemtypeloop" -->
91                         <!-- TMPL_IF name="selected" --><option value="<!-- TMPL_VAR name="itemtype"-->" selected="selected"> <!--TMPL_ELSE--><option value="<!-- TMPL_VAR name="itemtype" -->"> <!--/TMPL_IF--> <!-- TMPL_VAR name="description" --></option>
92         <!-- /TMPL_LOOP -->
93         </select> </li>
94     <!-- TMPL_IF NAME="branch_loop" -->
95     <li><label for="branch">Branch:</label>
96         <select name="branch" id="branch"
97         <!-- TMPL_LOOP NAME="branch_loop" -->
98             <!-- TMPL_IF name="selected" -->
99             <option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
100             <!-- TMPL_ELSE -->
101             <option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option>
102             <!-- /TMPL_IF -->
103         <!-- /TMPL_LOOP -->
104         </select>
105     </li>
106     <!-- /TMPL_IF -->
107     <!-- TMPL_IF NAME="patron_reason_loop" --><li><label for="patronreason">Reason for suggestion: </label><select name="patronreason" id="patronreason"><option value="">-- Choose --</option><!-- TMPL_LOOP NAME="patron_reason_loop" -->
108            <option value="<!-- TMPL_VAR NAME="authorised_value" -->"><!--TMPL_VAR NAME="lib" --></option>
109     <!-- /TMPL_LOOP --></select></li><!-- /TMPL_IF -->
110     <li><label for="note">Notes:</label><textarea name="note" id="note" rows="5" cols="40"></textarea></li>
111     </ol></fieldset>
112         <fieldset class="action"><input type="hidden" name="suggestedby" value="<!--TMPL_VAR Name="suggestedbyme"-->" /><input type="hidden" name="op" value="add_confirm" /><input type="submit" onclick="Check(this.form); return false;" value="Submit Your Suggestion" /> <a class="action" href="/cgi-bin/koha/opac-suggestions.pl">Cancel</a></fieldset>
113     </form>
114
115 <!-- /TMPL_IF -->
116
117 <!-- TMPL_IF name="op_else" -->
118     <h1><!-- TMPL_UNLESS NAME="OPACViewOthersSuggestions" --><!-- TMPL_IF NAME="loggedinusername" -->My <!-- /TMPL_IF --><!-- /TMPL_UNLESS -->Purchase Suggestions</h1>
119
120     <!-- TMPL_IF NAME="deleted" --><div class="dialog message">The selected suggestions have been deleted.</div><!-- /TMPL_IF -->
121     <!-- TMPL_IF NAME="submitted" --><div class="dialog message">Your suggestion has been submitted.</div><!-- /TMPL_IF -->
122
123     <!-- TMPL_IF NAME="suggestions_loop" -->
124     <!-- TMPL_IF NAME="OPACViewOthersSuggestions" -->
125         <form action="/cgi-bin/koha/opac-suggestions.pl" method="get">
126     <table>
127         <tr>
128                 <th>
129                     Search for:
130                 </th>
131                 <td>
132                     <input type="text" name="title" value="<!-- TMPL_VAR name="title"-->" />
133                 </td>
134                 <th>
135                 Suggested by:
136                 </th>
137                 <td>
138                     <select name="suggestedby">
139                         <option value="0">Anyone</option>
140                         <option value="1">Me</option>
141                     </select>
142                 </td>
143                 <th>
144                     <input type="submit" value="Search" />
145                 </th>
146         </tr>
147                 </table>
148             </form><!-- /TMPL_IF -->
149         <form action="/cgi-bin/koha/opac-suggestions.pl" method="post">
150             <input type="hidden" name="op" value="delete_confirm" />
151                         <div><span class="checkall"><a href="#" id="CheckAll">Select All</a></span>
152                 <span class="clearall"><a href="#" id="CheckNone">Clear All</a></span> | <!-- TMPL_IF NAME="loggedinusername" --><a class="new" href="/cgi-bin/koha/opac-suggestions.pl?op=add">New purchase suggestion</a><!-- TMPL_ELSE --><!-- TMPL_IF NAME="AnonSuggestions" --><a class="new" href="/cgi-bin/koha/opac-suggestions.pl?op=add">New purchase suggestion</a><!-- /TMPL_IF --><!-- /TMPL_IF -->
153 </div>
154                         <table id="suggestt" class="checkboxed">
155                         <thead><tr>
156             <!-- TMPL_IF NAME="loggedinusername" --><th>&nbsp;</th><!-- /TMPL_IF -->
157             <th>Summary</th>
158             <th>Note</th>
159             <!-- TMPL_IF NAME="OPACViewOthersSuggestions" --><th>Suggested For</th><!-- /TMPL_IF -->
160             <th>Managed by</th>
161             <th>Status</th>
162         </tr></thead>
163         <tbody><!-- TMPL_LOOP NAME="suggestions_loop" -->
164             <!-- TMPL_IF name="even" --><tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF -->
165 <!-- TMPL_IF NAME="loggedinusername" --><td>
166     <!-- TMPL_IF NAME="showcheckbox" -->
167                     <input type="checkbox" name="delete_field" value="<!--TMPL_VAR name="suggestionid" -->" />
168     <!-- /TMPL_IF -->
169                 </td><!-- /TMPL_IF -->
170                 <td>
171                     <p><strong><!-- TMPL_VAR NAME="title" escape="html" --></strong></p>
172                     <p><!-- TMPL_IF name="author" --><!-- TMPL_VAR NAME="author" -->,<!-- /TMPL_IF -->
173                         <!-- TMPL_IF name="copyrightdate" --> - <!-- TMPL_VAR NAME="copyrightdate" -->,<!-- /TMPL_IF --> 
174                         <!-- TMPL_IF name="publishercode" --> - <!-- TMPL_VAR name="publishercode" --><!-- /TMPL_IF -->
175                         <!-- TMPL_IF name="place" -->(<!-- TMPL_VAR name="place" -->)<!-- /TMPL_IF -->
176                         <!-- TMPL_IF name="collectiontitle" --> , <!-- TMPL_VAR name="collectiontitle" --><!-- /TMPL_IF -->
177                         <!-- TMPL_IF name="itemtype" --> - <!-- TMPL_VAR name="itemtype" --><!-- /TMPL_IF -->
178                     </p>
179                 </td>
180                 <td>
181                     <!-- TMPL_VAR name="note" -->
182                 </td>
183                 <!-- TMPL_IF NAME="OPACViewOthersSuggestions" --><td>
184                     <!-- TMPL_IF NAME="branchcodesuggestedby" --><!-- TMPL_VAR name="branchcodesuggestedby" --><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF -->
185                 </td><!-- /TMPL_IF -->
186                 <td>
187                                         <!-- TMPL_IF NAME="surnamemanagedby" --><!-- TMPL_VAR name="surnamemanagedby" --><!-- TMPL_IF name="firstnamemanagedby" -->,<!-- /TMPL_IF --> <!-- TMPL_VAR name="firstnamemanagedby" --><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF -->
188                 </td>
189                 <td>
190                     <!-- TMPL_IF name="ASKED" -->Requested<!-- /TMPL_IF -->
191                     <!-- TMPL_IF name="CHECKED" -->Checked by the library<!-- /TMPL_IF -->
192                     <!-- TMPL_IF name="ACCEPTED" -->Accepted by the library<!-- /TMPL_IF -->
193                     <!-- TMPL_IF name="ORDERED" -->Ordered by the library<!-- /TMPL_IF -->
194                     <!-- TMPL_IF name="REJECTED" -->Suggestion declined <!-- /TMPL_IF -->
195                     <!-- TMPL_IF name="AVAILABLE" -->Available in the library<!-- /TMPL_IF -->
196                     <!-- TMPL_IF name="reason" -->(<!-- TMPL_VAR name="reason" -->)<!-- /TMPL_IF -->
197                 </td>
198             </tr>
199         <!-- /TMPL_LOOP -->
200        </tbody>
201     </table> <!-- TMPL_IF NAME="loggedinusername" --><fieldset class="action">
202                 <input type="submit" value="Delete Checked Items" />
203             </fieldset>
204         <!-- /TMPL_IF -->
205         </form>
206     <!-- TMPL_ELSE --><p>There are no pending purchase suggestions.</p> <!-- TMPL_IF NAME="loggedinusername" --><p><a class="new" href="/cgi-bin/koha/opac-suggestions.pl?op=add">New purchase suggestion</a></p><!-- TMPL_ELSE --><!-- TMPL_IF NAME="AnonSuggestions" --><p><a class="new" href="/cgi-bin/koha/opac-suggestions.pl?op=add">New purchase suggestion</a></p><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
207         
208 <!-- /TMPL_IF -->
209 </div>
210 </div>
211 </div>
212 </div>
213 <div class="yui-b">
214 <div id="leftmenus" class="container">
215 <!--TMPL_INCLUDE NAME="navigation.inc" -->
216 <!-- TMPL_INCLUDE name="usermenu.inc" -->
217 </div>
218 </div>
219 </div>
220 <!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->