Wainui Witika-Park
cde5aa1050
Modified breadcrumbs to be accessible, in particular for a screen-reader. Made the block of breadcrumbs be a <nav aria label="Breadcrumb" class="breadcrumb"> with an ordered list inside. The last breadcrumbs also has aria-current="page" to specify that it is the current page. To test: 1) Apply patch 2) Build scss file 3) Ensure each of the files in the admin folder has breadcrumbs that are in a <nav aria label="Breadcrumb" class="breadcrumb"> block 4) Ensure that there is an ordered list in the block of breadcrumbs 5) Ensure that the last breadcrumb has aria-current="page" 6) Ensure that the breadcrumbs on each page of the staff client belonging to these files look the same as before, but the '>' symbol is replaced with '/' and the last breadcrumb has bold text 7) Ensure that when the last breadcrumb is clicked it takes you to the page you are currently on Sponsored-by: Catalyst IT Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
184 lines
7.2 KiB
Text
184 lines
7.2 KiB
Text
[% USE raw %]
|
|
[% USE Asset %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Administration › OAI sets › OAI set mappings</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
|
|
<body id="admin_oai_set_mappings" class="admin">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'prefs-admin-search.inc' %]
|
|
|
|
<nav aria-label="Breadcrumb" class="breadcrumb">
|
|
<ol>
|
|
<li>
|
|
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
|
|
</li>
|
|
<li>
|
|
<a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
|
|
</li>
|
|
<li>
|
|
<a href="/cgi-bin/koha/admin/oai_sets.pl">OAI sets configuration</a>
|
|
</li>
|
|
<li>
|
|
<a href="#" aria-current="page">OAI set mappings</a>
|
|
</li>
|
|
</ol>
|
|
</nav>
|
|
|
|
<div class="main container-fluid">
|
|
<div class="row">
|
|
<div class="col-sm-10 col-sm-push-2">
|
|
<main>
|
|
|
|
[% IF ( mappings_saved ) %]
|
|
<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 | html %]' ([% setSpec | html %])</h1>
|
|
[% UNLESS ( mappings ) %]
|
|
<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" id="mappingform">
|
|
<table id="mappings">
|
|
<thead>
|
|
<tr>
|
|
<th>Rule operator</th>
|
|
<th>Field</th>
|
|
<th>Subfield</th>
|
|
<th>Operator</th>
|
|
<th>Value</th>
|
|
<th> </th>
|
|
<th> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% IF ( mappings ) %]
|
|
[% FOREACH mapping IN mappings %]
|
|
<tr>
|
|
<td>
|
|
<select name="rule_operator">
|
|
[% IF (mapping.rule_operator == 'and') %]
|
|
<option value="and" selected="selected">and</option>
|
|
[% ELSE %]
|
|
<option value="and">and</option>
|
|
[% END %]
|
|
[% IF (mapping.rule_operator == 'or') %]
|
|
<option value="or" selected="selected">or</option>
|
|
[% ELSE %]
|
|
<option value="or">or</option>
|
|
[% END %]
|
|
</select>
|
|
</td>
|
|
<td><input type="text" name="marcfield" size="3" value="[% mapping.marcfield | html %]" /></td>
|
|
<td><input type="text" name="marcsubfield" size="1" value="[% mapping.marcsubfield | html %]" /></td>
|
|
<td><select name=operator>
|
|
[% IF mapping.operator == 'equal' %]
|
|
<option value="equal" selected="selected">is equal to</option>
|
|
<option value="notequal">not equal to</option>
|
|
[% ELSE %]
|
|
<option value="equal">is equal to</option>
|
|
<option value="notequal" selected="selected">not equal to</option>
|
|
[% END %]
|
|
</select></td>
|
|
<td><input type="text" name="marcvalue" value="[% mapping.marcvalue | html %]" /></td>
|
|
<td>
|
|
[% IF ( loop.last ) %]
|
|
<button type="button" id="new_rule_button" class="btn btn-default btn-xs" title="Add another condition"><i class="fa fa-plus"></i> Add</button>
|
|
[% END %]
|
|
</td>
|
|
<td><button class="btn btn-default btn-xs clear-field" type="button"><i class="fa fa-trash"></i> Delete</button></td>
|
|
</tr>
|
|
[% END %]
|
|
[% ELSE %]
|
|
<tr>
|
|
<td>
|
|
<select name="rule_operator">
|
|
[% IF (mapping.rule_operator == 'and') %]
|
|
<option value="and" selected="selected">and</option>
|
|
[% ELSE %]
|
|
<option value="and">and</option>
|
|
[% END %]
|
|
[% IF (mapping.rule_operator == 'or') %]
|
|
<option value="or" selected="selected">or</option>
|
|
[% ELSE %]
|
|
<option value="or">or</option>
|
|
[% END %]
|
|
</select>
|
|
</td>
|
|
<td><input type="text" name="marcfield" size="3" /></td>
|
|
<td><input type="text" name="marcsubfield" size="1" /></td>
|
|
<td><select name=operator>
|
|
<option value="equal">is equal to</option>
|
|
<option value="notequal">not equal to</option>
|
|
</select></td>
|
|
<td><input type="text" name="marcvalue" /></td>
|
|
<td>
|
|
<button type="button" id="new_rule_button" class="btn btn-default btn-xs" title="Add another condition"><i class="fa fa-plus"></i> Add</button>
|
|
</td>
|
|
<td><button class="btn btn-default btn-xs clear-field" type="button"><i class="fa fa-trash"></i> Delete</button></td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
<input type="hidden" name="id" value="[% id | html %]" />
|
|
<input type="hidden" name="op" value="save" />
|
|
<fieldset class="action">
|
|
<input type="submit" value="Save" /> <a class="cancel" href="/cgi-bin/koha/admin/oai_sets.pl">Cancel</a>
|
|
</fieldset>
|
|
</form>
|
|
|
|
</main>
|
|
</div> <!-- /.col-sm-10.col-sm-push-2 -->
|
|
|
|
<div class="col-sm-2 col-sm-pull-10">
|
|
<aside>
|
|
[% INCLUDE 'admin-menu.inc' %]
|
|
</aside>
|
|
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
|
|
</div> <!-- /.row -->
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% Asset.js("js/admin-menu.js") | $raw %]
|
|
<script>
|
|
$(document).ready(function() {
|
|
$("#mappingform").submit(function(){
|
|
hideDialogBox();
|
|
});
|
|
$("body").on("click","#new_rule_button", function(e){
|
|
e.preventDefault();
|
|
newCondition();
|
|
});
|
|
$("body").on("click",".clear-field",function(e){
|
|
e.preventDefault();
|
|
clearRow(e.target);
|
|
});
|
|
$("#mappings tbody tr:first-child td:first-child select").hide();
|
|
});
|
|
|
|
function newCondition() {
|
|
var tr = $('#new_rule_button').parents('tr');
|
|
var clone = $(tr).clone();
|
|
$("#new_rule_button").parent('td').find("#new_rule_button").remove();
|
|
$(clone).find("select").show();
|
|
$(tr).parent('tbody').append(clone);
|
|
}
|
|
function clearRow(link){
|
|
var tr = $(link).parent().parent();
|
|
var found = tr.find('#new_rule_button');
|
|
if( found.length ){
|
|
tr.find('input[type="text"]').attr("value","");
|
|
} else {
|
|
tr.remove();
|
|
}
|
|
$("#mappings tbody tr:first-child td:first-child select").hide();
|
|
}
|
|
function hideDialogBox() {
|
|
$('div.dialog').remove();
|
|
}
|
|
</script>
|
|
[% END %]
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|