Bug 7317: use preventDefault to prevent the scrollbar to move to the top
[koha-ffzg.git] / koha-tmpl / intranet-tmpl / prog / en / modules / ill / ill-requests.tt
1 [% USE Branches %]
2 [% USE Koha %]
3 [% USE KohaDates %]
4
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha &rsaquo; ILL requests  &rsaquo;</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
9 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css">
10 [% INCLUDE 'datatables.inc' %]
11 <script type="text/javascript">
12     //<![CDATA[
13     $(document).ready(function() {
14
15         // Illview Datatable setup
16
17         // Fields we don't want to display
18         var ignore = [
19             'accessurl',
20             'backend',
21             'completed',
22             'branch',
23             'capabilities',
24             'cost',
25             'medium',
26             'notesopac',
27             'notesstaff',
28             'placed',
29             'replied'
30         ];
31
32         // Fields we need to expand (flatten)
33         var expand = [
34             'metadata',
35             'patron'
36         ];
37
38         // Expanded fields
39         // This is auto populated
40         var expanded = {};
41
42         // The core fields that should be displayed first
43         var core = [
44             'metadata_Author',
45             'metadata_Title',
46             'borrowername',
47             'biblio_id',
48             'branchcode',
49             'status',
50             'updated',
51             'illrequest_id',
52             'action'
53         ];
54
55         // Extra fields that we need to tack on to the end
56         var extra = [ 'action' ];
57
58         // Remove any fields we're ignoring
59         var removeIgnore = function(dataObj) {
60             dataObj.forEach(function(thisRow) {
61                 ignore.forEach(function(thisIgnore) {
62                     if (thisRow.hasOwnProperty(thisIgnore)) {
63                         delete thisRow[thisIgnore];
64                     }
65                 });
66             });
67         };
68
69         // Expand any fields we're expanding
70         var expandExpand = function(row) {
71             expand.forEach(function(thisExpand) {
72                 if (row.hasOwnProperty(thisExpand)) {
73                     if (!expanded.hasOwnProperty(thisExpand)) {
74                         expanded[thisExpand] = [];
75                     }
76                     var expandObj = row[thisExpand];
77                     Object.keys(expandObj).forEach(
78                         function(thisExpandCol) {
79                             var expColName = thisExpand + '_' + thisExpandCol;
80                             // Keep a list of fields that have been expanded
81                             // so we can create toggle links for them
82                             if (expanded[thisExpand].indexOf(expColName) == -1) {
83                                 expanded[thisExpand].push(expColName);
84                             }
85                             expandObj[expColName] =
86                                 expandObj[thisExpandCol];
87                             delete expandObj[thisExpandCol];
88                         }
89                     );
90                     $.extend(true, row, expandObj);
91                     delete row[thisExpand];
92                 }
93             });
94         };
95
96         // Build a de-duped list of all column names
97         var allCols = {};
98         core.map(function(thisCore) {
99             allCols[thisCore] = 1;
100         });
101         var unionColumns = function(row) {
102             Object.keys(row).forEach(function(col) {
103                 if (ignore.indexOf(col) == -1) {
104                     allCols[col] = 1;
105                 }
106             });
107         };
108
109         // Some rows may not have fields that other rows have,
110         // so make sure all rows have the same fields
111         var fillMissing = function(row) {
112             Object.keys(allCols).forEach(function(thisCol) {
113                 row[thisCol] = (!row.hasOwnProperty(thisCol)) ?
114                     null :
115                     row[thisCol];
116             });
117         };
118
119         // Strip the expand prefix if it exists, we do this for display
120         var stripPrefix = function(value) {
121             expand.forEach(function(thisExpand) {
122                 var regex = new RegExp(thisExpand + '_', 'g');
123                 value = value.replace(regex, '');
124             });
125             return value;
126         };
127
128         // Our 'render' function for borrowerlink
129         var createPatronLink = function(data, type, row) {
130             return '<a title="View borrower details" ' +
131                 'href="/cgi-bin/koha/members/moremember.pl?' +
132                 'borrowernumber='+row.borrowernumber+'">' +
133                 row.patron_firstname + ' ' + row.patron_surname +
134                 '</a>';
135         };
136
137         // Render function for request ID
138         var createRequestId = function(data, type, row) {
139             return row.id_prefix + row.illrequest_id;
140         };
141
142         // Render function for request status
143         var createStatus = function(data, type, row, meta) {
144             var origData = meta.settings.oInit.originalData;
145             if (origData.length > 0) {
146                 return meta.settings.oInit.originalData[0].capabilities[
147                     row.status
148                 ].name;
149             } else {
150                 return '';
151             }
152         };
153
154         // Render function for creating a row's action link
155         var createActionLink = function(data, type, row) {
156             return '<a class="btn btn-default btn-sm" ' +
157                 'href="/cgi-bin/koha/ill/ill-requests.pl?' +
158                 'method=illview&amp;illrequest_id=' +
159                 row.illrequest_id +
160                 '">Manage request</a>' +
161                 '</div>';
162         };
163
164         // Columns that require special treatment
165         var specialCols = {
166             action: {
167                 name: '',
168                 func: createActionLink
169             },
170             borrowername: {
171                 name: 'Patron',
172                 func: createPatronLink
173             },
174             illrequest_id: {
175                 name: 'Request number',
176                 func: createRequestId
177             },
178             status: {
179                 name: 'Status',
180                 func: createStatus
181             },
182             biblio_id: {
183                 name: 'Biblio ID'
184             },
185             branchcode: {
186                 name: 'Library'
187             }
188         };
189
190         // Helper for handling prefilter column names
191         function toColumnName(myVal) {
192             return myVal
193                 .replace(/^filter/, '')
194                 .replace(/([A-Z])/g, "_$1")
195                 .replace(/^_/,'').toLowerCase();
196         }
197
198         // Toggle request attributes in Illview
199         $('#toggle_requestattributes').on('click', function(e) {
200             e.preventDefault();
201             $('#requestattributes').toggleClass('content_hidden');
202         });
203
204         // Filter partner list
205         $('#partner_filter').keyup(function() {
206             var needle = $('#partner_filter').val();
207             $('#partners > option').each(function() {
208                 var regex = new RegExp(needle, 'i');
209                 if (
210                     needle.length == 0 ||
211                     $(this).is(':selected') ||
212                     $(this).text().match(regex)
213                 ) {
214                     $(this).show();
215                 } else {
216                     $(this).hide();
217                 }
218             });
219         });
220
221         // Get our data from the API and process it prior to passing
222         // it to datatables
223         var ajax = $.ajax(
224             '/api/v1/illrequests?embed=metadata,patron,capabilities,branch'
225             ).done(function() {
226                 var data = JSON.parse(ajax.responseText);
227                 // Make a copy, we'll be removing columns next and need
228                 // to be able to refer to data that has been removed
229                 var dataCopy = $.extend(true, [], data);
230                 // Remove all columns we're not interested in
231                 removeIgnore(dataCopy);
232                 // Expand columns that need it and create an array
233                 // of all column names
234                 $.each(dataCopy, function(k, row) {
235                     expandExpand(row);
236                     unionColumns(row);
237                 });
238                 // Append any extra columns we need to tag on
239                 if (extra.length > 0) {
240                     extra.forEach(function(thisExtra) {
241                         allCols[thisExtra] = 1;
242                     });
243                 }
244                 // Different requests will have different columns,
245                 // make sure they all have the same
246                 $.each(dataCopy, function(k, row) {
247                     fillMissing(row);
248                 });
249
250                 // Assemble an array of column definitions for passing
251                 // to datatables
252                 var colData = [];
253                 Object.keys(allCols).forEach(function(thisCol) {
254                     // We may have defined a pretty name for this column
255                     var colName = (
256                         specialCols.hasOwnProperty(thisCol) &&
257                         specialCols[thisCol].hasOwnProperty('name')
258                     ) ?
259                         specialCols[thisCol].name :
260                         thisCol;
261                     // Create the table header for this column
262                     var str = '<th>' + stripPrefix(colName) + '</th>';
263                     $(str).appendTo('#illview-header');
264                     // Create the base column object
265                     var colObj = {
266                         name: thisCol,
267                         className: thisCol
268                     };
269                     // We may need to process the data going in this
270                     // column, so do it if necessary
271                     if (
272                         specialCols.hasOwnProperty(thisCol) &&
273                         specialCols[thisCol].hasOwnProperty('func')
274                     ) {
275                         colObj.render = specialCols[thisCol].func;
276                     } else {
277                         colObj.data = thisCol;
278                     }
279                     colData.push(colObj);
280                 });
281
282                 // Create the toggle links for all metadata fields
283                 var links = [];
284                 expanded.metadata.forEach(function(thisExpanded) {
285                     if (core.indexOf(thisExpanded) == -1) {
286                         links.push(
287                             '<a href="#" class="toggle-vis" data-column="' +
288                             thisExpanded + '">' + stripPrefix(thisExpanded) +
289                             '</a>'
290                         );
291                     }
292                 });
293                 $('#column-toggle').append(links.join(' | '));
294
295                 // Initialise the datatable
296                 var myTable = $('#ill-requests').DataTable($.extend(true, {}, dataTablesDefaults, {
297                     aoColumnDefs: [  // Last column shouldn't be sortable or searchable
298                         {
299                             aTargets: [ 'action' ],
300                             bSortable: false,
301                             bSearchable: false
302                         },
303                     ],
304                     aaSorting: [[ 6, 'desc' ]], // Default sort, updated descending
305                     processing: true, // Display a message when manipulating
306                     language: {
307                         loadingRecords: "Please wait - loading requests...",
308                         zeroRecords: "No requests were found"
309                     },
310                     iDisplayLength: 10, // 10 results per page
311                     sPaginationType: "full_numbers", // Pagination display
312                     deferRender: true, // Improve performance on big datasets
313                     data: dataCopy,
314                     columns: colData,
315                     originalData: data // Enable render functions to access
316                                        // our original data
317                 }));
318
319                 // Reset columns to default
320                 var resetColumns = function() {
321                     Object.keys(allCols).forEach(function(thisCol) {
322                         myTable.column(thisCol + ':name').visible(core.indexOf(thisCol) != -1);
323                     });
324                     myTable.columns.adjust().draw(false);
325                 };
326
327                 // Handle the click event on a toggle link
328                 $('a.toggle-vis').on('click', function(e) {
329                     e.preventDefault();
330                     var column = myTable.column(
331                         $(this).data('column') + ':name'
332                     );
333                     column.visible(!column.visible());
334                 });
335
336                 // Reset column toggling
337                 $('#reset-toggle').click(function() {
338                     resetColumns();
339                 });
340
341                 // Handle a prefilter request and do the prefiltering
342                 var filters = $('#ill-requests').data();
343                 if (typeof filters !== 'undefined') {
344                     var filterNames = Object.keys(filters).filter(
345                         function(thisData) {
346                             return thisData.match(/^filter/);
347                         }
348                     );
349                     filterNames.forEach(function(thisFilter) {
350                         var filterName = toColumnName(thisFilter) + ':name';
351                         var regex = '^'+filters[thisFilter]+'$';
352                         myTable.columns(filterName).search(regex, true, false);
353                     });
354                     myTable.draw();
355                 }
356
357                 // Initialise column hiding
358                 resetColumns();
359
360             }
361         );
362
363     });
364     //]]>
365 </script>
366 </head>
367
368 <body id="illrequests" class="ill">
369 [% INCLUDE 'header.inc' %]
370 [% INCLUDE 'cat-search.inc' %]
371
372 <div id="breadcrumbs">
373     <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
374     <a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a>
375     [% IF query_type == 'create' %]
376          &rsaquo; New request
377     [% ELSIF query_type == 'status' %]
378          &rsaquo; Status
379     [% END %]
380 </div>
381
382 <div id="doc3" class="yui-t2">
383     <div id="bd">
384         <div id="yui-main">
385             <div id="interlibraryloans" class="yui-b">
386         [% IF !backends_available %]
387             <div class="dialog message">ILL module configuration problem. Take a look at the <a href="/cgi-bin/koha/about.pl#sysinfo">about page</a></div>
388         [% ELSE %]
389                 [% INCLUDE 'ill-toolbar.inc' %]
390
391                 [% IF whole.error %]
392                     <h1>Error performing operation</h1>
393                     <!-- Dispatch on Status -->
394                     <p>We encountered an error:</p>
395                     <p>
396                       <pre>[% whole.message %] ([% whole.status %])</pre>
397                     </p>
398                 [% END %]
399
400                 [% IF query_type == 'create' %]
401                     <h1>New ILL request</h1>
402                     [% IF whole.stage == 'copyrightclearance' %]
403                         <div>
404                             <p>
405                                 [% Koha.Preference('ILLModuleCopyrightClearance') %]
406                             </p>
407                             <a href="?method=create&stage=copyrightclearance&backend=[% whole.value.backend %]"
408                                class="btn btn-sm btn-default btn-group"><i class="fa fa-check">Yes</i></a>
409                             <a href="/cgi-bin/koha/ill/ill-requests.pl"
410                                class="btn btn-sm btn-default btn-group"><i class="fa fa-times">No</i></a>
411                         </div>
412                     [% ELSE %]
413                         [% PROCESS $whole.template %]
414                     [% END %]
415
416                 [% ELSIF query_type == 'confirm' %]
417                     <h1>Confirm ILL request</h1>
418                     [% PROCESS $whole.template %]
419
420                 [% ELSIF query_type == 'cancel' and !whole.error %]
421                     <h1>Cancel a confirmed request</h1>
422                     [% PROCESS $whole.template %]
423
424                 [% ELSIF query_type == 'generic_confirm' %]
425                     <h1>Place request with partner libraries</h1>
426                   [% IF error %]
427                       <div class="alert">
428                     [% IF error == 'no_target_email' %]
429                           No target email addresses found. Either select at least
430                           one partner or check your ILL partner library records.
431                     [% ELSIF error == 'no_library_email' %]
432                           Your library has no usable email address. Please set it.
433                     [% ELSIF error == 'unkown_error' %]
434                           Unknown error processing your request. Contact your administrator.
435                     [% END %]
436                       </div>
437                   [% END %]
438                     <!-- Start of GENERIC_EMAIL case -->
439                     [% IF whole.value.partners %]
440                        [% ill_url = here_link _ "?method=illview&illrequest_id=" _ request.illrequest_id %]
441                         <form method="POST" action=[% here_link %]>
442                             <fieldset class="rows">
443                                 <legend>Interlibrary loan request details</legend>
444                                 <ol>
445                                     <li>
446                                         <label for="partner_filter">Filter partner libraries:</label>
447                                         <input type="text" id="partner_filter">
448                                     </li>
449                                     <li>
450                                         <label for="partners">Select partner libraries:</label>
451                                         <select size="5" multiple="true" id="partners"
452                                                 name="partners">
453                                             [% FOREACH partner IN whole.value.partners %]
454                                                 <option value=[% partner.email %]>
455                                                     [% partner.branchcode _ " - " _ partner.surname %]
456                                                 </option>
457                                             [% END %]
458                                         </select>
459
460                                     </li>
461                                     <li>
462                                         <label for="subject">Subject Line</label>
463                                         <input type="text" name="subject"
464                                                id="subject" type="text"
465                                                value="[% whole.value.draft.subject %]"/>
466                                     </li>
467                                     <li>
468                                         <label for="body">Email text:</label>
469                                         <textarea name="body" id="body" rows="20" cols="80">[% whole.value.draft.body %]</textarea>
470                                     </li>
471                                 </ol>
472                                 <input type="hidden" value="generic_confirm" name="method">
473                                 <input type="hidden" value="draft" name="stage">
474                                 <input type="hidden" value="[% request.illrequest_id %]" name="illrequest_id">
475                             </fieldset>
476                             <fieldset class="action">
477                                 <input type="submit" class="btn btn-default" value="Send email"/>
478                                 <span><a href="[% ill_url %]" title="Return to request details">Cancel</a></span>
479                             </fieldset>
480                         </form>
481                     [% ELSE %]
482                         <fieldset class="rows">
483                             <legend>Interlibrary loan request details</legend>
484                             <p>No partners have been defined yet. Please create appropriate patron records (by default ILLLIBS category).</p>
485                             <p>Be sure to provide email addresses for these patrons.</p>
486                             <p><span><a href="[% ill_url %]" title="Return to request details">Cancel</a></span></p>
487                         </fieldset>
488                     [% END %]
489                 <!-- generic_confirm ends here -->
490
491                 [% ELSIF query_type == 'edit_action' %]
492                     <form method="POST" action=[% here_link %]>
493                         <fieldset class="rows">
494                             <legend>Request details</legend>
495                             <ol>
496                                 <li class="borrowernumber">
497                                     <label for="borrowernumber">Patron ID:</label>
498                                     <input name="borrowernumber" id="borrowernumber" type="text" value="[% request.borrowernumber %]">
499                                 </li>
500                                 <li class="biblio_id">
501                                     <label for="biblio_id" class="biblio_id">Biblio ID:</label>
502                                     <input name="biblio_id" id="biblio_id" type="text" value="[% request.biblio_id %]">
503                                 </li>
504                                 <li class="branchcode">
505                                     <label for="branchcode" class="branchcode">Library:</label>
506                                     <select name="branchcode" id="branch">
507                                         [% FOREACH branch IN branches %]
508                                             [% IF ( branch.branchcode == request.branchcode ) %]
509                                                 <option value="[% branch.branchcode %]" selected="selected">
510                                                     [% branch.branchname %]
511                                                 </option>
512                                             [% ELSE %]
513                                                 <option value="[% branch.branchcode %]">
514                                                     [% branch.branchname %]
515                                                 </option>
516                                             [% END %]
517                                         [% END %]
518                                     </select>
519                                 </li>
520                                 <li class="status">
521                                     <label class="status">Status:</label>
522                                     [% stat = request.status %]
523                                     [% request.capabilities.$stat.name %]
524                                 </li>
525                                 <li class="updated">
526                                     <label class="updated">Last updated:</label>
527                                     [% request.updated | $KohaDates with_hours => 1 %]
528                                 </li>
529                                 <li class="medium">
530                                     <label class="medium">Request type:</label>
531                                     [% request.medium %]
532                                 </li>
533                                 <li class="cost">
534                                     <label class="cost">Cost:</label>
535                                     [% request.cost || 'N/A' %]
536                                 </li>
537                                 <li class="req_id">
538                                     <label class="req_id">Request number:</label>
539                                     [% request.id_prefix _ request.illrequest_id %]
540                                 </li>
541                                 <li class="notesstaff">
542                                     <label for="notesstaff" class="notesstaff">Staff notes:</label>
543                                     <textarea name="notesstaff" id="notesstaff" rows="5">[% request.notesstaff %]</textarea>
544                                 </li>
545                                 <li class="notesopac">
546                                     <label for="notesopac" class="notesopac">Opac notes:</label>
547                                     <textarea name="notesopac" id="notesopac" rows="5">[% request.notesopac %]</textarea>
548                                 </li>
549                             </ol>
550                         </fieldset>
551                         <fieldset class="action">
552                             <input type="hidden" value="edit_action" name="method">
553                             <input type="hidden" value="form" name="stage">
554                             <input type="hidden" value="[% request.illrequest_id %]" name="illrequest_id">
555                             <input type="submit" value="Submit">
556                             <a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl?method=illview&amp;illrequest_id=[% request.id %]">Cancel</a>
557                         </fieldset>
558                     </form>
559
560                 [% ELSIF query_type == 'delete_confirm' %]
561
562                     <div class="dialog alert">
563                         <h3>Are you sure you wish to delete this request?</h3>
564                         <p>
565                             <a class="btn btn-default btn-sm approve" href="?method=delete&amp;illrequest_id=[% request.id %]&amp;confirmed=1"><i class="fa fa-fw fa-check"></i>Yes</a>
566                             <a class="btn btn-default btn-sm deny" href="?method=illview&amp;illrequest_id=[% request.id %]"><i class="fa fa-fw fa-remove"></i>No</a>
567                         </p>
568                     </div>
569
570
571                 [% ELSIF query_type == 'illview' %]
572                     [% actions = request.available_actions %]
573                     [% capabilities = request.capabilities %]
574                     [% req_status = request.status %]
575                     <h1>Manage ILL request</h1>
576                     <div id="toolbar" class="btn-toolbar">
577                         <a title="Edit request" id="ill-toolbar-btn-edit-action" class="btn btn-sm btn-default" href="/cgi-bin/koha/ill/ill-requests.pl?method=edit_action&amp;illrequest_id=[% request.illrequest_id %]">
578                         <span class="fa fa-pencil"></span>
579                         Edit request
580                         </a>
581                         [% FOREACH action IN actions %]
582                             [% IF action.method != 0 %]
583                                 <a title="[% action.ui_method_name %]" id="ill-toolbar-btn-[% action.id | lower %]" class="btn btn-sm btn-default" href="/cgi-bin/koha/ill/ill-requests.pl?method=[% action.method %]&amp;illrequest_id=[% request.illrequest_id %]">
584                                 <span class="fa [% action.ui_method_icon %]"></span>
585                                 [% action.ui_method_name %]
586                                 </a>
587                             [% END %]
588                         [% END %]
589                     </div>
590                     <div id="ill-view-panel" class="panel panel-default">
591                         <div class="panel-heading">
592                             <h3>Request details</h3>
593                         </div>
594                         <div class="panel-body">
595                             <h4>Details from library</h4>
596                             <div class="rows">
597                                 <div class="orderid">
598                                     <span class="label orderid">Order ID:</span>
599                                     [% request.orderid || "N/A" %]
600                                 </div>
601                                 <div class="borrowernumber">
602                                     <span class="label borrowernumber">Patron:</span>
603                                     [% borrowerlink = "/cgi-bin/koha/members/moremember.pl" _ "?borrowernumber=" _ request.patron.borrowernumber %]
604                                     <a href="[% borrowerlink %]" title="View borrower details">
605                                     [% request.patron.firstname _ " " _ request.patron.surname _ " [" _ request.patron.cardnumber _ "]" %]
606                                     </a>
607                                 </div>
608
609                                 <div class="biblio_id">
610                                     <span class="label biblio_id">Biblio ID:</span>
611                                     [% request.biblio_id || "N/A" %]
612                                 </div>
613                                 <div class="branchcode">
614                                     <span class="label branchcode">Library:</span>
615                                     [% Branches.GetName(request.branchcode) %]
616                                 </div>
617                                 <div class="status">
618                                     <span class="label status">Status:</span>
619                                     [% capabilities.$req_status.name %]
620                                 </div>
621                                 <div class="updated">
622                                     <span class="label updated">Last updated:</span>
623                                     [% request.updated | $KohaDates with_hours => 1 %]
624                                 </div>
625                                 <div class="medium">
626                                     <span class="label medium">Request type:</span>
627                                     [% request.medium %]
628                                 </div>
629                                 <div class="cost">
630                                     <span class="label cost">Cost:</span>
631                                     [% request.cost || "N/A" %]
632                                 </div>
633                                 <div class="req_id">
634                                     <span class="label req_id">Request number:</span>
635                                     [% request.id_prefix _ request.illrequest_id %]
636                                 </div>
637                                 <div class="notesstaff">
638                                     <span class="label notes_staff">Staff notes:</span>
639                                     <pre>[% request.notesstaff %]</pre>
640                                 </div>
641                                 <div class="notesopac">
642                                     <span class="label notes_opac">Notes:</span>
643                                     <pre>[% request.notesopac %]</pre>
644                                 </div>
645                             </div>
646                             <div class="rows">
647                                 <h4>Details from supplier ([% request.backend %])</h4>
648                                 [% FOREACH meta IN request.metadata %]
649                                     <div class="requestmeta-[% meta.key %]">
650                                         <span class="label">[% meta.key %]:</span>
651                                         [% meta.value %]
652                                     </div>
653                                 [% END %]
654                             </div>
655                             <div class="rows">
656                                 <h3><a id="toggle_requestattributes" href="#">Toggle full supplier metadata</a></h3>
657                                 <div id="requestattributes" class="content_hidden">
658                                     [% FOREACH attr IN request.illrequestattributes %]
659                                         <div class="requestattr-[% attr.type %]">
660                                             <span class="label">[% attr.type %]:</span>
661                                             [% attr.value %]
662                                         </div>
663                                     [% END %]
664                                 </div>
665
666                             </div>
667                         </div>
668                     </div>
669
670                 [% ELSIF query_type == 'illlist' %]
671                     <!-- illlist -->
672                     <h1>View ILL requests</h1>
673                     <div id="results">
674                         <h3>Details for all requests</h3>
675
676                         <div id="column-toggle">
677                             Toggle additional columns:
678                         </div>
679                         <div id="reset-toggle"><a href="#">Reset toggled columns</a></div>
680
681                         <table
682                             [% FOREACH filter IN prefilters %]
683                             data-filter-[% filter.name %]="[% filter.value %]"
684                             [% END %]
685                             id="ill-requests">
686                             <thead>
687                                 <tr id="illview-header"></tr>
688                             </thead>
689                             <tbody id="illview-body">
690                             </tbody>
691                         </table>
692                     </div>
693                 [% ELSE %]
694                 <!-- Custom Backend Action -->
695                 [% INCLUDE $whole.template %]
696
697                 [% END %]
698         [% END %]
699             </div>
700         </div>
701     </div>
702 </div>
703
704 [% TRY %]
705 [% PROCESS backend_jsinclude %]
706 [% CATCH %]
707 [% END %]
708
709 [% INCLUDE 'intranet-bottom.inc' %]