|
Lines 34-39
Link Here
|
| 34 |
[% IF op == 'view' %] |
34 |
[% IF op == 'view' %] |
| 35 |
<h1>Detail of job #[% job.id | html %]</h1> |
35 |
<h1>Detail of job #[% job.id | html %]</h1> |
| 36 |
|
36 |
|
|
|
37 |
[% PROCESS "background_jobs/${job.type}.inc" %] |
| 38 |
|
| 37 |
<fieldset class="rows"> |
39 |
<fieldset class="rows"> |
| 38 |
<ol> |
40 |
<ol> |
| 39 |
<li><span class="label">Job ID: </span>[% job.id | html %]</li> |
41 |
<li><span class="label">Job ID: </span>[% job.id | html %]</li> |
|
Lines 44-177
Link Here
|
| 44 |
<li><label for="job_started_on">started_on: </label>[% job.started_on | html %]</li> |
46 |
<li><label for="job_started_on">started_on: </label>[% job.started_on | html %]</li> |
| 45 |
<li><label for="job_ended_on">ended_on: </label>[% job.ended_on | html %]</li> |
47 |
<li><label for="job_ended_on">ended_on: </label>[% job.ended_on | html %]</li> |
| 46 |
<li><label for="job_data">Report: </label> |
48 |
<li><label for="job_data">Report: </label> |
| 47 |
[% SWITCH job.type %] |
49 |
[% PROCESS 'report' %] |
| 48 |
[% CASE 'batch_biblio_record_modification' %] |
|
|
| 49 |
[% SET report = job.report %] |
| 50 |
[% IF report %] |
| 51 |
[% IF report.total_records == report.total_success %] |
| 52 |
<div class="dialog message"> |
| 53 |
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> |
| 54 |
[% IF lists.count %] |
| 55 |
<br /> |
| 56 |
Add modified records to the following list: |
| 57 |
<select name="add_bibs_to_list" id="add_bibs_to_list"> |
| 58 |
<option value="">Select a list</option> |
| 59 |
[% FOREACH list IN lists %] |
| 60 |
<option class="shelf" value="[% list.shelfnumber | html %]">[% list.shelfname | html %]</option> |
| 61 |
[% END %] |
| 62 |
</select> |
| 63 |
[% END %] |
| 64 |
</div> |
| 65 |
[% ELSE %] |
| 66 |
<div class="dialog message"> |
| 67 |
[% report.total_success | html %] / [% report.total_records | html %] records have successfully been modified. Some errors occurred. |
| 68 |
[% IF job.status == 'cancelled' %]The job has been cancelled before it finished.[% END %] |
| 69 |
<a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a> |
| 70 |
</div> |
| 71 |
[% END %] |
| 72 |
[% END %] |
| 73 |
[% CASE 'batch_authority_record_modification' %] |
| 74 |
[% SET report = job.report %] |
| 75 |
[% IF report %] |
| 76 |
[% IF report.total_records == report.total_success %] |
| 77 |
<div class="dialog message"> |
| 78 |
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> |
| 79 |
</div> |
| 80 |
[% ELSE %] |
| 81 |
<div class="dialog message"> |
| 82 |
[% report.total_success | html %] / [% report.total_records | html %] records have successfully been modified. Some errors occurred. |
| 83 |
[% IF job.status == 'cancelled' %]The job has been cancelled before it finished.[% END %] |
| 84 |
<a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a> |
| 85 |
</div> |
| 86 |
[% END %] |
| 87 |
[% END %] |
| 88 |
[% CASE 'batch_biblio_record_deletion' %] |
| 89 |
[% SET report = job.report %] |
| 90 |
[% IF report %] |
| 91 |
[% IF report.total_records == report.total_success %] |
| 92 |
<div class="dialog message"> |
| 93 |
All records have been deleted successfully! |
| 94 |
</div> |
| 95 |
[% ELSIF report.total_success == 0 %] |
| 96 |
<div class="dialog message"> |
| 97 |
No record has been deleted. An error occurred. |
| 98 |
</div> |
| 99 |
[% ELSE %] |
| 100 |
<div class="dialog message"> |
| 101 |
[% report.total_success | html %] / [% report.total_records | html %] records have been deleted successfully but some errors occurred. |
| 102 |
</div> |
| 103 |
[% END %] |
| 104 |
[% END %] |
| 105 |
[% CASE %]Job type "[% job.type | html %]" not handled in the template |
| 106 |
[% END %] |
| 107 |
</li> |
50 |
</li> |
| 108 |
<li><label for="job_data">Detailed messages: </label> |
51 |
<li><label for="job_data">Detailed messages: </label> |
| 109 |
[% SWITCH job.type %] |
52 |
[% PROCESS 'detail' %] |
| 110 |
[% CASE 'batch_biblio_record_modification' %] |
|
|
| 111 |
[% FOR m IN job.messages %] |
| 112 |
<div class="dialog message"> |
| 113 |
[% IF m.type == 'success' %] |
| 114 |
<i class="fa fa-check success"></i> |
| 115 |
[% ELSIF m.type == 'warning' %] |
| 116 |
<i class="fa fa-warning warn"></i> |
| 117 |
[% ELSIF m.type == 'error' %] |
| 118 |
<i class="fa fa-exclamation error"></i> |
| 119 |
[% END %] |
| 120 |
[% SWITCH m.code %] |
| 121 |
[% CASE 'biblio_not_modified' %] |
| 122 |
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.[% IF m.error %] ([% m.error %])[% END %]. |
| 123 |
[% CASE 'biblio_modified' %] |
| 124 |
Bibliographic record <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% m.biblionumber | uri %]">[% m.biblionumber | html %]</a> has successfully been modified. |
| 125 |
[% END %] |
| 126 |
</div> |
| 127 |
[% END %] |
| 128 |
[% CASE 'batch_authority_record_modification' %] |
| 129 |
[% FOR m IN job.messages %] |
| 130 |
<div class="dialog message"> |
| 131 |
[% IF m.type == 'success' %] |
| 132 |
<i class="fa fa-check success"></i> |
| 133 |
[% ELSIF m.type == 'warning' %] |
| 134 |
<i class="fa fa-warning warn"></i> |
| 135 |
[% ELSIF m.type == 'error' %] |
| 136 |
<i class="fa fa-exclamation error"></i> |
| 137 |
[% END %] |
| 138 |
[% SWITCH m.code %] |
| 139 |
[% CASE 'authority_not_modified' %] |
| 140 |
Authority record <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% m.authid | uri %]">[% m.authid | html %]</a> has not been modified. An error occurred on modifying it[% IF m.error %] ([% m.error %])[% END %]. |
| 141 |
[% CASE 'authority_modified' %] |
| 142 |
Authority record <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% m.authid | uri %]">[% m.authid | html %]</a> has successfully been modified.. |
| 143 |
[% END %] |
| 144 |
</div> |
| 145 |
[% END %] |
| 146 |
[% CASE 'batch_biblio_record_deletion' %] |
| 147 |
[% FOR m IN job.messages %] |
| 148 |
<div class="dialog message"> |
| 149 |
[% IF m.type == 'success' %] |
| 150 |
<i class="fa fa-check success"></i> |
| 151 |
[% ELSIF m.type == 'warning' %] |
| 152 |
<i class="fa fa-warning warn"></i> |
| 153 |
[% ELSIF m.type == 'error' %] |
| 154 |
<i class="fa fa-exclamation error"></i> |
| 155 |
[% END %] |
| 156 |
[% SWITCH m.code %] |
| 157 |
[% CASE 'biblio_not_exists' %] |
| 158 |
The biblionumber [% m.biblionumber | html %] does not exist in the database. |
| 159 |
[% CASE 'item_issued' %] |
| 160 |
At least one item is checked out on bibliographic record [% m.biblionumber | html %]. |
| 161 |
[% CASE 'reserve_not_cancelled' %] |
| 162 |
Bibliographic record [% m.biblionumber | html %] was not deleted. A hold could not be canceled (reserve_id [% m.reserve_id | html %]). |
| 163 |
[% CASE 'item_not_deleted' %] |
| 164 |
The bibliographic record [% m.biblionumber | html %] was not deleted. An error was encountered when deleting an item (itemnumber [% m.itemnumber | html %]). |
| 165 |
[% CASE 'biblio_not_deleted' %] |
| 166 |
Bibliographic record [% m.biblionumber | html %] was not deleted. An error occurred. |
| 167 |
[% CASE 'biblio_deleted' %] |
| 168 |
Bibliographic record [% m.biblionumber | html %] has been deleted successfully. |
| 169 |
[% END %] |
| 170 |
</div> |
| 171 |
[% END %] |
| 172 |
|
| 173 |
[% CASE %]Job type "[% job.type | html %]" not handled in the template |
| 174 |
[% END %] |
| 175 |
</li> |
53 |
</li> |
| 176 |
</ol> |
54 |
</ol> |
| 177 |
</fieldset> |
55 |
</fieldset> |
|
Lines 264-284
Link Here
|
| 264 |
"sPaginationType": "full_numbers" |
142 |
"sPaginationType": "full_numbers" |
| 265 |
})); |
143 |
})); |
| 266 |
|
144 |
|
| 267 |
$("#add_bibs_to_list").change(function(){ |
145 |
[% IF op == 'view' %] |
| 268 |
var selected = $("#add_bibs_to_list").find("option:selected"); |
146 |
[% PROCESS 'js' %] |
| 269 |
if ( selected.attr("class") == "shelf" ){ |
147 |
[% END %] |
| 270 |
var shelfnumber = selected.attr("value"); |
|
|
| 271 |
var bibs = new Array(); |
| 272 |
[% FOREACH message IN job.messages %] |
| 273 |
[% IF message.code == 'biblio_modified' %] |
| 274 |
bibs.push("biblionumber="+[% message.biblionumber | html %]); |
| 275 |
[% END %] |
| 276 |
[% END %] |
| 277 |
var bibstring = bibs.join("&"); |
| 278 |
window.open('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?shelfnumber='+shelfnumber+'&confirm=1&'+bibstring, 'popup', 'width=500,height=500,toolbar=false,scrollbars=yes,resizeable=yes'); |
| 279 |
return false; |
| 280 |
} |
| 281 |
}); |
| 282 |
}); |
148 |
}); |
| 283 |
</script> |
149 |
</script> |
| 284 |
[% END %] |
150 |
[% END %] |
| 285 |
- |
|
|