Bugzilla – Attachment 112468 Details for
Bug 23111
Setting a custom framework as the default for cataloguing is not possible
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23111: (follow-up) set default framework on advanced editor
Bug-23111-follow-up-set-default-framework-on-advan.patch (text/plain), 3.69 KB, created by
Aleisha Amohia
on 2020-10-25 03:36:58 UTC
(
hide
)
Description:
Bug 23111: (follow-up) set default framework on advanced editor
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2020-10-25 03:36:58 UTC
Size:
3.69 KB
patch
obsolete
>From 235aecb3cfc21c7fff2ff4dbbaa6ec3b01ed684e Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Sun, 25 Oct 2020 16:35:50 +1300 >Subject: [PATCH] Bug 23111: (follow-up) set default framework on advanced > editor > >This patch ensures the advanced editor considers the default biblio >framework. > >Also fixing bug in atomic update >--- > .../bug-23111_add-is_default-column-to-biblio_framework.perl | 2 +- > koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js | 7 ++++++- > koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt | 6 +++++- > 3 files changed, 12 insertions(+), 3 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug-23111_add-is_default-column-to-biblio_framework.perl b/installer/data/mysql/atomicupdate/bug-23111_add-is_default-column-to-biblio_framework.perl >index 42494040759..6655b250980 100644 >--- a/installer/data/mysql/atomicupdate/bug-23111_add-is_default-column-to-biblio_framework.perl >+++ b/installer/data/mysql/atomicupdate/bug-23111_add-is_default-column-to-biblio_framework.perl >@@ -1,6 +1,6 @@ > $DBversion = 'XXX'; # will be replaced by the RM > if( CheckVersion( $DBversion ) ) { >- if( !column_exists( 'biblio_framework', 'default' ) ) { >+ if( !column_exists( 'biblio_framework', 'is_default' ) ) { > $dbh->do(q{ALTER TABLE biblio_framework ADD is_default TINYINT(1) default 0 NOT NULL AFTER frameworktext}); > } > NewVersion( $DBversion, 23111, "Add is_default column to biblio_framework table"); >diff --git a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js >index fb0bac5d982..817a23b2e99 100644 >--- a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js >+++ b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js >@@ -686,8 +686,13 @@ define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], > displayRecord: function( record ) { > this.cm.setValue( TextMARC.RecordToText(record) ); > this.modified = false; >+ var fwcode = typeof record.frameworkcode !== 'undefined' ? record.frameworkcode : ''; >+ var defaultfw = $("a[data-default='Y']").data('frameworkcode'); >+ if ( typeof record.frameworkcode === 'undefined' && defaultfw ){ >+ fwcode = defaultfw; >+ } > this.setFrameworkCode( >- typeof record.frameworkcode !== 'undefined' ? record.frameworkcode : '', >+ fwcode, > false, > function ( error ) { > if ( typeof error !== 'undefined' ) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt >index d28822651fc..0922f5359ea 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt >@@ -56,7 +56,11 @@ > </li> > [% FOREACH framework IN frameworks %] > <li> >- <a class="change-framework" data-frameworkcode="[% framework.frameworkcode | html %]"> >+ [% IF framework.is_default %] >+ <a class="change-framework" data-frameworkcode="[% framework.frameworkcode | html %]" data-default="Y"> >+ [% ELSE %] >+ <a class="change-framework" data-frameworkcode="[% framework.frameworkcode | html %]"> >+ [% END %] > <i class="fa fa-fw fa-check selected"></i> > <i class="fa fa-fw unselected"> </i> > [% framework.frameworktext | html %] >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23111
:
90550
|
90587
|
90588
|
91039
|
91040
|
91791
|
92184
|
102602
|
102603
|
104058
|
104059
|
104060
|
104061
|
104062
|
106560
|
112354
|
112468
|
138766
|
138767
|
138768
|
138769
|
138770
|
141565
|
141566
|
141567
|
141568
|
141569
|
157717
|
157718
|
157719
|
157720
|
157721
|
157722
|
157723