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