e1a9c1db9b36a0504a75d9309f4c9ade24c7c8a7
[koha-ffzg.git] / koha-tmpl / intranet-tmpl / prog / en / modules / suggestion / acceptorreject.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Acquisitions &rsaquo; Suggestions Management</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.pack.js"></script>
5 <script type="text/JavaScript">
6  // <![CDATA[
7         $.tablesorter.addParser({
8             id: 'articles', 
9             is: function(s) {return false;  }, 
10             format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); }, 
11             type: 'text' 
12         });
13         /**
14          *  displayOther.
15          *  This function display the select or an textaera to write a reason.
16          */
17         function displayOther(id,show,hide) {
18                 $("#"+hide+id).hide();
19                 $("#"+show+id).show();
20         }
21         $(document).ready(function() {
22     $('#suggestiontabs > ul').tabs({
23                 select: function(ui) {
24                 $("#loadingtab").show();
25             },
26         show: function(ui) {
27                 $("#loadingtab").hide();
28             }
29         }); 
30         $("#acceptedt").tablesorter({
31                 headers: { 0: { sorter: 'articles' },3:{sorter: false},4:{sorter: false},5:{sorter: false},6:{sorter: false},7:{sorter: false}}
32         });
33         $("#acceptedt").bind("sortStart",function() {
34                 $("#sorting").show();
35         }).bind("sortEnd",function() {
36                 $("#sorting").hide();
37         });
38         $("#pendingt").tablesorter({
39     headers: { 0: { sorter: 'articles' },3:{sorter: false},4:{sorter: false},5:{sorter: false},6:{sorter: false},7:{sorter: false}}
40         });
41         $("#pendingt").bind("sortStart",function() {
42                 $("#sorting").show();
43         }).bind("sortEnd",function() {
44                 $("#sorting").hide();
45         });
46         $("#rejectedt").tablesorter({
47     headers: { 0: { sorter: 'articles' },3:{sorter: false},4:{sorter: false},5:{sorter: false},6:{sorter: false},7:{sorter: false}}
48         });
49         $("#rejectedt").bind("sortStart",function() {
50                 $("#sorting").show();
51         }).bind("sortEnd",function() {
52                 $("#sorting").hide();
53         });
54                 $("div[id*=other-reason]").hide();
55                 $("input[name*=other-reason]").focus(function(){ $(this).val(""); });
56                 $("select[name*=reason]").change(function(){
57                         if($(this).children("[@selected]").val() == "other"){
58                         displayOther($(this).attr("name").replace(/reason/,""),"other-reason","select-reason");
59                         }
60                 });
61                 $("a[href*=back]").click(function(){
62                         var sid = $(this).attr("href").replace(/#back/,"");
63                         displayOther(sid,"select-reason","other-reason");
64                         $("#reason"+sid).find("option[value='']").attr("selected","selected");
65                 });
66         }); 
67 // ]]>
68 </script>
69 <style>
70 .overlay {
71         top: 180px;
72         left: 50%;
73         position: absolute;
74         margin-left: -100px;
75         width: 200px;
76         text-align: center;
77         display: none;
78         margin-top: -10px;
79         background: #eeffd4;
80         padding : .5em;
81         color: #000;
82 }
83 </style>
84 </head>
85 <body>
86 <!-- TMPL_INCLUDE NAME="header.inc" -->
87 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
88
89 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <!-- TMPL_IF NAME="op_accepted"--> <a href="/cgi-bin/koha/suggestion/acceptorreject.pl">Suggestions Management</a> &rsaquo; Accepted<!-- /TMPL_IF --><!-- TMPL_IF NAME="op_else"--> Suggestions Management<!-- /TMPL_IF --><!-- TMPL_IF NAME="op_rejected"--> <a href="/cgi-bin/koha/suggestion/acceptorreject.pl">Suggestions Management</a> &rsaquo; Rejected<!-- /TMPL_IF --></div>
90
91 <div id="doc" class="yui-t7">
92    
93    <div id="bd">
94         <div id="yui-main">
95         <div class="yui-b">
96
97     <h1>Suggestions</h1>
98   <div id="sorting" class="overlay">Sorting...</div>
99   <div id="loadingtab" class="overlay">Loading tab...</div>
100   <div id="suggestiontabs" class="toptabs">
101         <ul class="ui-tabs-nav">
102       <li><a href="/cgi-bin/koha/suggestion/acceptorreject.pl#accepted">Accepted</a></li>
103       <li class="ui-tabs-selected"><a href="/cgi-bin/koha/suggestion/acceptorreject.pl#pending">Pending</a></li>
104       <li><a href="/cgi-bin/koha/suggestion/acceptorreject.pl#rejected">Rejected</a></li>
105                 </ul>
106         
107  <!--TMPL_LOOP Name="suggestions"-->
108   <div id="<!--TMPL_VAR Name="suggestiontype"-->">
109 <form name="f<!--TMPL_VAR Name="suggestiontype"-->" method="post" action="/cgi-bin/koha/suggestion/acceptorreject.pl">
110  <input type="hidden" name="op" value="aorr_confirm" />
111  <input type="hidden" name="suggestiontype" value="<!--TMPL_VAR Name="suggestiontype"-->" >
112
113     <!-- TMPL_IF NAME="suggestions_loop" -->
114         <!--TMPL_IF EXPR="suggestiontype eq 'accepted'"-->
115     <table id="acceptedt">
116         <!-- TMPL_ELSIF EXPR="suggestiontype eq 'pending'" -->
117         <table id="pendingt">
118         <!-- TMPL_ELSE -->
119         <table id="rejectedt">
120         <!-- /TMPL_IF -->
121         <thead><tr>
122             <th>Suggestion</th>
123             <th>Suggested by</th>
124             <th>Date</th>
125     <!--TMPL_IF EXPR="suggestiontype ne 'pending'"-->
126             <th>Reason</th>
127             <th>Reason Update</th>
128     <!--TMPL_ELSE-->
129             <th>Reason</th>
130     <!--/TMPL_IF -->         
131             <th>Accept</th>
132             <th>Reject</th>
133             <th>Delete</th>
134     </tr></thead>
135         <tbody><!-- TMPL_LOOP NAME="suggestions_loop" -->
136             <!-- TMPL_IF name="even" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
137                 <td>
138     <!-- TMPL_VAR NAME="title" --><!-- TMPL_IF NAME="author" -->, by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF --><br />
139                     <!-- TMPL_IF name="copyrightdate" -->&copy; <!-- TMPL_VAR name="copyrightdate" --> <!-- /TMPL_IF -->
140                         <!-- TMPL_IF name="volumedesc" -->; Volume:<i><!-- TMPL_VAR name="volumedesc" --></i> <!-- /TMPL_IF -->
141                         <!-- 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 -->
142                 </td>
143                 <td>
144                     <!-- TMPL_VAR name="surnamesuggestedby" -->
145                     <!-- TMPL_IF name="firstnamesuggestedby" -->,<!-- /TMPL_IF -->
146                     <!-- TMPL_VAR name="firstnamesuggestedby" -->
147                 </td>
148                 <td>
149                     <!-- TMPL_VAR name="date" -->
150                 </td>
151   
152     <!--TMPL_IF EXPR="suggestiontype ne 'pending'"-->
153                 <td>
154                 <!--TMPL_VAR Name="reason"-->
155       
156                 </td>
157     <!--/TMPL_IF -->
158                 <td>
159                             <div id="select-reason<!-- TMPL_VAR NAME="suggestionid" -->">
160                         <!-- TMPL_IF NAME="reasonsloop" --><select id="reason<!-- TMPL_VAR NAME="suggestionid" -->" name="reason<!-- TMPL_VAR NAME="suggestionid" -->">
161                                         <option value=""> -- Choose a reason -- </option>
162                             <!-- TMPL_LOOP NAME="reasonsloop" -->
163                                 <option value="<!-- TMPL_VAR NAME="lib" -->"><!-- TMPL_VAR NAME="lib" --></option>
164                             <!-- /TMPL_LOOP -->
165                                         <option value="other">Others...</option>
166                         </select><!-- TMPL_ELSE --><span class="problem">No reasons defined in <a href="/cgi-bin/koha/admin/authorised_values.pl">authorised values</a></span><!-- /TMPL_IF -->
167                     </div>
168                     <div id="other-reason<!-- TMPL_VAR NAME="suggestionid" -->">
169                         <input type="text" size="31" name="other-reason<!-- TMPL_VAR name="suggestionid" -->" value="please note your reason here..."  />
170                         <p><a href="#back<!-- TMPL_VAR NAME="suggestionid" -->">back to list</a></p>
171                     </div>
172                         
173                 </td>
174                 <td>
175     <!--TMPL_IF EXPR="suggestiontype eq 'accepted'"-->
176                         <input id="a<!--TMPL_VAR name="suggestionid" -->" name="<!--TMPL_VAR name="suggestionid" -->" type="radio" value="ACCEPTED" disabled="disabled"  />
177     
178     <!--TMPL_ELSE-->  
179                         <input id="a<!--TMPL_VAR name="suggestionid" -->" name="<!--TMPL_VAR name="suggestionid" -->" type="radio" value="ACCEPTED" />
180     <!--/TMPL_IF-->            
181             </td>
182             <td>
183     <!--TMPL_IF EXPR="suggestiontype eq 'rejected'"-->
184                         <input id="r<!--TMPL_VAR name="suggestionid" -->" name="<!--TMPL_VAR name="suggestionid" -->" type="radio" value="REJECTED" disabled="disabled" />
185     
186     <!--TMPL_ELSE-->  
187                         <input id="r<!--TMPL_VAR name="suggestionid" -->"  name="<!--TMPL_VAR name="suggestionid" -->" type="radio" value="REJECTED" />
188     <!--/TMPL_IF-->            
189                 
190             </td>
191             <td>
192                         <input id="d<!--TMPL_VAR name="suggestionid" -->" name="<!--TMPL_VAR name="suggestionid" -->" type="radio" value="delete" />
193             </td>
194          </tr>
195         <!-- /TMPL_LOOP --></tbody>
196         </table>  <fieldset>
197   <div id="select-reason<!-- TMPL_VAR NAME="suggestiontype" -->all">
198      <label for="reason<!-- TMPL_VAR NAME="suggestiontype" -->all">Choose a reason for all marked entries:</label>                 <select id="reason<!-- TMPL_VAR NAME="suggestiontype" -->all" name="reason<!-- TMPL_VAR NAME="suggestiontype" -->all">
199                       <option value=""> -- Choose a reason -- </option>
200                         <!--TMPL_LOOP Name="reasonsloop"-->
201                         <option value="<!--TMPL_VAR Name="lib" -->"><!--TMPL_VAR Name="lib" --></option>
202                         <!--/TMPL_LOOP-->
203                       <option value="other">Others...</option>
204                       </select>  <a href="#markall" id="markallop<!-- TMPL_VAR NAME="suggestiontype" -->">Mark all with this reason</a> 
205       </div>
206         
207         <div id="other-reason<!-- TMPL_VAR NAME="suggestiontype" -->all">
208     <label for="other-reason<!-- TMPL_VAR NAME="suggestiontype" -->all">Enter a reason for all marked entries:</label>
209       <input type="text" size="31" id="other-reason<!-- TMPL_VAR NAME="suggestiontype" -->all" name="other-reason<!-- TMPL_VAR NAME="suggestiontype" -->all" value="please note your reason here..." /> 
210     </div>
211   </fieldset>
212         <fieldset class="action"><input type="submit" value="Change Status" /></fieldset>
213 </form>
214 <!-- TMPL_ELSE -->
215     <!--TMPL_IF EXPR="suggestiontype eq 'pending'"-->
216     <b>No pending suggestions.</b>
217     <!--/TMPL_IF-->  
218     <!--TMPL_IF EXPR="suggestiontype eq 'accepted'"-->
219     <b>No accepted suggestions.</b>
220     <!--/TMPL_IF-->  
221     <!--TMPL_IF EXPR="suggestiontype eq 'rejected'"-->
222     <b>No rejected suggestions.</b>
223     <!--/TMPL_IF-->  
224 <!-- /TMPL_IF -->
225
226 </div>
227 <!--/TMPL_LOOP-->
228
229 </div>  
230 </div></div>
231
232 </div>
233 </div>
234 </div>
235 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->