From 6ce993a505cb30052764553578067b21adc26607 Mon Sep 17 00:00:00 2001
From: Owen Leonard <oleonard@myacpl.org>
Date: Mon, 26 Aug 2019 18:01:03 +0000
Subject: [PATCH] Bug 23512: Reindent notices and slips page (letter.tt)
This patch re-indents the template for notices and slips. It
makes only whitespace changes. It should have no effect on the behavior
of the page.
To test, go to Tools -> Notices & slips.
Test every aspect of the notice creation and edit process. At each step
the page should work correctly.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
---
.../intranet-tmpl/prog/en/modules/tools/letter.tt | 873 +++++++++++----------
1 file changed, 464 insertions(+), 409 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt
index 1f4c8f20e8..f7392809d8 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt
@@ -5,476 +5,531 @@
[% USE ColumnsSettings %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
-<title>Koha › Tools › Notices[% IF ( add_form or copy_form ) %][% IF ( modify ) %] › Modify notice[% ELSE %] › Add notice[% END %][% END %][% IF ( add_validate or copy_validate) %] › Notice added[% END %][% IF ( delete_confirm ) %] › Confirm deletion[% END %]</title>
+<title>
+ Koha › Tools › Notices
+ [% IF ( add_form or copy_form ) %]
+ [% IF ( modify ) %]
+ › Modify notice
+ [% ELSE %]
+ › Add notice
+ [% END %]
+ [% END %]
+ [% IF ( add_validate or copy_validate) %]
+ › Notice added
+ [% END %]
+ [% IF ( delete_confirm ) %]
+ › Confirm deletion
+ [% END %]
+</title>
[% INCLUDE 'doc-head-close.inc' %]
<style>#preview_template .modal-dialog { width : 80%; } .spinner { display: none; } @media (max-width: 767px) { #preview_template { margin: 0; width : auto; } }</style>
</head>
<body id="tools_letter" class="tools">
-[% INCLUDE 'header.inc' %]
-[% INCLUDE 'letters-search.inc' %]
+ [% INCLUDE 'header.inc' %]
+ [% INCLUDE 'letters-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › [% IF ( add_form or copy_form) %][% IF ( modify ) %]<a href="/cgi-bin/koha/tools/letter.pl">Notices & slips</a> › Modify notice[% ELSE %] <a href="/cgi-bin/koha/tools/letter.pl">Notices & slips</a> › Add notice[% END %][% ELSE %][% IF ( add_validate or copy_validate) %] <a href="/cgi-bin/koha/tools/letter.pl">Notices & slips</a> › Notice added[% ELSE %][% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/tools/letter.pl">Notices & slips</a> › Confirm deletion[% ELSE %]Notices & slips[% END %][% END %][% END %]</div>
+ <div id="breadcrumbs">
+ <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
+ <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
+ [% IF ( add_form or copy_form) %]
+ [% IF ( modify ) %]
+ <a href="/cgi-bin/koha/tools/letter.pl">Notices & slips</a> ›
+ Modify notice
+ [% ELSE %]
+ <a href="/cgi-bin/koha/tools/letter.pl">Notices & slips</a> ›
+ Add notice
+ [% END %]
+ [% ELSE %]
+ [% IF ( add_validate or copy_validate) %]
+ <a href="/cgi-bin/koha/tools/letter.pl">Notices & slips</a> ›
+ Notice added
+ [% ELSE %]
+ [% IF ( delete_confirm ) %]
+ <a href="/cgi-bin/koha/tools/letter.pl">Notices & slips</a> ›
+ Confirm deletion
+ [% ELSE %]
+ Notices & slips
+ [% END %]
+ [% END %]
+ [% END %]
+ </div> <!-- /#breadcrumbs -->
-<div id="preview_template" class="modal in" tabindex="-1" role="dialog" aria-labelledby="preview_template_label" aria-hidden="true">
- <div class="modal-dialog modal-lg">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
- <h3 id="preview_template_label">Preview notice template</h3>
- </div>
- <div class="modal-body">
- <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
- </div>
- <div class="modal-footer">
- <!-- TODO <a href="#" class="btn btn-default" id="preview_template_button" role="button" data-toggle="modal">Convert using the Template Toolkit syntax</a>-->
- <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
- </div>
- </div>
+ <div id="preview_template" class="modal in" tabindex="-1" role="dialog" aria-labelledby="preview_template_label" aria-hidden="true">
+ <div class="modal-dialog modal-lg">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
+ <h3 id="preview_template_label">Preview notice template</h3>
+ </div>
+ <div class="modal-body">
+ <div id="loading">
+ <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading
+ </div>
+ </div>
+ <div class="modal-footer">
+ <!-- TODO <a href="#" class="btn btn-default" id="preview_template_button" role="button" data-toggle="modal">Convert using the Template Toolkit syntax</a>-->
+ <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
+ </div>
+ </div>
+ </div>
</div>
-</div>
-
-[% IF add_form or copy_form %]
- <div class="main container-fluid">
- <div class="row">
- <div class="col-md-8 col-md-offset-2">
-[% ELSE %]
- <div class="main container-fluid">
- <div class="row">
- <div class="col-sm-10 col-sm-push-2">
- <main>
-[% END %]
-[% IF ( no_op_set ) %]
- <h1>Notices & slips</h1>
- <form method="get" action="/cgi-bin/koha/tools/letter.pl" id="selectlibrary">
- <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
- [% UNLESS independant_branch %]
- <p>
- Select a library :
- <select name="branchcode" id="branch" style="width:20em;">
- <option value="*">All libraries</option>
- [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
- </select>
- </p>
+ [% IF add_form or copy_form %]
+ <div class="main container-fluid">
+ <div class="row">
+ <div class="col-md-8 col-md-offset-2">
+ [% ELSE %]
+ <div class="main container-fluid">
+ <div class="row">
+ <div class="col-sm-10 col-sm-push-2">
+ <main>
[% END %]
- </form>
- <div id="toolbar" class="btn-toolbar">
- <div class="btn-group">
- <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> New notice <span class="caret"></span></button>
- <ul class="dropdown-menu">
- <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=acquisition">Acquisition</a></li>
- <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=catalogue">Catalog</a></li>
- <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=circulation">Circulation</a></li>
- <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=claimacquisition">Claim acquisition</a></li>
- <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=claimissues">Claim serial issue</a></li>
- <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=reserves">Holds</a></li>
- <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=orderacquisition">Order acquisition</a></li>
- <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=members">Patrons</a></li>
- <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=serial">Serials (new issue)</a></li>
- <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=suggestions">Suggestions</a></li>
+ [% IF ( no_op_set ) %]
+ <h1>Notices & slips</h1>
+ <form method="get" action="/cgi-bin/koha/tools/letter.pl" id="selectlibrary">
+ <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
+ [% UNLESS independant_branch %]
+ <p>
+ Select a library:
+ <select name="branchcode" id="branch" style="width:20em;">
+ <option value="*">All libraries</option>
+ [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
+ </select>
+ </p>
+ [% END %]
+ </form>
- </ul>
- </div>
- </div>
+ <div id="toolbar" class="btn-toolbar">
+ <div class="btn-group">
+ <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> New notice <span class="caret"></span></button>
+ <ul class="dropdown-menu">
+ <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=acquisition">Acquisition</a></li>
+ <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=catalogue">Catalog</a></li>
+ <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=circulation">Circulation</a></li>
+ <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=claimacquisition">Claim acquisition</a></li>
+ <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=claimissues">Claim serial issue</a></li>
+ <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=reserves">Holds</a></li>
+ <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=orderacquisition">Order acquisition</a></li>
+ <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=members">Patrons</a></li>
+ <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=serial">Serials (new issue)</a></li>
+ <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=suggestions">Suggestions</a></li>
- [% IF ( search ) %]
- <p>You searched for <b>[% searchfield | html %]</b></p>
- [% END %]
- [% IF ( letter && !independant_branch) %]
- [% select_for_copy = BLOCK %]
- <select name="branchcode">
- [% FOREACH l IN Branches.all() %]
- <option value="[% l.branchcode | html %]">Copy to [% l.branchname | html %]</option>
- [% END %]
- </select>
- [% END %]
- [% END %]
- [% IF letter %]
- <table id="lettert">
- <thead>
- <tr>
- <th>Library</th>
- <th>Module</th>
- <th>Code</th>
- <th>Name</th>
- <th class="nosort">Copy notice</th>
- <th class="nosort">Actions</th>
- </tr>
- </thead>
- <tbody>
- [% FOREACH lette IN letter %]
- [% can_edit = lette.branchcode || !independant_branch %]
- <tr>
- <td>[% IF lette.branchname %][% lette.branchname | html %][% ELSE %](All libraries)[% END %]</td>
- <td>
- [% SWITCH lette.module %]
- [% CASE 'acquisition' %]<span>Acquisition</span>
- [% CASE 'catalogue' %]<span>Catalog</span>
- [% CASE 'circulation' %]<span>Circulation</span>
- [% CASE 'orderacquisition' %]<span>Order acquisition</span>
- [% CASE 'claimacquisition' %]<span>Claim acquisition</span>
- [% CASE 'claimissues' %]<span>Claim serial issue</span>
- [% CASE 'reserves' %]<span>Holds</span>
- [% CASE 'members' %]<span>Patrons</span>
- [% CASE 'serial' %]<span>Serials (new issue)</span>
- [% CASE 'suggestions' %]<span>Suggestions</span>
- [% CASE %]<span>[% lette.module | html %]</span>
- [% END %]
- </td>
- <td>[% lette.code | html %]</td>
- <td>[% lette.name | html %]</td>
- <td class="actions">
- [% IF !independant_branch || !lette.branchcode %]
- <form method="post" action="/cgi-bin/koha/tools/letter.pl">
- <input type="hidden" name="op" value="copy_form" />
- <input type="hidden" name="oldbranchcode" value="[% lette.branchcode | html %]" />
- <input type="hidden" name="module" value="[% lette.module | html %]" />
- <input type="hidden" name="code" value="[% lette.code | html %]" />
- [% IF independant_branch %]
- <input type="hidden" name="branchcode" value="[% independant_branch | html %]" />
- [% ELSE %]
- [% select_for_copy | $raw %]
- [% END %]
- <button class="btn btn-default btn-xs"><i class="fa fa-clone"></i> Copy</button>
- </form>
+ </ul>
+ </div>
+ </div>
+
+ [% IF ( search ) %]
+ <p>You searched for <b>[% searchfield | html %]</b></p>
[% END %]
- </td>
- <td class="actions">
- [% IF can_edit %]
- <a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/letter.pl?op=add_form&branchcode=[% lette.branchcode | html %]&module=[% lette.module | html %]&code=[% lette.code | html %]"><i class="fa fa-pencil"></i> Edit</a>
+
+ [% IF ( letter && !independant_branch) %]
+ [% select_for_copy = BLOCK %]
+ <select name="branchcode">
+ [% FOREACH l IN Branches.all() %]
+ <option value="[% l.branchcode | html %]">Copy to [% l.branchname | html %]</option>
+ [% END %]
+ </select>
+ [% END %]
[% END %]
- [% IF !lette.protected && can_edit %]
- <a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/letter.pl?op=delete_confirm&branchcode=[% lette.branchcode | html %]&module=[% lette.module | html %]&code=[% lette.code | html %]"><i class="fa fa-trash"></i> Delete</a>
+
+ [% IF letter %]
+ <table id="lettert">
+ <thead>
+ <tr>
+ <th>Library</th>
+ <th>Module</th>
+ <th>Code</th>
+ <th>Name</th>
+ <th class="nosort">Copy notice</th>
+ <th class="nosort">Actions</th>
+ </tr>
+ </thead>
+ <tbody>
+ [% FOREACH lette IN letter %]
+ [% can_edit = lette.branchcode || !independant_branch %]
+ <tr>
+ <td>
+ [% IF lette.branchname %]
+ [% lette.branchname | html %]
+ [% ELSE %]
+ (All libraries)
+ [% END %]
+ </td>
+ <td>
+ [% SWITCH lette.module %]
+ [% CASE 'acquisition' %]<span>Acquisition</span>
+ [% CASE 'catalogue' %]<span>Catalog</span>
+ [% CASE 'circulation' %]<span>Circulation</span>
+ [% CASE 'orderacquisition' %]<span>Order acquisition</span>
+ [% CASE 'claimacquisition' %]<span>Claim acquisition</span>
+ [% CASE 'claimissues' %]<span>Claim serial issue</span>
+ [% CASE 'reserves' %]<span>Holds</span>
+ [% CASE 'members' %]<span>Patrons</span>
+ [% CASE 'serial' %]<span>Serials (new issue)</span>
+ [% CASE 'suggestions' %]<span>Suggestions</span>
+ [% CASE %]<span>[% lette.module | html %]</span>
+ [% END %]
+ </td>
+ <td>[% lette.code | html %]</td>
+ <td>[% lette.name | html %]</td>
+ <td class="actions">
+ [% IF !independant_branch || !lette.branchcode %]
+ <form method="post" action="/cgi-bin/koha/tools/letter.pl">
+ <input type="hidden" name="op" value="copy_form" />
+ <input type="hidden" name="oldbranchcode" value="[% lette.branchcode | html %]" />
+ <input type="hidden" name="module" value="[% lette.module | html %]" />
+ <input type="hidden" name="code" value="[% lette.code | html %]" />
+ [% IF independant_branch %]
+ <input type="hidden" name="branchcode" value="[% independant_branch | html %]" />
+ [% ELSE %]
+ [% select_for_copy | $raw %]
+ [% END %]
+ <button class="btn btn-default btn-xs"><i class="fa fa-clone"></i> Copy</button>
+ </form>
+ [% END %]
+ </td>
+ <td class="actions">
+ [% IF can_edit %]
+ <a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/letter.pl?op=add_form&branchcode=[% lette.branchcode | html %]&module=[% lette.module | html %]&code=[% lette.code | html %]"><i class="fa fa-pencil"></i> Edit</a>
+ [% END %]
+ [% IF !lette.protected && can_edit %]
+ <a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/letter.pl?op=delete_confirm&branchcode=[% lette.branchcode | html %]&module=[% lette.module | html %]&code=[% lette.code | html %]"><i class="fa fa-trash"></i> Delete</a>
+ [% END %]
+ </td>
+ </tr>
+ [% END %]
+ </tbody>
+ </table>
+ [% ELSE %]
+ <div class="dialog message">
+ [% IF ( branchcode ) %]
+ <p>There are no notices for this library.</p>
+ [% ELSE %]
+ <p>There are no notices.</p>
+ [% END %]
+ </div>
[% END %]
- </td>
- </tr>
- [% END %]
- </tbody>
- </table>
- [% ELSE %]
- <div class="dialog message">
- [% IF ( branchcode ) %]
- <p>There are no notices for this library.</p>
- [% ELSE %]
- <p>There are no notices.</p>
- [% END %]
- </div>
- [% END %]
-[% END %]
+ [% END %]
-[% IF add_form or copy_form %]
-<h1>[% IF ( modify ) %]Modify notice[% ELSE %]Add notice[% END %]</h1>
+ [% IF add_form or copy_form %]
+ <h1>[% IF ( modify ) %]Modify notice[% ELSE %]Add notice[% END %]</h1>
- <div id="toolbar" class="btn-toolbar">
- <div class="btn-group">
- <button class="btn btn-default" id="submit_form"><i class="fa fa-save"></i> Save</button>
- <button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
- <span class="caret"></span>
- </button>
- <ul class="dropdown-menu">
- <li><a id="saveandcontinue" href="#">Save and continue editing</a></li>
- </ul>
- </div>
- <a class="btn btn-default cancel" href="/cgi-bin/koha/tools/letter.pl"><i class="fa fa-remove"></i> Cancel</a>
- </div>
+ <div id="toolbar" class="btn-toolbar">
+ <div class="btn-group">
+ <button class="btn btn-default" id="submit_form"><i class="fa fa-save"></i> Save</button>
+ <button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
+ <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu">
+ <li><a id="saveandcontinue" href="#">Save and continue editing</a></li>
+ </ul>
+ </div>
+ <a class="btn btn-default cancel" href="/cgi-bin/koha/tools/letter.pl"><i class="fa fa-remove"></i> Cancel</a>
+ </div>
- <form id="add_notice" name="Aform" method="post" enctype="multipart/form-data" class="validate">
- [% IF add_form %]
- <input type="hidden" name="op" id="op" value="add_validate" />
- [% ELSE %]
- <input type="hidden" name="op" id="op" value="copy_validate" />
- [% END %]
+ <form id="add_notice" name="Aform" method="post" enctype="multipart/form-data" class="validate">
+ [% IF add_form %]
+ <input type="hidden" name="op" id="op" value="add_validate" />
+ [% ELSE %]
+ <input type="hidden" name="op" id="op" value="copy_validate" />
+ [% END %]
- <input type="hidden" name="checked" value="0" />
- [% IF ( modify ) %]
- <input type="hidden" name="add" value="0" />
- [% ELSE %]
- <input type="hidden" name="add" value="1" />
- [% END %]
- <fieldset class="rows">
- <input type="hidden" name="oldbranchcode" value="[% oldbranchcode | html %]" />
- <ol>
- [% IF independant_branch %]
- <input type="hidden" name="branchcode" value="[% independant_branch | html %]" />
- [% ELSE %]
- <li>
+ <input type="hidden" name="checked" value="0" />
- [% IF adding %]
- <label for="branch">Library:</label>
- <select name="branchcode" id="branch" style="width:20em;">
- <option value="">All libraries</option>
- [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
- </select>
- [% ELSE %]
- <span class="label">Library:</span>
- <input type="hidden" id="branch" name="branchcode" value="[% branchcode | html %]" />
- [% IF ( branchcode ) %]
- [% Branches.GetName( branchcode ) | html %]
- [% ELSE %]
- All libraries
- [% END %]
- [% END %]
- </li>
- [% END %]
- <li>
- <label for="module">Koha module:</label>
- <input type="hidden" name="oldmodule" value="[% module | html %]" />
- [% IF adding %]
- <select name="module" id="newmodule">
- [% ELSE %]
- <select name="module" id="module">
- [% END %]
+ [% IF ( modify ) %]
+ <input type="hidden" name="add" value="0" />
+ [% ELSE %]
+ <input type="hidden" name="add" value="1" />
+ [% END %]
+
+ <fieldset class="rows">
+ <input type="hidden" name="oldbranchcode" value="[% oldbranchcode | html %]" />
+ [% IF independant_branch %]
+ <input type="hidden" name="branchcode" value="[% independant_branch | html %]" />
+ <ol>
+ [% ELSE %]
+ <ol>
+ <li>
+ [% IF adding %]
+ <label for="branch">Library:</label>
+ <select name="branchcode" id="branch" style="width:20em;">
+ <option value="">All libraries</option>
+ [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
+ </select>
+ [% ELSE %]
+ <span class="label">Library:</span>
+ <input type="hidden" id="branch" name="branchcode" value="[% branchcode | html %]" />
+ [% IF ( branchcode ) %]
+ [% Branches.GetName( branchcode ) | html %]
+ [% ELSE %]
+ All libraries
+ [% END %]
+ [% END %]
+ </li>
+ [% END %]
+ <li>
+ <label for="module">Koha module:</label>
+ <input type="hidden" name="oldmodule" value="[% module | html %]" />
+ [% IF adding %]
+ <select name="module" id="newmodule">
+ [% ELSE %]
+ <select name="module" id="module">
+ [% END %]
[% IF ( module == "acquisition" ) %]
- <option value="acquisition" selected="selected">Acquisition</option>
+ <option value="acquisition" selected="selected">Acquisition</option>
[% ELSE %]
- <option value="acquisition" >Acquisition</option>
+ <option value="acquisition" >Acquisition</option>
[% END %]
[% IF ( module == "catalogue" ) %]
- <option value="catalogue" selected="selected">Catalog</option>
+ <option value="catalogue" selected="selected">Catalog</option>
[% ELSE %]
- <option value="catalogue" >Catalog</option>
+ <option value="catalogue" >Catalog</option>
[% END %]
[% IF ( module == "circulation" ) %]
- <option value="circulation" selected="selected">Circulation</option>
+ <option value="circulation" selected="selected">Circulation</option>
[% ELSE %]
- <option value="circulation">Circulation</option>
+ <option value="circulation">Circulation</option>
[% END %]
[% IF ( module == "orderacquisition" ) %]
- <option value="orderacquisition" selected="selected">Order acquisition</option>
+ <option value="orderacquisition" selected="selected">Order acquisition</option>
[% ELSE %]
- <option value="orderacquisition">Order acquisition</option>
+ <option value="orderacquisition">Order acquisition</option>
[% END %]
[% IF ( module == "claimacquisition" ) %]
- <option value="claimacquisition" selected="selected">Claim acquisition</option>
+ <option value="claimacquisition" selected="selected">Claim acquisition</option>
[% ELSE %]
- <option value="claimacquisition">Claim acquisition</option>
+ <option value="claimacquisition">Claim acquisition</option>
[% END %]
[% IF ( module == "claimissues" ) %]
- <option value="claimissues" selected="selected">Claim serial issue</option>
+ <option value="claimissues" selected="selected">Claim serial issue</option>
[% ELSE %]
- <option value="claimissues">Claim serial issue</option>
+ <option value="claimissues">Claim serial issue</option>
[% END %]
[% IF ( module == "reserves" ) %]
- <option value="reserves" selected="selected">Holds</option>
+ <option value="reserves" selected="selected">Holds</option>
[% ELSE %]
- <option value="reserves">Holds</option>
+ <option value="reserves">Holds</option>
[% END %]
[% IF ( module == "members" ) %]
- <option value="members" selected="selected">Patrons</option>
+ <option value="members" selected="selected">Patrons</option>
[% ELSE %]
- <option value="members">Patrons</option>
+ <option value="members">Patrons</option>
[% END %]
[% IF ( module == "serial" ) %]
- <option value="serial" selected="selected">Serials (new issue)</option>
+ <option value="serial" selected="selected">Serials (new issue)</option>
[% ELSE %]
- <option value="serial">Serials (new issue)</option>
+ <option value="serial">Serials (new issue)</option>
[% END %]
[% IF ( module == "suggestions" ) %]
- <option value="suggestions" selected="selected">Suggestions</option>
+ <option value="suggestions" selected="selected">Suggestions</option>
[% ELSE %]
- <option value="suggestions">Suggestions</option>
+ <option value="suggestions">Suggestions</option>
[% END %]
- </select>
- </li>
- <li>
- [% IF adding %]
- <label for="code" class="required">Code:</label>
- <input type="text" id="code" name="code" size="20" maxlength="20" value="" required="required"/>
- <span class="required">Required</span>
- [% ELSE %]
- <span class="label">Code:</span>
- <input type="hidden" id="code" name="code" value="[% code | html %]" />
- [% code | html %]
- [% END %]
- </li>
- <li>
- <label for="name" class="required">Name:</label>
- <input type="text" id="name" name="name" size="60" value="[% letter_name | html %]" required="required" />
- <span class="required">Required</span>
- </li>
- [% IF code and preview_is_available%]
- <li>
- <label for="name">Data for preview:</label>
- [% SWITCH code %]
- [% CASE 'CHECKIN' %]
- <input type="text" id="data_preview" name="data_preview" value="" placeholder="barcode" />
- [% CASE 'CHECKOUT' %]
- <input type="text" id="data_preview" name="data_preview" value="" placeholder="barcode|borrowernumber" />
- [% CASE 'HOLD_SLIP' %]
- <input type="text" id="data_preview" name="data_preview" value="" placeholder="biblionumber|borrowernumber" />
- [% CASE %]
- Not supported yet.
- [% END %]
- </li>
- [% END %]
- </ol>
- </fieldset>
- [% IF Koha.Preference('TranslateNotices') %]
- <div style="clear:both"></div>
- <div id="tabs">
- <ul>
- <li><a href="#lang_default">Default</a></li>
- [% FOR language IN languages %]
- [% FOR sublanguage IN language.sublanguages_loop %]
- [% IF language.plural %]
- <li><a href="#lang_[% sublanguage.rfc4646_subtag | uri %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</a></li>
- [% ELSE %]
- <li><a href="#lang_[% sublanguage.rfc4646_subtag | uri %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</a></li>
+ </select>
+ </li>
+ <li>
+ [% IF adding %]
+ <label for="code" class="required">Code:</label>
+ <input type="text" id="code" name="code" size="20" maxlength="20" value="" required="required"/>
+ <span class="required">Required</span>
+ [% ELSE %]
+ <span class="label">Code:</span>
+ <input type="hidden" id="code" name="code" value="[% code | html %]" />
+ [% code | html %]
+ [% END %]
+ </li>
+ <li>
+ <label for="name" class="required">Name:</label>
+ <input type="text" id="name" name="name" size="60" value="[% letter_name | html %]" required="required" />
+ <span class="required">Required</span>
+ </li>
+ [% IF code and preview_is_available%]
+ <li>
+ <label for="name">Data for preview:</label>
+ [% SWITCH code %]
+ [% CASE 'CHECKIN' %]
+ <input type="text" id="data_preview" name="data_preview" value="" placeholder="barcode" />
+ [% CASE 'CHECKOUT' %]
+ <input type="text" id="data_preview" name="data_preview" value="" placeholder="barcode|borrowernumber" />
+ [% CASE 'HOLD_SLIP' %]
+ <input type="text" id="data_preview" name="data_preview" value="" placeholder="biblionumber|borrowernumber" />
+ [% CASE %]
+ Not supported yet.
+ [% END %]
+ </li>
[% END %]
- [% END %]
+ </ol>
+ </fieldset>
+
+ [% IF Koha.Preference('TranslateNotices') %]
+ <div style="clear:both"></div>
+ <div id="tabs">
+ <ul>
+ <li><a href="#lang_default">Default</a></li>
+ [% FOR language IN languages %]
+ [% FOR sublanguage IN language.sublanguages_loop %]
+ [% IF language.plural %]
+ <li><a href="#lang_[% sublanguage.rfc4646_subtag | uri %]">[% sublanguage.native_description | html %] [% sublanguage.region_description | html %] ([% sublanguage.rfc4646_subtag | html %])</a></li>
+ [% ELSE %]
+ <li><a href="#lang_[% sublanguage.rfc4646_subtag | uri %]">[% sublanguage.native_description | html %] ([% sublanguage.rfc4646_subtag | html %])</a></li>
+ [% END %]
+ [% END %]
+ [% END %]
+ </ul>
[% END %]
- </ul>
- [% END %]
- [% FOREACH lang IN letters.keys %]
- <div id="lang_[% lang | html %]">
- <div class="transport-types" style="clear:both">
- [% FOR mtt IN letters.$lang.templates.keys.sort %]
- [% SET letter = letters.$lang.templates.$mtt %]
- <h3>
- [% SWITCH letter.message_transport_type %]
- [% CASE 'email' %]
- Email
- [% CASE 'print' %]
- Print
- [% CASE 'sms' %]
- SMS
- [% CASE 'feed' %]
- Feed
- [% CASE 'phone' %]
- Phone
- [% CASE %]
- [% letter.message_transport_type | html %]
- [% END %]
- </h3>
- [% IF letter.message_transport_type == "sms" and not Koha.Preference("SMSSendDriver") %]
- <fieldset class="rows mtt" id="[% letter.message_transport_type | html %]_[% lang | html %]" disabled="disabled">
- <div class="dialog message">You should enable the SMSSendDriver preference to use the SMS templates.</div>
- [% ELSIF letter.message_transport_type == "phone" and not Koha.Preference("TalkingTechItivaPhoneNotification") %]
- <fieldset class="rows mtt" id="[% letter.message_transport_type | html %]_[% lang | html %]" disabled="disabled">
- <div class="dialog message">You should enable the TalkingTechItivaPhoneNotification preference to use the phone templates.</div>
- [% ELSE %]
- <fieldset class="rows mtt" id="[% letter.message_transport_type | html %]_[% lang | html %]">
- [% END %]
- <ol>
- <li>
- <input type="hidden" name="message_transport_type" value="[% letter.message_transport_type | html %]" />
- <input type="hidden" name="lang" value="[% lang | html %]" />
- <label for="is_html_[% letter.message_transport_type | html %]_[% lang | html %]">HTML message:</label>
- [% IF letter.is_html %]
- <input type="checkbox" name="is_html_[% letter.message_transport_type | html %]" id="is_html_[% letter.message_transport_type | html %]_[% lang | html %]" value="1" checked="checked" />
- [% ELSE %]
- <input type="checkbox" name="is_html_[% letter.message_transport_type | html %]" id="is_html_[% letter.message_transport_type | html %]_[% lang | html %]" value="1" />
- [% END %]
- </li>
- <li>
- <label for="title_[% letter.message_transport_type | html %]_[% lang | html %]">Message subject:</label><input type="text" id="title_[% letter.message_transport_type | html %]_[% lang | html %]" name="title" size="60" value="[% letter.title | html %]" />
- </li>
- <li>
- <label for="SQLfieldname_[% letter.message_transport_type | html %]_[% lang | html %]">Message body:</label>
- [% IF letter.message_transport_type == 'sms' %]
- <span class="sms_counter" id="sms_counter_[% lang | html %]">[% IF letter.content && letter.content.length > 0 %][% letter.content.length | html %][% ELSE %]0[% END %]/160 characters</span>
- [% END %]
- <table>
- <tr>
- <td>
- <select name="SQLfieldname" id="SQLfieldname_[% letter.message_transport_type | html %]_[% lang | html %]" multiple="multiple" size="9">
- [% FOREACH SQLfieldname IN SQLfieldnames %]
- <option value="[% SQLfieldname.value | html %]">[% SQLfieldname.text | html %]</option>
- [% END %]
- </select>
- </td>
- <td class="actions">
- <button type="button" data-containerid="[% letter.message_transport_type | html %]_[% lang | html %]" class="btn btn-default btn-sm insert">Insert <i class="fa fa-long-arrow-right"></i></button>
- </td>
- <td><textarea name="content" data-lang="[% lang | html %]" class="content_[% letter.message_transport_type | html %]" id="content_[% letter.message_transport_type | html %]_[% lang | html %]" cols="80" rows="15">[% letter.content | html %]</textarea></td>
- </tr>
- </table>
- </li>
- [% IF preview_is_available %]
- <li>
- <a href="/cgi-bin/koha/svc/letters/preview" class="preview_template btn btn-default btn-xs" title="Preview this notice template" data-mtt="[% letter.message_transport_type | html %]" data-lang="[% lang | html %]"><i class="fa fa-eye"></i> Preview</a>
- </li>
- [% END %]
- </ol>
- </fieldset>
- [% END %]
- </div>
- </div> <!-- / #transport-types -->
- [% END %]
- [% IF Koha.Preference('TranslateNotices') %]
- </div>
- [% END %]
+ [% FOREACH lang IN letters.keys %]
+ <div id="lang_[% lang | html %]">
+ <div class="transport-types" style="clear:both">
+ [% FOR mtt IN letters.$lang.templates.keys.sort %]
+ [% SET letter = letters.$lang.templates.$mtt %]
+ <h3>
+ [% SWITCH letter.message_transport_type %]
+ [% CASE 'email' %]
+ Email
+ [% CASE 'print' %]
+ Print
+ [% CASE 'sms' %]
+ SMS
+ [% CASE 'feed' %]
+ Feed
+ [% CASE 'phone' %]
+ Phone
+ [% CASE %]
+ [% letter.message_transport_type | html %]
+ [% END %]
+ </h3>
+ [% IF letter.message_transport_type == "sms" and not Koha.Preference("SMSSendDriver") %]
+ <fieldset class="rows mtt" id="[% letter.message_transport_type | html %]_[% lang | html %]" disabled="disabled">
+ <div class="dialog message">You should enable the SMSSendDriver preference to use the SMS templates.</div>
+ [% ELSIF letter.message_transport_type == "phone" and not Koha.Preference("TalkingTechItivaPhoneNotification") %]
+ <fieldset class="rows mtt" id="[% letter.message_transport_type | html %]_[% lang | html %]" disabled="disabled">
+ <div class="dialog message">You should enable the TalkingTechItivaPhoneNotification preference to use the phone templates.</div>
+ [% ELSE %]
+ <fieldset class="rows mtt" id="[% letter.message_transport_type | html %]_[% lang | html %]">
+ [% END %]
+ <ol>
+ <li>
+ <input type="hidden" name="message_transport_type" value="[% letter.message_transport_type | html %]" />
+ <input type="hidden" name="lang" value="[% lang | html %]" />
+ <label for="is_html_[% letter.message_transport_type | html %]_[% lang | html %]">HTML message:</label>
+ [% IF letter.is_html %]
+ <input type="checkbox" name="is_html_[% letter.message_transport_type | html %]" id="is_html_[% letter.message_transport_type | html %]_[% lang | html %]" value="1" checked="checked" />
+ [% ELSE %]
+ <input type="checkbox" name="is_html_[% letter.message_transport_type | html %]" id="is_html_[% letter.message_transport_type | html %]_[% lang | html %]" value="1" />
+ [% END %]
+ </li>
+ <li>
+ <label for="title_[% letter.message_transport_type | html %]_[% lang | html %]">Message subject:</label><input type="text" id="title_[% letter.message_transport_type | html %]_[% lang | html %]" name="title" size="60" value="[% letter.title | html %]" />
+ </li>
+ <li>
+ <label for="SQLfieldname_[% letter.message_transport_type | html %]_[% lang | html %]">Message body:</label>
+ [% IF letter.message_transport_type == 'sms' %]
+ <span class="sms_counter" id="sms_counter_[% lang | html %]">[% IF letter.content && letter.content.length > 0 %][% letter.content.length | html %][% ELSE %]0[% END %]/160 characters</span>
+ [% END %]
+ <table>
+ <tr>
+ <td>
+ <select name="SQLfieldname" id="SQLfieldname_[% letter.message_transport_type | html %]_[% lang | html %]" multiple="multiple" size="9">
+ [% FOREACH SQLfieldname IN SQLfieldnames %]
+ <option value="[% SQLfieldname.value | html %]">[% SQLfieldname.text | html %]</option>
+ [% END %]
+ </select>
+ </td>
+ <td class="actions">
+ <button type="button" data-containerid="[% letter.message_transport_type | html %]_[% lang | html %]" class="btn btn-default btn-sm insert">Insert <i class="fa fa-long-arrow-right"></i></button>
+ </td>
+ <td>
+ <textarea name="content" data-lang="[% lang | html %]" class="content_[% letter.message_transport_type | html %]" id="content_[% letter.message_transport_type | html %]_[% lang | html %]" cols="80" rows="15">[% letter.content | html %]</textarea>
+ </td>
+ </tr>
+ </table>
+ </li>
+ [% IF preview_is_available %]
+ <li>
+ <a href="/cgi-bin/koha/svc/letters/preview" class="preview_template btn btn-default btn-xs" title="Preview this notice template" data-mtt="[% letter.message_transport_type | html %]" data-lang="[% lang | html %]"><i class="fa fa-eye"></i> Preview</a>
+ </li>
+ [% END %]
+ </ol>
+ </fieldset>
+ [% END %]
+ </div>
+ </div> <!-- / #transport-types -->
+ [% END %]
- <input type="hidden" id="redirect" name="redirect" value="" />
- <input type="hidden" id="section" name="section" value="[% section | html %]" />
- <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
- </form>
-[% END %]
+ [% IF Koha.Preference('TranslateNotices') %]
+ </div>
+ [% END %]
-[% IF ( add_validate or copy_validate) %]
- Data recorded
- <form action="[% action | html %]" method="post">
- <input type="submit" value="OK" />
- </form>
-[% END %]
+ <input type="hidden" id="redirect" name="redirect" value="" />
+ <input type="hidden" id="section" name="section" value="[% section | html %]" />
+ <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
+ </form>
+ [% END %]
-[% IF ( delete_confirm ) %]
- <div class="dialog alert">
- <h3>Delete notice?</h3>
- <table>
- <thead>
- <tr>
- <th>Library</th>
- <th>Module</th>
- <th>Code</th>
- <th>Name</th>
- </tr>
- </thead>
- <tr>
- <td>[% IF letter.branchcode %][% Branches.GetName( letter.branchcode ) | html %][% ELSE %](All libraries)[% END %]</td>
- <td>[% letter.module | html %]</td>
- <td>[% letter.code | html %]</td>
- <td>[% letter.name | html %]</td>
- </tr>
- </table>
- <form action="[% action | html %]" method="post">
- <input type="hidden" name="op" value="delete_confirmed">
- <input type="hidden" name="branchcode" value="[% letter.branchcode | html %]" />
- <input type="hidden" name="code" value="[% letter.code | html %]" />
- <input type="hidden" name="module" value="[% letter.module | html %]" />
- <button type="submit" class="approve"><i class="fa fa-check"></i> Yes, delete</button>
- </form>
+ [% IF ( add_validate or copy_validate) %]
+ Data recorded
+ <form action="[% action | html %]" method="post">
+ <input type="submit" value="OK" />
+ </form>
+ [% END %]
- <form action="[% action | html %]" method="get">
- <button type="submit" class="deny"><i class="fa fa-times"></i> No, do not delete</button>
- </form>
- </div>
-[% END %]
+ [% IF ( delete_confirm ) %]
+ <div class="dialog alert">
+ <h3>Delete notice?</h3>
+ <table>
+ <thead>
+ <tr>
+ <th>Library</th>
+ <th>Module</th>
+ <th>Code</th>
+ <th>Name</th>
+ </tr>
+ </thead>
+ <tr>
+ <td>[% IF letter.branchcode %][% Branches.GetName( letter.branchcode ) | html %][% ELSE %](All libraries)[% END %]</td>
+ <td>[% letter.module | html %]</td>
+ <td>[% letter.code | html %]</td>
+ <td>[% letter.name | html %]</td>
+ </tr>
+ </table>
+ <form action="[% action | html %]" method="post">
+ <input type="hidden" name="op" value="delete_confirmed">
+ <input type="hidden" name="branchcode" value="[% letter.branchcode | html %]" />
+ <input type="hidden" name="code" value="[% letter.code | html %]" />
+ <input type="hidden" name="module" value="[% letter.module | html %]" />
+ <button type="submit" class="approve"><i class="fa fa-check"></i> Yes, delete</button>
+ </form>
-[% IF ( delete_confirmed ) %]
- Data deleted
- <form action="[% action | html %]" method="post">
- <input type="submit" value="OK" />
- </form>
-[% END %]
+ <form action="[% action | html %]" method="get">
+ <button type="submit" class="deny"><i class="fa fa-times"></i> No, do not delete</button>
+ </form>
+ </div>
+ [% END %]
-[% IF add_form or copy_form %]
- </div> <!-- /.col-md-8 -->
- </div> <!-- /.row -->
-[% ELSE %]
- </main>
- </div> <!-- /.col-sm-10.col-sm-push-2 -->
+ [% IF ( delete_confirmed ) %]
+ Data deleted
+ <form action="[% action | html %]" method="post">
+ <input type="submit" value="OK" />
+ </form>
+ [% END %]
- <div class="col-sm-2 col-sm-pull-10">
- <aside>
- [% INCLUDE 'tools-menu.inc' %]
- </aside>
- </div> <!-- /.col-sm-2.col-sm-pull-10 -->
- </div> <!-- /.row -->
-[% END %]
+ [% IF add_form or copy_form %]
+ </div> <!-- /.col-md-8 -->
+ </div> <!-- /.row -->
+ [% ELSE %]
+ </main>
+ </div> <!-- /.col-sm-10.col-sm-push-2 -->
+
+ <div class="col-sm-2 col-sm-pull-10">
+ <aside>
+ [% INCLUDE 'tools-menu.inc' %]
+ </aside>
+ </div> <!-- /.col-sm-2.col-sm-pull-10 -->
+ </div> <!-- /.row -->
+ [% END %]
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/tools-menu.js") | $raw %]
--
2.11.0