Bug 7317: (followup) Fix id and class on body tag
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / ill / ill-requests.tt
1 [% USE Branches %]
2 [% USE Koha %]
3
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha &rsaquo; ILL requests  &rsaquo;</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
8 <script type="text/javascript" src="[% themelang %]/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 createBorrowerLink = 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: 'Borrower',
172                 func: createBorrowerLink
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 number'
184             },
185             branchcode: {
186                 name: 'Branch code'
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').click(function() {
200             $('#requestattributes').toggleClass('content_hidden');
201         });
202
203         // Filter partner list
204         $('#partner_filter').keyup(function() {
205             var needle = $('#partner_filter').val();
206             $('#partners > option').each(function() {
207                 var regex = new RegExp(needle, 'i');
208                 if (
209                     needle.length == 0 ||
210                     $(this).is(':selected') ||
211                     $(this).text().match(regex)
212                 ) {
213                     $(this).show();
214                 } else {
215                     $(this).hide();
216                 }
217             });
218         });
219
220         // Get our data from the API and process it prior to passing
221         // it to datatables
222         var ajax = $.ajax(
223             '/api/v1/illrequests?embed=metadata,patron,capabilities,branch'
224             ).done(function() {
225                 var data = JSON.parse(ajax.responseText);
226                 // Make a copy, we'll be removing columns next and need
227                 // to be able to refer to data that has been removed
228                 var dataCopy = $.extend(true, [], data);
229                 // Remove all columns we're not interested in
230                 removeIgnore(dataCopy);
231                 // Expand columns that need it and create an array
232                 // of all column names
233                 $.each(dataCopy, function(k, row) {
234                     expandExpand(row);
235                     unionColumns(row);
236                 });
237                 // Append any extra columns we need to tag on
238                 if (extra.length > 0) {
239                     extra.forEach(function(thisExtra) {
240                         allCols[thisExtra] = 1;
241                     });
242                 };
243                 // Different requests will have different columns,
244                 // make sure they all have the same
245                 $.each(dataCopy, function(k, row) {
246                     fillMissing(row);
247                 });
248
249                 // Assemble an array of column definitions for passing
250                 // to datatables
251                 var colData = [];
252                 Object.keys(allCols).forEach(function(thisCol) {
253                     // We may have defined a pretty name for this column
254                     var colName = (
255                         specialCols.hasOwnProperty(thisCol) &&
256                         specialCols[thisCol].hasOwnProperty('name')
257                     ) ?
258                         specialCols[thisCol].name :
259                         thisCol;
260                     // Create the table header for this column
261                     var str = '<th>' + stripPrefix(colName) + '</th>';
262                     $(str).appendTo('#illview-header');
263                     // Create the base column object
264                     var colObj = {
265                         name: thisCol,
266                         className: thisCol
267                     };
268                     // We may need to process the data going in this
269                     // column, so do it if necessary
270                     if (
271                         specialCols.hasOwnProperty(thisCol) &&
272                         specialCols[thisCol].hasOwnProperty('func')
273                     ) {
274                         colObj.render = specialCols[thisCol].func;
275                     } else {
276                         colObj.data = thisCol
277                     }
278                     colData.push(colObj);
279                 });
280
281                 // Create the toggle links for all metadata fields
282                 var links = [];
283                 expanded.metadata.forEach(function(thisExpanded) {
284                     if (core.indexOf(thisExpanded) == -1) {
285                         links.push(
286                             '<a href="#" class="toggle-vis" data-column="' +
287                             thisExpanded + '">' + stripPrefix(thisExpanded) +
288                             '</a>'
289                         );
290                     }
291                 });
292                 $('#column-toggle').append(links.join(' | '));
293
294                 // Initialise the datatable
295                 var myTable = $('#ill-requests').DataTable($.extend(true, {}, dataTablesDefaults, {
296                     aoColumnDefs: [  // Last column shouldn't be sortable or searchable
297                         {
298                             aTargets: [ 'action' ],
299                             bSortable: false,
300                             bSearchable: false
301                         },
302                     ],
303                     aaSorting: [[ 6, 'desc' ]], // Default sort, updated descending
304                     processing: true, // Display a message when manipulating
305                     language: {
306                         loadingRecords: "Please wait - loading requests...",
307                         zeroRecords: "No requests were found"
308                     },
309                     iDisplayLength: 10, // 10 results per page
310                     sPaginationType: "full_numbers", // Pagination display
311                     deferRender: true, // Improve performance on big datasets
312                     data: dataCopy,
313                     columns: colData,
314                     originalData: data // Enable render functions to access
315                                        // our original data
316                 }));
317
318                 // Reset columns to default
319                 var resetColumns = function() {
320                     Object.keys(allCols).forEach(function(thisCol) {
321                         myTable.column(thisCol + ':name').visible(core.indexOf(thisCol) != -1);
322                     });
323                     myTable.columns.adjust().draw(false);
324                 };
325
326                 // Handle the click event on a toggle link
327                 $('a.toggle-vis').on('click', function(e) {
328                     e.preventDefault();
329                     var column = myTable.column(
330                         $(this).data('column') + ':name'
331                     );
332                     column.visible(!column.visible());
333                 });
334
335                 // Reset column toggling
336                 $('#reset-toggle').click(function() {
337                     resetColumns();
338                 });
339
340                 // Handle a prefilter request and do the prefiltering
341                 var filters = $('#ill-requests').data();
342                 if (typeof filters !== 'undefined') {
343                     var filterNames = Object.keys(filters).filter(
344                         function(thisData) {
345                             return thisData.match(/^filter/);
346                         }
347                     );
348                     filterNames.forEach(function(thisFilter) {
349                         var filterName = toColumnName(thisFilter) + ':name';
350                         var regex = '^'+filters[thisFilter]+'$';
351                         console.log(regex);
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     [% IF query_type == 'create' %]
375         <a href=[% parent %]>ILL requests</a> &rsaquo; New request
376     [% ELSIF query_type == 'status' %]
377         <a href=[% parent %]>ILL requests</a> &rsaquo; Status
378     [% ELSE %]
379         ILL requests
380     [% END %]
381 </div>
382
383 <div id="doc3" class="yui-t2">
384     <div id="bd">
385         <div id="yui-main">
386             <div id="interlibraryloans" class="yui-b">
387                 [% INCLUDE 'ill-toolbar.inc' %]
388
389                 [% IF whole.error %]
390                     <h1>Error performing operation</h1>
391                     <!-- Dispatch on Status -->
392                     <p>We encountered an error:</p>
393                     <p>
394                       <pre>[% whole.message %] ([% whole.status %])</pre>
395                     </p>
396                 [% END %]
397
398                 [% IF query_type == 'create' %]
399                     <h1>New ILL request</h1>
400                     [% IF whole.stage == 'copyrightclearance' %]
401                         <div>
402                             <p>
403                                 [% Koha.Preference('ILLModuleCopyrightClearance') %]
404                             </p>
405                             <a href="?method=create&stage=copyrightclearance&backend=[% whole.value.backend %]"
406                                class="btn btn-sm btn-default btn-group"><i class="fa fa-check">Yes</i></a>
407                             <a href="/cgi-bin/koha/ill/ill-requests.pl"
408                                class="btn btn-sm btn-default btn-group"><i class="fa fa-times">No</i></a>
409                         </div>
410                     [% ELSE %]
411                         [% PROCESS $whole.template %]
412                     [% END %]
413
414                 [% ELSIF query_type == 'confirm' %]
415                     <h1>Confirm ILL request</h1>
416                     [% PROCESS $whole.template %]
417
418                 [% ELSIF query_type == 'cancel' and !whole.error %]
419                     <h1>Cancel a confirmed request</h1>
420                     [% PROCESS $whole.template %]
421
422                 [% ELSIF query_type == 'generic_confirm' %]
423                     <h1>Place request with partner libraries</h1>
424                     <!-- Start of GENERIC_EMAIL case -->
425                     [% IF whole.value.partners %]
426                        [% ill_url = here_link _ "?method=illview&illrequest_id=" _ request.illrequest_id %]
427                         <form method="POST" action=[% here_link %]>
428                             <fieldset class="rows">
429                                 <legend>Interlibrary loan request details</legend>
430                                 <ol>
431                                     <li>
432                                         <label for="partner_filter">Filter partner libraries:</label>
433                                         <input type="text" id="partner_filter">
434                                     </li>
435                                     <li>
436                                         <label for="partners">Select partner libraries:</label>
437                                         <select size="5" multiple="true" id="partners"
438                                                 name="partners">
439                                             [% FOREACH partner IN whole.value.partners %]
440                                                 <option value=[% partner.email %]>
441                                                     [% partner.branchcode _ " - " _ partner.surname %]
442                                                 </option>
443                                             [% END %]
444                                         </select>
445
446                                     </li>
447                                     <li>
448                                         <label for="subject">Subject Line</label>
449                                         <input type="text" name="subject"
450                                                id="subject" type="text"
451                                                value="[% whole.value.draft.subject %]"/>
452                                     </li>
453                                     <li>
454                                         <label for="body">Email text:</label>
455                                         <textarea name="body" id="body" rows="20" cols="80">[% whole.value.draft.body %]</textarea>
456                                     </li>
457                                 </ol>
458                                 <input type="hidden" value="generic_confirm" name="method">
459                                 <input type="hidden" value="draft" name="stage">
460                                 <input type="hidden" value="[% request.illrequest_id %]" name="illrequest_id">
461                             </fieldset>
462                             <fieldset class="action">
463                                 <input type="submit" class="btn btn-default" value="Send email"/>
464                                 <span><a href="[% ill_url %]" title="Return to request details">Cancel</a></span>
465                             </fieldset>
466                         </form>
467                     [% ELSE %]
468                         <fieldset class="rows">
469                             <legend>Interlibrary loan request details</legend>
470                             <p>No partners have been defined yet. Please create appropriate patron records (by default ILLLIBS category).</p>
471                             <p>Be sure to provide email addresses for these patrons.</p>
472                             <p><span><a href="[% ill_url %]" title="Return to request details">Cancel</a></span></p>
473                         </fieldset>
474                     [% END %]
475                 <!-- generic_confirm ends here -->
476
477                 [% ELSIF query_type == 'edit_action' %]
478                     <form method="POST" action=[% here_link %]>
479                         <fieldset class="rows">
480                             <legend>Request details</legend>
481                             <ol>
482                                 <li class="borrowernumber">
483                                     <label for="borrowernumber">Borrower number:</label>
484                                     <input name="borrowernumber" id="borrowernumber" type="text" value="[% request.borrowernumber %]">
485                                 </li>
486                                 <li class="biblio_id">
487                                     <label for="biblio_id" class="biblio_id">Biblio number:</label>
488                                     <input name="biblio_id" id="biblio_id" type="text" value="[% request.biblio_id %]">
489                                 </li>
490                                 <li class="branchcode">
491                                     <label for="branchcode" class="branchcode">Branch:</label>
492                                     <select name="branchcode" id="branch">
493                                         [% FOREACH branch IN branches %]
494                                             [% IF ( branch.branchcode == request.branchcode ) %]
495                                                 <option value="[% branch.branchcode %]" selected="selected">
496                                                     [% branch.branchname %]
497                                                 </option>
498                                             [% ELSE %]
499                                                 <option value="[% branch.branchcode %]">
500                                                     [% branch.branchname %]
501                                                 </option>
502                                             [% END %]
503                                         [% END %]
504                                     </select>
505                                 </li>
506                                 <li class="status">
507                                     <label class="status">Status:</label>
508                                     [% stat = request.status %]
509                                     [% request.capabilities.$stat.name %]
510                                 </li>
511                                 <li class="updated">
512                                     <label class="updated">Last updated:</label>
513                                     [% request.updated %]
514                                 </li>
515                                 <li class="medium">
516                                     <label class="medium">Request type:</label>
517                                     [% request.medium %]
518                                 </li>
519                                 <li class="cost">
520                                     <label class="cost">Cost:</label>
521                                     [% request.cost %]
522                                 </li>
523                                 <li class="req_id">
524                                     <label class="req_id">Request number:</label>
525                                     [% request.id_prefix _ request.illrequest_id %]
526                                 </li>
527                                 <li class="notesstaff">
528                                     <label for="notesstaff" class="notesstaff">Staff notes:</label>
529                                     <textarea name="notesstaff" id="notesstaff" rows="5">[% request.notesstaff %]</textarea>
530                                 </li>
531                                 <li class="notesopac">
532                                     <label for="notesopac" class="notesopac">Opac notes:</label>
533                                     <textarea name="notesopac" id="notesopac" rows="5">[% request.notesopac %]</textarea>
534                                 </li>
535                             </ol>
536                         </fieldset>
537                         <fieldset class="action">
538                             <input type="hidden" value="edit_action" name="method">
539                             <input type="hidden" value="form" name="stage">
540                             <input type="hidden" value="[% request.illrequest_id %]" name="illrequest_id">
541                             <input type="submit" value="Submit">
542                             <a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl?method=illview&amp;illrequest_id=[% request.id %]">Cancel</a>
543                         </fieldset>
544                     </form>
545
546                 [% ELSIF query_type == 'delete_confirm' %]
547
548                     <div class="dialog alert">
549                         <h3>Are you sure you wish to delete this request?</h3>
550                         <p>
551                             <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>
552                             <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>
553                         </p>
554                     </div>
555
556
557                 [% ELSIF query_type == 'illview' %]
558                     [% actions = request.available_actions %]
559                     [% capabilities = request.capabilities %]
560                     [% req_status = request.status %]
561                     <h1>Manage ILL request</h1>
562                     <div id="toolbar" class="btn-toolbar">
563                         <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 %]">
564                         <span class="fa fa-pencil"></span>
565                         Edit request
566                         </a>
567                         [% FOREACH action IN actions %]
568                             [% IF action.method != 0 %]
569                                 <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 %]">
570                                 <span class="fa [% action.ui_method_icon %]"></span>
571                                 [% action.ui_method_name %]
572                                 </a>
573                             [% END %]
574                         [% END %]
575                     </div>
576                     <div id="ill-view-panel" class="panel panel-default">
577                         <div class="panel-heading">
578                             <h3>Request details</h3>
579                         </div>
580                         <div class="panel-body">
581                             <h4>Details from library</h4>
582                             <div class="rows">
583                                 <div class="orderid">
584                                     <span class="label orderid">Order ID:</span>
585                                     [% request.orderid || "N/A" %]
586                                 </div>
587                                 <div class="borrowernumber">
588                                     <span class="label borrowernumber">Borrower:</span>
589                                     [% borrowerlink = "/cgi-bin/koha/members/moremember.pl"
590                                     _ "?borrowernumber=" _ request.patron.borrowernumber %]
591                                     <a href="[% borrowerlink %]" title="View borrower details">
592                                     [% request.patron.firstname _ " "
593                                     _ request.patron.surname _ " ["
594                                     _ request.patron.cardnumber
595                                     _ "]" %]
596                                     </a>
597                                 </div>
598
599                                 <div class="biblio_id">
600                                     <span class="label biblio_id">Biblio number:</span>
601                                     [% request.biblio_id || "N/A" %]
602                                 </div>
603                                 <div class="branchcode">
604                                     <span class="label branchcode">Branch:</span>
605                                     [% Branches.GetName(request.branchcode) %]
606                                 </div>
607                                 <div class="status">
608                                     <span class="label status">Status:</span>
609                                     [% capabilities.$req_status.name %]
610                                 </div>
611                                 <div class="updated">
612                                     <span class="label updated">Last updated:</span>
613                                     [% request.updated %]
614                                 </div>
615                                 <div class="medium">
616                                     <span class="label medium">Request type:</span>
617                                     [% request.medium %]
618                                 </div>
619                                 <div class="cost">
620                                     <span class="label cost">Cost:</span>
621                                     [% request.cost || "N/A" %]
622                                 </div>
623                                 <div class="req_id">
624                                     <span class="label req_id">Request number:</span>
625                                     [% request.id_prefix _ request.illrequest_id %]
626                                 </div>
627                                 <div class="notesstaff">
628                                     <span class="label notes_staff">Staff notes:</span>
629                                     <pre>[% request.notesstaff %]</pre>
630                                 </div>
631                                 <div class="notesopac">
632                                     <span class="label notes_opac">Notes:</span>
633                                     <pre>[% request.notesopac %]</pre>
634                                 </div>
635                             </div>
636                             <div class="rows">
637                                 <h4>Details from supplier ([% request.backend %])</h4>
638                                 [% FOREACH meta IN request.metadata %]
639                                     <div class="requestmeta-[% meta.key %]">
640                                         <span class="label">[% meta.key %]:</span>
641                                         [% meta.value %]
642                                     </div>
643                                 [% END %]
644                             </div>
645                             <div class="rows">
646                                 <h3><a id="toggle_requestattributes" href="#">Toggle full supplier metadata</a></h3>
647                                 <div id="requestattributes" class="content_hidden">
648                                     [% FOREACH attr IN request.illrequestattributes %]
649                                         <div class="requestattr-[% attr.type %]">
650                                             <span class="label">[% attr.type %]:</span>
651                                             [% attr.value %]
652                                         </div>
653                                     [% END %]
654                                 </div>
655
656                             </div>
657                         </div>
658                     </div>
659
660                 [% ELSIF query_type == 'illlist' %]
661                     <!-- illlist -->
662                     <h1>View ILL requests</h1>
663                     <div id="results">
664                         <h3>Details for all requests</h3>
665
666                         <div id="column-toggle">
667                             Toggle additional columns:
668                         </div>
669                         <div id="reset-toggle"><a href="#">Reset toggled columns</a></div>
670
671                         <table
672                             [% FOREACH filter IN prefilters %]
673                             data-filter-[% filter.name %]="[% filter.value %]"
674                             [% END %]
675                             id="ill-requests">
676                             <thead>
677                                 <tr id="illview-header"></tr>
678                             </thead>
679                             <tbody id="illview-body">
680                             </tbody>
681                         </table>
682                     </div>
683                 [% ELSE %]
684                 <!-- Custom Backend Action -->
685                 [% INCLUDE $whole.template %]
686
687                 [% END %]
688             </div>
689         </div>
690     </div>
691 </div>
692
693 [% TRY %]
694 [% PROCESS backend_jsinclude %]
695 [% CATCH %]
696 [% END %]
697
698 [% INCLUDE 'intranet-bottom.inc' %]