Wainui Witika-Park
001095eae5
Swapped the order of the page titles to have the unique information first, i.e. the name of the specific page displays first, and the name of the website (e.g. Koha) displays at the end. To test: 1) Apply patch 2) Ensure each of the files in the admin folder are swapped around to display the most unique information first, and the website name is at the end 3) Ensure the pages displayed on the Staff Client that correspond to these files also display the changes Sponsored-by: Catalyst IT Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Henry Bolshaw <bolshawh@parliament.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
233 lines
7.9 KiB
Text
233 lines
7.9 KiB
Text
[% USE raw %]
|
|
[% USE Branches %]
|
|
[% USE Asset %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>
|
|
[% IF op =='add_form' %]
|
|
[% IF desk.desk_id %]
|
|
Modify desk
|
|
[% ELSE %]
|
|
New desk
|
|
[% END %] › [% ELSE %]
|
|
[% IF op == 'delete_confirm' %]
|
|
Confirm deletion of desk › [% END %]
|
|
[% END %]
|
|
Desks › Administration › Koha
|
|
</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
|
|
<body id="admin_desks" class="admin">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'desks-admin-search.inc' %]
|
|
|
|
<nav id="breadcrumbs" 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>
|
|
|
|
[% IF op == 'add_form' %]
|
|
<li>
|
|
<a href="/cgi-bin/koha/admin/desks.pl">Desks</a>
|
|
</li>
|
|
<li>
|
|
<a href="#" aria-current="page">
|
|
[% IF desk.desk_id %]
|
|
Modify desk
|
|
[% ELSE %]
|
|
New desk
|
|
[% END %]
|
|
</a>
|
|
</li>
|
|
|
|
[% ELSIF op == 'delete_confirm' %]
|
|
<li>
|
|
<a href="/cgi-bin/koha/admin/desks.pl">Desks</a>
|
|
</li>
|
|
<li>
|
|
<a href="#" aria-current="page">
|
|
Confirm deletion of desk
|
|
</a>
|
|
</li>
|
|
|
|
[% ELSE %]
|
|
<li>
|
|
<a href="#" aria-current="page">
|
|
Desks
|
|
</a>
|
|
</li>
|
|
[% END %]
|
|
</ol>
|
|
</nav>
|
|
|
|
<div class="main container-fluid">
|
|
<div class="row">
|
|
<div class="col-sm-10 col-sm-push-2">
|
|
<main>
|
|
|
|
[% FOR m IN messages %]
|
|
<div class="dialog [% m.type | html %]">
|
|
[% SWITCH m.code %]
|
|
[% CASE 'error_on_update' %]
|
|
An error occurred when updating this desk. Perhaps it already exists.
|
|
[% CASE 'error_on_insert' %]
|
|
An error occurred when adding this desk. The desk ID might already exist.
|
|
[% CASE 'error_on_delete' %]
|
|
An error occurred when deleting this desk. Check the logs.
|
|
[% CASE 'success_on_update' %]
|
|
Desk updated successfully.
|
|
[% CASE 'success_on_insert' %]
|
|
Desk added successfully.
|
|
[% CASE 'success_on_delete' %]
|
|
Desk deleted successfully.
|
|
[% CASE 'already_exists' %]
|
|
This desk already exists.
|
|
[% CASE %]
|
|
[% m.code | html %]
|
|
[% END %]
|
|
</div>
|
|
[% END %]
|
|
|
|
[% IF op == 'add_form' %]
|
|
[% IF desk %]
|
|
<h1>Modify a desk</h1>
|
|
[% ELSE %]
|
|
<h1>New desk</h1>
|
|
[% END %]
|
|
|
|
<form action="/cgi-bin/koha/admin/desks.pl" name="Aform" method="post" class="validated">
|
|
<input type="hidden" name="op" value="add_validate" />
|
|
<input type="hidden" name="desk_id" value="[% desk.desk_id | html %]" />
|
|
|
|
<fieldset class="rows">
|
|
<ol>
|
|
[% IF desk %]
|
|
<li><span class="label">Desk ID: </span>[% desk.desk_id | html %]</li>
|
|
[% END %]
|
|
<li>
|
|
<label for="desk_name" class="required">Desk: </label>
|
|
<input type="text" name="desk_name" id="desk_name" size="80" maxlength="100" value="[% desk.desk_name | html %]" required="required" class="required" /> <span class="required">Required</span>
|
|
</li>
|
|
<li>
|
|
<label for="branchcode" class="required">Library: </label>
|
|
<select id="branchcode" name="branchcode" required="required">
|
|
<option value=""></option>
|
|
[% FOREACH branch IN branches %]
|
|
[% IF (Branches.GetLoggedInBranchcode == branch.branchcode) %]
|
|
<option value="[% branch.branchcode|html %]" selected="selected">[% branch.branchname|html %]</option>
|
|
[% ELSE %]
|
|
<option value="[% branch.branchcode|html %]">[% branch.branchname|html %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
|
|
</ol>
|
|
</fieldset>
|
|
|
|
<fieldset class="action">
|
|
<input type="submit" value="Submit" />
|
|
<a class="cancel" href="/cgi-bin/koha/admin/desks.pl">Cancel</a>
|
|
</fieldset>
|
|
</form>
|
|
[% END %]
|
|
|
|
[% IF op == 'delete_confirm' %]
|
|
<div class="dialog alert">
|
|
<h3>Delete desk "[% desk.desk_name | html %]"?</h3>
|
|
<table>
|
|
<tr><th>Desk ID</th>
|
|
<td>[% desk.desk_id | html %]</td>
|
|
</tr>
|
|
<tr><th>Desk</th>
|
|
<td>[% desk.desk_name | html %]</td>
|
|
</tr>
|
|
<tr><th>Library</th>
|
|
<td>[% Branches.GetName( desk.branchcode ) | html %]</td>
|
|
</tr>
|
|
</table>
|
|
<form action="/cgi-bin/koha/admin/desks.pl" method="post">
|
|
<input type="hidden" name="op" value="delete_confirmed" />
|
|
<input type="hidden" name="desk_id" value="[% desk.desk_id | html %]" />
|
|
<button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
|
|
</form>
|
|
<form action="/cgi-bin/koha/admin/desks.pl" method="get">
|
|
<button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
|
|
</form>
|
|
</div>
|
|
[% END %]
|
|
|
|
[% IF op == 'list' %]
|
|
|
|
<div id="toolbar" class="btn-toolbar">
|
|
<a class="btn btn-default" id="newdesk" href="/cgi-bin/koha/admin/desks.pl?op=add_form"><i class="fa fa-plus"></i> New desk</a>
|
|
</div>
|
|
|
|
<h2>Desks</h2>
|
|
[% IF searchfield %]
|
|
Searching: [% searchfield | html %]
|
|
[% END %]
|
|
|
|
[% IF desks.count %]
|
|
<table id="table_desks">
|
|
<thead>
|
|
<tr>
|
|
<th>Desk ID</th>
|
|
<th>Desk</th>
|
|
<th>Library</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH desk IN desks %]
|
|
<tr>
|
|
<td>[% desk.desk_id | html %]</td>
|
|
<td>[% desk.desk_name | html %]</td>
|
|
<td>[% Branches.GetName( desk.branchcode ) | html %]</td>
|
|
<td class="actions">
|
|
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/desks.pl?op=add_form&desk_id=[% desk.desk_id | html %]"><i class="fa fa-pencil"></i> Edit</a>
|
|
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/desks.pl?op=delete_confirm&desk_id=[% desk.desk_id | html %]"><i class="fa fa-trash"></i> Delete</a>
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
[% ELSE %]
|
|
<div class="dialog message">
|
|
There are no desks defined. <a href="/cgi-bin/koha/admin/desks.pl?op=add_form">Create a new desk</a>.
|
|
</div>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
</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 %]
|
|
[% INCLUDE 'datatables.inc' %]
|
|
<script>
|
|
$(document).ready(function() {
|
|
$("#table_desks").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"aoColumnDefs": [
|
|
{ "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
|
|
],
|
|
"aaSorting": [[ 1, "asc" ]],
|
|
"iDisplayLength": 10,
|
|
"sPaginationType": "full_numbers"
|
|
}));
|
|
});
|
|
</script>
|
|
[% END %]
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|