Owen Leonard
9d0aae8889
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
345 lines
14 KiB
Cheetah
345 lines
14 KiB
Cheetah
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
|
|
<title>Koha › Administration › Classification Sources
|
|
<!-- TMPL_IF name="class_source_form" -->
|
|
<!-- TMPL_IF name="edit_class_source" -->
|
|
› Modify classification source
|
|
<!-- TMPL_ELSE -->
|
|
› Add classification source
|
|
<!-- /TMPL_IF -->
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF name="sort_rule_form" -->
|
|
<!-- TMPL_IF name="edit_sort_rule" -->
|
|
› Modify filing rule
|
|
<!-- TMPL_ELSE -->
|
|
› Add filing rule
|
|
<!-- /TMPL_IF -->
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF name="delete_class_source_form" -->
|
|
› Confirm deletion of classification source <!-- TMPL_VAR name="class_source" -->
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF name="delete_sort_rule_form" -->
|
|
› Confirm deletion of filing rule <!-- TMPL_VAR name="sort_rule" -->
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF name="delete_sort_rule_impossible" -->
|
|
› Cannot delete filing rule <!-- TMPL_VAR name="sort_rule" -->
|
|
<!-- /TMPL_IF -->
|
|
</title>
|
|
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
|
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
|
|
function CheckSourceForm(f) {
|
|
var ok=1;
|
|
var _alertString="";
|
|
var alertString2;
|
|
if (f.class_source.value.length==0) {
|
|
_alertString += "\n- " + _("Classification source code missing");
|
|
}
|
|
if (f.sort_rule.value.length==0) {
|
|
_alertString += "\n- " + _("Filing rule code missing");
|
|
}
|
|
if (f.description.value.length==0) {
|
|
_alertString += "\n- " + _("Description missing");
|
|
}
|
|
if (_alertString.length==0) {
|
|
document.Aform.submit();
|
|
} else {
|
|
alertString2 = _("Form not submitted because of the following problem(s)");
|
|
alertString2 += "\n------------------------------------------------------------------------------------\n";
|
|
alertString2 += _alertString;
|
|
alert(alertString2);
|
|
}
|
|
}
|
|
|
|
function CheckRuleForm(f) {
|
|
var ok=1;
|
|
var _alertString="";
|
|
var alertString2;
|
|
if (f.sort_rule.value.length==0) {
|
|
_alertString += "\n- " + _("Filing rule code missing");
|
|
}
|
|
if (f.description.value.length==0) {
|
|
_alertString += "\n- " + _("Description missing");
|
|
}
|
|
if (f.sort_routine.value.length==0) {
|
|
_alertString += "\n- " + _("Sort routine missing");
|
|
}
|
|
if (_alertString.length==0) {
|
|
document.Aform.submit();
|
|
} else {
|
|
alertString2 = _("Form not submitted because of the following problem(s)");
|
|
alertString2 += "\n------------------------------------------------------------------------------------\n";
|
|
alertString2 += _alertString;
|
|
alert(alertString2);
|
|
}
|
|
}
|
|
|
|
//]]>
|
|
</script>
|
|
</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> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › <!-- TMPL_IF name="display_lists" -->Classification Sources<!-- TMPL_ELSE --><a href="/cgi-bin/koha/admin/classsources.pl">Classification Sources</a><!-- /TMPL_IF -->
|
|
<!-- TMPL_IF name="class_source_form" -->
|
|
<!-- TMPL_IF name="edit_class_source" -->
|
|
› Modify classification source
|
|
<!-- TMPL_ELSE -->
|
|
› Add classification source
|
|
<!-- /TMPL_IF -->
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF name="sort_rule_form" -->
|
|
<!-- TMPL_IF name="edit_sort_rule" -->
|
|
› Modify filing rule
|
|
<!-- TMPL_ELSE -->
|
|
› Add filing rule
|
|
<!-- /TMPL_IF -->
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF name="delete_class_source_form" -->
|
|
› Confirm deletion of classification source <span class="ex">'<!-- TMPL_VAR name="class_source" -->'</span>
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF name="delete_sort_rule_form" -->
|
|
› Confirm deletion of filing rule <span class="ex">'<!-- TMPL_VAR name="sort_rule" -->'</span>
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF name="delete_sort_rule_impossible" -->
|
|
› Cannot delete filing rule <span class="ex">'<!-- TMPL_VAR name="sort_rule" -->'</span>
|
|
<!-- /TMPL_IF -->
|
|
</div>
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
<!-- TMPL_IF name="class_source_form" -->
|
|
<!-- TMPL_IF name="edit_class_source" -->
|
|
<h2>› Modify classification source</h2>
|
|
<!-- TMPL_ELSE -->
|
|
<h2>› Add classification source</h2>
|
|
<!-- /TMPL_IF -->
|
|
<form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
|
|
<input type="hidden" name="op" value="<!-- TMPL_VAR name="confirm_op"-->" />
|
|
<fieldset class="rows">
|
|
<ol>
|
|
<li>
|
|
<!-- TMPL_IF name="edit_class_source" -->
|
|
<span class="label">Classification source code: </span>
|
|
<input type="hidden" name="class_source" value="<!-- TMPL_VAR name="class_source" -->" />
|
|
<!-- TMPL_VAR name="class_source" -->
|
|
<!-- TMPL_ELSE -->
|
|
<label for="class_source">Classification source code: </label>
|
|
<input type="text" id="class_source" name="class_source" size="10" maxlength="10" />
|
|
<!-- /TMPL_IF -->
|
|
</li>
|
|
<li><label for="description">Description: </label>
|
|
<input type="text" id="description" name="description" size="50" maxlength="250"
|
|
value="<!-- TMPL_VAR name="description" escape="HTML" -->" />
|
|
</li>
|
|
<li><label for="used">Source in use?</label>
|
|
<!-- TMPL_IF NAME="used" --><input type="checkbox" id="used" name="used" value="used" checked="checked" /><!-- TMPL_ELSE -->
|
|
<input type="checkbox" id="used" name="used" value="used" /><!-- /TMPL_IF -->
|
|
</li>
|
|
<li><label for="sort_rule">Filing Rule: </label>
|
|
<select id="sort_rule" name="sort_rule">
|
|
<!-- TMPL_LOOP name="rules_dropdown" -->
|
|
<!-- TMPL_IF name="selected" -->
|
|
<option value="<!-- TMPL_VAR name="rule" -->" selected="selected"><!-- TMPL_VAR name="description" --> (<!-- TMPL_VAR name="rule" -->)</option>
|
|
<!-- TMPL_ELSE -->
|
|
<option value="<!-- TMPL_VAR name="rule" -->"><!-- TMPL_VAR name="description" --> (<!-- TMPL_VAR name="rule" -->)</option>
|
|
<!-- /TMPL_IF -->
|
|
<!-- /TMPL_LOOP -->
|
|
</select>
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
<fieldset class="action">
|
|
<!-- TMPL_IF name="edit_class_source" -->
|
|
<input type="button" value="Save"
|
|
onclick="CheckSourceForm(this.form)" />
|
|
<!-- TMPL_ELSE -->
|
|
<input type="button" value="Save"
|
|
onclick="CheckSourceForm(this.form)" />
|
|
<!-- /TMPL_IF-->
|
|
<a class="cancel" href="/cgi-bin/koha/admin/classsources.pl">Cancel</a>
|
|
</fieldset>
|
|
</form>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF name="sort_rule_form" -->
|
|
<!-- TMPL_IF name="edit_sort_rule" -->
|
|
<h2>› Modify filing rule</h2>
|
|
<!-- TMPL_ELSE -->
|
|
<h2>› Add filing rule</h2>
|
|
<!-- /TMPL_IF -->
|
|
<form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
|
|
<input type="hidden" name="op" value="<!-- TMPL_VAR name="confirm_op"-->" />
|
|
<fieldset class="rows">
|
|
<ol>
|
|
<li>
|
|
<!-- TMPL_IF name="edit_sort_rule" -->
|
|
<span class="label">Filing rule code: </span>
|
|
<input type="hidden" name="sort_rule" value="<!-- TMPL_VAR name="sort_rule" -->" />
|
|
<!-- TMPL_VAR name="sort_rule" -->
|
|
<!-- TMPL_ELSE -->
|
|
<label for="sort_rule">Filing rule code: </label>
|
|
<input type="text" id="sort_rule" name="sort_rule" size="10" maxlength="10" />
|
|
<!-- /TMPL_IF -->
|
|
</li>
|
|
<li><label for="description">Description: </label>
|
|
<input type="text" id="description" name="description" size="50" maxlength="250"
|
|
value="<!-- TMPL_VAR name="description" escape="HTML" -->" />
|
|
</li>
|
|
<li><label for="sort_routine">Filing Routine: </label>
|
|
<select id="sort_routine" name="sort_routine">
|
|
<!-- TMPL_LOOP name="routines_dropdown" -->
|
|
<!-- TMPL_IF name="selected" -->
|
|
<option value="<!-- TMPL_VAR name="routine" -->" selected="selected"><!-- TMPL_VAR name="routine" --></option>
|
|
<!-- TMPL_ELSE -->
|
|
<option value="<!-- TMPL_VAR name="routine" -->"><!-- TMPL_VAR name="routine" --></option>
|
|
<!-- /TMPL_IF -->
|
|
<!-- /TMPL_LOOP -->
|
|
</select>
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
<fieldset class="action">
|
|
<!-- TMPL_IF name="edit_sort_rule" -->
|
|
<input type="button" value="Save"
|
|
onclick="CheckRuleForm(this.form)" />
|
|
<!-- TMPL_ELSE -->
|
|
<input type="button" value="Save"
|
|
onclick="CheckRuleForm(this.form)" /> <!-- /TMPL_IF-->
|
|
<a class="cancel" href="/cgi-bin/koha/admin/classsources.pl">Cancel</a>
|
|
</fieldset>
|
|
</form>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF name="delete_class_source_form" -->
|
|
<div class="dialog alert"><h3>Confirm deletion of classification source <span class="ex">'<!-- TMPL_VAR name="class_source" -->'</span>?</h3>
|
|
<form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
|
|
<input type="hidden" name="op" value="<!-- TMPL_VAR name="confirm_op"-->" />
|
|
<input type="hidden" name="class_source" value="<!-- TMPL_VAR name="class_source" -->" />
|
|
<input type="submit" value="Delete classification source" class="approve" /></form>
|
|
<form action="<!-- TMPL_VAR name="script_name" -->" method="get"><input type="submit" value="No, Do Not Delete" class="deny" />
|
|
</form>
|
|
</div>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF name="delete_sort_rule_form" -->
|
|
<div class="dialog alert"><h3>Confirm deletion of filing rule <span class="ex">'<!-- TMPL_VAR name="sort_rule" -->'</span>?</h3>
|
|
<form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
|
|
<input type="hidden" name="op" value="<!-- TMPL_VAR name="confirm_op"-->" />
|
|
<input type="hidden" name="sort_rule" value="<!-- TMPL_VAR name="sort_rule" -->" />
|
|
<input type="submit" value="Delete filing rule" class="approve" />
|
|
</form>
|
|
<form action="<!-- TMPL_VAR name="script_name" -->" method="get"> <input type="submit" value="No, Do Not Delete" class="deny" /></form></div>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF name="delete_sort_rule_impossible" -->
|
|
<div class="dialog message"><h3>Cannot delete filing rule <span class="ex">'<!-- TMPL_VAR name="sort_rule" -->'</span></h3>
|
|
<p>The filing rule <!-- TMPL_VAR name="sort_rule" --> is used by at least one classification source. Please
|
|
remove it from all classification source definitions before trying again.
|
|
</p>
|
|
<form action="<!-- TMPL_VAR name="script_name" -->" method="get">
|
|
<input type="button" value="OK" class="approve" /></form>
|
|
</div>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF name="display_lists" -->
|
|
|
|
<div id="toolbar">
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
// prepare DOM for YUI Toolbar
|
|
$(document).ready(function() {
|
|
yuiToolbar();
|
|
});
|
|
// YUI Toolbar Functions
|
|
function yuiToolbar() {
|
|
new YAHOO.widget.Button("newsource");
|
|
new YAHOO.widget.Button("newrule");
|
|
} //]]>
|
|
</script>
|
|
<ul class="toolbar">
|
|
<li><a id="newsource" href="<!-- TMPL_VAR name="script_name" -->?op=add_source">New Classification Source</a></li>
|
|
<li><a id="newrule" href="<!-- TMPL_VAR name="script_name" -->?op=add_sort_rule">New Filing Rules</a></li>
|
|
</ul></div>
|
|
|
|
<h2>Classification Sources</h2>
|
|
<!-- TMPL_IF name="added_source" -->
|
|
<span class="problem">Added classification source <!-- TMPL_VAR name="added_source" --></span>
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF name="edited_source" -->
|
|
<span class="problem">Modified classification source <!-- TMPL_VAR name="edited_source" --></span>
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF name="deleted_source" -->
|
|
<span class="problem">Deleted classification source <!-- TMPL_VAR name="deleted_source" --></span>
|
|
<!-- /TMPL_IF -->
|
|
<table>
|
|
<tr>
|
|
<th>Code</th>
|
|
<th>Description</th>
|
|
<th>In Use</th>
|
|
<th>Filing Rule</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
<!-- TMPL_LOOP name="class_sources" -->
|
|
<tr>
|
|
<td><!-- TMPL_VAR name="code" --></td>
|
|
<td><!-- TMPL_VAR name="description" --></td>
|
|
<td><!-- TMPL_IF name="used" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
|
|
<td><!-- TMPL_VAR name="sortrule" --></td>
|
|
<td>
|
|
<a href="<!-- TMPL_VAR name="script_name" -->?op=edit_source&class_source=<!-- TMPL_VAR name="code" escape="HTML" -->">Edit</a>
|
|
<a href="<!-- TMPL_VAR name="script_name" -->?op=delete_source&class_source=<!-- TMPL_VAR name="code" escape="HTML" -->">Delete</a>
|
|
</td>
|
|
</tr>
|
|
<!-- /TMPL_LOOP -->
|
|
</table>
|
|
|
|
<div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
|
|
|
|
<div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
|
|
<h2>Classification Filing Rules</h2>
|
|
<!-- TMPL_IF name="added_rule" -->
|
|
<span class="problem">Added filing rule <!-- TMPL_VAR name="added_rule" --></span>
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF name="edited_rule" -->
|
|
<span class="problem">Modified filing rule <!-- TMPL_VAR name="edited_rule" --></span>
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF name="deleted_rule" -->
|
|
<span class="problem">Deleted filing rule <!-- TMPL_VAR name="deleted_rule" --></span>
|
|
<!-- /TMPL_IF -->
|
|
<table>
|
|
<tr>
|
|
<th>Code</th>
|
|
<th>Description</th>
|
|
<th>Sorting Routine</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
<!-- TMPL_LOOP name="class_sort_rules" -->
|
|
<tr>
|
|
<td><!-- TMPL_VAR name="rule" --></td>
|
|
<td><!-- TMPL_VAR name="description" --></td>
|
|
<td><!-- TMPL_VAR name="sort_routine" --></td>
|
|
<td>
|
|
<a href="<!-- TMPL_VAR name="script_name" -->?op=edit_sort_rule&sort_rule=<!-- TMPL_VAR name="rule" escape="HTML" -->">Edit</a>
|
|
<a href="<!-- TMPL_VAR name="script_name" -->?op=delete_sort_rule&sort_rule=<!-- TMPL_VAR name="rule" escape="HTML" -->">Delete</a>
|
|
</td>
|
|
</tr>
|
|
<!-- /TMPL_LOOP -->
|
|
</table>
|
|
<div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
|
|
|
|
<!-- /TMPL_IF -->
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
<!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
|
|
</div>
|
|
</div>
|
|
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|