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

(-)a/installer/data/mysql/atomicupdate/bug_24108-add_SaveRecordbyControlNumber_syspref.sql (+1 lines)
Line 0 Link Here
1
NSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('SaveRecordbyControlNumber', '0', 'If set, advanced editor (Rancor) will use the control number field to populate the name of the save file, otherwise it uses the biblionumber.', NULL, 'YesNo');
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc (-2 / +24 lines)
Lines 289-295 require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr Link Here
289
        'iso2709': {
289
        'iso2709': {
290
            saveLabel: _("Save as MARC (.mrc) file"),
290
            saveLabel: _("Save as MARC (.mrc) file"),
291
            save: function( id, record, done ) {
291
            save: function( id, record, done ) {
292
                saveAs( new Blob( [record.toISO2709()], { 'type': 'application/octet-stream;charset=utf-8' } ), 'record.mrc' );
292
                var recname = 'record.mrc';
293
                if(state.recordID) {
294
                    recname = state.recordID+'.mrc';
295
                }
296
297
                [% IF (Koha.Preference('SaveRecordbyControlNumber') == '1') %]
298
                var controlnumfield = record.field('001');
299
                if(controlnumfield) {
300
                    recname = controlnumfield.subfield('@')+'.mrc';
301
                }
302
                [% END %]
303
                saveAs( new Blob( [record.toISO2709()], { 'type': 'application/octet-stream;charset=utf-8' } ), recname );
293
304
294
                done( {} );
305
                done( {} );
295
            }
306
            }
Lines 297-303 require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr Link Here
297
        'marcxml': {
308
        'marcxml': {
298
            saveLabel: _("Save as MARCXML (.xml) file"),
309
            saveLabel: _("Save as MARCXML (.xml) file"),
299
            save: function( id, record, done ) {
310
            save: function( id, record, done ) {
300
                saveAs( new Blob( [record.toXML()], { 'type': 'application/octet-stream;charset=utf-8' } ), 'record.xml' );
311
                var recname = 'record.mrc';
312
                if(state.recordID) {
313
                    recname = state.recordID+'.mrc';
314
                }
315
316
                [% IF (Koha.Preference('SaveRecordbyControlNumber') == '1') %]
317
                var controlnumfield = record.field('001');
318
                if(controlnumfield) {
319
                    recname = controlnumfield.subfield('@')+'.xml';
320
                }
321
                [% END %]
322
                saveAs( new Blob( [record.toXML()], { 'type': 'application/octe     t-stream;charset=utf-8' } ), recname );
301
323
302
                done( {} );
324
                done( {} );
303
            }
325
            }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref (-1 / +9 lines)
Lines 27-32 Cataloging: Link Here
27
            - the advanced cataloging editor.
27
            - the advanced cataloging editor.
28
            - "<br/> <strong>NOTE:</strong>"
28
            - "<br/> <strong>NOTE:</strong>"
29
            - Currently does not include support for UNIMARC or NORMARC fixed fields.
29
            - Currently does not include support for UNIMARC or NORMARC fixed fields.
30
        -
31
            - "When saving in a MARC/MARCXML file in the advanced editor (Rancor), use the"
32
            - pref: SaveRecordbyControlNumber
33
              default: 0
34
              choices:
35
                  yes: Enable
36
                  yes: "Save by controlnumber"
37
                  no: "Save by biblionumber"
38
            - "in the file name. Default is by biblionumer."
30
    Spine labels:
39
    Spine labels:
31
        -
40
        -
32
            - When using the quick spine label printer,
41
            - When using the quick spine label printer,
33
- 

Return to bug 24108