Bugzilla – Attachment 16107 Details for
Bug 9366
On cataloguing each user can easily display tags or not
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9366: On cataloguing each user can easily display tags or not
Bug-9366-On-cataloguing-each-user-can-easily-displ.patch (text/plain), 8.05 KB, created by
Jonathan Druart
on 2013-03-14 08:39:22 UTC
(
hide
)
Description:
Bug 9366: On cataloguing each user can easily display tags or not
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-03-14 08:39:22 UTC
Size:
8.05 KB
patch
obsolete
>From 3b5f0a301523c6e1231f7e519f55c7a9663c4284 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Tue, 8 Jan 2013 14:49:24 +0100 >Subject: [PATCH] Bug 9366: On cataloguing each user can easily display tags > or not > >If the syspref hide_marc is set to "don't display", tags are not shown >by default. >This patch adds a checkbox to hide/show tags directly on the >cataloguing page. > >Test plan: >Enable/disable the sysprefs hide_marc and advancedMARCeditor in order to >check if the display is according with what the user want. > >Bonus: >This patch removes the link "Show MARCtag documentation links" if the >syspref advancedMARCeditor is enabled. > >Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> >All tests pass. >--- > .../prog/en/modules/cataloguing/addbiblio.tt | 65 +++++++++----------- > 1 file changed, 28 insertions(+), 37 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >index 7e439bf..1ea4fdb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >@@ -53,7 +53,25 @@ > redirect("items"); > return false; > }); >- }); >+ >+ [% IF hide_marc %] >+ var hide = false; >+ [% ELSE %] >+ var hide = true; >+ [% END %] >+ $("#hide_tags").change( function(){ >+ if ( $(this).is(':checked') ) { >+ $(".tagnum").hide(); >+ $(".subfieldcode").hide(); >+ } else { >+ $(".tagnum").show(); >+ $(".subfieldcode").show(); >+ } >+ } ); >+ $("#hide_tags").attr("checked", !hide) >+ $("#hide_tags").change(); >+ >+ }); > > function redirect(dest){ > $("#redirect").attr("value",dest); >@@ -310,8 +328,8 @@ function Changefwk(FwkList) { > [% END %] > </h1> > >-[% IF marcflavour != 'NORMARC' %] >-<div><input type="checkbox" name="marcDocsSelect" id="marcDocsSelect" checked="true" /> Show MARC tag documentation links<br/></div> >+[% IF marcflavour != 'NORMARC' AND NOT advancedMARCEditor %] >+<div><label><input type="checkbox" name="marcDocsSelect" id="marcDocsSelect" checked="true" /> Show MARC tag documentation links</label><br/></div> > [% END %] > > [% UNLESS ( number ) %] >@@ -385,6 +403,8 @@ function Changefwk(FwkList) { > </option> > [% END %] > </select> >+ <label><input id="hide_tags" type="checkbox" class="vertical-align:middle;"/>Hide tags</label> >+ <input type="hidden" name="op" value="addbiblio" /> > </div> > [% END %] > </div> >@@ -411,13 +431,11 @@ function Changefwk(FwkList) { > [% IF ( innerloo.tag ) %] > <div class="tag" id="tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]"> > <div class="tag_title" id="div_indicator_tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]"> >- [% UNLESS hide_marc %] > [% IF advancedMARCEditor %] > <a href="#" tabindex="1" class="tagnum" title="[% innerloo.tag_lib %] - Click to Expand this Tag" onclick="ExpandField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]'); return false;">[% innerloo.tag %]</a> > [% ELSE %] >- <span class="tagnum" title="[% innerloo.tag_lib %]">[% innerloo.tag %] >+ <span class="tagnum" title="[% innerloo.tag_lib %]">[% innerloo.tag %]</span> > [% IF marcflavour != 'NORMARC' %]<a class="marcdocs" onclick="PopupMARCFieldDoc('[% innerloo.tag %]', [% BIG_LOO.number %]); return false;"> ?</a>[% END %] >- </span> > [% END %] > [% IF ( innerloo.fixedfield ) %] > <input type="text" >@@ -452,34 +470,13 @@ function Changefwk(FwkList) { > maxlength="1" > value="[% innerloo.indicator2 %]" /> > [% END %] - >- [% ELSE %] >- [% IF ( innerloo.fixedfield ) %] >- <input type="hidden" >- tabindex="1" >- name="tag_[% innerloo.tag %]_indicator1_[% innerloo.index %][% innerloo.random %]" >- value="[% innerloo.indicator1 %]" /> >- <input type="hidden" >- tabindex="1" >- name="tag_[% innerloo.tag %]_indicator2_[% innerloo.index %][% innerloo.random %]" >- value="[% innerloo.indicator2 %]" /> >- [% ELSE %] >- <input type="hidden" >- tabindex="1" >- name="tag_[% innerloo.tag %]_indicator1_[% innerloo.index %][% innerloo.random %]" >- value="[% innerloo.indicator1 %]" /> >- <input type="hidden" >- tabindex="1" >- name="tag_[% innerloo.tag %]_indicator2_[% innerloo.index %][% innerloo.random %]" >- value="[% innerloo.indicator2 %]" /> >- [% END %] >- [% END %] > > [% UNLESS advancedMARCEditor %] > <a href="#" tabindex="1" class="expandfield" onclick="ExpandField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]'); return false;" title="Click to Expand this Tag">[% innerloo.tag_lib %]</a> > [% END %] > <span class="field_controls"> > [% IF ( innerloo.repeatable ) %] >- <a href="#" tabindex="1" class="buttonPlus" onclick="CloneField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]','[% hide_marc %]','[% advancedMARCEditor %]'); return false;" title="Repeat this Tag"> >+ <a href="#" tabindex="1" class="buttonPlus" onclick="CloneField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]','0','[% advancedMARCEditor %]'); return false;" title="Repeat this Tag"> > <img src="/intranet-tmpl/prog/img/repeat-tag.png" alt="Repeat this Tag" /> > </a> > [% END %] >@@ -493,14 +490,13 @@ function Changefwk(FwkList) { > [% FOREACH subfield_loo IN innerloo.subfield_loop %] > <!-- One line on the marc editor --> > <div class="subfield_line" style="[% subfield_loo.visibility %]" id="subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]"> >- >+ > [% UNLESS advancedMARCEditor %] > [% IF ( subfield_loo.fixedfield ) %]<label for="tag_[% subfield_loo.tag %]_subfield_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" style="display:none;" class="labelsubfield"> > [% ELSE %]<label for="tag_[% subfield_loo.tag %]_subfield_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" class="labelsubfield"> > [% END %] > [% END %] >- >- [% UNLESS hide_marc %] >+ > <span class="subfieldcode"> > [% IF ( subfield_loo.fixedfield ) %] > <img class="buttonUp" style="display:none;" src="/intranet-tmpl/prog/img/up.png" onclick="upSubfield('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]')" alt="Move Up" title="Move Up" /> >@@ -517,12 +513,7 @@ function Changefwk(FwkList) { > class="flat" > tabindex="0" /> > </span> >- [% ELSE %] >- <input type="hidden" >- name="tag_[% subfield_loo.tag %]_code_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" >- value="[% subfield_loo.subfield %]" /> >- [% END %] >- >+ > [% UNLESS advancedMARCEditor %] > [% IF ( subfield_loo.mandatory ) %]<span class="subfield subfield_mandatory">[% ELSE %]<span class="subfield">[% END %] > [% subfield_loo.marc_lib_plain %] >-- >1.7.10.4
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 9366
:
14469
|
14470
|
14526
|
14527
|
15490
|
15491
|
16107
|
16108
|
16109
|
16978
|
16979
|
18868
|
18869
|
25821
|
26016
|
26327