Bugzilla – Attachment 15490 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.39 KB, created by
Jonathan Druart
on 2013-02-18 08:41:05 UTC
(
hide
)
Description:
Bug 9366: On cataloguing each user can easily display tags or not
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-02-18 08:41:05 UTC
Size:
8.39 KB
patch
obsolete
>From 69bc0f3dd81397ce2609159a6f86d2ad8c874175 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 | 63 ++++++++------------ > 1 file changed, 26 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 415c65f..5489a9e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >@@ -22,6 +22,23 @@ > { path: "/", expires: 365 }); > } > >+ [% 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(); >+ > }); > > $('#header_search').tabs().bind('show.ui-tabs', function(e, ui) { $('#header_search > div:not(.ui-tabs-hide)').find('input').eq(0).focus(); }); >@@ -282,8 +299,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 ) %] >@@ -330,7 +347,6 @@ function Changefwk(FwkList) { > $("#z3950searchc").empty(); > $("#savebutton").empty(); > yuiToolbar(); >- > $("#marcDocsSelect").click(function(){ > if($(this).attr("checked")){ > showMARCdocLinks(); >@@ -416,6 +432,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" /> > </li> > [% END %] > </ul> >@@ -443,13 +461,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" >@@ -484,34 +500,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 %] >@@ -525,14 +520,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" /> >@@ -549,12 +543,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