Koha/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt
Kyle M Hall a8942c2884 Revert bug 13618 - "Prevent XSS in the Staff Client and the OPAC" due to performance issues
Revert "DBRev to make notes of the XSS patches and the new important dependency."

This reverts commit e140603a59.

Revert "Bug 13618: Specific for branches.opac_info"

This reverts commit 06e4a50f00.

Revert "Bug 13618: (follow-up) Specific for other prefs"

This reverts commit d6475a111f.

Revert "Bug 13618: Fix for debarredcomment and patron messages"

This reverts commit dd98c9df92.

Revert "Bug 13618: Do not display html tags in patron's notices"

This reverts commit a065b243fe.

Revert "Bug 13618: Do not display   and html tags in item fields content"

This reverts commit baeeaffbf8.

Revert "Bug 13618: Fix for system preference description"

This reverts commit a967a09261.

Revert "Bug 13618: Remove html filters for newly pushed code"

This reverts commit 0e98662b10.

Revert "Bug 13618: (follow-up) add missing lines for opac-shelves"

This reverts commit fc2fb605e5.

Revert "Bug 13618: (follow-up) Specific for ColumnsSettings"

This reverts commit bc308fdd9c.

Revert "Bug 13618: Fix for edit biblios and items"

This reverts commit 811c4e8402.

Revert "Bug 13618: followup to remove tabs"

This reverts commit ca8e8c397c.

Revert "Bug 13618: Fix last occurrences recently introduced to master"

This reverts commit bb417b256b.

Revert "Bug 13618: Fix for news"

This reverts commit ae5b98020a.

Revert "Bug 13618: Fix escape on sending baskets or shelves by email"

This reverts commit a7731ffe25.

Revert "Bug 13618: Specific for XSLTBloc"

This reverts commit 11fa38dc29.

Revert "Bug 13618: Specific for Salutation on editing a patron"

This reverts commit 36c07ad6d3.

Revert "Bug 13618: Specific for other prefs"

This reverts commit e6ea281a3b.

Revert "Bug 13618 - memberentrygen.tt errors Not a GLOB reference"

This reverts commit 7824874557.

Revert "Bug 13618: Specific for ColumnsSettings"

This reverts commit 1834da3da3.

Revert "Bug 13618: Specific for IntranetUser* and OPACUser* prefs"

This reverts commit 21ae62b253.

Revert "Bug 13618: Fix error 'Not a GLOB reference'"

This reverts commit 602bdbab4c.

Revert "Bug 13618: Specific for the ISBD view"

This reverts commit d254362435.

Revert "Bug 13618: Specific for pagination_bar"

This reverts commit 8837a8ae68.

Revert "Bug 13618: Specific places where we don't need to escape variables - intra"

This reverts commit 00eff140b3.

Revert "Bug 13618: Remove html filters at the intranet"

This reverts commit 7db851ff03.

Revert "Bug 13618: Specific places where we don't need to escape variables"

This reverts commit 49a3738b8d.

Revert "Bug 13618: Remove html filters at the OPAC"

This reverts commit cedaa0e23e.

Revert "Bug 13618: Use Template::Stash::AutoEscaping to use the html filter"

This reverts commit 01b38d3b13.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2016-02-11 19:39:53 +00:00

402 lines
21 KiB
Text

[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Administration &rsaquo; Libraries and groups
[% IF op == 'editcategory' %]
&rsaquo;[% IF category.categorycode %]Edit group [% category.categorycode%][% ELSE %]New group[% END %]
[% ELSIF op == 'delete_confirm_category' %]
&rsaquo; Confirm deletion of group [% category.categorycode %]
[% ELSIF op == 'add_form' %]
&rsaquo;[% IF library %]Modify library[% ELSE %]New library [% library.branchcode %][% END %]
[% ELSIF op == 'delete_confirm' %]
&rsaquo; Confirm deletion of library '[% library.branchcode %]'
[% END %]
</title>
[% INCLUDE 'doc-head-close.inc' %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
[% INCLUDE 'datatables.inc' %]
<script type="text/javascript" src="[% interface %]/lib/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
$("#branchest").dataTable($.extend(true, {}, dataTablesDefaults, {
"aoColumnDefs": [
{ "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
],
"iDisplayLength": 10,
"sPaginationType": "four_button"
}));
[% UNLESS library %]
$("#Aform").on("submit", function( event ) {
if ( $("#branchcode").val().match(/\s/) ) {
event.preventDefault();
alert(_("The library code entered contains whitespace characters. Please remove any whitespace characters from the library code"));
return false;
} else {
return true;
}
});
[% END %]
});
tinyMCE.init({
mode : "textareas",
theme : "advanced",
content_css : "[% themelang %]/css/tinymce.css",
plugins : "table,save,advhr,advlink,contextmenu",
theme_advanced_buttons1 : "save,|,bold,italic,|,cut,copy,paste,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,|,link,unlink,anchor,cleanup,help,code,advhr,",
theme_advanced_buttons2 : "tablecontrols,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,removeformat,|,visualaid,|,sub,sup,|,charmap",
// theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_path_location : "bottom",
theme_advanced_resizing : true,
apply_source_formatting : true
});
//]]>
</script>
</head>
<body id="admin_branches" class="admin">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-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/branches.pl">Libraries and groups</a>
[% IF op == 'add_form_category' %]
&rsaquo; [% IF category.categorycode %]Edit group [% category.categorycode %][% ELSE %]New group[% END %]
[% ELSIF op == 'delete_confirm_category' %]
&rsaquo; Confirm deletion of group [% category.categorycode %]
[% ELSIF op == 'add_form' %]
&rsaquo; [% IF library %]Modify library[% ELSE %]New library [% library.branchcode %][% END %]
[% ELSIF op == 'delete_confirm' %]
&rsaquo; Confirm deletion of library '[% library.branchcode %]'
[% END %]
</div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
[% FOR m IN messages %]
<div class="dialog [% m.type %]">
[% SWITCH m.code %]
[% CASE 'error_on_update' %]
An error occurred when updating this library. Perhaps it already exists.
[% CASE 'error_on_insert' %]
An error occurred when adding this library. The branchcode might already exist.
[% CASE 'error_on_delete' %]
An error occurred when deleting this library. Check the logs.
[% CASE 'success_on_update' %]
Library updated successfully.
[% CASE 'success_on_insert' %]
Library added successfully.
[% CASE 'success_on_delete' %]
Library deleted successfully.
[% CASE 'cannot_delete_library' %]
This library cannot be deleted. Patrons or items are still using it
[% IF m.data.patrons_count and m.data.items_count %]
([% m.data.patrons_count %] patrons and [% m.data.items_count %] items).
[% ELSIF m.data.patrons_count %]
([% m.data.patrons_count %] patrons).
[% ELSIF m.data.items_count %]
([% m.data.items_count %] items).
[% END %]
[% CASE 'error_on_update_category' %]
An error occurred when updating this library category. Perhaps it already exists.
[% CASE 'error_on_insert_category' %]
An error occurred when adding this library category. The categorycode might already exist.
[% CASE 'error_on_delete_category' %]
An error occurred when deleting this library category. Check the logs.
[% CASE 'success_on_update_category' %]
Library category updated successfully.
[% CASE 'success_on_insert_category' %]
Library category added successfully.
[% CASE 'success_on_delete_category' %]
Library category deleted successfully.
[% CASE 'cannot_delete_category' %]
This library category cannot be deleted. [% m.data.libraries_count %] libraries are still using it.
[% CASE %]
[% m.code %]
[% END %]
</div>
[% END %]
[% IF op == 'list' %]
<div id="toolbar" class="btn-toolbar">
<a class="btn btn-small" id="newbranch" href="/cgi-bin/koha/admin/branches.pl?op=add_form"><i class="fa fa-plus"></i> New library</a>
<a class="btn btn-small" id="newcategory" href="/cgi-bin/koha/admin/branches.pl?op=add_form_category"><i class="fa fa-plus"></i> New group</a>
</div>
[% END %]
[% IF op == 'add_form' %]
<h3>[% IF library %]Modify library[% ELSE %]New library[% END %]</h3>
<form action="/cgi-bin/koha/admin/branches.pl" id="Aform" name="Aform" class="validated" method="post">
<fieldset class="rows">
<input type="hidden" name="op" value="add_validate" />
[% IF library %]
<input type="hidden" name="is_a_modif" value="1" />
[% END %]
<ol>
<li>
[% IF library %]
<span class="label">Library code: </span>
<input type="hidden" name="branchcode" value="[% library.branchcode |html %]" />
[% library.branchcode %]
[% ELSE %]
<label for="branchcode" class="required">Library code: </label>
<input type="text" name="branchcode" id="branchcode" size="10" maxlength="10" value="[% library.branchcode |html %]" class="required" required="required" />
<span class="required">Required</span>
[% END %]
</li>
<li>
<label for="branchname" class="required">Name: </label>
<input type="text" name="branchname" id="branchname" size="80" value="[% library.branchname |html %]" class="required" required="required" />
<span class="required">Required</span>
</li>
</ol>
</fieldset>
[% IF categories %]
<fieldset class="rows"><legend>Group(s):</legend>
<ol>
[% FOREACH category IN categories %]
<li>
<label for="[% category.categorycode %]">[% category.categoryname %]: </label>
[% IF category and selected_categorycodes.grep(category.categorycode).size %]
<input type="checkbox" id="[% category.categorycode %]" name="selected_categorycode_[% category.categorycode %]" checked="checked" />
[% ELSE %]
<input type="checkbox" id="[% category.categorycode %]" name="selected_categorycode_[% category.categorycode %]" />
[% END %]
<span class="hint">[% category.codedescription %]</span>
</li>
[% END %]
</ol>
</fieldset>
[% END %]
<fieldset class="rows">
<ol>
<li><label for="branchaddress1">Address line 1: </label><input type="text" name="branchaddress1" id="branchaddress1" size="60" value="[% library.branchaddress1 |html %]" /></li>
<li><label for="branchaddress2">Address line 2: </label><input type="text" name="branchaddress2" id="branchaddress2" size="60" value="[% library.branchaddress2 |html %]" /></li>
<li><label for="branchaddress3">Address line 3: </label><input type="text" name="branchaddress3" id="branchaddress3" size="60" value="[% library.branchaddress3 |html %]" /></li>
<li><label for="branchcity">City: </label><input type="text" name="branchcity" id="branchcity" size="60" value="[% library.branchcity |html %]" /></li>
<li><label for="branchstate">State: </label><input type="text" name="branchstate" id="branchstate" size="60" value="[% library.branchstate |html %]" /></li>
<li><label for="branchzip">ZIP/Postal code: </label><input type="text" name="branchzip" id="branchzip" size="25" maxlength="25" value="[% library.branchzip |html %]" /></li>
<li><label for="branchcountry">Country: </label><input type="text" name="branchcountry" id="branchcountry" size="60" value="[% library.branchcountry |html %]" /></li>
<li><label for="branchphone">Phone: </label><input type="text" name="branchphone" id="branchphone" size="60" value="[% library.branchphone |html %]" /></li>
<li><label for="branchfax">Fax: </label><input type="text" name="branchfax" id="branchfax" size="60" value="[% library.branchfax |html %]" /></li>
<li><label for="branchemail">Email: </label><input type="text" name="branchemail" id="branchemail" class="email" size="80" value="[% library.branchemail |html %]" /></li>
<li><label for="branchreplyto">Reply-To (if different to Email): </label> <input type="text" name="branchreplyto" id="branchreplyto" class="email" size="80" value="[% library.branchreplyto |html %]" /></li>
<li><label for="branchreturnpath">Return-Path (if different to Email): </label> <input type="text" name="branchreturnpath" id="branchreturnpath" class="email" size="80" value="[% library.branchreturnpath |html %]" /></li>
<li><label for="branchurl">URL: </label><input type="text" name="branchurl" id="branchurl" size="80" value="[% library.branchurl |html %]" class="url" /></li>
<li><label for="opac_info">OPAC info: </label><textarea name="opac_info" id="opac_info">[% library.opac_info |html %]</textarea></li>
<li><label for="branchip">IP: </label><input type="text" name="branchip" id="branchip" size="15" maxlength="15" value="[% library.branchip |html %]" /> <span class="hint">Can be entered as a single IP, or a subnet such as 192.168.1.*</span></li>
<li><label for="branchnotes">Notes: </label><input type="text" name="branchnotes" id="branchnotes" size="80" value="[% library.branchnotes |html %]" /></li>
</ol>
</fieldset>
<fieldset class="action">
<input type="submit" value="Submit" />
<a class="cancel" href="/cgi-bin/koha/admin/branches.pl">Cancel</a>
</fieldset>
</form>
[% END %]
[% IF op == 'delete_confirm' and not ( items_count or patrons_count )%]
<form action="/cgi-bin/koha/admin/branches.pl" method="post">
<fieldset>
<legend>Confirm deletion of [% library.branchname %] ([% library.branchcode %])?</legend>
<input type="hidden" name="op" value="delete_confirmed" />
<input type="hidden" name="branchcode" value="[% library.branchcode |html %]" />
<input type="hidden" name="branchname" value="[% library.branchname |html %]">
<fieldset class="action">
<input type="submit" value="Delete Library" />
<a class="cancel" href="/cgi-bin/koha/admin/branches.pl">Cancel</a>
</fieldset>
</fieldset>
</form>
[% END %]
[% IF op == 'list' %]
<h3>Libraries</h3>
[% IF libraries %]
<table id="branchest">
<thead>
<tr>
<th>Name</th>
<th>Code</th>
<th>Address</th>
<th>Properties</th>
<th>IP</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
[% FOREACH library IN libraries %]
<tr>
<td>[% library.branchname |html %]</td>
<td>[% library.branchcode |html %]</td>
<td>
[% IF library.branchaddress1 %]
[% library.branchaddress1 |html %][% END %]
[% IF library.branchaddress2 %]
<br />[% library.branchaddress2 |html %][% END %]
[% IF library.branchaddress3 %]
<br />[% library.branchaddress3 |html %][% END %]
[% IF library.branchcity %]
<br />[% library.branchcity |html %][% END %][% IF ( library.branchstate ) %],
[% library.branchstate |html %][% END %]
[% IF library.branchzip %]
[% library.branchzip |html %][% END %]
[% IF library.branchcountry %]
<br />[% library.branchcountry |html %][% END %]
[% IF library.branchphone %]
<br />Ph: [% library.branchphone |html %][% END %]
[% IF library.branchfax %]
<br />Fax: [% library.branchfax |html %][% END %]
[% IF library.branchemail %]
<br /><a href="mailto:[% library.branchemail %]">[% library.branchemail |html %]</a>[% END %]
[% IF library.branchurl %]
<br /><a href="[% library.branchurl %]">[% library.branchurl |html %]</a>[% END %]
[% IF library.opac_info %]
<br />OPAC Info: <div>[% library.opac_info %]</div>[% END %]
[% IF library.branchnotes %]
<br />Notes: [% library.branchnotes |html %][% END %]
</td>
<td>
[% FOREACH category IN library.get_categories %]
[% category.categoryname %]<br />
[% END %]
</td>
<td>[% library.branchip %]</td>
<td>
<a href="/cgi-bin/koha/admin/branches.pl?op=add_form&amp;branchcode=[% library.branchcode %]">Edit</a>
</td>
<td>
<a href="/cgi-bin/koha/admin/branches.pl?op=delete_confirm&amp;branchcode=[% library.branchcode %]">Delete</a>
</td>
</tr>
[% END %]
</tbody>
</table>
[% ELSE %]
<div class="dialog message">There are no libraries defined. <a href="/cgi-bin/koha/admin/branches.pl?op=add_form">Start defining libraries</a>.</div>
[% END %]
[% IF group_types %]
[% FOREACH group_type IN group_types %]
<h3>[% IF group_type.categorytype == 'properties' %]Properties[% ELSIF group_type.categorytype == 'searchdomain' %]Search domain[% END %]</h3>
[% IF group_type.categories %]
<table>
<thead>
<tr>
<th>Name</th>
<th>Code</th>
<th>Description</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
[% FOREACH category IN group_type.categories %]
<tr>
<td>[% category.categoryname %]</td>
<td>[% category.categorycode %]</td>
<td>[% category.codedescription %]</td>
<td>
<a href="/cgi-bin/koha/admin/branches.pl?categorycode=[% category.categorycode %]&amp;op=add_form_category">Edit</a>
</td>
<td>
<a href="/cgi-bin/koha/admin/branches.pl?categorycode=[% category.categorycode %]&amp;op=delete_confirm_category">Delete</a>
</td>
</tr>
[% END %]
</tbody>
</table>
[% ELSE %]
[% IF group_type.categorytype == 'properties' %]
No properties defined.
[% ELSIF group_type.categorytype == 'searchdomain' %]
No search domain defined.
[% END %]
<a href="/cgi-bin/koha/admin/branches.pl?op=add_form_category">Add a new group</a>.
[% END %]
[% END %]
[% ELSE %]
<p>No groups defined.</p>
[% END %]
[% END %]
[% IF op == 'add_form_category' %]
<h3>[% IF category.categorycode %]Edit group [% category.categorycode %][% ELSE %]Add group[% END %]</h3>
<form action="/cgi-bin/koha/admin/branches.pl" name="Aform" method="post">
<input type="hidden" name="op" value="add_validate_category" />
[% IF category.categorycode %]
<input type="hidden" name="is_a_modif" value="1" />
[% END %]
<fieldset class="rows">
<ol>
<li>
[% IF category.categorycode %]
<span class="label">Category code: </span>
<input type="hidden" name="categorycode" id="categorycode" value="[% category.categorycode |html %]" />
[% category.categorycode %]
[% ELSE %]
<label for="categorycode">Category code:</label>
<input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" />
[% END %]
</li>
<li>
<label for="categoryname">Name: </label>
<input type="text" name="categoryname" id="categoryname" size="32" maxlength="32" value="[% category.categoryname |html %]" />
</li>
<li>
<label for="codedescription">Description: </label>
<input type="text" name="codedescription" id="codedescription" size="70" value="[% category.codedescription |html %]" />
</li>
<li>
<label for="categorytype">Category type: </label>
<select id="categorytype" name="categorytype">
[% IF category.categorytype == 'properties' %]
<option value="searchdomain">Search domain</option>
<option value="properties" selected="selected">Properties</option>
[% ELSE %]
<option value="searchdomain">Search domain</option>
<option value="properties">Properties</option>
[% END %]
</select>
</li>
<li>
<label for="show_in_pulldown">Show in search pulldown: </label>
[% IF category.show_in_pulldown %]
<input type="checkbox" name="show_in_pulldown" id="show_in_pulldown" checked="checked"/>
[% ELSE %]
<input type="checkbox" name="show_in_pulldown" id="show_in_pulldown" />
[% END %]
</li>
</ol>
</fieldset>
<fieldset class="action"><input type="submit" value="Update" /></fieldset>
</form>
[% END %]
[% IF op == 'delete_confirm_category' %]
<div class="dialog message">
Are you sure you want to delete the group '[% category.codedescription %]' ([% category.categorycode %])?
<form action="/cgi-bin/koha/admin/branches.pl" method="post">
<input type="hidden" name="op" value="delete_confirmed_category" />
<input type="hidden" name="categorycode" value="[% category.categorycode |html %]" />
<input type="submit" value="Delete" />
<a class="cancel" href="/cgi-bin/koha/admin/branches.pl">Cancel</a>
</form>
</div>
[% END %]
</div>
</div>
<div class="yui-b">
[% INCLUDE 'admin-menu.inc' %]
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]