Bugzilla – Attachment 15338 Details for
Bug 8906
Improve OAI management interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8906 - Improve OAI management interface
Bug-8906---Improve-OAI-management-interface.patch (text/plain), 13.31 KB, created by
Marcel de Rooy
on 2013-02-15 10:38:17 UTC
(
hide
)
Description:
Bug 8906 - Improve OAI management interface
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2013-02-15 10:38:17 UTC
Size:
13.31 KB
patch
obsolete
>From 9e97b45ae54f5690185454a6e81b80bd069ca736 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 11 Oct 2012 14:07:01 -0400 >Subject: [PATCH] Bug 8906 - Improve OAI management interface >Content-Type: text/plain; charset="utf-8" > >Revising OAI configuration interface to conform to >existing interface patterns: > >- Properly-formatted form rows >- "clone" and "clear" links consistent with other > forms which use these conventions >- Improved title and breadcrumbs >- Standard save and cancel markup > >New to the mappings interface: A "clear" button >to remove or empty the contents of a row. This replaces >the help text about emptying fields. > >To test: view, add and edit OAI sets and mappings. Try adding >and removing multiple set descriptions and mappings. > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../prog/en/modules/admin/oai_set_mappings.tt | 48 ++++++---- > .../prog/en/modules/admin/oai_sets.tt | 97 +++++++++----------- > 2 files changed, 74 insertions(+), 71 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_set_mappings.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_set_mappings.tt >index 1724c06..58f3807 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_set_mappings.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_set_mappings.tt >@@ -1,10 +1,19 @@ > [% INCLUDE 'doc-head-open.inc' %] >-<title>Koha › Admin › OAI set mappings</title> >+<title>Koha › Administration › OAI sets › OAI set mappings</title> > [% INCLUDE 'doc-head-close.inc' %] > <script type="text/javascript"> > //<![CDATA[ > $(document).ready(function() { >- // Some JS >+ $("#mappingform").submit(function(){ >+ hideDialogBox(); >+ }); >+ $("#ORbutton").live("click", function(){ >+ newCondition(); >+ return false; >+ }); >+ $(".clear-field").live("click",function(e){ >+ clearRow(e.target); >+ }); > }); > > function newCondition() { >@@ -13,14 +22,18 @@ function newCondition() { > $("#ORbutton").parent('td').replaceWith('<td style="text-align:center">OR</td>'); > $(tr).parent('tbody').append(clone); > } >- >+function clearRow(link){ >+ var tr = $(link).parent().parent(); >+ var found = tr.find('#ORbutton'); >+ if( found.length ){ >+ tr.find('input[type="text"]').attr("value",""); >+ } else { >+ tr.find('input[type="text"]').attr("value","").end().hide(); >+ } >+} > function hideDialogBox() { > $('div.dialog').remove(); > } >- >-function returnToSetsPage() { >- window.location.href = "/cgi-bin/koha/admin/oai_sets.pl"; >-} > //]]> > </script> > </head> >@@ -29,7 +42,7 @@ function returnToSetsPage() { > [% INCLUDE 'header.inc' %] > [% INCLUDE 'cat-search.inc' %] > >-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Admin</a> › <a href="/cgi-bin/koha/admin/oai_set_mappings.pl?id=[% id %]">OAI set mappings</a></div> >+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › <a href="/cgi-bin/koha/admin/oai_sets.pl">OAI sets</a> › <a href="/cgi-bin/koha/admin/oai_set_mappings.pl?id=[% id %]">OAI set mappings</a></div> > > <div id="doc3" class="yui-t2"> > >@@ -37,16 +50,16 @@ function returnToSetsPage() { > <div id="yui-main"> > <div class="yui-b"> > [% IF ( mappings_saved ) %] >- <div class="dialog"> >- <p>Mappings have been saved</p> >+ <div class="dialog message"> >+ <h4>Mappings have been saved</h4> > <p><a href="/cgi-bin/koha/admin/oai_sets.pl">Return to sets management</a></p> > </div> > [% END %] > <h1>Mappings for set '[% setName %]' ([% setSpec %])</h1> > [% UNLESS ( mappings ) %] >- <p class="warning">Warning: no mappings defined for this set</p> >+ <div class="dialog alert"><p><strong>Warning:</strong> No mappings have been defined for this set</p></div> > [% END %] >- <form action="/cgi-bin/koha/admin/oai_set_mappings.pl" method="post" onsubmit="hideDialogBox();"> >+ <form action="/cgi-bin/koha/admin/oai_set_mappings.pl" method="post" id="mappingform"> > <table id="mappings"> > <thead> > <tr> >@@ -55,6 +68,7 @@ function returnToSetsPage() { > <th> </th> > <th>Value</th> > <th> </th> >+ <th> </th> > </tr> > </thead> > <tbody> >@@ -67,11 +81,12 @@ function returnToSetsPage() { > <td><input type="text" name="marcvalue" value="[% mapping.marcvalue %]" /></td> > <td style="text-align:center"> > [% IF ( loop.last ) %] >- <input type="button" id="ORbutton" value="OR" onclick="newCondition()"/> >+ <input type="button" id="ORbutton" value="OR" title="Add another condition" /> > [% ELSE %] > OR > [% END %] > </td> >+ <td><a class="clear-field" href="#">Clear</a></td> > </tr> > [% END %] > [% ELSE %] >@@ -80,17 +95,16 @@ function returnToSetsPage() { > <td style="text-align:center"><input type="text" name="marcsubfield" size="1" /></td> > <td>is equal to</td> > <td><input type="text" name="marcvalue" /></td> >- <td><input type="button" id="ORbutton" value="OR" onclick="newCondition()"/></td> >+ <td><input type="button" id="ORbutton" value="OR" /></td> >+ <td><a class="clear-field" href="#">Clear</a></td> > </tr> > [% END %] > </tbody> > </table> >- <p class="hint">Hint: to delete a line, empty at least one of the text fields in this line</p> > <input type="hidden" name="id" value="[% id %]" /> > <input type="hidden" name="op" value="save" /> > <fieldset class="action"> >- <input type="submit" value="Save" /> >- <input type="button" value="Cancel" onclick="returnToSetsPage();" /> >+ <input type="submit" value="Save" /> <a class="cancel" href="/cgi-bin/koha/admin/oai_sets.pl">Cancel</a> > </fieldset> > </form> > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt >index 21a0c4f..6f25c71 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt >@@ -1,13 +1,13 @@ > [% INCLUDE 'doc-head-open.inc' %] >-<title>Koha › Admin › OAI sets</title> >+<title>Koha › Administration › [% IF ( op_new ) %]OAI sets configuration › Add a new OAI set[% ELSE %]OAI sets configuration[% END %]</title> > [% INCLUDE 'doc-head-close.inc' %] > <script type="text/javascript"> > //<![CDATA[ > function newDescField() { >- $("#descriptionlist").append( >- '<li>' + >- '<textarea style="vertical-align:middle" name="description"></textarea>' + >- '<a style="cursor:pointer" onclick="delDescField(this)"> ×</a>' + >+ $("#adddescription").before( >+ '<li><label>setDescription: </label>' + >+ '<textarea style="vertical-align:middle" rows="2" cols="30" name="description"></textarea>' + >+ '<a onclick="delDescField(this); return false;" class="clear-field" href="#">Remove</a>' + > '</li>' > ); > } >@@ -18,7 +18,7 @@ function delDescField(minusButton) { > } > > $(document).ready(function() { >- // Some JS >+ new YAHOO.widget.Button("newoaiset"); > }); > //]]> > </script> >@@ -28,67 +28,56 @@ $(document).ready(function() { > [% INCLUDE 'header.inc' %] > [% INCLUDE 'cat-search.inc' %] > >-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Admin</a> › OAI sets</div> >+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › [% IF ( op_new ) %]<a href="http://localhost:8888/cgi-bin/koha/admin/oai_sets.pl">OAI sets configuration</a> › Add a new OAI set[% ELSIF ( op_mod ) %]<a href="http://localhost:8888/cgi-bin/koha/admin/oai_sets.pl">OAI sets configuration</a> › Modify OAI set '[% spec %]'[% ELSE %] OAI sets configuration[% END %]</div> > > <div id="doc3" class="yui-t2"> > > <div id="bd"> > <div id="yui-main"> > <div class="yui-b"> >- <h1>OAI sets configuration</h1> >- >- [% IF op_new %] >- <h2>Add a new set</h2> >+ [% IF ( op_new || op_mod ) %] > <form method="post" action="/cgi-bin/koha/admin/oai_sets.pl"> >+ [% IF ( op_new ) %] >+ <h2>Add a new OAI set</h2> > <input type="hidden" name="op" value="savenew" /> >- <fieldset> >- <label for="spec">setSpec</label> >- <input type="text" id="spec" name="spec" /> >- <br /> >- <label for="name">setName</label> >- <input type="text" id="name" name="name" /> >- <br /> >- <label>setDescriptions</label> >- <ul id="descriptionlist"> >- </ul> >- <a style="cursor:pointer" onclick='newDescField()'>Add description</a> >- </fieldset> >- <input type="submit" value="Save" /> >- <input type="button" value="Cancel" onclick="window.location.href = '/cgi-bin/koha/admin/oai_sets.pl'" /> >- </form> >- [% ELSE %][% IF op_mod %] >- <h2>Modify set '[% spec %]'</h2> >- <form method="post" action="/cgi-bin/koha/admin/oai_sets.pl"> >- <input type="hidden" name="op" value="savemod" /> >- <input type="hidden" name="id" value="[% id %]" /> >- <fieldset> >- <label for="spec">setSpec</label> >- <input type="text" id="spec" name="spec" value="[% spec %]" /> >- <br /> >- <label for="name">setName</label> >- <input type="text" id="name" name="name" value="[% name %]" /> >- <br /> >- <label>setDescriptions</label> >- <ul id="descriptionlist"> >+ [% ELSIF ( op_mod ) %] >+ <h2>Modify OAI set '[% spec %]'</h2> >+ <input type="hidden" name="op" value="savemod" /> >+ <input type="hidden" name="id" value="[% id %]" /> >+ [% END %] >+ <fieldset id="oaidetails" class="rows"> >+ <ol> >+ <li> >+ <label for="spec" class="required">setSpec: </label> >+ <input type="text" id="spec" name="spec" value="[% spec %]" /> >+ </li> >+ <li> >+ <label for="name" class="required">setName: </label> >+ <input type="text" id="name" name="name" value="[% name %]" /> >+ </li> > [% FOREACH desc IN descriptions %] > <li> >- <textarea style="vertical-align:middle" name="description">[% desc.description %]</textarea> >- <a style="cursor:pointer" onclick="delDescField(this)"> ×</a> >+ <label>setDescription: </label> >+ <textarea style="vertical-align:middle" rows="2" cols="30" name="description">[% desc.description %]</textarea> >+ <a onclick="delDescField(this); return false;" class="clear-field" href="#">Remove</a> > </li> > [% END %] >- </ul> >- <a style="cursor:pointer" onclick='newDescField()'>Add description</a> >+ <li id="adddescription"><span class="label"> </span><a class="clone-field" href="#" onclick='newDescField(); return false;'>Add description</a></li> >+ >+ </ol> >+ </fieldset> >+ <fieldset class="action"> >+ <input type="submit" value="Save" /> <a class="cancel" href="/cgi-bin/koha/admin/oai_sets.pl">Cancel</a> > </fieldset> >- <input type="submit" value="Save" /> >- <input type="button" value="Cancel" onclick="window.location.href = '/cgi-bin/koha/admin/oai_sets.pl'" /> > </form> >- [% END %] >- [% END %] >+ [% ELSE %] > >- <h2>List of sets</h2> >- [% UNLESS ( op_new ) %] >- <a href="/cgi-bin/koha/admin/oai_sets.pl?op=new">Add a new set</a> >- [% END %] >+ <div id="toolbar"> >+ <ul class="toolbar"> >+ <li><a id="newoaiset" href="/cgi-bin/koha/admin/oai_sets.pl?op=new">New set</a></li> >+ </ul></div> >+ >+ <h2>OAI sets</h2> > [% IF sets_loop %] > <table> > <thead> >@@ -127,9 +116,9 @@ $(document).ready(function() { > </tbody> > </table> > [% ELSE %] >- <p>There is no set defined.</p> >+ <div class="dialog message"><p>There are no sets defined.</p></div> >+ [% END %] > [% END %] >- > > </div> > </div> >-- >1.7.7.6
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 8906
:
12775
|
12898
|
13561
|
14107
|
14262
|
14299
| 15338 |
15339
|
15340