Merge remote-tracking branch 'origin/new/bug_5356'
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / serials-search.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 [% USE KohaDates %]
3 <title>Koha &rsaquo; Serials [% biblionumber %]</title>
4 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5 [% INCLUDE 'doc-head-close.inc' %]
6 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
7 [% INCLUDE 'datatables-strings.inc' %]
8 <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
9 <script type="text/javascript">
10 //<![CDATA[
11  $(document).ready(function() {
12     var srlt = $("#srlt").dataTable($.extend(true, {}, dataTablesDefaults, {
13         "aoColumnDefs": [
14             { "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
15         ],
16         "sPaginationType": "four_button"
17     } ) );
18
19     srlt.fnAddFilters("filter", 750);
20  });
21  //]]>
22 </script>
23 </head>
24 <body id="ser_serials-home" class="ser">
25 [% INCLUDE 'header.inc' %]
26 [% INCLUDE 'serials-search.inc' %]
27
28 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; [% IF ( done_searched ) %]<a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> &rsaquo; Search results[% ELSE %]Serials [% END %] </div>
29
30 <div id="doc3" class="yui-t2">
31   <div id="bd">
32     <div id="yui-main">
33       <div class="yui-b">
34       [% INCLUDE 'serials-toolbar.inc' %]
35
36       <h2>Serials subscriptions</h2>
37       [% UNLESS ( done_searched ) %]
38       <div id="advsearch">
39         <form action="/cgi-bin/koha/serials/serials-search.pl" method="get">
40           <fieldset class="rows">
41           <legend>Search subscriptions</legend>
42               <ol>
43                 <li>
44                   <label for="issn">ISSN:</label>
45                   <input type="text" id="issn" name="ISSN_filter" value="[% ISSN_filter %]" />
46                 </li>
47                 <li>
48                   <label for="title">Title:</label>
49                   <input type="text" id="title" name="title_filter" value="[% title_filter %]" />
50                 </li>
51                 [% IF ( marcflavour == "UNIMARC" ) %]
52                 <li>
53                   <label for="ean">EAN:</label>
54                   <input type="text" id="ean" name="EAN_filter" value="[% EAN_filter %]" />
55                 </li>
56                 [% END %]
57                 <li>
58                   <label for="publisher">Publisher:</label>
59                   <input type="text" id="publisher" name="publisher_filter" value="[% publisher_filter %]" />
60                 </li>
61                 <li>
62                   <label for="bookseller">Bookseller:</label>
63                   <input type="text" id="bookseller" name="bookseller_filter" value="[% bookseller_filter %]" />
64                 </li>
65                 <li>
66                   <label for="branch">Branch:</label>
67                   <select id="branch" name="branch_filter">
68                     <option value="">All</option>
69                     [% FOREACH branch IN branches_loop %]
70                       [% IF ( branch.selected ) %]
71                         <option selected="selected" value="[% branch.branchcode %]">[% branch.branchname %]</option>
72                       [% ELSE %]
73                         <option value="[% branch.branchcode %]">[% branch.branchname %]</option>
74                       [% END %]
75                     [% END %]
76                   </select>
77                 </li>
78               </ol>
79               <input type="hidden" name="searched" value="1" />
80               <fieldset class="action">
81                 <input type="submit" value="Search" />
82               </fieldset>
83           </fieldset>
84         </form>
85       </div>
86       [% END %]
87       [% IF ( done_searched ) %]
88         [% IF ( subscriptions ) %]
89           <table id="srlt">
90             <thead>
91               <tr>
92                   <th>ISSN</th>
93                   <th>Title</th>
94                   <th> Notes </th>
95                   <th>Library</th>
96                   <th>Call number</th>
97                   <th>Expiration date</th>
98                   [% IF ( routing && CAN_user_serials_routing ) %]
99                     <th>Routing list</th>
100                   [% END %]
101                   <th>&nbsp;</th>
102                   <th>&nbsp;</th>
103               </tr>
104             </thead>
105             <tfoot>
106               <tr>
107                 <td><input type="text" class="filter" data-column_num="0" placeholder="Search ISSN" /></td>
108                 <td><input type="text" class="filter" data-column_num="1" placeholder="Search title" /></td>
109                 <td><input type="text" class="filter" data-column_num="2" placeholder="Search notes" /></td>
110                 <td><input type="text" class="filter" data-column_num="3" placeholder="Search library" /></td>
111                 <td><input type="text" class="filter" data-column_num="4" placeholder="Search callnumber" /></td>
112                 <td><input type="text" class="filter" data-column_num="5" placeholder="Search expiration date" /></td>
113                 [% IF ( routing && CAN_user_serials_routing ) %]<td></td>[% END %]
114                 <td></td>
115                 <td></td>
116               </tr>
117             </tfoot>
118             <tbody>
119               [% FOREACH subscription IN subscriptions %]
120                 <tr>
121                   <td>
122                   [% IF ( subscription.issn ) %][% subscription.issn %]
123                   [% END %]
124                   </td>
125                   <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]" class="button" title="subscription detail">[% subscription.title |html %]</a>
126                   </td>
127                   <td>[% IF ( subscription.notes ) %][% subscription.notes %][% END %]
128                   [% IF ( subscription.internalnotes ) %]([% subscription.internalnotes %])[% END %]
129                   </td>
130                   <td>
131                     [% IF ( subscription.branchname ) %][% subscription.branchname %][% END %]
132                   </td>
133                   <td>
134                     [% IF ( subscription.callnumber ) %][% subscription.callnumber %][% END %]
135                   </td>
136                   <td>
137                     [% IF ( subscription.enddate ) %][% subscription.enddate | $KohaDates %][% END %]
138                   </td>
139                   [% IF ( routing && CAN_user_serials_routing ) %]
140                   <td>
141                     [% IF ( subscription.cannotedit ) %]
142                       &nbsp;
143                     [% ELSE %]
144                       [% IF ( subscription.routingedit ) %]
145                         <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]">Edit</a>
146                         ([% subscription.routingedit %])
147                       [% ELSE %]
148                         <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]&amp;op=new">New</a>
149                       [% END %]
150                     [% END %]
151                   </td>
152                   [% END %]
153                   <td><a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid %]">Issue history</a>
154                   </td>
155                   <td>
156                   [% IF ( subscription.cannotedit ) %]
157                     &nbsp;
158                   [% ELSE %]
159                     [% IF ( CAN_user_serials_receive_serials ) %]<a href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscription.subscriptionid %]&amp;serstatus=1,3,7">Serial receive</a>[% END %]
160                   [% END %]
161                   </td>
162                 </tr>
163               [% END %]
164             </tbody>
165           </table>
166         [% ELSE %]
167           There is no subscription for your search.
168         [% END %]
169       [% END %]
170     </div>
171   </div>
172
173   <div class="yui-b">
174     [% INCLUDE 'serials-menu.inc' %]
175     [% IF ( done_searched ) %]
176     <div id="advsearch">
177         <form action="/cgi-bin/koha/serials/serials-search.pl" method="get">
178           <fieldset class="brief">
179             <h4>Search subscriptions</h4>
180               <ol>
181                 <li>
182                   <label for="issn">ISSN:</label>
183                   <input type="text" id="issn" name="ISSN_filter" value="[% ISSN_filter %]" />
184                 </li>
185                 <li>
186                   <label for="title">Title:</label>
187                   <input type="text" id="title" name="title_filter" value="[% title_filter %]" />
188                 </li>
189                 [% IF ( marcflavour == "UNIMARC" ) %]
190                 <li>
191                   <label for="ean">EAN:</label>
192                   <input type="text" id="ean" name="EAN_filter" value="[% EAN_filter %]" />
193                 </li>
194                 [% END %]
195                 <li>
196                   <label for="publisher">Publisher:</label>
197                   <input type="text" id="publisher" name="publisher_filter" value="[% publisher_filter %]" />
198                 </li>
199                 <li>
200                   <label for="bookseller">Bookseller:</label>
201                   <input type="text" id="bookseller" name="bookseller_filter" value="[% bookseller_filter %]" />
202                 </li>
203                 <li>
204                   <label for="branch">Branch:</label>
205                   <select id="branch" name="branch_filter">
206                     <option value="">All</option>
207                     [% FOREACH branch IN branches_loop %]
208                       [% IF ( branch.selected ) %]
209                         <option selected="selected" value="[% branch.branchcode %]">[% branch.branchname %]</option>
210                       [% ELSE %]
211                         <option value="[% branch.branchcode %]">[% branch.branchname %]</option>
212                       [% END %]
213                     [% END %]
214                   </select>
215                 </li>
216               </ol>
217               <input type="hidden" name="searched" value="1" />
218               <fieldset class="action">
219                 <input type="submit" value="Search" />
220               </fieldset>
221             </div>
222           </fieldset>
223         </form>
224       [% END %]
225   </div>
226 </div>
227 [% INCLUDE 'intranet-bottom.inc' %]