Bugzilla – Attachment 30180 Details for
Bug 12613
Remove CGI::scrolling_list from koha2marclinks.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 12613: Remove CGI::scrolling_list from koha2marclinks.pl
PASSED-QA-Bug-12613-Remove-CGIscrollinglist-from-k.patch (text/plain), 9.66 KB, created by
Katrin Fischer
on 2014-07-28 06:09:12 UTC
(
hide
)
Description:
[PASSED QA] Bug 12613: Remove CGI::scrolling_list from koha2marclinks.pl
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-07-28 06:09:12 UTC
Size:
9.66 KB
patch
obsolete
>From d02accba32c960d018c26f27270ab1f7bc5d87c5 Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Sat, 19 Jul 2014 16:44:11 -0300 >Subject: [PATCH] [PASSED QA] Bug 12613: Remove CGI::scrolling_list from > koha2marclinks.pl > >This patch removes all (2) instances from koha2marclinks.pl. >Also changes dropdowns width on mapping editor, from an >ugly ragged right to a fixed width view. > >To test: >1. Apply the patch >2. Go to Administration > Koha to MARC mapping >3. Pulldown in this view has been replaced, check >for regressions: change table type and press Ok, >verify you get Koha fields and tag/subfield appropriate >for each table. >4. Now press 'Edit' on any field, go into mapping editor >5. Check that all pulldowns show tag/subtags relevant >for each group ( 000s ... 900s ) >6. Check that current mapping is displayed correctly >7. Check for regressions: unmap, remap, press Ok, >verify, change again. >8. If you can, check display of mapping editor on several >browsers, just in case. > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >I have tested with Firefox/Iceweasel only. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Passes all tests and QA script. >Also tested in Chromium. >--- > admin/koha2marclinks.pl | 28 ++--- > .../prog/en/modules/admin/koha2marclinks.tt | 137 ++++++--------------- > 2 files changed, 46 insertions(+), 119 deletions(-) > >diff --git a/admin/koha2marclinks.pl b/admin/koha2marclinks.pl >index 7ea4f20..cb30a24 100755 >--- a/admin/koha2marclinks.pl >+++ b/admin/koha2marclinks.pl >@@ -85,14 +85,10 @@ if ( $op eq 'add_form' ) { > { > push @marcarray, "$field $tagsubfield - $liblibrarian"; > } >- my $marclist = CGI::scrolling_list( >- -name => 'marc', >- -values => \@marcarray, >- -default => >- "$defaulttagfield $defaulttagsubfield - $defaultliblibrarian", >- -size => 1, >- -multiple => 0, >- ); >+ my $marclist = { >+ values => \@marcarray, >+ default => "$defaulttagfield $defaulttagsubfield - $defaultliblibrarian", >+ }; > $template->param( "marclist$i" => $marclist ); > } > $template->param( >@@ -154,19 +150,13 @@ q|select tagfield,tagsubfield,liblibrarian,kohafield from marc_subfield_structur > "$script_name?op=add_form&tablename=$tablename&kohafield=$field"; > push( @loop_data, \%row_data ); > } >+ my $tablenames = { >+ values => [ 'biblio', 'biblioitems', 'items' ], >+ default => $tablename, >+ }; > $template->param( > loop => \@loop_data, >- tablename => CGI::scrolling_list( >- -name => 'tablename', >- -values => [ >- 'biblio', >- 'biblioitems', >- 'items', >- ], >- -default => $tablename, >- -size => 1, >- -multiple => 0 >- ) >+ tablename => $tablenames, > ); > } #---- END $OP eq DEFAULT > output_html_with_http_headers $input, $cookie, $template->output; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt >index aa40731..aad10bd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt >@@ -28,105 +28,31 @@ > [% IF ( add_form ) %] > <h1>Connect [% tablename %].[% kohafield %] to a MARC subfield</h1> > <p>Choose and validate 1 MARC subfield for <strong>[% tablename %].[% kohafield %]</strong>. That will modify <b>all frameworks</b> which is usually what you need, but you have been warned.</p> >- <fieldset class="rows"><ol> >-<li><form action="[% script_name %]" method="post"> <input type="hidden" name="op" value="add_validate" /> >- <input type="hidden" name="tablename" value="[% tablename %]" /> >- <input type="hidden" name="kohafield" value="[% kohafield %]" /> >- <label>000s</label> >- [% marclist0 %] <input type="submit" value="OK" /></form> >- >- </li> >- <li> >- >- <form action="[% script_name %]" method="post"> >- <input type="hidden" name="op" value="add_validate" /> >- <input type="hidden" name="tablename" value="[% tablename %]" /> >- <label>100s</label> >- [% marclist1 %] >- <input type="hidden" name="kohafield" value="[% kohafield %]" /><input type="submit" value="OK" /> </form> >- >- </li> >- <li> >- >- >- <form action="[% script_name %]" method="post"><input type="hidden" name="op" value="add_validate" /> >- <input type="hidden" name="tablename" value="[% tablename %]" /> >- <input type="hidden" name="kohafield" value="[% kohafield %]" /> >- <label>200s</label> >- [% marclist2 %] <input type="submit" value="OK" /></form> >- >- </li> >- <li> >- >- <form action="[% script_name %]" method="post"> >- <input type="hidden" name="op" value="add_validate" /> >- <input type="hidden" name="tablename" value="[% tablename %]" /> >- <input type="hidden" name="kohafield" value="[% kohafield %]" /> >- <label>300s</label> >- [% marclist3 %] <input type="submit" value="OK" /> </form> >- >- </li> >- <li> >- >- <form action="[% script_name %]" method="post"> >- <input type="hidden" name="op" value="add_validate" /> >- <input type="hidden" name="tablename" value="[% tablename %]" /> >- <input type="hidden" name="kohafield" value="[% kohafield %]" /> >- <label>400s</label> >- [% marclist4 %] <input type="submit" value="OK" /></form> >- >- </li> >- <li> >- >- <form action="[% script_name %]" method="post"> >- <input type="hidden" name="op" value="add_validate" /> >- <input type="hidden" name="tablename" value="[% tablename %]" /> >- <input type="hidden" name="kohafield" value="[% kohafield %]" /> >- <label>500s</label> >- [% marclist5 %] <input type="submit" value="OK" /></form> >- >- </li> >- <li> >- >- <form action="[% script_name %]" method="post"> >- <input type="hidden" name="op" value="add_validate" /> >- <input type="hidden" name="tablename" value="[% tablename %]" /> >- <input type="hidden" name="kohafield" value="[% kohafield %]" /> >- <label>600s</label> >- [% marclist6 %] <input type="submit" value="OK" /></form> >- >- </li> >- <li> >- >- <form action="[% script_name %]" method="post"> >- <input type="hidden" name="op" value="add_validate" /> >- <input type="hidden" name="tablename" value="[% tablename %]" /> >- <input type="hidden" name="kohafield" value="[% kohafield %]" /> >- <label>700s</label> >- [% marclist7 %] <input type="submit" value="OK" /></form> >- >- </li> >- <li> >- >- <form action="[% script_name %]" method="post"> >- <input type="hidden" name="op" value="add_validate" /> >- <input type="hidden" name="tablename" value="[% tablename %]" /> >- <input type="hidden" name="kohafield" value="[% kohafield %]" /> >- <label>800s</label> >- [% marclist8 %] <input type="submit" value="OK" /></form> >- >- </li> >- <li> >- >- <form action="[% script_name %]" method="post"> >- <input type="hidden" name="op" value="add_validate" /> >- <input type="hidden" name="tablename" value="[% tablename %]" /> >- <input type="hidden" name="kohafield" value="[% kohafield %]" /> >- <label>900s</label> >- [% marclist9 %] <input type="submit" value="OK" /></form> >- >- </li> >- </ol></fieldset> >+ <fieldset class="rows"> >+ <ol> >+ [% FOR i IN [ 0 .. 9 ] %] >+ [% marclist = "marclist$i" %] >+ <li> >+ <form action="[% script_name %]" method="post"> >+ <input type="hidden" name="op" value="add_validate" /> >+ <input type="hidden" name="tablename" value="[% tablename %]" /> >+ <input type="hidden" name="kohafield" value="[% kohafield %]" /> >+ <label>[% i %]00s</label> >+ <select name="marc" id="marc" size="1" width="570" style="width: 570px;"> >+ [% FOREACH value IN $marclist.values %] >+ [% IF ( value == $marclist.default ) %] >+ <option value="[% value %]" selected>[% value %]</option> >+ [% ELSE %] >+ <option value="[% value %]">[% value %]</option> >+ [% END %] >+ [% END %] >+ </select> >+ <input type="submit" value="OK" /> >+ </form> >+ </li> >+ [% END %] >+ </ol> >+ </fieldset> > <fieldset class="action"> > <form action="[% script_name %]" name="Aform" method="post"> > <input type="hidden" name="op" value="add_validate" /> >@@ -144,7 +70,18 @@ > > <h1>Koha to MARC mapping [% tagfield %]</h1> > <form action="[% script_name %]" method="post"> >-<p>[% tablename %] <input type="submit" value="OK" /></p> >+<p> >+ <select name="tablename" id="tablename" size="1"> >+ [% FOREACH value IN tablename.values %] >+ [% IF ( value == tablename.default ) %] >+ <option value=[% value %] selected>[% value %]</option> >+ [% ELSE %] >+ <option value=[% value %]>[% value %]</option> >+ [% END %] >+ [% END %] >+ </select> >+ <input type="submit" value="OK" /> >+</p> > </form> > <table> > <tr> >-- >1.9.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 12613
:
29878
|
30122
| 30180