Koha/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tmpl
Owen Leonard b69ad9de3e Fix for Bug 5650, item type page key wrong
- Fixes for authorised_values.pl and itemtypes.pl
- Hiding table when there are no values to prevent js error
- Hiding table pager when there are no values
- Removing paging code from the script

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-26 19:50:49 +13:00

288 lines
13 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; Administration &rsaquo; Authorized Values <!-- TMPL_IF name="add_form" --> &rsaquo; <!-- TMPL_IF name="action_modify" -->Modify authorized value<!-- /TMPL_IF -->
<!-- TMPL_IF name="action_add_value" --> &rsaquo; New authorized value<!-- /TMPL_IF -->
<!-- TMPL_IF name="action_add_category" --> &rsaquo; New category<!-- /TMPL_IF --><!-- /TMPL_IF -->
<!-- TMPL_IF name="delete_confirm" --> &rsaquo; Confirm Deletion<!-- /TMPL_IF -->
<!-- TMPL_IF name="else" -->Authorized values<!-- /TMPL_IF --></title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.pager.js"></script>
<script type="text/javascript" id="js">$(document).ready(function() {
// call the tablesorter plugin
$("#table_authorized_values").tablesorter({
sortList: [[1,0]],
headers: { 4: { sorter: false}, 5: { sorter: false}}
}).tablesorterPager({container: $("#pagertable_authorized_values"),positionFixed: false,size: 50});
}); </script>
<script type="text/JavaScript" language="JavaScript">
//<![CDATA[
$(document).ready(function() {
$('#icons > ul').tabs();
});
//]]>
</script>
<style type="text/css">
fieldset.rows div.toptabs li { clear:none;margin-right:.5em;padding-bottom:0;width:auto; }
fieldset.rows div.toptabs .ui-tabs-nav li.ui-tabs-selected {background-color : transparent; }
fieldset.rows .ui-tabs-panel { margin-right : 10px; margin-left : 10px;margin-bottom:10px;}
</style>
</head>
<body>
<!-- TMPL_INCLUDE NAME="header.inc" -->
<!-- TMPL_INCLUDE NAME="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; <!-- TMPL_IF name="add_form" --> <a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized Values</a> &rsaquo; <!-- TMPL_IF name="action_modify" -->Modify authorized value<!-- /TMPL_IF -->
<!-- TMPL_IF name="action_add_value" -->New authorized value<!-- /TMPL_IF -->
<!-- TMPL_IF name="action_add_category" -->New category<!-- /TMPL_IF --><!-- /TMPL_IF -->
<!-- TMPL_IF name="delete_confirm" --> <a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized Values</a> &rsaquo; Confirm Deletion<!-- /TMPL_IF -->
<!-- TMPL_IF name="else" -->Authorized values<!-- /TMPL_IF --></div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<!-- TMPL_IF name="add_form" -->
<h1>
<!-- TMPL_IF name="action_modify" -->Modify authorized value<!-- /TMPL_IF -->
<!-- TMPL_IF name="action_add_value" -->New authorized value<!-- /TMPL_IF -->
<!-- TMPL_IF name="action_add_category" -->New category<!-- /TMPL_IF -->
</h1>
<form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
<input type="hidden" name="op" value="add_validate" />
<input type="hidden" name="offset" value="<!-- TMPL_VAR name="offset" -->" />
<fieldset class="rows"><ol>
<li>
<!-- TMPL_IF name="action_add_category" --><label for="category">Category</label>
<input type="text" name="category" id="category" size="10" maxlength="10" />
<!-- TMPL_ELSE --><span class="label">Category</span>
<input type="hidden" name="category" value="<!-- TMPL_VAR NAME='category' -->" /> <!-- TMPL_VAR NAME='category' -->
<!-- /TMPL_IF -->
</li>
<li>
<label for="authorised_value">Authorized value</label>
<!-- TMPL_IF name="action_modify" --><input type="hidden" id="id" name="id" value="<!-- TMPL_VAR name="id" -->" /><!-- /TMPL_IF -->
<input type="text" id="authorised_value" name="authorised_value" value="<!-- TMPL_VAR name="authorised_value" -->" maxlength="80" />
</li>
<li>
<label for="lib">Description</label>
<input type="text" name="lib" id="lib" value="<!-- TMPL_VAR name="lib" -->" maxlength="80" />
</li>
<li>
<label for="lib_opac">Description (OPAC)</label>
<input type="text" name="lib_opac" id="lib_opac" value="<!-- TMPL_VAR name="lib_opac" -->" maxlength="80" />
</li>
</ol>
<div id="icons" class="toptabs">
<h5 style="margin-left:10px;">Choose an Icon:</h5>
<ul>
<li><a href="/cgi-bin/koha/admin/authorised_values.pl?op=add_form&amp;category=<!-- TMPL_VAR NAME="category" -->#none">None</a></li>
<!-- TMPL_LOOP NAME="imagesets" -->
<!-- TMPL_IF NAME="imagesetactive" --><li class="ui-tabs-selected"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a href="/cgi-bin/koha/admin/authorised_values.pl?op=add_form&amp;category=<!-- TMPL_VAR NAME="category" -->#<!-- TMPL_VAR NAME="imagesetname" -->"><!-- TMPL_VAR name="imagesetname" --></a></li>
<!-- /TMPL_LOOP -->
</ul>
</div>
<div id="none"><ul>
<li><label for="noimage">No image: </label><input type="radio" name="imageurl" id="noimage" value="removeImage" /></li>
</ul>
<br class="clear" /></div>
<!-- TMPL_LOOP NAME="imagesets" -->
<div id="<!-- TMPL_VAR NAME="imagesetname" -->"><ul>
<!-- TMPL_LOOP NAME="images" -->
<li style="float: none; display: inline; clear : none; width: auto;">
<label> <!-- TMPL_IF NAME="StaffImageUrl" -->
<img src="<!-- TMPL_VAR name="StaffImageUrl" -->" alt="<!-- TMPL_VAR name="StaffImageUrl" -->" title="<!-- TMPL_VAR name="StaffImageUrl" -->" />
<!-- TMPL_ELSE -->
<!-- /TMPL_IF -->
<!-- TMPL_IF name="checked" -->
<input type="radio" name="imageurl" value="<!-- TMPL_VAR name="KohaImage" -->" checked="checked" />
<!-- TMPL_ELSE -->
<!-- TMPL_IF NAME="KohaImage" --> <!-- to delete the radio button if there is no image after -->
<input type="radio" name="imageurl" value="<!-- TMPL_VAR name="KohaImage" -->" />
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
</label>
</li>
<!-- /TMPL_LOOP --></ul>
<br class="clear" />
</div>
<!-- /TMPL_LOOP -->
</fieldset>
<fieldset class="action"> <input type="hidden" name="id" value="<!-- TMPL_VAR name="id" -->" />
<input type="submit" value="Save" /> <a class="cancel" href="/cgi-bin/koha/admin/authorised_values.pl?searchfield=<!-- TMPL_VAR NAME="category" -->">Cancel</a></fieldset>
</form>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="delete_confirm" -->
<div class="dialog alert">
<h3>Confirm Deletion</h3>
<table>
<tr>
<th>Category</th>
<th>Value</th>
<th>Description</th>
<th>Description (OPAC)</th>
</tr>
<tr>
<td><!-- TMPL_VAR name="searchfield" --></td>
<td><!-- TMPL_VAR name="Tvalue" --></td>
<td><!-- TMPL_VAR name="Tlib" --></td>
<td><!-- TMPL_VAR name="Tlib_opac" --></td>
</tr>
</table>
<form action="<!-- TMPL_VAR name=" script_name " -->" method="post">
<input type="hidden" name="op" value="delete_confirmed" />
<input type="hidden" name="id" value="<!-- TMPL_VAR name="id" -->" />
<input type="hidden" name="searchfield" value="<!-- TMPL_VAR name="searchfield" -->" /><fieldset class="action"><input type="submit" value="Yes, Delete" class="approve" /></form>
<form action="<!-- TMPL_VAR name=" script_name " -->" method="get"><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" /><input type="submit" value="No, Do Not Delete" class="deny" /></form>
</div>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="else" -->
<div id="toolbar">
<script type="text/javascript">
//<![CDATA[
// prepare DOM for YUI Toolbar
$(document).ready(function() {
yuiToolbar();
$('#category').find("input:submit").hide();
$('#searchfield').change(function() {
$('#category').submit();
});
});
// YUI Toolbar Functions
function yuiToolbar() {
new YAHOO.widget.Button("addauth");
new YAHOO.widget.Button("addcat");
}
//]]>
</script>
<ul class="toolbar">
<li><a id="addauth" href= "/cgi-bin/koha/admin/authorised_values.pl?op=add_form&amp;category=<!-- TMPL_VAR NAME="category" -->">New Authorized value for <!-- TMPL_VAR name="category" --></a></li>
<li><a id="addcat" href= "/cgi-bin/koha/admin/authorised_values.pl?op=add_form">New Category</a></li>
</ul></div>
<h1>Authorized values</h1>
<p>These values can be used in many pull down menus throughout the Koha system. You can define as many categories as you want, and as many authorized values as you want in each category.</p>
<p>When you define the MARC subfield structure, you can link a subfield to a authorized-value category. When the user ask for adding of modifying a biblio, the subfield is not entered through a free field, but though a list of authorized values</p>
<!-- TMPL_IF name="duplicate_category" -->
<div>
<span class="problem">Could not add value &quot;<!-- TMPL_VAR name="duplicate_value" -->&quot; for category
&quot;<!-- TMPL_VAR name="duplicate_category" -->&quot; &mdash; value already present.
</span>
</div>
<!-- /TMPL_IF -->
<form action="/cgi-bin/koha/admin/authorised_values.pl" method="post" id="category"><label for="searchfield">Show Category: </label><!-- TMPL_VAR name="tab_list" --> <input type="submit" value="Submit" /></form>
<!-- TMPL_IF EXPR="category eq 'Bsort1'" -->
<p>An authorized value attached to patrons, that can be used for stats purposes</p>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="category eq 'Bsort2'" -->
<p>An authorized value attached to patrons, that can be used for stats purposes</p>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="category eq 'Asort1'" -->
<p>An authorized value attached to acquisitions, that can be used for stats purposes</p>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="category eq 'Asort2'" -->
<p>An authorized value attached to acquisitions, that can be used for stats purposes</p>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="category eq 'SUGGEST'" -->
<p>Reasons to reject or accept patron suggestions</p>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="category eq 'DAMAGED'" -->
<p>Statuses to describe a damaged item</p>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="category eq 'LOST'" -->
<p>Statuses to describe a lost item</p>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="category eq 'MANUAL_INV'" -->
<p>Additional values for manual invoice types</p>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="category eq 'BOR_NOTES'" -->
<p>Values for custom patron notes</p>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="category eq 'LOC'" -->
<p>Values for shelving locations</p>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="category eq 'CCODE'" -->
<p>Values for collection codes</p>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="category eq 'NOT_LOAN'" -->
<p>Statuses to describe why an item is not for loan</p>
<!-- /TMPL_IF -->
<h3>Authorized values for category <!-- TMPL_VAR name="category" -->:</h3>
<!-- TMPL_IF NAME="loop" --><span id="pagertable_authorized_values" class="pager">
<form class="formpager">&nbsp;<strong>page(s)</strong>&nbsp;:
<img src="<!-- TMPL_VAR name="interface" -->/prog/img/first.png" class="first"/>
<img src="<!-- TMPL_VAR name="interface" -->/prog/img/prev.png" class="prev"/>
<input type="text" size="5" class="pagedisplay"/>
<img src="<!-- TMPL_VAR name="interface" -->/prog/img/next.png" class="next"/>
<img src="<!-- TMPL_VAR name="interface" -->/prog/img/last.png" class="last"/>
, entries/page :
<select class="pagesize">
<option value="10">10</option>
<option value="20">20</option>
<option value="30">30</option>
<option value="40">40</option>
<option selected="selected" value="50">50</option>
<option value="100">100</option>
<option value="200">200</option>
</select>
</form>
</span><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="loop" --><table id="table_authorized_values" class="tablesorter">
<thead><tr>
<th>Authorized value</th>
<th>Description</th>
<th>Description (OPAC)</th>
<th>Icon</th>
<th>Edit</th>
<th>Delete</th>
</tr>
</thead><tbody>
<!-- TMPL_LOOP name="loop" -->
<!-- TMPL_UNLESS name="__odd__" -->
<tr>
<!-- TMPL_ELSE -->
<tr>
<!-- /TMPL_UNLESS -->
<td><!-- TMPL_VAR name="authorised_value" --></td>
<td><!-- TMPL_VAR name="lib" --></td>
<td><!-- TMPL_VAR name="lib_opac" --></td>
<td><!-- TMPL_IF NAME="imageurl" --><img src="<!-- TMPL_VAR name="imageurl" -->" alt=""/><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td>
<td><a href="<!-- TMPL_VAR name="edit" -->">Edit</a></td>
<td><a href="<!-- TMPL_VAR name="delete" -->">Delete</a></td>
</tr>
<!-- /TMPL_LOOP -->
</tbody></table><!-- TMPL_ELSE -->
<div class="dialog message">There are no authorized values defined for <!-- TMPL_VAR NAME="category" --></div>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="isprevpage" -->
<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
<input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="prevpage" -->" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
<input type="submit" value="&lt;&lt; Previous" /></form>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
</div>
</div>
<div class="yui-b">
<!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
</div>
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->