| Line 0
          
      
      
        Link Here | 
          
            
              | 0 | -  | 1 | [% USE raw %] | 
            
              |  |  | 2 | [% USE Asset %] | 
            
              | 3 | [% SET footerjs = 1 %] | 
            
              | 4 | [% INCLUDE 'doc-head-open.inc' %] | 
            
              | 5 | <title>Koha › Administration › [% IF op =='add_form' %]Background jobs› [% IF job %] View background job[% ELSE %] Background jobs[% END %][% END %]</title> | 
            
              | 6 | [% INCLUDE 'doc-head-close.inc' %] | 
            
              | 7 | </head> | 
            
              | 8 |  | 
            
              | 9 | <body id="admin_background_jobs" class="admin"> | 
            
              | 10 | [% INCLUDE 'header.inc' %] | 
            
              | 11 |  | 
            
              | 12 | <div id="breadcrumbs"> | 
            
              | 13 |     <a href="/cgi-bin/koha/mainpage.pl">Home</a> | 
            
              | 14 |     › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> | 
            
              | 15 |     › <a href="/cgi-bin/koha/admin/background_jobs.pl">Background jobs</a> | 
            
              | 16 | </div> | 
            
              | 17 |  | 
            
              | 18 | <div class="main container-fluid"> | 
            
              | 19 |     <div class="row"> | 
            
              | 20 |         <div class="col-sm-10 col-sm-push-2"> | 
            
              | 21 |             <main> | 
            
              | 22 |  | 
            
              | 23 | [% FOR m IN messages %] | 
            
              | 24 |     <div class="dialog [% m.type | html %]"> | 
            
              | 25 |         [% SWITCH m.code %] | 
            
              | 26 |         [% CASE %] | 
            
              | 27 |             [% m.code | html %] | 
            
              | 28 |         [% END %] | 
            
              | 29 |     </div> | 
            
              | 30 | [% END %] | 
            
              | 31 |  | 
            
              | 32 | [% IF op == 'view' %] | 
            
              | 33 |     <h1>Detail of job #[% job.id | html %]</h1> | 
            
              | 34 |  | 
            
              | 35 |     <fieldset class="rows"> | 
            
              | 36 |         <ol> | 
            
              | 37 |             <li><span class="label">Job ID: </span>[% job.id | html %]</li> | 
            
              | 38 |             <li><label for="job_status">Status: </label>[% job.status | html %]</li> | 
            
              | 39 |             <li><label for="job_progress">Progress: </label>[% job.progress || 0 | html %] / [% job.size | html %]</li> | 
            
              | 40 |             <li><label for="job_type">Type: </label>[% job.type | html %]</li> | 
            
              | 41 |             <li><label for="job_enqueued_on">enqueued_on: </label>[% job.enqueued_on | html %]</li> | 
            
              | 42 |             <li><label for="job_started_on">started_on: </label>[% job.started_on | html %]</li> | 
            
              | 43 |             <li><label for="job_ended_on">ended_on: </label>[% job.ended_on | html %]</li> | 
            
              | 44 |             <li><label for="job_data">Report: </label> | 
            
              | 45 |                 [% SWITCH job.type %] | 
            
              | 46 |                 [% CASE 'batch_biblio_record_modification' %] | 
            
              | 47 |                     [% SET report = job.report %] | 
            
              | 48 |                     [% IF report %] | 
            
              | 49 |                         [% IF report.total_records == report.total_success %] | 
            
              | 50 |                             <div class="dialog message"> | 
            
              | 51 |                                 All records have successfully been modified! <a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a> | 
            
              | 52 |                             </div> | 
            
              | 53 |                         [% ELSE %] | 
            
              | 54 |                             <div class="dialog message"> | 
            
              | 55 |                                 [% report.total_success | html %] / [% report.total_records | html %] records have successfully been modified. Some errors occurred. <a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a> | 
            
              | 56 |                             </div> | 
            
              | 57 |                         [% END %] | 
            
              | 58 |                     [% END %] | 
            
              | 59 |                 [% CASE %][% job.type | html %] | 
            
              | 60 |                 [% END %] | 
            
              | 61 |             </li> | 
            
              | 62 |             <li><label for="job_data">Detailed messages: </label> | 
            
              | 63 |                 [% SWITCH job.type %] | 
            
              | 64 |                 [% CASE 'batch_biblio_record_modification' %] | 
            
              | 65 |                     [% FOR m IN job.messages %] | 
            
              | 66 |                         <div class="dialog message"> | 
            
              | 67 |                             [% IF m.type == 'success' %] | 
            
              | 68 |                                 <i class="fa fa-check success"></i> | 
            
              | 69 |                             [% ELSIF m.type == 'warning' %] | 
            
              | 70 |                                 <i class="fa fa-warning warn"></i> | 
            
              | 71 |                             [% ELSIF m.type == 'error' %] | 
            
              | 72 |                                 <i class="fa fa-exclamation error"></i> | 
            
              | 73 |                             [% END %] | 
            
              | 74 |                             [% SWITCH m.code %] | 
            
              | 75 |                             [% CASE 'biblio_not_modified' %] | 
            
              | 76 |                                 Bibliographic record <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% m.biblionumber | uri %]">[% m.biblionumber | html %]</a> has not been modified. An error occurred on modifying it. | 
            
              | 77 |                             [% CASE 'biblio_modified' %] | 
            
              | 78 |                                 Bibliographic record <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% m.biblionumber | uri %]">[% m.biblionumber | html %]</a> has successfully been modified. | 
            
              | 79 |                             [% END %] | 
            
              | 80 |                         </div> | 
            
              | 81 |                     [% END %] | 
            
              | 82 |                 [% CASE %][% job.type | html %] | 
            
              | 83 |                 [% END %] | 
            
              | 84 |             </li> | 
            
              | 85 |         </ol> | 
            
              | 86 |     </fieldset> | 
            
              | 87 |  | 
            
              | 88 |     <a href="/cgi-bin/koha/admin/background_jobs.pl">Return to the job list</a> | 
            
              | 89 | [% END %] | 
            
              | 90 |  | 
            
              | 91 | [% IF op == 'list' %] | 
            
              | 92 |  | 
            
              | 93 |     <h2>Background jobs</h2> | 
            
              | 94 |  | 
            
              | 95 |     [% IF jobs.count %] | 
            
              | 96 |         <table id="table_background_jobs"> | 
            
              | 97 |             <thead> | 
            
              | 98 |                 <tr> | 
            
              | 99 |                     <th>Job ID</th> | 
            
              | 100 |                     <th>Status</th> | 
            
              | 101 |                     <th>Progress</th> | 
            
              | 102 |                     <th>Type</th> | 
            
              | 103 |                     <th>Enqueued on</th> | 
            
              | 104 |                     <th>Started on</th> | 
            
              | 105 |                     <th>Ended on</th> | 
            
              | 106 |                     <th>Actions (NIY)</th> | 
            
              | 107 |                 </tr> | 
            
              | 108 |             </thead> | 
            
              | 109 |             <tbody> | 
            
              | 110 |                 [% FOREACH job IN jobs %] | 
            
              | 111 |                 <tr> | 
            
              | 112 |                     <td>[% job.id | html %]</td> | 
            
              | 113 |                     <td>[% job.status | html %]</td> | 
            
              | 114 |                     <td>[% job.progress || 0 | html %] / [% job.size | html %]</td> | 
            
              | 115 |                     <td> | 
            
              | 116 |                         [% SWITCH job.type %] | 
            
              | 117 |                         [% CASE 'batch_biblio_record_modification' %]Batch bibliographic record modification | 
            
              | 118 |                         [% CASE %][% job.type | html %] | 
            
              | 119 |                         [% END %] | 
            
              | 120 |                     </td> | 
            
              | 121 |                     <td>[% job.enqueued_on | html %]</td> | 
            
              | 122 |                     <td>[% job.started_on| html %]</td> | 
            
              | 123 |                     <td>[% job.ended_on| html %]</td> | 
            
              | 124 |                     <td class="actions"> | 
            
              | 125 |                         <a class="btn btn-default btn-xs disabled" href="/cgi-bin/koha/admin/background_jobs.pl?op=delete_confirm&id=[% job.id | html %]"><i class="fa fa-pencil"></i> Delete</a> | 
            
              | 126 |                         <a class="btn btn-default btn-xs  disabled" href="/cgi-bin/koha/admin/background_jobs.pl?op=replay&id=[% job.id | html %]"><i class="fa fa-trash"></i> Replay</a> | 
            
              | 127 |                     </td> | 
            
              | 128 |                 </tr> | 
            
              | 129 |                 [% END %] | 
            
              | 130 |             </tbody> | 
            
              | 131 |         </table> | 
            
              | 132 |     [% ELSE %] | 
            
              | 133 |         <div class="dialog message"> | 
            
              | 134 |             There are no background jobs yet. | 
            
              | 135 |         </div> | 
            
              | 136 |     [% END %] | 
            
              | 137 | [% END %] | 
            
              | 138 |  | 
            
              | 139 |             </main> | 
            
              | 140 |         </div> <!-- /.col-sm-10.col-sm-push-2 --> | 
            
              | 141 |  | 
            
              | 142 |         <div class="col-sm-2 col-sm-pull-10"> | 
            
              | 143 |             <aside> | 
            
              | 144 |                 [% INCLUDE 'admin-menu.inc' %] | 
            
              | 145 |             </aside> | 
            
              | 146 |         </div> <!-- /.col-sm-2.col-sm-pull-10 --> | 
            
              | 147 |      </div> <!-- /.row --> | 
            
              | 148 |  | 
            
              | 149 | [% MACRO jsinclude BLOCK %] | 
            
              | 150 |     [% Asset.js("js/admin-menu.js") | $raw %] | 
            
              | 151 |     [% INCLUDE 'datatables.inc' %] | 
            
              | 152 |     <script> | 
            
              | 153 |         $(document).ready(function() { | 
            
              | 154 |             $("#table_cities").dataTable($.extend(true, {}, dataTablesDefaults, { | 
            
              | 155 |                 "aoColumnDefs": [ | 
            
              | 156 |                     { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false }, | 
            
              | 157 |                 ], | 
            
              | 158 |                 "aaSorting": [[ 1, "asc" ]], | 
            
              | 159 |                 "iDisplayLength": 10, | 
            
              | 160 |                 "sPaginationType": "full_numbers" | 
            
              | 161 |             })); | 
            
              | 162 |         }); | 
            
              | 163 |     </script> | 
            
              | 164 | [% END %] | 
            
              | 165 | [% INCLUDE 'intranet-bottom.inc' %] |