Bugzilla – Attachment 46785 Details for
Bug 13618
Add additional template filter methods and a filter presence test to Koha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13618: Fix for edit biblios and items
Bug-13618-Fix-for-edit-biblios-and-items.patch (text/plain), 22.44 KB, created by
Jonathan Druart
on 2016-01-18 11:20:17 UTC
(
hide
)
Description:
Bug 13618: Fix for edit biblios and items
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-01-18 11:20:17 UTC
Size:
22.44 KB
patch
obsolete
>From fe80dc9ddcdc36c2f2ea9b94c2f3887ad7b1b64b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 1 Dec 2015 12:56:56 +0000 >Subject: [PATCH] Bug 13618: Fix for edit biblios and items > >On editing biblios or items, the marc_lib, marc_value and javascript >values are often populated with html code which needs to be displayed >raw. > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >--- > .../prog/en/modules/acqui/addorderiso2709.tt | 4 ++-- > .../prog/en/modules/authorities/authorities.tt | 8 ++++---- > .../prog/en/modules/cataloguing/addbiblio.tt | 8 ++++---- > .../prog/en/modules/cataloguing/additem.tt | 6 +++--- > .../prog/en/modules/serials/serials-edit.tt | 12 ++++++------ > .../prog/en/modules/services/itemrecorddisplay.tt | 6 +++--- > .../prog/en/modules/tools/batchMod-edit.tt | 4 ++-- > .../bootstrap/en/modules/opac-MARCdetail.tt | 20 ++++++++++---------- > .../bootstrap/en/modules/opac-auth-MARCdetail.tt | 2 +- > 9 files changed, 35 insertions(+), 35 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >index 31822d9..7a3e291 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >@@ -308,9 +308,9 @@ > [% FOREACH iteminformatio IN item.iteminformation %]<li style="[% iteminformatio.hidden %];"> > <div class="subfield_line" id="subfield[% iteminformatio.serialid %][% iteminformatio.countitems %][% iteminformatio.subfield %][% iteminformatio.random %]"> > [% IF (iteminformatio.mandatory) %] >- <label class="required">[% iteminformatio.subfield %] - [% iteminformatio.marc_lib %]</label> >+ <label class="required">[% iteminformatio.subfield %] - [% iteminformatio.marc_lib.raw %]</label> > [% ELSE %] >- <label>[% iteminformatio.subfield %] - [% iteminformatio.marc_lib %]</label> >+ <label>[% iteminformatio.subfield %] - [% iteminformatio.marc_lib.raw %]</label> > [% END %] > > [% IF ( iteminformatio.marc_value.type == 'select' ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >index 7faf688..92cceed 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >@@ -63,7 +63,7 @@ function AreMandatoriesNotOk(){ > [% FOREACH subfield_loo IN innerloo.subfield_loop %] > [% IF ( subfield_loo.mandatory ) %]mandatories.push("[% subfield_loo.id %]"); > tab.push("[% BIG_LOO.number %]"); >- label.push("[% subfield_loo.marc_lib |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]"); >+ label.push("[% subfield_loo.marc_lib.raw |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]"); > [% END %] > [% END %] > [% END %] >@@ -319,7 +319,7 @@ function confirmnotdup(redirect){ > <img class="buttonUp" src="[% interface %]/[% theme %]/img/up.png" onclick="upSubfield('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]')" alt="Move Up" title="Move Up" /> > [% END %] > <input type="text" >- title="[% subfield_loo.marc_lib %]" >+ title="[% subfield_loo.marc_lib.raw %]" > style=" [% IF ( subfield_loo.fixedfield ) %]display:none; [% END %]border:0;" > name="tag_[% subfield_loo.tag %]_code_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" > value="[% subfield_loo.subfield %]" >@@ -336,7 +336,7 @@ function confirmnotdup(redirect){ > > [% UNLESS advancedMARCEditor %] > [% IF ( subfield_loo.mandatory ) %]<span class="subfield subfield_mandatory">[% ELSE %]<span class="subfield">[% END %] >- [% subfield_loo.marc_lib %] >+ [% subfield_loo.marc_lib.raw %] > [% IF ( subfield_loo.mandatory ) %]<span class="mandatory_marker" title="This field is mandatory">*</span>[% END %] > </span> > </label> >@@ -363,7 +363,7 @@ function confirmnotdup(redirect){ > [% ELSE %] > <a href="#" id="buttonDot_[% mv.id %]" class="buttonDot tag_editor" title="Tag editor">...</a> > [% END %] >- [% mv.javascript %] >+ [% mv.javascript.raw %] > [% ELSIF ( mv.type == 'text' ) %] > <input type="text" id="[%- mv.id -%]" name="[%- mv.name -%]" value="[%- mv.value -%]" class="input_marceditor" tabindex="1" size="67" maxlength="[%- mv.maxlength -%]" /> > [% ELSIF ( mv.type == 'textarea' ) %] >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 a29c12c..4e0ac0c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >@@ -253,7 +253,7 @@ function AreMandatoriesNotOk(){ > [% FOREACH subfield_loo IN innerloo.subfield_loop %] > [% IF ( subfield_loo.mandatory ) %]mandatories.push("[% subfield_loo.id %]"); > tab.push("[% BIG_LOO.number %]"); >- label.push("[% subfield_loo.marc_lib %]"); >+ label.push("[% subfield_loo.marc_lib.raw %]"); > [% END %] > [% END %] > [% END %] >@@ -619,7 +619,7 @@ function Changefwk(FwkList) { > <img class="buttonUp" src="[% interface %]/[% theme %]/img/up.png" onclick="upSubfield('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]')" alt="Move Up" title="Move Up" /> > [% END %] > <input type="text" >- title="[% subfield_loo.marc_lib %]" >+ title="[% subfield_loo.marc_lib.raw %]" > style=" [% IF ( subfield_loo.fixedfield ) %]display:none; [% END %]border:0;" > name="tag_[% subfield_loo.tag %]_code_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" > value="[% subfield_loo.subfield %]" >@@ -631,7 +631,7 @@ function Changefwk(FwkList) { > > [% UNLESS advancedMARCEditor %] > [% IF ( subfield_loo.mandatory ) %]<span class="subfield subfield_mandatory">[% ELSE %]<span class="subfield">[% END %] >- [% subfield_loo.marc_lib %] >+ [% subfield_loo.marc_lib.raw %] > [% IF ( subfield_loo.mandatory ) %]<span class="mandatory_marker" title="This field is mandatory">*</span>[% END %] > </span> > </label> >@@ -656,7 +656,7 @@ function Changefwk(FwkList) { > <a href="#" id="buttonDot_[% mv.id %]" class="buttonDot tag_editor framework_plugin" tabindex="1" title="Tag editor">Tag editor</a> > [% END %] > </span> >- [% mv.javascript %] >+ [% mv.javascript.raw %] > [% ELSIF ( mv.type == 'hidden' ) %] > <input tabindex="1" type="hidden" id="[%- mv.id -%]" name="[%- mv.name -%]" size="[%- mv.size -%]" maxlength="[%- mv.maxlength -%]" value="[%- mv.value -%]" /> > [% ELSIF ( mv.type == 'textarea' ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >index d7c1913..01137e1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >@@ -225,9 +225,9 @@ function confirm_deletion() { > [% FOREACH ite IN item %] > <li><div class="subfield_line" style="[% ite.visibility %]" id="subfield[% ite.tag %][% ite.subfield %][% ite.random %]"> > [% IF ( ite.mandatory ) %] >- <label class="required">[% ite.subfield %] - [% ite.marc_lib %]</label> >+ <label class="required">[% ite.subfield %] - [% ite.marc_lib.raw %]</label> > [% ELSE %] >- <label>[% ite.subfield %] - [% ite.marc_lib %]</label> >+ <label>[% ite.subfield %] - [% ite.marc_lib.raw %]</label> > [% END %] > > [% SET mv = ite.marc_value %] >@@ -258,7 +258,7 @@ function confirm_deletion() { > [% ELSE %] > <a href="#" id="buttonDot_[%- mv.id -%]" class="[%- mv.class -%]" title="Tag editor">...</a> > [% END %] >- [%- mv.javascript -%] >+ [%- mv.javascript.raw -%] > [% ELSIF ( mv.type == 'text' ) %] > <input type="text" id="[%- mv.id -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength -%]" value="[%- mv.value -%]" /> > [% ELSIF ( mv.type == 'textarea' ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >index 8a4081a..d4a7708 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >@@ -233,9 +233,9 @@ $(document).ready(function() { > <ol>[% FOREACH iteminformatio IN item.iteminformation %]<li> > <div class="subfield_line" style="[% iteminformatio.hidden %]" id="subfield[% item.serialid %][% item.countitems %][% iteminformatio.subfield %][% iteminformatio.random %]"> > [% IF (iteminformatio.mandatory) %] >- <label class="required">[% iteminformatio.subfield %] - [% iteminformatio.marc_lib %]</label> >+ <label class="required">[% iteminformatio.subfield %] - [% iteminformatio.marc_lib.raw %]</label> > [% ELSE %] >- <label>[% iteminformatio.subfield %] - [% iteminformatio.marc_lib %]</label> >+ <label>[% iteminformatio.subfield %] - [% iteminformatio.marc_lib.raw %]</label> > [% END %] > [% IF ( iteminformatio.marc_value.type == 'select' ) %] > <select name="field_value" size="1"> >@@ -248,7 +248,7 @@ $(document).ready(function() { > [% END %] > </select> > [% ELSE %] >- [% iteminformatio.marc_value %] >+ [% iteminformatio.marc_value.raw %] > [% END %] > <input type="hidden" name="itemid" value="[% item.itemid %]" /> > <input type="hidden" name="kohafield" value="[% iteminformatio.kohafield %]" /> >@@ -379,9 +379,9 @@ $(document).ready(function() { > <ol>[% FOREACH iteminformatio IN newserialloo.iteminformation %]<li> > <div class="subfield_line" style="[% iteminformatio.hidden %]" id="subfield[% newserialloo.serialid %][% newserialloo.countitems %][% iteminformatio.subfield %][% iteminformatio.random %]"> > [% IF (iteminformatio.mandatory) %] >- <label class="required">[% iteminformatio.subfield %] - [% iteminformatio.marc_lib %]</label> >+ <label class="required">[% iteminformatio.subfield %] - [% iteminformatio.marc_lib.raw %]</label> > [% ELSE %] >- <label>[% iteminformatio.subfield %] - [% iteminformatio.marc_lib %]</label> >+ <label>[% iteminformatio.subfield %] - [% iteminformatio.marc_lib.raw %]</label> > [% END %] > [% IF ( iteminformatio.marc_value.type == 'select' ) %] > <select name="field_value" size="1"> >@@ -394,7 +394,7 @@ $(document).ready(function() { > [% END %] > </select> > [% ELSE %] >- [% iteminformatio.marc_value %] >+ [% iteminformatio.marc_value.raw %] > [% END %] > <input type="hidden" name="itemid" value="[% newserialloo.itemid %]" /> > <input type="hidden" name="kohafield" value="[% iteminformatio.kohafield %]" /> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/services/itemrecorddisplay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/services/itemrecorddisplay.tt >index d55268a..d738b06 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/services/itemrecorddisplay.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/services/itemrecorddisplay.tt >@@ -7,9 +7,9 @@ > [% END %] > <div class="subfield_line" id="subfield[% iteminfo.serialid %][% iteminfo.countitems %][% iteminfo.subfield %][% iteminfo.random %]"> > [% IF (iteminfo.mandatory) %] >- <label class="required">[% iteminfo.subfield %] - [% iteminfo.marc_lib %]</label> >+ <label class="required">[% iteminfo.subfield %] - [% iteminfo.marc_lib.raw %]</label> > [% ELSE %] >- <label>[% iteminfo.subfield %] - [% iteminfo.marc_lib %]</label> >+ <label>[% iteminfo.subfield %] - [% iteminfo.marc_lib.raw %]</label> > [% END %] > [% IF ( iteminfo.marc_value.type == 'select' ) %] > <select name="field_value" size="1"> >@@ -22,7 +22,7 @@ > [% END %] > </select> > [% ELSE %] >- [% iteminfo.marc_value %] >+ [% iteminfo.marc_value.raw %] > [% END %] > <input type="hidden" name="itemid" value="1" /> > <input type="hidden" name="kohafield" value="[% iteminfo.kohafield %]" /> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt >index 9217603..329107a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt >@@ -174,7 +174,7 @@ $(document).ready(function(){ > <label for="tag_[% ite.tag %]_subfield_[% ite.subfield %]_[% ite.random %]"> > [% END %] > [% ite.subfield %] - >- [% ite.marc_lib %] >+ [% ite.marc_lib.raw %] > </label> > [% UNLESS ( ite.mandatory ) %]<input type="checkbox" id="row[% ite.tag %][% ite.subfield %][% ite.random %]" title="Check to delete subfield [% ite.subfield %]" name="disable_input" value="[% ite.subfield %]" />[% ELSE %]<span class="required">Required</span>[% END %] > >@@ -199,7 +199,7 @@ $(document).ready(function(){ > [% ELSE %] > <a href="#" id="buttonDot_[% mv.id %]" class="buttonDot" title="Tag editor">...</a> > [% END %] >- [% mv.javascript %] >+ [% mv.javascript.raw %] > [% ELSIF ( mv.type == 'text' ) %] > <input type="text" tabindex="1" id="[%- mv.id -%]" name="field_value" class="input_marceditor" size="50" maxlength="255" value="[%- mv.value -%]" /> > [% ELSIF ( mv.type == 'hidden' ) %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt >index f4ca095..a34310d 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt >@@ -37,7 +37,7 @@ > <tr><th colspan="2">[% tab0X.tag %]</th></tr> > [% FOREACH subfiel IN tab0X.subfield %] > <tr> >- <td>[% subfiel.marc_lib %]</td> >+ <td>[% subfiel.marc_lib.raw %]</td> > <td>[% subfiel.marc_value %]</td> > </tr> > [% END %] >@@ -46,7 +46,7 @@ > <tr><th colspan="2">[% tab1X.tag %]</th></tr> > [% FOREACH subfiel IN tab1X.subfield %] > <tr> >- <td >[% subfiel.marc_lib %]</td> >+ <td >[% subfiel.marc_lib.raw %]</td> > <td >[% subfiel.marc_value %]</td> > </tr> > [% END %] >@@ -56,7 +56,7 @@ > <tr><th colspan="2">[% tab2X.tag %]</th></tr> > [% FOREACH subfiel IN tab2X.subfield %] > <tr> >- <td>[% subfiel.marc_lib %]</td> >+ <td>[% subfiel.marc_lib.raw %]</td> > <td>[% subfiel.marc_value %]</td> > </tr> > [% END %] >@@ -66,7 +66,7 @@ > <tr><th colspan="2">[% tab3X.tag %]</th></tr> > [% FOREACH subfiel IN tab3X.subfield %] > <tr> >- <td>[% subfiel.marc_lib %]</td> >+ <td>[% subfiel.marc_lib.raw %]</td> > <td>[% subfiel.marc_value %]</td> > </tr> > [% END %] >@@ -76,7 +76,7 @@ > <tr><th colspan="2" >[% tab4X.tag %]</th></tr> > [% FOREACH subfiel IN tab4X.subfield %] > <tr> >- <td>[% subfiel.marc_lib %]</td> >+ <td>[% subfiel.marc_lib.raw %]</td> > <td>[% subfiel.marc_value %]</td> > </tr> > [% END %] >@@ -86,7 +86,7 @@ > <tr><th colspan="2">[% tab5X.tag %]</th></tr> > [% FOREACH subfiel IN tab5X.subfield %] > <tr> >- <td>[% subfiel.marc_lib %]</td> >+ <td>[% subfiel.marc_lib.raw %]</td> > <td>[% subfiel.marc_value %]</td> > </tr> > [% END %] >@@ -96,7 +96,7 @@ > <tr><th colspan="2">[% tab6X.tag %]</th></tr> > [% FOREACH subfiel IN tab6X.subfield %] > <tr> >- <td>[% subfiel.marc_lib %]</td> >+ <td>[% subfiel.marc_lib.raw %]</td> > <td>[% subfiel.marc_value %]</td> > </tr> > [% END %] >@@ -106,7 +106,7 @@ > <tr><th colspan="2">[% tab7X.tag %]</th></tr> > [% FOREACH subfiel IN tab7X.subfield %] > <tr> >- <td>[% subfiel.marc_lib %]</td> >+ <td>[% subfiel.marc_lib.raw %]</td> > <td>[% subfiel.marc_value %]</td> > </tr> > [% END %] >@@ -116,7 +116,7 @@ > <tr><th colspan="2">[% tab8X.tag %]</th></tr> > [% FOREACH subfiel IN tab8X.subfield %] > <tr> >- <td>[% subfiel.marc_lib %]</td> >+ <td>[% subfiel.marc_lib.raw %]</td> > <td>[% subfiel.marc_value %]</td> > </tr> > [% END %] >@@ -126,7 +126,7 @@ > <tr><th colspan="2">[% tab9X.tag %]</th></tr> > [% FOREACH subfiel IN tab9X.subfield %] > <tr> >- <td>[% subfiel.marc_lib %]</td> >+ <td>[% subfiel.marc_lib.raw %]</td> > <td>[% subfiel.marc_value %]</td> > </tr> > [% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-MARCdetail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-MARCdetail.tt >index 7aded0b..6de7978 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-MARCdetail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-MARCdetail.tt >@@ -49,7 +49,7 @@ > <p><b>[% Tag0X.tag %]</b></p> > <ul> > [% FOREACH subfiel IN Tag0X.subfield %] >- <li><b>[% subfiel.marc_lib %]:</b> >+ <li><b>[% subfiel.marc_lib.raw %]:</b> > [% IF subfiel.isurl %]<a href="[% subfiel.marc_value %]">[% subfiel.marc_value %]</a> > [% ELSE %][% subfiel.marc_value %][% END %]</li> > [% END %] >-- >2.1.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 13618
:
35488
|
35516
|
40480
|
40481
|
40482
|
40483
|
40484
|
40485
|
40487
|
41346
|
41347
|
41348
|
41349
|
41350
|
41351
|
41352
|
41353
|
41354
|
41355
|
41746
|
41747
|
41776
|
42009
|
42054
|
42072
|
42073
|
42075
|
42078
|
42079
|
42087
|
42090
|
42091
|
42092
|
42093
|
42094
|
42095
|
42096
|
42097
|
45141
|
45784
|
45785
|
45788
|
46767
|
46768
|
46769
|
46770
|
46771
|
46772
|
46773
|
46774
|
46775
|
46776
|
46777
|
46778
|
46779
|
46780
|
46781
|
46782
|
46783
|
46784
|
46785
|
46786
|
46787
|
46788
|
46789
|
46790
|
46791
|
46792
|
46793
|
46794
|
46795
|
46796
|
46797
|
46798
|
46799
|
46800
|
46801
|
46802
|
46803
|
46804
|
46805
|
46806
|
46807
|
46808
|
46809
|
46810
|
46811
|
46812
|
46813
|
46814
|
46815
|
46816
|
46817
|
46818
|
46819
|
46820
|
46821
|
46822
|
47425
|
47426
|
47427
|
47428
|
47429
|
47430
|
47431
|
47432
|
47433
|
47434
|
47435
|
47436
|
47437
|
47438
|
47439
|
47440
|
47441
|
47442
|
47443
|
47444
|
47445
|
47446
|
47447
|
47448
|
47449
|
47450
|
47451
|
47452
|
47631
|
59983
|
59984
|
59987
|
77804
|
77805
|
77806
|
77807
|
77808
|
77809
|
77997
|
77998
|
78158
|
78274
|
78415
|
79404
|
79818
|
81183
|
83479
|
83480