Koha/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt
Kyle M Hall 0cab6f2ef3 Bug 14915: Use Font Awesome instead of Glyphicons for the staff intranet
We should be using Font Awesome for our icons instead of Glyphicons, for
the reasons discussed on bug 13696.

Test Plan:
1) Apply this patch
2) Note all Glyphicons have been replaced with FA icons in the staff intranet
3) git grep "icon-" ./koha-tmpl/intranet-tmpl/prog/en/modules/
   should give no results
4) git grep "icon-" ./koha-tmpl/intranet-tmpl/prog/en/includes/
   should give no results

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
We need a follow-up to cover the files changes since this
patch was written. Especially to cover the changes in the
label creator modules.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 10:02:42 -03:00

235 lines
8.5 KiB
Text

[% USE KohaDates %]
[% USE ColumnsSettings %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Administration &rsaquo; Currencies &amp; Exchange rates &rsaquo;
[% IF ( add_form ) %][% IF ( searchfield ) %]Modify currency '[% searchfield %]'[% ELSE %]New currency[% END %][% END %]
[% IF ( delete_confirm ) %]Confirm deletion of currency '[% searchfield %]'[% END %]
[% IF ( delete_confirmed ) %]Currency deleted[% END %]
[% IF ( else ) %]Currencies[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'columns_settings.inc' %]
<script type="text/javascript">
//<![CDATA[
function check_currency(val) {
if ( val == 1.0 ) {
$("#active").removeAttr('disabled');
$("#hint").html("");
} else {
$("#active").removeAttr('checked');
$("#active").attr('disabled','disabled');
$("#hint").html(_("The active currency must have a rate of 1.0"));
}
}
$(document).ready(function() {
columns_settings = [% ColumnsSettings.GetColumns( 'admin', 'currency', 'currencies-table', 'json' ) %]
var issuest = KohaTable("#currencies-table", {
"sDom": 'C<"clearfix">t',
"aaSorting": [],
"aoColumnDefs": [
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
{ "sType": "title-string", "aTargets" : [ "title-string" ] }
],
"bPaginate": false,
}, columns_settings);
// prevents users to check active with a currency != 1
$("#rate").keyup(function() {
check_currency( $(this).val() );
});
check_currency( $("#rate").val() );
});
//]]>
</script>
</head>
<body id="admin_currency" class="admin">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'currencies-admin-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; <a href="/cgi-bin/koha/admin/currency.pl">Currencies &amp; Exchange rates</a> &rsaquo; [% IF ( add_form ) %][% IF ( searchfield ) %]Modify currency '[% searchfield %]'[% ELSE %]New currency[% END %][% END %]
[% IF ( delete_confirm ) %]Confirm deletion of currency '<span class="ex">[% searchfield %]</span>'[% END %]
[% IF ( delete_confirmed ) %]Currency deleted[% END %]
[% IF ( else ) %]Currencies[% END %]
</div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
[% IF ( else ) %]
<div id="toolbar" class="btn-toolbar">
<a class="btn btn-small" id="newcurrency" href="[% script_name %]?op=add_form"><i class="fa fa-plus"></i> New currency</a>
</div>
[% END %]
[% IF ( add_form ) %]
<form action="[% script_name %]" name="Aform" method="post" class="validated">
<input type="hidden" name="op" value="save" />
<fieldset class="rows">
<legend>[% IF ( searchfield ) %]
Modify currency
[% ELSE %]
New currency
[% END %]</legend>
<ol>
<li>
[% IF ( searchfield ) %]
<span class="label">Currency: </span>
<input type="hidden" name="currency" id="currency" value="[% searchfield %]" />[% searchfield %]
[% ELSE %]
<label for="currency" class="required">Currency: </label>
<input type="text" name="currency" id="currency" size="50" maxlength="50" onblur="toUC(this);" required="required" class="required" /> <span class="required">Required</span>
[% END %]
</li>
<li>
<label for="rate" class="required">Rate: </label>
<input type="text" name="rate" id="rate" size="10" maxlength="10" value="[% rate %]" required="required" class="required" /> <span class="required">Required</span>
</li>
<li>
<label for="symbol" class="required">Symbol: </label>
<input type="text" name="symbol" id="symbol" size="5" maxlength="5" value="[% symbol %]" required="required" class="required" /> <span class="required">Required</span>
</li>
<li>
<label for="isocode">ISO code: </label>
<input type="text" name="isocode" id="isocode" size="5" maxlength="5" value="[% isocode %]" />
</li>
<li>
<span class="label">Last updated: </span>[% timestamp | $KohaDates %]
</li>
<li>
<label for="active">Active: </label>
[% IF ( active ) %]
<input type="checkbox" id="active" name="active" value="1" checked="checked" />
[% ELSE %]
<input type="checkbox" id="active" name="active" value="1" />
[% END %]
<span id="hint" class="hint"></span>
</li>
</ol>
</fieldset>
<fieldset class="action">
<input type="submit" value="Submit" />
<a href="/cgi-bin/koha/admin/currency.pl" class="cancel">Cancel</a>
</fieldset>
</form>
[% END %]
[% IF ( delete_confirm ) %]
[% IF ( totalgtzero ) %]
<div class="dialog message">
<h3>Cannot delete currency <span class="ex">'[% searchfield %]'</span></h3>
<p>This currency is used [% total %] times. Deletion not possible</p>
<form action="[% script_name %]" method="post">
<input type="submit" value="OK" class="approve" />
</form>
</div>
[% ELSE %]
<div class="dialog alert">
<h3>Confirm deletion of currency <span class="ex">'[% searchfield %]'</span></h3>
<table>
<tr><th>Currency</th>
<td>[% searchfield %]</td>
</tr>
<tr><th>Rate</th>
<td>[% rate %]</td>
</tr>
</table>
<form action="[% script_name %]" method="post">
<input type="hidden" name="op" value="delete_confirmed" />
<input type="hidden" name="searchfield" value="[% searchfield %]" />
<input type="submit" class="approve" value="Delete this currency" />
</form>
<form action="[% script_name %]" method="post">
<input type="submit" class="deny" value="No, do not delete" />
</form>
</div>
[% END %]
[% END %]
[% IF ( delete_confirmed ) %]
<div class="dialog message"><h3>Currency deleted</h3>
<form action="[% script_name %]" method="post">
<input type="submit" class="approve" value="OK" />
</form></div>
[% END %]
[% IF ( else ) %]
<h2>Currencies and exchange rates</h2>
[% IF ( loop ) %][% UNLESS ( activecurrency ) %]<div class="dialog alert"><h3>No active currency is defined</h3><p>Please edit one currency and mark it as active.</p></div>[% END %][% END %]
[% IF ( searchfield ) %]
You searched for [% searchfield %]</span>
[% END %]
<table id='currencies-table'>
<thead>
<tr>
<th>Currency</th>
<th>Rate</th>
<th>Symbol</th>
<th>ISO code</th>
<th class="title-string">Last updated</th>
<th>Active</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
[% FOREACH loo IN loop %]
<tr>
<td>[% loo.currency %]</td>
<td>[% loo.rate %]</td>
<td>[% loo.symbol |html %]</td>
<td>[% loo.isocode |html %]</td>
<td><span title="[% loo.timestamp %]">[% loo.timestamp | $KohaDates %]</span></td>
<td style="color:green;">[% IF ( loo.active ) %]✓[% END %]</td>
<td>
<a href="[% loo.script_name %]?op=add_form&amp;searchfield=[% loo.currency %]">Edit</a>
|
<a href="[% loo.script_name %]?op=delete_confirm&amp;searchfield=[% loo.currency %]">Delete</a>
</td>
</tr>
[% END %]
</tbody>
</table>
<br />
[% IF ( offsetgtzero ) %]
<a href="[% script_name %]?offset=[% prevpage %]">&lt;&lt; Previous</a>
[% END %]
[% IF ( ltcount ) %]
<a href="[% script_name %]?offset=[% nextpage %]">Next &gt;&gt;</a>
[% END %]
<div class="hint">
<p>
When importing MARC files via the staging tools, the tool will attempt to find and use the price of the currently active currency.
</p>
<p>
Some examples of compatible price fields include "$9.99", "9.99 USD", "$9.99 USD", "9.99 USD (10.00 CAN)", "$9.99 USD (paperback)".
These examples assume USD is the active currency.
</p>
</div>
[% END %]
</div>
</div>
<div class="yui-b">
[% INCLUDE 'admin-menu.inc' %]
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]