Bugzilla – Attachment 81076 Details for
Bug 21647
Clean up SRU fields mapping templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21647: Clean up SRU fields mapping templates
Bug-21647-Clean-up-SRU-fields-mapping-templates.patch (text/plain), 8.85 KB, created by
Owen Leonard
on 2018-10-24 15:45:08 UTC
(
hide
)
Description:
Bug 21647: Clean up SRU fields mapping templates
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2018-10-24 15:45:08 UTC
Size:
8.85 KB
patch
obsolete
>From 84245ced614c2c17269e3c9c004d11a75a9d6db2 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 24 Oct 2018 15:39:13 +0000 >Subject: [PATCH] Bug 21647: Clean up SRU fields mapping templates > >This patch makes corrections to the SRU field mapping templates >(bibliographic and authority): > > - Bootstrap grid > - JavaScript to the footer > - Other markup corrections > >To test, apply the patch and go to Administration -> Z39.50/SRU servers > >- Add or edit an SRU server > - Click "Modify" next to the SRU search fields mapping field. > - Confirm that the popup window layout is correct. > - Confirm that adding information to the form is correctly saved to > the SRU server form. > - Test this process with SRU server record type set to both > "Authority" and "Bibliographic." >--- > .../prog/en/modules/admin/sru_modmapping.tt | 6 +- > .../prog/en/modules/admin/sru_modmapping_auth.tt | 83 +++++++++++----------- > 2 files changed, 45 insertions(+), 44 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping.tt >index bdbf4ef..8528933 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping.tt >@@ -15,8 +15,8 @@ > > <form id="form01" method="post"> > <fieldset class="rows"> >- <div class="yui-g"> >- <div class="yui-u first"> >+ <div class="row"> >+ <div class="col-xs-6"> > <ol> > <li> > <label for="title">Title: </label> >@@ -40,7 +40,7 @@ > </li> > </ol> > </div> >- <div class="yui-u"> >+ <div class="col-xs-6"> > <ol> > <li> > <label for="author">Author: </label> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping_auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping_auth.tt >index b1999fe..797d01a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping_auth.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping_auth.tt >@@ -1,88 +1,63 @@ >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › SRU search fields mapping for authorities</title> > [% INCLUDE 'doc-head-close.inc' %] >- >-<script type="text/javascript"> >-//<![CDATA[ >- $(document).ready(function() { >- $("#form01").submit(function(event) { >- if(window.opener) { >- var newmap=allInputs(); >- window.opener.$('#show_sru_fields').val(newmap); >- window.close(); >- } else { >- // In this case not called as a popup. Just do nothing. >- event.preventDefault(); >- } >- }); >- }); >- function allInputs () { >- var aInput= new Array(); >- $("form :input").each(function() { >- if( this.id && $(this).val() ) { >- aInput.push(this.id+'='+$(this).val()); >- } >- }); >- return aInput.join(','); >- } >-//]]> >-</script> > </head> > > <body id="admin_sru_modmapping" class="admin"> > >-<div id="custom-doc" class="yui-t7"> >+<div class="main container-fluid"> > >- <div id="bd"> >+ <main> > <h1>Modify SRU search fields mapping for authorities</h1> > <form id="form01" method="post"> > <fieldset class="rows"> >- <div class="yui-g"> >- <div class="yui-u first"> >+ <div class="row"> >+ <div class="col-xs-6"> > <ol> > <li> > <label for="srchany">Keyword (any): </label> >- <input id="srchany" type="text" value="[% FILTER html %][% mapping.srchany | html %][% END %]" /> >+ <input id="srchany" type="text" value="[% mapping.srchany | html %]" /> > </li> > <li> > <label for="nameany">Name (any): </label> >- <input id="nameany" type="text" value="[% FILTER html %][% mapping.nameany | html %][% END %]" /> >+ <input id="nameany" type="text" value="[% mapping.nameany | html %]" /> > </li> > <li> > <label for="authorany">Author (any): </label> >- <input id="authorany" type="text" value="[% FILTER html %][% mapping.authorany | html %][% END %]" /> >+ <input id="authorany" type="text" value="[% mapping.authorany | html %]" /> > </li> > <li> > <label for="authorpersonal">Author (personal): </label> >- <input id="authorpersonal" type="text" value="[% FILTER html %][% mapping.authorpersonal | html %][% END %]" /> >+ <input id="authorpersonal" type="text" value="[% mapping.authorpersonal | html %]" /> > </li> > <li> > <label for="authorcorp">Author (corporate): </label> >- <input id="authorcorp" type="text" value="[% FILTER html %][% mapping.authorcorp | html %][% END %]" /> >+ <input id="authorcorp" type="text" value="[% mapping.authorcorp | html %]" /> > </li> > <li> > <label for="authormeetingcon">Author (meeting/conference): </label> >- <input id="authormeetingcon" type="text" value="[% FILTER html %][% mapping.authormeetingcon | html %][% END %]" /> >+ <input id="authormeetingcon" type="text" value="[% mapping.authormeetingcon | html %]" /> > </li> > </ol> > </div> >- <div class="yui-u"> >+ <div class="col-xs-6"> > <ol> > <li> > <label for="subject">Subject heading: </label> >- <input id="subject" type="text" value="[% FILTER html %][% mapping.subject | html %][% END %]" /> >+ <input id="subject" type="text" value="[% mapping.subject | html %]" /> > </li> > <li> > <label for="subjectsubdiv">Subject sub-division: </label> >- <input id="subjectsubdiv" type="text" value="[% FILTER html %][% mapping.subjectsubdiv | html %][% END %]" /> >+ <input id="subjectsubdiv" type="text" value="[% mapping.subjectsubdiv | html %]" /> > </li> > <li> > <label for="title">Title (any): </label> >- <input id="title" type="text" value="[% FILTER html %][% mapping.title | html %][% END %]" /> >+ <input id="title" type="text" value="[% mapping.title | html %]" /> > </li> > <li> > <label for="uniformtitle">Title (uniform): </label> >- <input id="uniformtitle" type="text" value="[% FILTER html %][% mapping.uniformtitle | html %][% END %]" /> >+ <input id="uniformtitle" type="text" value="[% mapping.uniformtitle | html %]" /> > </li> > </ol> > </div> >@@ -95,4 +70,30 @@ > </form> > </div> > >+[% MACRO jsinclude BLOCK %] >+ <script> >+ $(document).ready(function() { >+ $("#form01").submit(function(event) { >+ if(window.opener) { >+ var newmap=allInputs(); >+ window.opener.$('#show_sru_fields').val(newmap); >+ window.close(); >+ } else { >+ // In this case not called as a popup. Just do nothing. >+ event.preventDefault(); >+ } >+ }); >+ }); >+ function allInputs () { >+ var aInput= new Array(); >+ $("form :input").each(function() { >+ if( this.id && $(this).val() ) { >+ aInput.push(this.id+'='+$(this).val()); >+ } >+ }); >+ return aInput.join(','); >+ } >+ </script> >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' popup_window=1 %] >-- >2.1.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 21647
:
81076
|
81132
|
81341
|
81365