View | Details | Raw Unified | Return to bug 18133
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt (-10 / +34 lines)
Lines 9-18 Link Here
9
//<![CDATA[
9
//<![CDATA[
10
var MSG_CANNOT_BE_DELETED = _("This record cannot be deleted, at least one item is currently checked out.");
10
var MSG_CANNOT_BE_DELETED = _("This record cannot be deleted, at least one item is currently checked out.");
11
$(document).ready(function() {
11
$(document).ready(function() {
12
  $(".bib_specific").show();
13
  $(".auth_specific").hide();
12
  $("input[type='radio']").click(function(){
14
  $("input[type='radio']").click(function(){
13
    if ($(this).attr('id') == 'authority_type') {
15
    if ($(this).attr('id') == 'authority_type') {
16
      $(".auth_specific").show();
17
      $(".bib_specific").hide();
14
      $("#shelves").hide();
18
      $("#shelves").hide();
15
    } else if ($(this).attr('id') == 'biblio_type') {
19
    } else if ($(this).attr('id') == 'biblio_type') {
20
      $(".bib_specific").show();
21
      $(".auth_specific").hide();
16
      $("#shelves").show();
22
      $("#shelves").show();
17
    }
23
    }
18
  });
24
  });
Lines 157-166 $(document).ready(function() { Link Here
157
        </ol>
163
        </ol>
158
      </fieldset>
164
      </fieldset>
159
      <fieldset class="rows">
165
      <fieldset class="rows">
160
        <legend>Or enter a list of record numbers</legend>
166
        <legend>Or enter a list of <span class="bib_specific">record</span><span class="auth_specific">authority</span> numbers</legend>
161
        <ol>
167
        <ol>
162
          <li>
168
          <li>
163
            <label for="recordnumber_list">Record number list (one per line): </label>
169
            <label for="recordnumber_list"><span class="bib_specific">Record</span><span class="auth_specific">Authority</span> number list (one per line): </label>
164
            <textarea rows="10" cols="30" id="recordnumber_list" name="recordnumber_list"></textarea>
170
            <textarea rows="10" cols="30" id="recordnumber_list" name="recordnumber_list"></textarea>
165
          </li>
171
          </li>
166
        </ol>
172
        </ol>
Lines 238-259 $(document).ready(function() { Link Here
238
        <fieldset class="action">
244
        <fieldset class="action">
239
          <input type="hidden" name="op" value="delete" />
245
          <input type="hidden" name="op" value="delete" />
240
          <input type="hidden" name="recordtype" value="[% recordtype %]" />
246
          <input type="hidden" name="recordtype" value="[% recordtype %]" />
241
          <input type="submit" value="Delete selected records" class="button" />
247
          [% IF ( recordtype == "biblio" ) %]
248
            <input type="submit" value="Delete selected records" class="button">
249
          [% ELSE %]
250
            <input type="submit" value="Delete selected authorities" class="button">
251
          [% END %]
242
          <a class="cancel" href="/cgi-bin/koha/tools/batch_delete_records.pl">Cancel</a>
252
          <a class="cancel" href="/cgi-bin/koha/tools/batch_delete_records.pl">Cancel</a>
243
        </fieldset>
253
        </fieldset>
244
      </form>
254
      </form>
245
    [% ELSE %]
255
    [% ELSE %]
246
      There are no record ids defined.
256
      [% IF ( recordtype == "biblio" ) %]
257
        There are no record numbers defined.
258
      [% ELSE %]
259
        There are no authority numbers defined.
260
      [% END %]
247
    [% END %]
261
    [% END %]
248
  [% ELSIF op == 'report' %]
262
  [% ELSIF op == 'report' %]
249
    [% IF report.total_records == report.total_success %]
263
    [% IF ( recordtype == "biblio" ) %]
250
      All records have been deleted successfully!
264
      [% IF report.total_records == report.total_success %]
251
    [% ELSIF report.total_success == 0 %]
265
        All records have been deleted successfully!
252
      No record has been deleted. An error occurred.
266
      [% ELSIF report.total_success == 0 %]
267
        No record has been deleted. An error occurred.
268
      [% ELSE %]
269
        [% report.total_success %] / [% report.total_records %] records have been deleted successfully but some errors occurred.
270
      [% END %]
253
    [% ELSE %]
271
    [% ELSE %]
254
      [% report.total_success %] / [% report.total_records %] records have been deleted successfully but some errors occurred.
272
      [% IF report.total_records == report.total_success %]
273
        All authorities have been deleted successfully!
274
      [% ELSIF report.total_success == 0 %]
275
        No authority has been deleted. An error occurred.
276
      [% ELSE %]
277
        [% report.total_success %] / [% report.total_records %] authorities have been deleted successfully but some errors occurred.
278
      [% END %]
255
    [% END %]
279
    [% END %]
256
    <p><a href="/cgi-bin/koha/tools/batch_delete_records.pl" title="New batch record deletion">New batch record deletion</a></p>
280
    <a href="/cgi-bin/koha/tools/batch_delete_records.pl" title="New batch record deletion">New batch record deletion</a>
257
  [% ELSE %]
281
  [% ELSE %]
258
    No action defined for the template.
282
    No action defined for the template.
259
  [% END %]
283
  [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt (-5 / +21 lines)
Lines 13-22 function Dopop(link) { Link Here
13
}
13
}
14
14
15
$(document).ready(function() {
15
$(document).ready(function() {
16
  $(".bib_specific").show();
17
  $(".auth_specific").hide();
16
  $("input[type='radio']").click(function(){
18
  $("input[type='radio']").click(function(){
17
    if ($(this).attr('id') == 'authority_type') {
19
    if ($(this).attr('id') == 'authority_type') {
20
      $(".bib_specific").hide();
21
      $(".auth_specific").show();
18
      $("#shelves").hide();
22
      $("#shelves").hide();
19
    } else if ($(this).attr('id') == 'biblio_type') {
23
    } else if ($(this).attr('id') == 'biblio_type') {
24
      $(".bib_specific").show();
25
      $(".auth_specific").hide();
20
      $("#shelves").show();
26
      $("#shelves").show();
21
    }
27
    }
22
  });
28
  });
Lines 148-154 $(document).ready(function() { Link Here
148
                [% ELSIF message.code == 'biblio_modified' %]
154
                [% ELSIF message.code == 'biblio_modified' %]
149
                    Bibliographic record <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% message.biblionumber %]">[% message.biblionumber %]</a> has successfully been modified.
155
                    Bibliographic record <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% message.biblionumber %]">[% message.biblionumber %]</a> has successfully been modified.
150
                [% ELSIF message.code == 'authority_modified' %]
156
                [% ELSIF message.code == 'authority_modified' %]
151
                    Bibliographic record <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% message.authid %]">[% message.authid %]</a> has successfully been modified.
157
                    Authority record <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% message.authid %]">[% message.authid %]</a> has successfully been modified.
152
                [% END %]
158
                [% END %]
153
                [% IF message.error %]
159
                [% IF message.error %]
154
                    (The error was: [% message.error%]. See the Koha logfile for more information).
160
                    (The error was: [% message.error%]. See the Koha logfile for more information).
Lines 190-199 $(document).ready(function() { Link Here
190
        </ol>
196
        </ol>
191
      </fieldset>
197
      </fieldset>
192
      <fieldset class="rows">
198
      <fieldset class="rows">
193
        <legend>Or enter a list of record numbers</legend>
199
        <legend>Or enter a list of <span class="bib_specific">record</span><span class="auth_specific">authority</span> numbers</legend>
194
        <ol>
200
        <ol>
195
          <li>
201
          <li>
196
            <label for="recordnumber_list">Record number list (one per line): </label>
202
            <label for="recordnumber_list"><span class="bib_specific">Record</span><span class="auth_specific">Authority</span> number list (one per line): </label>
197
            <textarea rows="10" cols="30" id="recordnumber_list" name="recordnumber_list"></textarea>
203
            <textarea rows="10" cols="30" id="recordnumber_list" name="recordnumber_list"></textarea>
198
          </li>
204
          </li>
199
        </ol>
205
        </ol>
Lines 306-312 $(document).ready(function() { Link Here
306
        <fieldset class="action">
312
        <fieldset class="action">
307
          <input type="hidden" name="op" value="modify" />
313
          <input type="hidden" name="op" value="modify" />
308
          <input type="hidden" name="recordtype" value="[% recordtype %]" />
314
          <input type="hidden" name="recordtype" value="[% recordtype %]" />
309
          <input type="button" id="mainformsubmit" value="Modify selected records" class="button" />
315
          [% IF ( recordtype == "biblio" ) %]
316
            <input type="button" id="mainformsubmit" value="Modify selected records" class="button" />
317
          [% ELSE %]
318
            <input type="button" id="mainformsubmit" value="Modify selected authorities" class="button" />
319
          [% END %]
310
          <input type="hidden" name="runinbackground" id="runinbackground" value="" />
320
          <input type="hidden" name="runinbackground" id="runinbackground" value="" />
311
          <input type="hidden" name="completedJobID" id="completedJobID" value="" />
321
          <input type="hidden" name="completedJobID" id="completedJobID" value="" />
312
          <a class="cancel" href="/cgi-bin/koha/tools/batch_record_modification.pl">Cancel</a>
322
          <a class="cancel" href="/cgi-bin/koha/tools/batch_record_modification.pl">Cancel</a>
Lines 323-329 $(document).ready(function() { Link Here
323
    [% END %]
333
    [% END %]
324
  [% ELSIF view == 'report' %]
334
  [% ELSIF view == 'report' %]
325
    [% IF report.total_records == report.total_success %]
335
    [% IF report.total_records == report.total_success %]
326
        <div class="dialog message">All records have successfully been modified! <span id="auth_next_steps"><a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a></span></div>
336
        <div class="dialog message">
337
          [% IF ( recordtype == "biblio" ) %]
338
            All records have successfully been modified!
339
          [% ELSE %]
340
            All authorities have successfully been modified!
341
          [% END %]
342
          <span id="auth_next_steps"><a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a></span></div>
327
    [% ELSE %]
343
    [% ELSE %]
328
        <div class="dialog message">[% report.total_success %] / [% report.total_records %] records have successfully been modified. Some errors occurred. <span id="auth_next_steps"><a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a></span></div>
344
        <div class="dialog message">[% report.total_success %] / [% report.total_records %] records have successfully been modified. Some errors occurred. <span id="auth_next_steps"><a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a></span></div>
329
    [% END %]
345
    [% END %]
(-)a/tools/batch_delete_records.pl (+1 lines)
Lines 117-122 if ( $op eq 'form' ) { Link Here
117
    $template->param(
117
    $template->param(
118
        records => \@records,
118
        records => \@records,
119
        op => 'list',
119
        op => 'list',
120
        recordtype => $recordtype,
120
    );
121
    );
121
} elsif ( $op eq 'delete' ) {
122
} elsif ( $op eq 'delete' ) {
122
    # We want to delete selected records!
123
    # We want to delete selected records!
(-)a/tools/batch_record_modification.pl (-1 / +1 lines)
Lines 157-162 if ( $op eq 'form' ) { Link Here
157
        }
157
        }
158
    }
158
    }
159
    $template->param(
159
    $template->param(
160
        recordtype => $recordtype,
160
        records => \@records,
161
        records => \@records,
161
        mmtid => $mmtid,
162
        mmtid => $mmtid,
162
        view => 'list',
163
        view => 'list',
163
- 

Return to bug 18133