Koha/koha-tmpl/intranet-tmpl/prog/en/modules/admin/ill_batch_statuses.tt
Pedro Amorim fc83fb3ebb
Bug 30719: (QA follow-up) Squash:
This is a squash of 25 QA patches located at:
    https://github.com/PTFS-Europe/koha/commits/new_30719

Bug 30719: (QA follow-up) Batch column should be hidden by default
Bug 30719: (QA follow-up) Fix wrong tt filter type
Bug 30719: (QA follow-up) Make atomicupdate idempotent
Bug 30719: (QA follow-up) Use COMMENT syntax in database files
Bug 30719: (QA follow-up) Fix tiny boolean is_system
Bug 30719: (QA follow-up) Add missing CONSTRAINT entries from kohastructure.sql to the atomicupdate file
Bug 30719: (QA follow-up) Add missing koha_object_class and
koha_objects_class methods
Bug 30719: (QA follow-up) Swap search to find
Bug 30719: (QA follow-up) Fix tests
Bug 30719: (QA follow-up) API terminology - id -> batch_id
Bug 30719: (QA follow-up) API terminology - borrowernumber -> patron_id
Bug 30719: (QA follow-up) API terminology - branchcode -> library_id
Bug 30719: (QA follow-up) Make mandatory illbatch_statuses translatable
Bug 30719: (QA follow-up) Improve translatability
Bug 30719: (QA follow-up) Fix capitalization of Interlibrary Loan
Bug 30719: (QA follow-up) Change Branch to Library in ILL batches table
Bug 30719: (QA follow-up) Add template WRAPPER to batch statuses breadrcrumbs
Bug 30719: (QA follow-up) Utilize patron_to_html function to display patron info in batches table
Bug 30719: (QA follow-up) Add mandatory batch statuses to the atomicupdate
Bug 30719: (QA follow-up) Add page-section to the batch statuses list page
Bug 30719: (QA follow-up) Style Save button on batch status edit page
Bug 30719: (QA follow-up) Add question mark to label string, rephrase new ILL batch button
Bug 30719: (QA follow-up) Add noExport class to action columns in batch list table and batch modal table
Bug 30719: (QA follow-up) Add page-section and headers to ILL batch table
Bug 30719: (QA follow-up) Perltidy

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-17 14:45:18 -03:00

165 lines
7.7 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 %] &rsaquo; [% END %]
Interlibrary loan batch statuses &rsaquo; Administration &rsaquo; Koha
</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="admin_ill_batch_statuses" class="admin">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'prefs-admin-search.inc' %]
[% 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' %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/ill_batch_statuses.pl">Interlibrary loan batch statuses</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
[% IF status.id %]
<span>Modify batch status</span>
[% ELSE %]
<span>New batch status</span>
[% END %]
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Interlibrary loan batch statuses
[% 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_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>
[% IF status.is_system %]
<strong>Yes</strong>
[% ELSE %]
<strong>No</strong>
[% END %]
<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-primary">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 %]
<div class="page-section">
<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&amp;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&amp;code=[% status.code | uri %]"><i class="fa fa-delete"></i> Delete</a>
[% END %]
</td>
</tr>
[% END %]
</tbody>
</table>
</page-section>
[% 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' %]