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>
154 lines
4.9 KiB
Text
154 lines
4.9 KiB
Text
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Administration › [% IF ( add_form ) %]Cities › [% IF ( cityid ) %] Modify city[% ELSE %] New city[% END %][% ELSE %][% IF ( delete_confirm ) %]Cities › Confirm deletion of city[% ELSE %] Cities[% END %][% END %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
|
|
[% INCLUDE 'datatables.inc' %]
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
$(document).ready(function() {
|
|
$("#table_cities").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"aoColumnDefs": [
|
|
{ "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
|
|
],
|
|
"aaSorting": [[ 1, "asc" ]],
|
|
"iDisplayLength": 10
|
|
}));
|
|
});
|
|
//]]>
|
|
</script>
|
|
</head>
|
|
<body id="admin_cities" class="admin">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'cities-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>
|
|
› <a href="/cgi-bin/koha/admin/cities.pl">Cities</a>
|
|
[% IF ( add_form ) %]
|
|
› [% IF ( cityid ) %]Modify[% ELSE %]New[% END %] City
|
|
[% ELSIF ( delete_confirm ) %]
|
|
› Confirm deletion of city
|
|
[% END %]
|
|
</div>
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
[% IF ( add_form ) %]
|
|
[% IF ( cityid ) %]
|
|
<h1>Modify a city</h1>
|
|
[% ELSE %]
|
|
<h1>New city</h1>
|
|
[% END %]
|
|
|
|
<form action="[% script_name %]" name="Aform" method="post" class="validated">
|
|
<input type="hidden" name="op" value="add_validate" />
|
|
<input type="hidden" name="checked" value="0" />
|
|
<input type="hidden" name="cityid" value="[% cityid %]" />
|
|
|
|
<fieldset class="rows"><ol> [% IF ( cityid ) %]
|
|
<li>
|
|
<span class="label">City ID: </span>[% cityid %]</li>
|
|
[% END %]
|
|
<li>
|
|
<label for="city_name" class="required">City: </label>
|
|
<input type="text" name="city_name" id="city_name" size="80" maxlength="100" value="[% city_name |html %]" required="required" class="required" /> <span class="required">Required</span>
|
|
</li>
|
|
<li>
|
|
<label for="city_state">State: </label>
|
|
<input type="text" name="city_state" id="city_state" size="80" maxlength="100" value="[% city_state |html %]" />
|
|
</li>
|
|
<li>
|
|
<label for="city_zipcode" class="required">Zip/Postal code: </label>
|
|
<input type="text" name="city_zipcode" id="city_zipcode" size="20" maxlength="20" value="[% city_zipcode %]" required="required" class="required" /> <span class="required">Required</span>
|
|
</li>
|
|
<li>
|
|
<label for="city_country">Country: </label>
|
|
<input type="text" name="city_country" id="city_country" size="80" maxlength="100" value="[% city_country |html %]" />
|
|
</li></ol></fieldset>
|
|
|
|
<fieldset class="action">
|
|
<input type="submit" value="Submit" /> <a class="cancel" href="/cgi-bin/koha/admin/cities.pl">Cancel</a>
|
|
</fieldset>
|
|
</form>
|
|
|
|
[% END %]
|
|
[% IF ( delete_confirm ) %]
|
|
<div class="dialog alert">
|
|
<h3>Delete City "[% city_name %]?"</h3>
|
|
<table>
|
|
<tr><th>City id</th>
|
|
<td>[% cityid %]</td>
|
|
</tr>
|
|
<tr><th>City</th>
|
|
<td>[% city_name %]</td>
|
|
</tr>
|
|
<tr><th>State</th>
|
|
<td>[% city_state %]</td>
|
|
</tr>
|
|
<tr><th>Zip/Postal code</th>
|
|
<td>[% city_zipcode %]</td>
|
|
</tr>
|
|
<tr><th>Country</th>
|
|
<td>[% city_country %]</td>
|
|
</tr>
|
|
</table>
|
|
<form action="[% script_name %]" method="post">
|
|
<input type="hidden" name="op" value="delete_confirmed" />
|
|
<input type="hidden" name="cityid" value="[% cityid %]" />
|
|
<input type="submit" class="approve" value="Yes, Delete" />
|
|
</form>
|
|
<form action="[% script_name %]" method="get">
|
|
<input type="submit" class="deny" value="No, do not Delete" />
|
|
</form>
|
|
</div>
|
|
[% END %]
|
|
|
|
[% IF ( else ) %]
|
|
|
|
<div id="toolbar" class="btn-toolbar">
|
|
<a class="btn btn-small" id="newcity" href="[% script_name %]?op=add_form"><i class="icon-plus"></i> New city</a>
|
|
</div>
|
|
|
|
<h2>Cities</h2>
|
|
[% IF ( searchfield ) %]
|
|
Searching: [% searchfield %]
|
|
[% END %]
|
|
|
|
[% IF ( loop ) %]
|
|
<table id="table_cities">
|
|
<thead>
|
|
<th>City ID</th>
|
|
<th>City</th>
|
|
<th>State</th>
|
|
<th>Zip/Postal code</th>
|
|
<th>Country</th>
|
|
<th> </th>
|
|
<th> </th>
|
|
</thead>
|
|
[% FOREACH loo IN loop %]
|
|
<tr>
|
|
<td>[% loo.cityid %]</td>
|
|
<td>[% loo.city_name %]</td>
|
|
<td>[% loo.city_state %]</td>
|
|
<td>[% loo.city_zipcode %]</td>
|
|
<td>[% loo.city_country %]</td>
|
|
<td><a href="[% loo.script_name %]?op=add_form&cityid=[% loo.cityid %]">Edit</a></td>
|
|
<td><a href="[% loo.script_name %]?op=delete_confirm&cityid=[% loo.cityid %]">Delete</a></td>
|
|
</tr>
|
|
[% END %]
|
|
</table>[% END %]
|
|
[% END %]
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
[% INCLUDE 'admin-menu.inc' %]
|
|
</div>
|
|
</div>
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|
|
|