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

(-)a/installer/data/mysql/atomicupdate/bug-23111_add-is_default-column-to-biblio_framework.perl (-1 / +1 lines)
Lines 1-6 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
1
$DBversion = 'XXX';  # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
2
if( CheckVersion( $DBversion ) ) {
3
    if( !column_exists( 'biblio_framework', 'default' ) ) {
3
    if( !column_exists( 'biblio_framework', 'is_default' ) ) {
4
        $dbh->do(q{ALTER TABLE biblio_framework ADD is_default TINYINT(1) default 0 NOT NULL AFTER frameworktext});
4
        $dbh->do(q{ALTER TABLE biblio_framework ADD is_default TINYINT(1) default 0 NOT NULL AFTER frameworktext});
5
    }
5
    }
6
    NewVersion( $DBversion, 23111, "Add is_default column to biblio_framework table");
6
    NewVersion( $DBversion, 23111, "Add is_default column to biblio_framework table");
(-)a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js (-1 / +6 lines)
Lines 686-693 define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], Link Here
686
        displayRecord: function( record ) {
686
        displayRecord: function( record ) {
687
            this.cm.setValue( TextMARC.RecordToText(record) );
687
            this.cm.setValue( TextMARC.RecordToText(record) );
688
            this.modified = false;
688
            this.modified = false;
689
            var fwcode = typeof record.frameworkcode !== 'undefined' ? record.frameworkcode : '';
690
            var defaultfw = $("a[data-default='Y']").data('frameworkcode');
691
            if ( typeof record.frameworkcode === 'undefined' && defaultfw ){
692
                fwcode = defaultfw;
693
            }
689
            this.setFrameworkCode(
694
            this.setFrameworkCode(
690
                typeof record.frameworkcode !== 'undefined' ? record.frameworkcode : '',
695
                fwcode,
691
                false,
696
                false,
692
                function ( error ) {
697
                function ( error ) {
693
                    if ( typeof error !== 'undefined' ) {
698
                    if ( typeof error !== 'undefined' ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt (-2 / +5 lines)
Lines 56-62 Link Here
56
                </li>
56
                </li>
57
                [% FOREACH framework IN frameworks %]
57
                [% FOREACH framework IN frameworks %]
58
                    <li>
58
                    <li>
59
                        <a class="change-framework" data-frameworkcode="[% framework.frameworkcode | html %]">
59
                        [% IF framework.is_default %]
60
                            <a class="change-framework" data-frameworkcode="[% framework.frameworkcode | html %]" data-default="Y">
61
                        [% ELSE %]
62
                            <a class="change-framework" data-frameworkcode="[% framework.frameworkcode | html %]">
63
                        [% END %]
60
                            <i class="fa fa-fw fa-check selected"></i>
64
                            <i class="fa fa-fw fa-check selected"></i>
61
                            <i class="fa fa-fw unselected">&nbsp;</i>
65
                            <i class="fa fa-fw unselected">&nbsp;</i>
62
                            [% framework.frameworktext | html %]
66
                            [% framework.frameworktext | html %]
63
- 

Return to bug 23111