Pedro Amorim
36680ea6c0
- UI adding support for batch statuses in batch UI - Admin UI for managing batch statuses - API specs Co-authored-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Edith Speller <Edith.Speller@ukhsa.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
168 lines
7.4 KiB
Text
168 lines
7.4 KiB
Text
[% USE raw %]
|
|
[% USE Asset %]
|
|
[% USE Branches %]
|
|
[% USE Price %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>
|
|
[% IF op =='add_form' %]
|
|
[% IF status.id %]
|
|
Modify batch status
|
|
[% ELSE %]
|
|
New batch status
|
|
[% END %] › [% END %]
|
|
Interlibrary Loan batch statuses › Administration › Koha
|
|
</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
|
|
<body id="admin_ill_batch_statuses" class="admin">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'prefs-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/ill_batch_statuses.pl">Interlibrary Loan batch statuses</a>
|
|
</li>
|
|
<li>
|
|
<a href="#" aria-current="page">
|
|
[% IF status.id %]
|
|
Modify
|
|
[% ELSE %]
|
|
New
|
|
[% END %] batch status
|
|
</a>
|
|
</li>
|
|
|
|
[% ELSE %]
|
|
<li>
|
|
<a href="#" aria-current="page">
|
|
Interlibrary Loan batch statuses
|
|
</a>
|
|
</li>
|
|
[% END %]
|
|
</ol>
|
|
</nav>
|
|
|
|
<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_saving' %]
|
|
<span>Batch status saved successfully</span>
|
|
[% CASE 'success_on_delete' %]
|
|
<span>Batch status deleted successfully</span>
|
|
[% CASE 'error_on_saving' %]
|
|
<span>An error occurred when saving this batch status</span>
|
|
[% CASE 'error_on_delete' %]
|
|
<span>An error occurred when deleting this batch status</span>
|
|
[% CASE %]
|
|
<span>[% m.code | html %]</span>
|
|
[% END %]
|
|
</div>
|
|
[% END %]
|
|
|
|
[% IF op == 'add_form' %]
|
|
[% IF status %]
|
|
<h1>Modify a batch status</h1>
|
|
[% ELSE %]
|
|
<h1>New batch status</h1>
|
|
[% END %]
|
|
|
|
<form action="/cgi-bin/koha/admin/ill_batch_statuses.pl" name="Aform" method="post" class="validated">
|
|
<input type="hidden" name="op" value="add_validate" />
|
|
<fieldset class="rows">
|
|
<ol>
|
|
<li>
|
|
<label for="name" class="required">Name: </label>
|
|
<input type="text" name="name" id="name" size="80" maxlength="100" class="required focus" required="required" value="[% status.name | html %]"><span class="required">Required. Maximum length is 100 letters</span>
|
|
</li>
|
|
<li>
|
|
<label for="code">Code: </label>
|
|
[% IF status %]
|
|
<strong>[% status.code | html %]</strong>
|
|
<input type="hidden" name="code" value="[% status.code | html %]" />
|
|
[% ELSE %]
|
|
<input type="text" name="code" id="code" size="80" maxlength="20" class="required" required="required" value="[% status.code | html %]"><span class="required">Required, specify UPPERCASE LETTERS. Maximum length is 20 letters</span>
|
|
[% END %]
|
|
</li>
|
|
<li>
|
|
<label for="is_system">Is a system status: </label>
|
|
<strong>[% status.is_system ? "Yes" : "No" | html %]</strong>
|
|
<input type="hidden" name="is_system" value="[% status.is_system | html %]" />
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
|
|
<fieldset class="action">
|
|
<button id="save_batch_status" class="btn btn-default">Save</button>
|
|
<a class="cancel" href="/cgi-bin/koha/admin/ill_batch_statuses.pl">Cancel</a>
|
|
</fieldset>
|
|
</form>
|
|
[% END %]
|
|
|
|
[% IF op == 'list' %]
|
|
<div id="toolbar" class="btn-toolbar">
|
|
<a class="btn btn-default" id="newillbatchstatus" href="/cgi-bin/koha/admin/ill_batch_statuses.pl?op=add_form"><i class="fa fa-plus"></i> New batch status</a>
|
|
</div>
|
|
|
|
<h1>Interlibrary Loan batch statuses</h1>
|
|
[% IF statuses.count %]
|
|
<table id="table_batch_statuses">
|
|
<thead>
|
|
<th>Name</th>
|
|
<th>Code</th>
|
|
<th>Is system</th>
|
|
<th class="noExport">Actions</th>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH status IN statuses %]
|
|
<tr>
|
|
<td>[% status.name | html %]</td>
|
|
<td>[% status.code | html %]</td>
|
|
<td>[% status.is_system ? "Yes" : "No" | html %]</td>
|
|
<td class="actions">
|
|
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/ill_batch_statuses.pl?op=add_form&code=[% status.code | uri %]"><i class="fa fa-pencil"></i> Edit</a>
|
|
[% IF !status.is_system %]
|
|
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/ill_batch_statuses.pl?op=delete&code=[% status.code | uri %]"><i class="fa fa-delete"></i> Delete</a>
|
|
[% END %]
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
[% ELSE %]
|
|
<div class="dialog message">
|
|
There are no batch statuses defined. <a href="/cgi-bin/koha/admin/ill_batch_statuses.pl?op=add_form">Create new batch status</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' %]
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|