Owen Leonard
a46b3b4de0
Some scripts pass a template variable to facilitate an alternate table row class for styling. Other use the 'IF (loop.odd)' construction. I think we're at the point where the CSS3 :nth-child() selector is widely-supported enough that we can do without template-based solutions: http://caniuse.com/#feat=css-sel3 This patch adds such a selector to the staff client CSS and removes the corresponding template markup from Administration pages. The last in this series of patches will remove the redundant CSS. Also in this patch: a few minor markup corrections. To test, apply the patch and clear your browser cache if necessary. View the following pages and confirm that alternate table row highlighting works as before: - Administration -> Budgets - Acquisitions -> Vendor -> Contracts - Administration -> Budgets -> Budget -> Planning - Administration -> Authority types - Administration -> Authority types -> MARC structure - Administration -> Authority types -> MARC structure -> subfields - Administration -> MARC bibliographic framework - Administration -> MARC bibliographic framework -> MARC structure - Administration -> MARC bibliographic framework -> MARC structure -> Subfields - Administration -> Libraries and groups - Administration -> Cities and towns - Administration -> Classification sources - Administration -> Circulation and fines rules - Administration -> Currencies and exchange rates - Administration -> Item types - Administration -> Koha to MARC mapping - Administration -> System preferences -> Local use - Administration -> Z39.50 client targets Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
191 lines
6.5 KiB
Text
191 lines
6.5 KiB
Text
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Administration ›
|
|
[% IF ( add_form ) %][% IF ( searchfield ) %] Printers › Modify printer '[% searchfield %]'[% ELSE %] Printers › New printer[% END %][% END %]
|
|
[% IF ( add_validate ) %] Printers › Printer added[% END %]
|
|
[% IF ( delete_confirm ) %] Printers › Confirm deletion of printer '[% searchfield %]'[% END %]
|
|
[% IF ( delete_confirmed ) %] Printers › Printer deleted[% END %]
|
|
[% IF ( else ) %]Printers[% END %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% IF ( add_form ) %]<script type="text/javascript">
|
|
//<![CDATA[
|
|
//
|
|
function isNotNull(f,noalert) {
|
|
if (f.value.length ==0) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
//
|
|
function isNum(v,maybenull) {
|
|
var n = new Number(v.value);
|
|
if (isNaN(n)) {
|
|
return false;
|
|
}
|
|
if (maybenull==0 && v.value=="") {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
//
|
|
function Check(f) {
|
|
var ok=1;
|
|
var _alertString="";
|
|
var alertString2;
|
|
if (f.printername.value.length==0) {
|
|
_alertString += "- printer name missing\n";
|
|
}
|
|
if (f.printqueue.value.length==0) {
|
|
_alertString += "- Queue missing\n";
|
|
}
|
|
if (_alertString.length==0) {
|
|
document.Aform.submit();
|
|
} else {
|
|
alertString2 = "Form not submitted because of the following problem(s)\n";
|
|
alertString2 += "------------------------------------------------------------------------------------\n\n";
|
|
alertString2 += _alertString;
|
|
alert(alertString2);
|
|
}
|
|
}
|
|
//]]>
|
|
</script>
|
|
[% END %]
|
|
</head>
|
|
<body id="admin_printers" class="admin">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'printers-admin-search.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › [% IF ( add_form ) %][% IF ( searchfield ) %] <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> › Modify printer '[% searchfield %]'[% ELSE %] <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> › New printer[% END %][% END %]
|
|
[% IF ( add_validate ) %] <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> › Printer added[% END %]
|
|
[% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> › Confirm deletion of printer '[% searchfield %]'[% END %]
|
|
[% IF ( delete_confirmed ) %] <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> › Printer deleted[% END %]
|
|
[% IF ( else ) %]Printers[% END %]</div>
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
[% IF ( add_form ) %]
|
|
|
|
[% IF ( searchfield ) %]
|
|
<h1>Modify printer</h1>
|
|
[% ELSE %]
|
|
<h1>New printer</h1>
|
|
[% END %]
|
|
<form action="[% script_name %]" name="Aform" method="post">
|
|
<input type="hidden" name="op" value="add_validate" />
|
|
[% IF ( searchfield ) %]
|
|
<input type="hidden" name="add" value="0" />
|
|
[% ELSE %]
|
|
<input type="hidden" name="add" value="1" />
|
|
[% END %]
|
|
<fieldset class="rows">
|
|
<ol> [% IF ( searchfield ) %]
|
|
<li>
|
|
<span class="label">Printer name: </span>
|
|
<input type="hidden" name="printername" id="" value="[% searchfield %]" />[% searchfield %]
|
|
</li>
|
|
[% ELSE %]
|
|
<li>
|
|
<label for="printername">Printer name: </label>
|
|
<input type="text" name="printername" id="printername" size="50" maxlength="50" />
|
|
</li>
|
|
[% END %]
|
|
<li>
|
|
<label for="printqueue">Queue: </label>
|
|
<input type="text" name="printqueue" id="printqueue" size="50" maxlength="50" value="[% printqueue %]" />
|
|
</li>
|
|
<li>
|
|
<label for="printtype">Type: </label>
|
|
<input type="text" name="printtype" id="printtype" size="50" maxlength="50" value="[% printtype %]" />
|
|
</li></ol>
|
|
</fieldset>
|
|
<fieldset class="action"><input type="submit" value="Submit" onclick="Check(this.form);" /> <a class="cancel" href="/cgi-bin/koha/admin/printers.pl">Cancel</a></fieldset>
|
|
</form>
|
|
|
|
[% END %]
|
|
|
|
[% IF ( add_validate ) %]
|
|
<h3>Printer added</h3>
|
|
<form action="[% script_name %]" method="post">
|
|
<fieldset class="action"> <input type="submit" value="OK" /></fieldset>
|
|
</form>
|
|
[% END %]
|
|
|
|
[% IF ( delete_confirm ) %]
|
|
<h3>Confirm deletion of printer <em>[% searchfield %]</em></h3>
|
|
<ul>
|
|
<li>
|
|
<strong>Printer: </strong>
|
|
[% searchfield %]
|
|
</li>
|
|
<li>
|
|
<strong>Queue: </strong>
|
|
[% printqueue %]
|
|
</li>
|
|
<li>
|
|
<strong>Type: </strong>
|
|
[% printtype %]
|
|
</li>
|
|
</ul>
|
|
<form action="[% script_name %]" method="post">
|
|
<input type="hidden" name="op" value="delete_confirmed" />
|
|
<input type="hidden" name="searchfield" value="[% searchfield %]" />
|
|
<input type="submit" value="Delete this printer" />
|
|
</form> <form action="[% script_name %]" method="post">
|
|
<input type="submit" value="Do not Delete" />
|
|
</form>
|
|
[% END %]
|
|
|
|
[% IF ( delete_confirmed ) %]
|
|
<h3>Printer deleted</h3>
|
|
<form action="[% script_name %]" method="post">
|
|
<fieldset class="action"><input type="submit" value="OK" /></fieldset>
|
|
</form>
|
|
[% END %]
|
|
|
|
[% IF ( else ) %]
|
|
|
|
<div id="toolbar" class="btn-toolbar">
|
|
<a class="btn btn-small" id="newprinter" href="/cgi-bin/koha/admin/printers.pl?op=add_form"><i class="icon-plus"></i> New printer</a>
|
|
</div>
|
|
|
|
<h2>Printers</h2>
|
|
[% IF ( searchfield ) %]
|
|
You searched for [% searchfield %]</span>
|
|
[% END %]
|
|
|
|
[% IF ( loop ) %]<table>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Queue</th>
|
|
<th>Type</th>
|
|
<th> </th>
|
|
</tr>
|
|
[% FOREACH loo IN loop %]
|
|
<tr>
|
|
<td>[% loo.printername %]</td>
|
|
<td>[% loo.printqueue %]</td>
|
|
<td>[% loo.printtype %]</td>
|
|
<td><a href="[% loo.script_name %]?op=add_form&searchfield=[% loo.printername %]">Edit</a> <a href="[% loo.script_name %]?op=delete_confirm&searchfield=[% loo.printername %]">Delete</a></td>
|
|
</tr>
|
|
[% END %]
|
|
</table>[% ELSE %]<div class="notice">No printers defined.</div>[% END %]
|
|
|
|
[% IF ( offsetgtzero ) %]
|
|
<a href="[% script_name %]?offset=[% prevpage %]"><< Previous</a>
|
|
[% END %]
|
|
|
|
[% IF ( ltcount ) %]
|
|
<a href="[% script_name %]?offset=[% nextpage %]">Next >></a>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
[% INCLUDE 'admin-menu.inc' %]
|
|
</div>
|
|
</div>
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|