Bugzilla – Attachment 2911 Details for
Bug 5546
Ability to hide MARC documentation links
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Add sysprefs and use then to hide MARC docs stuff
0001-Bug-5546-syspref-to-hide-MARC-documentation-links.patch (text/plain), 5.95 KB, created by
Tomás Cohen Arazi (tcohen)
on 2010-12-28 14:50:12 UTC
(
hide
)
Description:
Add sysprefs and use then to hide MARC docs stuff
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2010-12-28 14:50:12 UTC
Size:
5.95 KB
patch
obsolete
>From f1443becd7154105fa20215ef6c3a50243360c2a Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Tom=C3=A1s=20Cohen=20Arazi?= <tomascohen@gmail.com> >Date: Tue, 28 Dec 2010 11:39:41 -0300 >Subject: [PATCH] [Bug 5546] syspref to hide MARC documentation links > >--- > cataloguing/addbiblio.pl | 6 ++++++ > installer/data/mysql/en/mandatory/sysprefs.sql | 1 + > installer/data/mysql/updatedatabase.pl | 7 +++++++ > .../en/modules/admin/preferences/cataloguing.pref | 6 ++++++ > .../prog/en/modules/cataloguing/addbiblio.tmpl | 9 +++++++-- > 5 files changed, 27 insertions(+), 2 deletions(-) > >diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl >index 2c0c63d..82d5ddb 100755 >--- a/cataloguing/addbiblio.pl >+++ b/cataloguing/addbiblio.pl >@@ -1023,6 +1023,12 @@ $template->param( title => $record->title() ) if ( $record ne "-1" ); > if (C4::Context->preference("marcflavour") eq "MARC21"){ > $template->param(MARC21 => 1); > } >+ >+if (C4::Context->preference("enableMARCdocs")){ >+ $template->param(enableMARCdocs => 1); >+} >+ >+ > $template->param( > popup => $mode, > frameworkcode => $frameworkcode, >diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql >index 94d5de1..0b3d487 100644 >--- a/installer/data/mysql/en/mandatory/sysprefs.sql >+++ b/installer/data/mysql/en/mandatory/sysprefs.sql >@@ -278,3 +278,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ILS-DI:AuthorizedIPs','','.','Restricts usage of ILS-DI to some IPs','Free'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OverduesBlockCirc','noblock','When checking out an item should overdues block checkout, generate a confirmation dialogue, or allow checkout','noblock|confirmation|block','Choice'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('DisplayMultiPlaceHold','1','Display the ability to place multiple holds or not','','YesNo'); >+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('enableMARCdocs',1,'If ON, enables display of MARC documentation links',NULL,'YesNo'); >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index ac272ce..39d3218 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -3915,6 +3915,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > SetVersion ($DBversion); > } > >+$DBversion = 'XXX'; >+if (C4::Context->preference("Version") < TransformToNum($DBversion)) { >+ $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('enableMARCdocs',1,'If Yes, enables display of MARC documentation links',NULL,'YesNo')"); >+ print "Upgrade to $DBversion done (Add enableMARCdocs syspref)\n"; >+ SetVersion ($DBversion); >+} >+ > > > =head1 FUNCTIONS >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref >index d809022..0a51ced 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref >@@ -100,6 +100,12 @@ Cataloging: > economical: Do > - collapse repeated tags of the same type into one tag entry on the display. > - >+ - pref: enableMARCdocs >+ choices: >+ yes: Display >+ no: "Don't display" >+ - "MARC documentation links" >+ - > - By default, display biblio records in > - pref: IntranetBiblioDefaultView > choices: >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl >index 0fa4dc1..79c55ae 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl >@@ -67,6 +67,7 @@ function PopupZ3950() { > } > } > >+<!-- TMPL_IF NAME="enableMARCdocs" --> > function PopupMARCFieldDoc(field, fieldnumber) { > <!-- TMPL_IF NAME="MARC21" --> > _MARC21FieldDoc(field); >@@ -101,6 +102,7 @@ function _UNIMARCFieldDoc(field,fieldnumber) { > window.open("http://archive.ifla.org/VI/3/p1996-1/uni9.htm"); > } > } >+<!-- /TMPL_IF --> > > /** > * check if mandatory subfields are written >@@ -784,8 +786,11 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ? > <!-- TMPL_IF NAME="advancedMARCEditor" --> > <a href="#" tabindex="1" class="tagnum" title="<!-- TMPL_VAR NAME="tag_lib"--> - Click to Expand this Tag" onclick="ExpandField('tag_<!-- TMPL_VAR NAME="tag"-->_<!-- TMPL_VAR NAME='index' --><!-- TMPL_VAR NAME="random" -->'); return false;"><!-- TMPL_VAR NAME="tag" --></a> > <!-- TMPL_ELSE --> >- <span class="tagnum" title="<!-- TMPL_VAR NAME="tag_lib" -->"><!-- TMPL_VAR NAME="tag" --><a >- onclick="PopupMARCFieldDoc(<!-- TMPL_VAR NAME="tag" -->, <!-- TMPL_VAR NAME="number" -->); return false;"> ?</a></span> >+ <span class="tagnum" title="<!-- TMPL_VAR NAME="tag_lib" -->"><!-- TMPL_VAR NAME="tag" --> >+ <!-- TMPL_IF NAME="enableMARCdocs" --><a >+ onclick="PopupMARCFieldDoc(<!-- TMPL_VAR NAME="tag" -->, <!-- TMPL_VAR NAME="number" -->); return false;"> ?</a> >+ <!-- /TMPL_IF --> >+ </span> > <!-- /TMPL_IF --> > <!-- TMPL_IF NAME="fixedfield" --> > <input tabindex="1" class="indicator flat" type="text" style="display:none;" name="tag_<!-- TMPL_VAR NAME="tag" -->_indicator1_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->" size="1" maxlength="1" value="<!-- TMPL_VAR NAME="indicator1" -->" /> >-- >1.7.1 >
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 5546
:
2911
|
2922
|
3230
|
3275
|
3623