Moving inline script blocks to <head> where possible
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / suggestion / acceptorreject.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Suggestion Management</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <script type="text/JavaScript">
5  // <![CDATA[
6     /**
7      *  check(form);
8      *  This function check the form before submit it.
9      */
10      /*
11      function check(form){
12         return true;
13      }
14      */
15         /**
16          *  displayOther.
17          *  This function display the select or an textaera to write a reason.
18          */
19         function displayOther(id) {
20                 var spanselect = document.getElementById("span-select-reason"+id);
21                 var spanother = document.getElementById("span-other-reason"+id);
22         var select = spanselect.firstChild.nextSibling; 
23         
24                 if(select.value != "other"){
25                         return;
26                 }
27                 if(spanother.getAttribute('class')=='content_visible'){
28                         spanother.removeAttribute('class');
29                         spanselect.removeAttribute('class');
30                         spanother.setAttribute('class','content_hidden');
31                         spanselect.setAttribute('class','content_visible');
32                 }
33                 else{
34                         spanother.removeAttribute('class');
35                         spanselect.removeAttribute('class');
36                         spanselect.setAttribute('class','content_hidden');
37                         spanother.setAttribute('class','content_visible');                      
38                 }
39         }
40 // ]]>
41 </script>
42 </head>
43 <body>
44 <!-- TMPL_INCLUDE NAME="header.inc" -->
45
46 <!-- TMPL_INCLUDE NAME="menu-acqui.inc" -->
47
48 <div id="doc3" class="yui-t2">
49    
50    <div id="bd">
51         <div id="yui-main">
52         <div class="yui-b"><div class="yui-g">
53
54     <h1>Suggestions Management</h1>
55     
56     <div id="action">
57         <a href="/cgi-bin/koha/suggestion/acceptorreject.pl?op=accepted">Accepted</a>
58         <a href="/cgi-bin/koha/suggestion/acceptorreject.pl?op=aorr_confirm">Waiting</a>
59         <a href="/cgi-bin/koha/suggestion/acceptorreject.pl?op=rejected">Rejected</a>
60     </div>
61
62 <!-- TMPL_IF name="op_else" -->
63     <!-- TMPL_IF NAME="suggestions_loop" -->
64     <b>Waiting suggestion,</b> accept or reject these suggestions with a reason.
65     <form name="f" method="post" action="/cgi-bin/koha/suggestion/acceptorreject.pl">
66     <input type="hidden" name="op" value="aorr_confirm">
67     <table>
68         <tr>
69             <th>Status</th>
70             <th>Reason</th>
71             <th>Suggestion</th>
72             <th>Suggested by</th>
73         </tr>
74         <!-- TMPL_LOOP NAME="suggestions_loop" -->
75             <tr<!-- TMPL_IF name="even" --> class="highlight"<!-- /TMPL_IF -->>
76                 <td>
77                     <select name="aorr">
78                         <option value=""> -- Choose Action -- </option>
79                         <option value="R<!--TMPL_VAR name="suggestionid" -->">Reject</option>
80                         <option value="A<!--TMPL_VAR name="suggestionid" -->">Accept</option>
81                     </select>
82                 </td>
83                 <td>
84
85                             <span id="span-select-reason<!-- TMPL_VAR NAME="suggestionid" -->" class="content_visible">
86                         <select name="reason<!-- TMPL_VAR name="suggestionid" -->" onchange="displayOther('<!-- TMPL_VAR NAME="suggestionid" -->');">
87                                         <option value=""> -- Choose a reason -- </option>
88                             <!-- TMPL_LOOP NAME="reasonsloop" -->
89                                 <option value="<!-- TMPL_VAR NAME="lib" -->"><!-- TMPL_VAR NAME="lib" --></option>
90                             <!-- /TMPL_LOOP -->
91                                         <option value="other">Others...</option>
92                         </select>
93                     <!-- TMPL_UNLESS NAME="reasonsloop"-->
94                         <span class="problem">No reasons defined on</span> <a href="/cgi-bin/koha/admin/authorised_values.pl">authorised value</a>.
95                     <!-- /TMPL_UNLESS -->
96                     </span>
97                     <span id="span-other-reason<!-- TMPL_VAR NAME="suggestionid" -->" class="content_hidden">
98                         <input type="text" name="other-reason<!-- TMPL_VAR name="suggestionid" -->" value="write your reason here..." onclick="if(this.value === 'write your reason here...'){this.value=''}" />
99                         <small><a href="JavaScript:displayOther('<!-- TMPL_VAR NAME="suggestionid" -->');">back to list</a></small>
100                     </span>
101                 </td>
102                 <td>
103                 <!-- TMPL_VAR NAME="title" --><!-- TMPL_IF NAME="author" -->, by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF --><br />
104                     <!-- TMPL_IF name="copyrightdate" -->&copy; <!-- TMPL_VAR name="copyrightdate" --> <!-- /TMPL_IF -->
105                         <!-- TMPL_IF name="volumedesc" -->; Volume:<i><!-- TMPL_VAR name="volumedesc" --></i> <!-- /TMPL_IF -->
106                         <!-- TMPL_IF name="isbn" -->; ISBN :<i><!-- TMPL_VAR name="isbn" --></i> <!-- /TMPL_IF --><!-- TMPL_IF name="publishercode" -->; Published by <!-- TMPL_VAR name="publishercode" --> <!-- /TMPL_IF --><!-- TMPL_IF name="publicationyear" --> in <i><!-- TMPL_VAR name="publicationyear" --></i> <!-- /TMPL_IF --><!-- TMPL_IF name="place" --> in <i><!-- TMPL_VAR name="place" --></i> <!-- /TMPL_IF --><br /><!-- TMPL_IF name="note" --><!-- TMPL VAR NAME="note" --><!-- /TMPL_IF -->
107                 </td>
108                 <td>
109                     <!-- TMPL_VAR name="surnamesuggestedby" -->
110                     <!-- TMPL_IF name="firstnamesuggestedby" -->,<!-- /TMPL_IF -->
111                     <!-- TMPL_VAR name="firstnamesuggestedby" -->
112                 </td>
113             </tr>
114         <!-- /TMPL_LOOP -->
115         </table>
116         <input type="submit" value="Change Status">
117 </form>
118 <!-- TMPL_ELSE -->
119     <b>No waiting suggestion to accept or reject.</b>
120 <!-- /TMPL_IF -->
121 <!-- /TMPL_IF -->
122
123 <!-- TMPL_IF NAME="done" -->
124     <br />
125     <!-- TMPL_IF NAME="op_accepted"-->
126         <b>Accepted suggestion</b>
127     <!-- /TMPL_IF -->
128     <!-- TMPL_IF NAME="op_rejected"-->
129         <b>Rejected suggestion</b>
130     <!-- /TMPL_IF -->
131     
132     <!-- TMPL_IF NAME="suggestions_loop" -->
133         <table>
134         <tr>
135             <th>Reason</th>
136             <th>Suggestion</th>
137             <th>Suggested by</th>
138             <th>Date</th>
139         </tr>
140         <!-- TMPL_LOOP NAME="suggestions_loop" -->
141             <td>
142                 <!-- TMPL_VAR NAME="reason" -->
143             </td>
144             <td>
145                 <!-- TMPL_VAR NAME="title" -->
146                     <!-- TMPL_IF NAME="author" -->
147                         , by <!-- TMPL_VAR NAME="author" -->
148                     <!-- /TMPL_IF -->
149                     <br />
150                     <!-- TMPL_IF name="copyrightdate" -->
151                         &copy <!-- TMPL_VAR name="copyrightdate" -->
152                     <!-- /TMPL_IF -->
153                     <!-- TMPL_IF name="volumedesc" -->
154                         ; Volume:<i><!-- TMPL_VAR name="volumedesc" --></i>
155                     <!-- /TMPL_IF -->
156                     <!-- TMPL_IF name="isbn" -->
157                         ; ISBN :<i><!-- TMPL_VAR name="isbn" --></i>
158                     <!-- /TMPL_IF -->
159                     <!-- TMPL_IF name="publishercode" -->
160                         ; Published by <!-- TMPL_VAR name="publishercode" -->
161                     <!-- /TMPL_IF -->
162                     <!-- TMPL_IF name="publicationyear" -->
163                         in <i><!-- TMPL_VAR name="publicationyear" --></i>
164                     <!-- /TMPL_IF -->
165                     <!-- TMPL_IF name="place" -->
166                         in <i><!-- TMPL_VAR name="place" --></i>
167                     <!-- /TMPL_IF -->
168                     <br />
169                     <!-- TMPL_IF name="note" -->
170                         <!-- TMPL VAR NAME="note" -->
171                     <!-- /TMPL_IF -->
172             </td>
173             <td>
174                 <!-- TMPL_VAR name="surnamesuggestedby" -->
175                 <!-- TMPL_IF name="firstnamesuggestedby" -->,<!-- /TMPL_IF -->
176                 <!-- TMPL_VAR name="firstnamesuggestedby" -->
177             </td>
178             <td>
179                 <!-- TMPL_VAR NAME="date" -->
180             </td>
181          </tr>
182         <!-- /TMPL_LOOP -->
183         </table>
184     <!-- TMPL_ELSE -->
185         <br /><br />
186         No suggestion has already been 
187         <!-- TMPL_IF NAME="op_accepted"-->
188             accepted.
189         <!-- TMPL_ELSE -->
190             rejected.
191         <!-- /TMPL_IF -->
192     <!-- /TMPL_IF -->
193 <!-- /TMPL_IF -->
194
195
196 </div>
197 </div>
198 </div>
199
200 <!-- TMPL_INCLUDE NAME="mainmenu.inc" -->
201 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->