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

(-)a/C4/Record.pm (-1 / +14 lines)
Lines 707-713 sub marc2bibtex { Link Here
707
        );
707
        );
708
    }
708
    }
709
709
710
    $tex .= "\@book{";
710
    if ( C4::Context->preference('RisUseItemtypeAsType') ) {
711
        my $s = GetMarcSubfieldStructureFromKohaField('biblioitems.itemtype');
712
        my $type = $record->subfield( $s->{tagfield}, $s->{tagsubfield} );
713
        if ($type) {
714
            $tex .= '@' . $type . '{';
715
        }
716
        else {
717
            $tex .= "\@book{";
718
        }
719
    }
720
    else {
721
        $tex .= "\@book{";
722
    }
723
711
    my @elt;
724
    my @elt;
712
    for ( my $i = 0 ; $i < scalar( @bh ) ; $i = $i + 2 ) {
725
    for ( my $i = 0 ; $i < scalar( @bh ) ; $i = $i + 2 ) {
713
        next unless $bh[$i+1];
726
        next unless $bh[$i+1];
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 66-71 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
66
('BiblioAddsAuthorities','0',NULL,'If ON, adding a new biblio will check for an existing authority record and create one on the fly if one doesn\'t exist','YesNo'),
66
('BiblioAddsAuthorities','0',NULL,'If ON, adding a new biblio will check for an existing authority record and create one on the fly if one doesn\'t exist','YesNo'),
67
('BiblioDefaultView','normal','normal|marc|isbd','Choose the default detail view in the catalog; choose between normal, marc or isbd','Choice'),
67
('BiblioDefaultView','normal','normal|marc|isbd','Choose the default detail view in the catalog; choose between normal, marc or isbd','Choice'),
68
('BibtexExportAdditionalFields',  '', NULL ,  'Define additional BibTex tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.',  'textarea'),
68
('BibtexExportAdditionalFields',  '', NULL ,  'Define additional BibTex tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.',  'textarea'),
69
('BibtexUseItemtypeAsType',  '0', NULL ,  'Use biblio.itemtype for BibTeX export type if set',  'YesNo'),
69
('BlockExpiredPatronOpacActions','1',NULL,'Set whether an expired patron can perform opac actions such as placing holds or renew books, can be overridden on a per patron-type basis','YesNo'),
70
('BlockExpiredPatronOpacActions','1',NULL,'Set whether an expired patron can perform opac actions such as placing holds or renew books, can be overridden on a per patron-type basis','YesNo'),
70
('BlockReturnOfWithdrawnItems','1','0','If enabled, items that are marked as withdrawn cannot be returned.','YesNo'),
71
('BlockReturnOfWithdrawnItems','1','0','If enabled, items that are marked as withdrawn cannot be returned.','YesNo'),
71
('BorrowerMandatoryField','surname|cardnumber',NULL,'Choose the mandatory fields for a patron\'s account','free'),
72
('BorrowerMandatoryField','surname|cardnumber',NULL,'Choose the mandatory fields for a patron\'s account','free'),
(-)a/installer/data/mysql/updatedatabase.pl (+5 lines)
Lines 8969-8974 if ( CheckVersion($DBversion) ) { Link Here
8969
        VALUES ('BibtexExportAdditionalFields',  '', NULL ,  'Define additional BibTex tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.',  'textarea')
8969
        VALUES ('BibtexExportAdditionalFields',  '', NULL ,  'Define additional BibTex tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.',  'textarea')
8970
    });
8970
    });
8971
8971
8972
    $dbh->do(q{
8973
        INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES
8974
        ('BibtexUseItemtypeAsType',  '0', NULL ,  'Use biblio.itemtype for BibTeX export type if set',  'YesNo')
8975
    });
8976
8972
    print "Upgrade to $DBversion done (Bug XXX - Add ability to export arbitrary MARC fields for RIS and BibTex)\n";
8977
    print "Upgrade to $DBversion done (Bug XXX - Add ability to export arbitrary MARC fields for RIS and BibTex)\n";
8973
    SetVersion($DBversion);
8978
    SetVersion($DBversion);
8974
}
8979
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref (-2 / +7 lines)
Lines 210-221 Cataloging: Link Here
210
            - "<br/>"
210
            - "<br/>"
211
            - "All values of repeating tags and subfields will be printed with the given BibTeX tag."
211
            - "All values of repeating tags and subfields will be printed with the given BibTeX tag."
212
        -
212
        -
213
            - pref: BibtexUseItemtypeAsType
214
              choices:
215
                  yes: "Do"
216
                  no: "Do not"
217
            - use the record level itemtype code for the record type if it is set. If it is not set, the default of @book will be used.
218
        -
213
            - Include following fields when exporting RIS,
219
            - Include following fields when exporting RIS,
214
            - pref: RisExportAdditionalFields
220
            - pref: RisExportAdditionalFields
215
              type: textarea
221
              type: textarea
216
            - "Use one line per tag in the format RIS_TAG: TAG$SUBFIELD ( e.g. LC: 010$a )"
222
            - "Use one line per tag in the format RIS_TAG: TAG$SUBFIELD ( e.g. LC: 010$a )"
217
            - "<br/>"
223
            - "<br/>"
218
            - "To specificy multiple marc tags/subfields as targets for a repeating RIS tag, use the following format: RIS_TAG: [TAG2$SUBFIELD1, TAG2$SUBFIELD2] ( e.g. XY: [501$a, 505$g] )"
224
            - "To specificy multiple marc tags/subfields as targets for a repeating RIS tag, use the following format: RIS_TAG: [TAG2$SUBFIELD1, TAG2$SUBFIELD2] ( e.g. NT: [501$a, 505$g] )"
219
            - "<br/>"
225
            - "<br/>"
220
            - "All values of repeating tags and subfields will be printed with the given RIS tag."
226
            - "All values of repeating tags and subfields will be printed with the given RIS tag."
221
        -
227
        -
222
- 

Return to bug 12357