Bug 7317: Fix more translation issues
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / ill / ill-requests.tt
blob1613637e9947c72b3fc90608375187ffe5a468d9
1 [% USE Branches %]
2 [% USE Koha %]
3 [% USE KohaDates %]
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() {
15         // Illview Datatable setup
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         ];
32         // Fields we need to expand (flatten)
33         var expand = [
34             'metadata',
35             'patron'
36         ];
38         // Expanded fields
39         // This is auto populated
40         var expanded = {};
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         ];
55         // Extra fields that we need to tack on to the end
56         var extra = [ 'action' ];
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         };
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         };
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         };
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         };
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         };
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         };
137         // Render function for request ID
138         var createRequestId = function(data, type, row) {
139             return row.id_prefix + row.illrequest_id;
140         };
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                 var status_name = meta.settings.oInit.originalData[0].capabilities[
147                     row.status
148                 ].name;
149                 switch( status_name ) {
150                     case "New request":
151                         return _("New request");
152                         break;
153                     case "Requested":
154                         return _("Requested");
155                         break;
156                     case "Requested from partners":
157                         return _("Requested from partners");
158                         break;
159                     case "Request reverted":
160                         return _("Request reverted");
161                         break;
162                     case "Queued request":
163                         return _("Queued request");
164                         break;
165                     case "Cancellation requested":
166                         return _("Cancellation requested");
167                         break;
168                     case "Completed":
169                         return _("Completed");
170                         break;
171                     case "Delete request":
172                         return _("Delete request");
173                         break;
174                     default:
175                         return status_name;
176                 }
177             } else {
178                 return '';
179             }
180         };
182         // Render function for creating a row's action link
183         var createActionLink = function(data, type, row) {
184             return '<a class="btn btn-default btn-sm" ' +
185                 'href="/cgi-bin/koha/ill/ill-requests.pl?' +
186                 'method=illview&amp;illrequest_id=' +
187                 row.illrequest_id +
188                 '">' + _("Manage request") + '</a>';
189         };
191         // Columns that require special treatment
192         var specialCols = {
193             action: {
194                 name: '',
195                 func: createActionLink
196             },
197             borrowername: {
198                 name: _("Patron"),
199                 func: createPatronLink
200             },
201             illrequest_id: {
202                 name: _("Request number"),
203                 func: createRequestId
204             },
205             status: {
206                 name: _("Status"),
207                 func: createStatus
208             },
209             biblio_id: {
210                 name: _("Biblio ID")
211             },
212             branchcode: {
213                 name: _("Library")
214             }
215         };
217         // Helper for handling prefilter column names
218         function toColumnName(myVal) {
219             return myVal
220                 .replace(/^filter/, '')
221                 .replace(/([A-Z])/g, "_$1")
222                 .replace(/^_/,'').toLowerCase();
223         }
225         // Toggle request attributes in Illview
226         $('#toggle_requestattributes').on('click', function(e) {
227             e.preventDefault();
228             $('#requestattributes').toggleClass('content_hidden');
229         });
231         // Filter partner list
232         $('#partner_filter').keyup(function() {
233             var needle = $('#partner_filter').val();
234             $('#partners > option').each(function() {
235                 var regex = new RegExp(needle, 'i');
236                 if (
237                     needle.length == 0 ||
238                     $(this).is(':selected') ||
239                     $(this).text().match(regex)
240                 ) {
241                     $(this).show();
242                 } else {
243                     $(this).hide();
244                 }
245             });
246         });
248         // Get our data from the API and process it prior to passing
249         // it to datatables
250         var ajax = $.ajax(
251             '/api/v1/illrequests?embed=metadata,patron,capabilities,branch'
252             ).done(function() {
253                 var data = JSON.parse(ajax.responseText);
254                 // Make a copy, we'll be removing columns next and need
255                 // to be able to refer to data that has been removed
256                 var dataCopy = $.extend(true, [], data);
257                 // Remove all columns we're not interested in
258                 removeIgnore(dataCopy);
259                 // Expand columns that need it and create an array
260                 // of all column names
261                 $.each(dataCopy, function(k, row) {
262                     expandExpand(row);
263                     unionColumns(row);
264                 });
265                 // Append any extra columns we need to tag on
266                 if (extra.length > 0) {
267                     extra.forEach(function(thisExtra) {
268                         allCols[thisExtra] = 1;
269                     });
270                 }
271                 // Different requests will have different columns,
272                 // make sure they all have the same
273                 $.each(dataCopy, function(k, row) {
274                     fillMissing(row);
275                 });
277                 // Assemble an array of column definitions for passing
278                 // to datatables
279                 var colData = [];
280                 Object.keys(allCols).forEach(function(thisCol) {
281                     // We may have defined a pretty name for this column
282                     var colName = (
283                         specialCols.hasOwnProperty(thisCol) &&
284                         specialCols[thisCol].hasOwnProperty('name')
285                     ) ?
286                         specialCols[thisCol].name :
287                         thisCol;
288                     // Create the table header for this column
289                     var str = '<th>' + stripPrefix(colName) + '</th>';
290                     $(str).appendTo('#illview-header');
291                     // Create the base column object
292                     var colObj = {
293                         name: thisCol,
294                         className: thisCol
295                     };
296                     // We may need to process the data going in this
297                     // column, so do it if necessary
298                     if (
299                         specialCols.hasOwnProperty(thisCol) &&
300                         specialCols[thisCol].hasOwnProperty('func')
301                     ) {
302                         colObj.render = specialCols[thisCol].func;
303                     } else {
304                         colObj.data = thisCol;
305                     }
306                     colData.push(colObj);
307                 });
309                 // Create the toggle links for all metadata fields
310                 var links = [];
311                 expanded.metadata.forEach(function(thisExpanded) {
312                     if (core.indexOf(thisExpanded) == -1) {
313                         links.push(
314                             '<a href="#" class="toggle-vis" data-column="' +
315                             thisExpanded + '">' + stripPrefix(thisExpanded) +
316                             '</a>'
317                         );
318                     }
319                 });
320                 $('#column-toggle').append(links.join(' | '));
322                 // Initialise the datatable
323                 var myTable = $('#ill-requests').DataTable($.extend(true, {}, dataTablesDefaults, {
324                     aoColumnDefs: [  // Last column shouldn't be sortable or searchable
325                         {
326                             aTargets: [ 'action' ],
327                             bSortable: false,
328                             bSearchable: false
329                         },
330                     ],
331                     aaSorting: [[ 6, 'desc' ]], // Default sort, updated descending
332                     processing: true, // Display a message when manipulating
333                     language: {
334                         loadingRecords: "Please wait - loading requests...",
335                         zeroRecords: "No requests were found"
336                     },
337                     iDisplayLength: 10, // 10 results per page
338                     sPaginationType: "full_numbers", // Pagination display
339                     deferRender: true, // Improve performance on big datasets
340                     data: dataCopy,
341                     columns: colData,
342                     originalData: data // Enable render functions to access
343                                        // our original data
344                 }));
346                 // Reset columns to default
347                 var resetColumns = function() {
348                     Object.keys(allCols).forEach(function(thisCol) {
349                         myTable.column(thisCol + ':name').visible(core.indexOf(thisCol) != -1);
350                     });
351                     myTable.columns.adjust().draw(false);
352                 };
354                 // Handle the click event on a toggle link
355                 $('a.toggle-vis').on('click', function(e) {
356                     e.preventDefault();
357                     var column = myTable.column(
358                         $(this).data('column') + ':name'
359                     );
360                     column.visible(!column.visible());
361                 });
363                 // Reset column toggling
364                 $('#reset-toggle').click(function() {
365                     resetColumns();
366                 });
368                 // Handle a prefilter request and do the prefiltering
369                 var filters = $('#ill-requests').data();
370                 if (typeof filters !== 'undefined') {
371                     var filterNames = Object.keys(filters).filter(
372                         function(thisData) {
373                             return thisData.match(/^filter/);
374                         }
375                     );
376                     filterNames.forEach(function(thisFilter) {
377                         var filterName = toColumnName(thisFilter) + ':name';
378                         var regex = '^'+filters[thisFilter]+'$';
379                         myTable.columns(filterName).search(regex, true, false);
380                     });
381                     myTable.draw();
382                 }
384                 // Initialise column hiding
385                 resetColumns();
387             }
388         );
390     });
391     //]]>
392 </script>
393 </head>
395 <body id="illrequests" class="ill">
396 [% INCLUDE 'header.inc' %]
397 [% INCLUDE 'cat-search.inc' %]
399 <div id="breadcrumbs">
400     <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
401     <a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a>
402     [% IF query_type == 'create' %]
403          &rsaquo; New request
404     [% ELSIF query_type == 'status' %]
405          &rsaquo; Status
406     [% END %]
407 </div>
409 <div id="doc3" class="yui-t2">
410     <div id="bd">
411         <div id="yui-main">
412             <div id="interlibraryloans" class="yui-b">
413         [% IF !backends_available %]
414             <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>
415         [% ELSE %]
416                 [% INCLUDE 'ill-toolbar.inc' %]
418                 [% IF whole.error %]
419                     <h1>Error performing operation</h1>
420                     <!-- Dispatch on Status -->
421                     <p>We encountered an error:</p>
422                     <p>
423                       <pre>[% whole.message %] ([% whole.status %])</pre>
424                     </p>
425                 [% END %]
427                 [% IF query_type == 'create' %]
428                     <h1>New ILL request</h1>
429                     [% IF whole.stage == 'copyrightclearance' %]
430                         <div>
431                             <p>
432                                 [% Koha.Preference('ILLModuleCopyrightClearance') %]
433                             </p>
434                             <a href="?method=create&stage=copyrightclearance&backend=[% whole.value.backend %]"
435                                class="btn btn-sm btn-default btn-group"><i class="fa fa-check">Yes</i></a>
436                             <a href="/cgi-bin/koha/ill/ill-requests.pl"
437                                class="btn btn-sm btn-default btn-group"><i class="fa fa-times">No</i></a>
438                         </div>
439                     [% ELSE %]
440                         [% PROCESS $whole.template %]
441                     [% END %]
443                 [% ELSIF query_type == 'confirm' %]
444                     <h1>Confirm ILL request</h1>
445                     [% PROCESS $whole.template %]
447                 [% ELSIF query_type == 'cancel' and !whole.error %]
448                     <h1>Cancel a confirmed request</h1>
449                     [% PROCESS $whole.template %]
451                 [% ELSIF query_type == 'generic_confirm' %]
452                     <h1>Place request with partner libraries</h1>
453                   [% IF error %]
454                       <div class="alert">
455                     [% IF error == 'no_target_email' %]
456                           No target email addresses found. Either select at least
457                           one partner or check your ILL partner library records.
458                     [% ELSIF error == 'no_library_email' %]
459                           Your library has no usable email address. Please set it.
460                     [% ELSIF error == 'unkown_error' %]
461                           Unknown error processing your request. Contact your administrator.
462                     [% END %]
463                       </div>
464                   [% END %]
465                     <!-- Start of GENERIC_EMAIL case -->
466                     [% IF whole.value.partners %]
467                        [% ill_url = here_link _ "?method=illview&illrequest_id=" _ request.illrequest_id %]
468                         <form method="POST" action=[% here_link %]>
469                             <fieldset class="rows">
470                                 <legend>Interlibrary loan request details</legend>
471                                 <ol>
472                                     <li>
473                                         <label for="partner_filter">Filter partner libraries:</label>
474                                         <input type="text" id="partner_filter">
475                                     </li>
476                                     <li>
477                                         <label for="partners">Select partner libraries:</label>
478                                         <select size="5" multiple="true" id="partners"
479                                                 name="partners">
480                                             [% FOREACH partner IN whole.value.partners %]
481                                                 <option value=[% partner.email %]>
482                                                     [% partner.branchcode _ " - " _ partner.surname %]
483                                                 </option>
484                                             [% END %]
485                                         </select>
487                                     </li>
488                                     <li>
489                                         <label for="subject">Subject Line</label>
490                                         <input type="text" name="subject"
491                                                id="subject" type="text"
492                                                value="[% whole.value.draft.subject %]"/>
493                                     </li>
494                                     <li>
495                                         <label for="body">Email text:</label>
496                                         <textarea name="body" id="body" rows="20" cols="80">[% whole.value.draft.body %]</textarea>
497                                     </li>
498                                 </ol>
499                                 <input type="hidden" value="generic_confirm" name="method">
500                                 <input type="hidden" value="draft" name="stage">
501                                 <input type="hidden" value="[% request.illrequest_id %]" name="illrequest_id">
502                             </fieldset>
503                             <fieldset class="action">
504                                 <input type="submit" class="btn btn-default" value="Send email"/>
505                                 <span><a href="[% ill_url %]" title="Return to request details">Cancel</a></span>
506                             </fieldset>
507                         </form>
508                     [% ELSE %]
509                         <fieldset class="rows">
510                             <legend>Interlibrary loan request details</legend>
511                             <p>No partners have been defined yet. Please create appropriate patron records (by default ILLLIBS category).</p>
512                             <p>Be sure to provide email addresses for these patrons.</p>
513                             <p><span><a href="[% ill_url %]" title="Return to request details">Cancel</a></span></p>
514                         </fieldset>
515                     [% END %]
516                 <!-- generic_confirm ends here -->
518                 [% ELSIF query_type == 'edit_action' %]
519                     <form method="POST" action=[% here_link %]>
520                         <fieldset class="rows">
521                             <legend>Request details</legend>
522                             <ol>
523                                 <li class="borrowernumber">
524                                     <label for="borrowernumber">Patron ID:</label>
525                                     <input name="borrowernumber" id="borrowernumber" type="text" value="[% request.borrowernumber %]">
526                                 </li>
527                                 <li class="biblio_id">
528                                     <label for="biblio_id" class="biblio_id">Biblio ID:</label>
529                                     <input name="biblio_id" id="biblio_id" type="text" value="[% request.biblio_id %]">
530                                 </li>
531                                 <li class="branchcode">
532                                     <label for="branchcode" class="branchcode">Library:</label>
533                                     <select name="branchcode" id="branch">
534                                         [% FOREACH branch IN branches %]
535                                             [% IF ( branch.branchcode == request.branchcode ) %]
536                                                 <option value="[% branch.branchcode %]" selected="selected">
537                                                     [% branch.branchname %]
538                                                 </option>
539                                             [% ELSE %]
540                                                 <option value="[% branch.branchcode %]">
541                                                     [% branch.branchname %]
542                                                 </option>
543                                             [% END %]
544                                         [% END %]
545                                     </select>
546                                 </li>
547                                 <li class="status">
548                                     <label class="status">Status:</label>
549                                     [% stat = request.status %]
550                                     [% request.capabilities.$stat.name %]
551                                 </li>
552                                 <li class="updated">
553                                     <label class="updated">Last updated:</label>
554                                     [% request.updated | $KohaDates with_hours => 1 %]
555                                 </li>
556                                 <li class="medium">
557                                     <label class="medium">Request type:</label>
558                                     [% request.medium %]
559                                 </li>
560                                 <li class="cost">
561                                     <label class="cost">Cost:</label>
562                                     [% request.cost || 'N/A' %]
563                                 </li>
564                                 <li class="req_id">
565                                     <label class="req_id">Request number:</label>
566                                     [% request.id_prefix _ request.illrequest_id %]
567                                 </li>
568                                 <li class="notesstaff">
569                                     <label for="notesstaff" class="notesstaff">Staff notes:</label>
570                                     <textarea name="notesstaff" id="notesstaff" rows="5">[% request.notesstaff %]</textarea>
571                                 </li>
572                                 <li class="notesopac">
573                                     <label for="notesopac" class="notesopac">Opac notes:</label>
574                                     <textarea name="notesopac" id="notesopac" rows="5">[% request.notesopac %]</textarea>
575                                 </li>
576                             </ol>
577                         </fieldset>
578                         <fieldset class="action">
579                             <input type="hidden" value="edit_action" name="method">
580                             <input type="hidden" value="form" name="stage">
581                             <input type="hidden" value="[% request.illrequest_id %]" name="illrequest_id">
582                             <input type="submit" value="Submit">
583                             <a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl?method=illview&amp;illrequest_id=[% request.id %]">Cancel</a>
584                         </fieldset>
585                     </form>
587                 [% ELSIF query_type == 'delete_confirm' %]
589                     <div class="dialog alert">
590                         <h3>Are you sure you wish to delete this request?</h3>
591                         <p>
592                             <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>
593                             <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>
594                         </p>
595                     </div>
598                 [% ELSIF query_type == 'illview' %]
599                     [% actions = request.available_actions %]
600                     [% capabilities = request.capabilities %]
601                     [% req_status = request.status %]
602                     <h1>Manage ILL request</h1>
603                     <div id="toolbar" class="btn-toolbar">
604                         <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 %]">
605                         <span class="fa fa-pencil"></span>
606                         Edit request
607                         </a>
608                         [% FOREACH action IN actions %]
609                             [% IF action.method != 0 %]
610                                 <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 %]">
611                                 <span class="fa [% action.ui_method_icon %]"></span>
612                                 [% action.ui_method_name %]
613                                 </a>
614                             [% END %]
615                         [% END %]
616                     </div>
617                     <div id="ill-view-panel" class="panel panel-default">
618                         <div class="panel-heading">
619                             <h3>Request details</h3>
620                         </div>
621                         <div class="panel-body">
622                             <h4>Details from library</h4>
623                             <div class="rows">
624                                 <div class="orderid">
625                                     <span class="label orderid">Order ID:</span>
626                                     [% request.orderid || "N/A" %]
627                                 </div>
628                                 <div class="borrowernumber">
629                                     <span class="label borrowernumber">Patron:</span>
630                                     [% borrowerlink = "/cgi-bin/koha/members/moremember.pl" _ "?borrowernumber=" _ request.patron.borrowernumber %]
631                                     <a href="[% borrowerlink %]" title="View borrower details">
632                                     [% request.patron.firstname _ " " _ request.patron.surname _ " [" _ request.patron.cardnumber _ "]" %]
633                                     </a>
634                                 </div>
636                                 <div class="biblio_id">
637                                     <span class="label biblio_id">Biblio ID:</span>
638                                     [% request.biblio_id || "N/A" %]
639                                 </div>
640                                 <div class="branchcode">
641                                     <span class="label branchcode">Library:</span>
642                                     [% Branches.GetName(request.branchcode) %]
643                                 </div>
644                                 <div class="status">
645                                     <span class="label status">Status:</span>
646                                     [% capabilities.$req_status.name %]
647                                 </div>
648                                 <div class="updated">
649                                     <span class="label updated">Last updated:</span>
650                                     [% request.updated | $KohaDates with_hours => 1 %]
651                                 </div>
652                                 <div class="medium">
653                                     <span class="label medium">Request type:</span>
654                                     [% request.medium %]
655                                 </div>
656                                 <div class="cost">
657                                     <span class="label cost">Cost:</span>
658                                     [% request.cost || "N/A" %]
659                                 </div>
660                                 <div class="req_id">
661                                     <span class="label req_id">Request number:</span>
662                                     [% request.id_prefix _ request.illrequest_id %]
663                                 </div>
664                                 <div class="notesstaff">
665                                     <span class="label notes_staff">Staff notes:</span>
666                                     <pre>[% request.notesstaff %]</pre>
667                                 </div>
668                                 <div class="notesopac">
669                                     <span class="label notes_opac">Notes:</span>
670                                     <pre>[% request.notesopac %]</pre>
671                                 </div>
672                             </div>
673                             <div class="rows">
674                                 <h4>Details from supplier ([% request.backend %])</h4>
675                                 [% FOREACH meta IN request.metadata %]
676                                     <div class="requestmeta-[% meta.key %]">
677                                         <span class="label">[% meta.key %]:</span>
678                                         [% meta.value %]
679                                     </div>
680                                 [% END %]
681                             </div>
682                             <div class="rows">
683                                 <h3><a id="toggle_requestattributes" href="#">Toggle full supplier metadata</a></h3>
684                                 <div id="requestattributes" class="content_hidden">
685                                     [% FOREACH attr IN request.illrequestattributes %]
686                                         <div class="requestattr-[% attr.type %]">
687                                             <span class="label">[% attr.type %]:</span>
688                                             [% attr.value %]
689                                         </div>
690                                     [% END %]
691                                 </div>
693                             </div>
694                         </div>
695                     </div>
697                 [% ELSIF query_type == 'illlist' %]
698                     <!-- illlist -->
699                     <h1>View ILL requests</h1>
700                     <div id="results">
701                         <h3>Details for all requests</h3>
703                         <div id="column-toggle">
704                             Toggle additional columns:
705                         </div>
706                         <div id="reset-toggle"><a href="#">Reset toggled columns</a></div>
708                         <table
709                             [% FOREACH filter IN prefilters %]
710                             data-filter-[% filter.name %]="[% filter.value %]"
711                             [% END %]
712                             id="ill-requests">
713                             <thead>
714                                 <tr id="illview-header"></tr>
715                             </thead>
716                             <tbody id="illview-body">
717                             </tbody>
718                         </table>
719                     </div>
720                 [% ELSE %]
721                 <!-- Custom Backend Action -->
722                 [% INCLUDE $whole.template %]
724                 [% END %]
725         [% END %]
726             </div>
727         </div>
728     </div>
729 </div>
731 [% TRY %]
732 [% PROCESS backend_jsinclude %]
733 [% CATCH %]
734 [% END %]
736 [% INCLUDE 'intranet-bottom.inc' %]