Koha/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt
Owen Leonard 9bd21c7a38
Bug 33909: Improve translation of title tags: Administration
This patch updates administration templates so that title tags can be
more easily translated.

To test, apply the patch and confirm that the following
Administration pages have the correct title tags:

 - Libraries
 - Library groups
 - Item types
 - Authorized values
 - Patron categories
 - Circulation and fines rules
 - Patron attribute types
 - Library transfer limits
 - Library transfer limits advanced editor
 - Transport cost matrix
 - Item circulation alerts
 - Cities and towns
 - Curbside pickup
 - Patron restriction types
 - Debit types
 - Credit types
 - Cash registers
 - Manage plugins
 - Manage jobs
 - MARC bibliographic framework
 - Koha to MARC mapping
 - MARC Bibliographic framework test
 - Authority types
 - Classification configuration
 - Record matching rules
 - Record overlay rules
 - OAI sets configuration
 - Item search fields
 - Search engine configuration
 - Currencies and exchange rates
 - Budgets
 - Funds
 - EDI accounts
 - Library EANs
 - Network Printers
 - Identity providers
 - Z39.50/SRU servers
 - SMTP servers
 - Did you mean?
 - Table settings
 - Audio alerts
 - Share your usage statistics
 - Share content with Mana KB
 - Additional fields
 - Keyboard shortcuts

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-08-15 11:25:51 +03:00

256 lines
12 KiB
Text

[% USE raw %]
[% USE Asset %]
[% USE Branches %]
[% USE Price %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% FILTER collapse %]
[% IF op == 'add_form' %]
[% IF cash_register %]
[% tx("Modify cash register {cash_register}", { cash_register = cash_register.id }) | html %]
[% ELSE %]
[% t("New cash register") | html %]
[% END %] &rsaquo;
[% ELSIF op == 'delete_confirm' %]
[% tx("Confirm deletion of cash register '{cash_register}'", { cash_register = cash_register.id }) | html %] &rsaquo;
[% END %]
[% t("Cash registers") | html %] &rsaquo;
[% t("Administration") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="admin_cash_registers" class="admin">
[% WRAPPER 'header.inc' %]
[% INCLUDE 'prefs-admin-search.inc' %]
[% END %]
[% WRAPPER 'sub-header.inc' %]
[% WRAPPER breadcrumbs %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
[% END %]
[% IF op == 'add_form' || op == 'delete_confirm' %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/cash_registers.pl">Cash registers</a>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Cash registers</span>
[% END %]
[% END %]
[% IF op == 'add_form' %]
[% IF cash_register %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Modify cash register [% cash_register.id | html %]</span>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>New cash register</span>
[% END %]
[% END %]
[% ELSIF op == 'delete_confirm' %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Confirm deletion of cash register '[% cash_register.id | html %]'</span>
[% END %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">
<div class="col-sm-10 col-sm-push-2">
<main>
[% FOREACH m IN messages %]
<div class="dialog [% m.type | html %]">
[% SWITCH m.code %]
[% CASE 'success_on_insert' %]
<span>Cash register added successfully.</span>
[% CASE 'error_on_insert' %]
<span>An error occurred when adding this cash register.</span>
[% CASE 'success_on_update' %]
<span>Cash register updated successfully.</span>
[% CASE 'error_on_update' %]
<span>An error occurred when updating this cash register.</span>
[% CASE 'success_on_default' %]
<span>Library default updated successfully.</span>
[% CASE 'error_on_update' %]
<span>An error on setting library default.</span>
[% CASE 'success_on_archive' %]
<span>Cash register archived successfully.</span>
[% CASE 'success_on_restore' %]
<span>Cash register restored successfully.</span>
[% CASE %]
<span>[% m.code | html %]</span>
[% END %]
</div>
[% END %]
[% IF op == 'add_form' %]
<h1>[% IF cash_register %]Modify cash register[% ELSE %]Add new cash register[% END %]</h1>
<form action="/cgi-bin/koha/admin/cash_registers.pl" id="Aform" name="Aform" class="validated" method="post">
<fieldset class="rows">
<input type="hidden" name="op" value="add_validate" />
<ol>
[% IF cash_register %]
<li>
<span class="label">Cash register ID: </span>[% cash_register.id | html %]
<input type="hidden" name="id" value="[% cash_register.id | html %]" />
</li>
[% END %]
<li>
<label for="name" class="required">Name: </label>
<input type="text" name="name" id="name" size="24" maxlength="24" value="[% cash_register.name | html %]" class="required focus" />
<span class="required">Required</span>
</li>
<li>
<label for="description">Description: </label>
<input type="text" name="description" id="description" size="24" value="[% cash_register.description | html %]"/>
</li>
<li>
<label for="branch">Library: </label>
<select id="branch" name="branch">
[% IF cash_register %]
[% PROCESS options_for_libraries libraries => Branches.all( selected => cash_register.branch ) %]
[% ELSE %]
[% PROCESS options_for_libraries libraries => Branches.all() %]
[% END %]
</select>
</li>
<li>
<label for="starting_float">Initial float: </label>
<input type="text" pattern='^\d+(?:\.\d{0,2})$' name="starting_float" id="starting_float" size="24" value="[% cash_register.starting_float | $Price on_editing => 1 %]" />
</li>
</ol>
</fieldset>
<fieldset class="action">
[% IF cash_register %]
<input type="submit" class="btn btn-primary" value="Save" />
[% ELSE %]
<input type="submit" class="btn btn-primary" value="Add" />
[% END %]
<a class="cancel" href="/cgi-bin/koha/admin/cash_registers.pl?op=list">Cancel</a>
</fieldset>
</form>
[% END %]
[% IF op == 'list' %]
<div id="toolbar" class="btn-toolbar">
<a class="btn btn-default" id="newcashregister" href="/cgi-bin/koha/admin/cash_registers.pl?op=add_form"><i class="fa fa-plus"></i> New cash register</a>
</div>
<h1>Cash registers</h1>
<div class="page-section">
<h2>Cash registers for <select id="branch_filter" name="branch_filter">
<option value=""></option>
[% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1, ) %]
</select>
</h2>
[% IF cash_registers.count %]
<table id="table_cash_registers">
<thead>
<th>Name</th>
<th>Description</th>
<th>Library</th>
<th>Library default</th>
<th>Initial float</th>
<th class="noExport">Actions</th>
</thead>
<tbody>
[% FOREACH cash_register IN cash_registers %]
[% IF cash_register.branch_default %]
<tr class="default">
[% ELSE %]
<tr>
[% END %]
<td>[% cash_register.name | html %]</td>
<td>[% cash_register.description | html %]</td>
<td>[% cash_register.library.branchname | html %]</td>
<td>[% IF cash_register.branch_default %]Yes[% ELSE %]No[% END %]</td>
<td>[% cash_register.starting_float | $Price %]</td>
[% IF cash_register.archived == '0' %]
<td class="actions">
<a class="btn btn-default btn-xs" href="cash_registers.pl?op=add_form&amp;id=[% cash_register.id | uri %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
[% IF cash_register.branch_default %]
<a class="btn btn-default btn-xs" href="cash_registers.pl?op=drop_default&amp;id=[% cash_register.id | uri %]"><i class="fa fa-archive"></i> Drop default</a>
[% ELSE %]
<a class="btn btn-default btn-xs" href="cash_registers.pl?op=make_default&amp;id=[% cash_register.id | uri %]"><i class="fa fa-archive"></i> Make default</a>
[% END %]
<a class="btn btn-default btn-xs" href="cash_registers.pl?op=archive&amp;id=[% cash_register.id | uri %]"><i class="fa fa-archive"></i> Archive</a>
</td>
[% ELSE %]
<td class="actions"><a class="btn btn-default btn-xs" href="cash_registers.pl?op=unarchive&amp;id=[% cash_register.id | uri %]"><i class="fa fa-trash-can-restore"></i> Restore</a></td>
[% END %]
</tr>
[% END %]
</tbody>
</table>
[% ELSE %]
<div class="dialog message">There are no cash registers defined. <a href="/cgi-bin/koha/admin/cash_registers.pl?op=add_form">Start adding cash registers</a>.</div>
[% END # /cash_register.count %]
</div>
[% END # /op == 'list' %]
</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>
function filterDataTable( table, column, term ){
if( column ){
table.column( column ).search( term ).draw();
} else {
table.search( term ).draw();
}
clearFilter( term );
}
function clearFilter( term ){
if( term == "" ){
$(".dt_button_clear_filter").addClass("disabled");
} else {
$(".dt_button_clear_filter").removeClass("disabled");
}
}
$(document).ready(function() {
var crtable = $("#table_cash_registers").DataTable($.extend(true, {}, dataTablesDefaults, {
"aoColumnDefs": [
{ "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable":false },
],
"aaSorting": [[ 1, "asc" ]],
"paginationType": "full",
}));
$("#branch_filter").on("change", function(){
// Table must be filtered by the <option>'s text, not its value
var opt = $(this).find("option:selected").text();
filterDataTable( crtable, 2, opt );
});
});
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]