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

(-)a/C4/Record.pm (-1 / +12 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
        } else {
716
            $tex .= "\@book{";
717
        }
718
    }
719
    else {
720
        $tex .= "\@book{";
721
    }
711
    $tex .= join(",\n", $id, map { $bh{$_} ? qq(\t$_ = {$bh{$_}}) : () } keys %bh);
722
    $tex .= join(",\n", $id, map { $bh{$_} ? qq(\t$_ = {$bh{$_}}) : () } keys %bh);
712
    $tex .= "\n";
723
    $tex .= "\n";
713
724
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 65-70 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
65
('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'),
65
('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
('BiblioDefaultView','normal','normal|marc|isbd','Choose the default detail view in the catalog; choose between normal, marc or isbd','Choice'),
66
('BiblioDefaultView','normal','normal|marc|isbd','Choose the default detail view in the catalog; choose between normal, marc or isbd','Choice'),
67
('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'),
67
('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
('BibtexUseItemtypeAsType',  '0', NULL ,  'Use biblio.itemtype for BibTeX export type if set',  'YesNo'),
68
('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'),
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'),
69
('BlockReturnOfWithdrawnItems','1','0','If enabled, items that are marked as withdrawn cannot be returned.','YesNo'),
70
('BlockReturnOfWithdrawnItems','1','0','If enabled, items that are marked as withdrawn cannot be returned.','YesNo'),
70
('BorrowerMandatoryField','surname|cardnumber',NULL,'Choose the mandatory fields for a patron\'s account','free'),
71
('BorrowerMandatoryField','surname|cardnumber',NULL,'Choose the mandatory fields for a patron\'s account','free'),
(-)a/installer/data/mysql/updatedatabase.pl (+5 lines)
Lines 8568-8573 if ( CheckVersion($DBversion) ) { Link Here
8568
        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')
8568
        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')
8569
    });
8569
    });
8570
8570
8571
    $dbh->do(q{
8572
        INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES
8573
        ('BibtexUseItemtypeAsType',  '0', NULL ,  'Use biblio.itemtype for BibTeX export type if set',  'YesNo')
8574
    });
8575
8571
    print "Upgrade to $DBversion done (Bug XXX - Add ability to export arbitrary MARC fields for RIS and BibTex)\n";
8576
    print "Upgrade to $DBversion done (Bug XXX - Add ability to export arbitrary MARC fields for RIS and BibTex)\n";
8572
    SetVersion($DBversion);
8577
    SetVersion($DBversion);
8573
}
8578
}
(-)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