Koha/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudget.tmpl

368 lines
14 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; Administration &rsaquo; <!-- TMPL_IF NAME="else" -->Budgets<!-- /TMPL_IF --><!-- TMPL_IF name="add_form" -->Budgets &rsaquo; <!-- TMPL_IF NAME="aqbudgetid" -->Modify<!-- TMPL_ELSE -->Add<!-- /TMPL_IF --> Budget<!-- /TMPL_IF --><!-- TMPL_IF NAME="add_validate" -->Budgets &rsaquo; Budget Data Recorded<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirmed" -->Budgets &rsaquo; Budget Deleted<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirm" -->Budgets &rsaquo; Delete Book Budget?<!-- /TMPL_IF --></title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!-- TMPL_INCLUDE NAME="calendar.inc" -->
<!-- TMPL_IF name="add_form" -->
<script type="text/javascript">
//<![CDATA[
//
function isNotNull(f,noalert) {
if (f.value.length ==0) {
return false;
}
return true;
}
//
function toUC(f) {
var x=f.value.toUpperCase();
f.value=x;
return true;
}
//
function isNum(v,maybenull) {
var n = new Number(v.value);
if (isNaN(n)) {
return false;
}
if (maybenull==0 && v.value=='') {
return false;
}
return true;
}
//
function isDate(f) {
var t = Date.parse(f.value);
if (isNaN(t)) {
return false;
}
}
//
function Check(f) {
var ok=1;
var _alertString="";
var alertString2;
if (f.bookfundid.value.length==0) {
_alertString += "- bookfundid missing\n";
}
if (!(isNotNull(window.document.Aform.budgetamount,1))) {
_alertString += "- Budget missing\n";
}
if (_alertString.length==0) {
document.Aform.submit();
} else {
alertString2 = "Form not submitted because of the following problem(s)\n";
alertString2 += "------------------------------------------------------------------------------------\n\n";
alertString2 += _alertString;
alert(alertString2);
}
}
//]]>
</script>
<!-- /TMPL_IF -->
</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="else" -->Budgets<!-- /TMPL_IF --><!-- TMPL_IF name="add_form" --><a href="/cgi-bin/koha/admin/aqbudget.pl">Budgets</a> &rsaquo; <!-- TMPL_IF NAME="aqbudgetid" -->Modify<!-- TMPL_ELSE -->Add<!-- /TMPL_IF --> Budget<!-- /TMPL_IF --><!-- TMPL_IF NAME="add_validate" --><a href="/cgi-bin/koha/admin/aqbudget.pl">Budgets</a> &rsaquo; Budget Data Recorded<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirmed" --><a href="/cgi-bin/koha/admin/aqbudget.pl">Budgets</a> &rsaquo; Budget Deleted<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirm" --><a href="/cgi-bin/koha/admin/aqbudget.pl">Budgets</a> &rsaquo; Delete Book Budget?<!-- /TMPL_IF --></div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<!-- TMPL_IF NAME="add_validate" -->
<ul id="_informations"><li>Budget Data Recorded, return to <a href="<!-- TMPL_VAR name="script_name" -->">budget list</a></li></ul>
<!-- /TMPL_IF --> <!-- add_validate -->
<!-- TMPL_IF name="delete_confirmed" -->
<ul id="_informations"><li>Budget deleted, return to <a href="<!-- TMPL_VAR name="script_name" -->">budget list</a></li></ul>
<!-- /TMPL_IF --> <!-- delete_confirmed -->
<!-- TMPL_IF name="else" -->
<h1>Budgets</h1>
<form action="/cgi-bin/koha/admin/aqbudget.pl" method="post">
<fieldset class="rows"><legend>Search Budgets</legend><ol>
<li><label for="filter_bookfundid"> Book fund:</label>
<select name="filter_bookfundid" id="filter_bookfundid">
<option value="">----</option>
<!-- TMPL_LOOP name="filter_bookfundids" -->
<!-- TMPL_IF NAME="selected" -->
<option value="<!-- TMPL_VAR name="bookfundid" -->" selected="selected"><!-- TMPL_VAR name="bookfundid" --></option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR name="bookfundid" -->"><!-- TMPL_VAR name="bookfundid" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
</li>
<li><label for="filter_branchcode">Library:</label>
<select name="filter_branchcode" id="filter_branchcode">
<option value="">----</option>
<!-- TMPL_LOOP name="filter_branches" -->
<!-- TMPL_IF NAME="selected" -->
<option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="name" --></option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="name" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
</li>
<li><label for="filter_startdate_sign"> Start date:</label>
<select name="filter_startdate_sign" id="filter_startdate_sign">
<!-- TMPL_IF NAME="filter_startdate_sign_equal_selected" -->
<option value="=" selected="selected">=</option>
<!-- TMPL_ELSE -->
<option value="=">=</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="filter_startdate_sign_superior_selected" -->
<option value="&gt;=" selected="selected">&gt;=</option>
<!-- TMPL_ELSE -->
<option value="&gt;=">&gt;=</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="filter_startdate_sign_inferior_selected" -->
<option value="&lt;=" selected="selected">&lt;=</option>
<!-- TMPL_ELSE -->
<option value="&lt;=">&lt;=</option>
<!-- /TMPL_IF -->
</select>
<input type="text" size="10" id="filter_startdate" name="filter_startdate" value="<!-- TMPL_VAR Name="filter_startdate" -->" />
<img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="filter_startdate_button" alt="Show Calendar" />
<script type="text/javascript">
//<![CDATA[
Calendar.setup(
{
inputField : "filter_startdate",
ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
button : "filter_startdate_button"
}
);
//]]>
</script>
</li>
<li><label for="filter_enddate_sign"> End date:</label>
<select name="filter_enddate_sign" id="filter_enddate_sign">
<!-- TMPL_IF NAME="filter_enddate_sign_equal_selected" -->
<option value="=" selected="selected">=</option>
<!-- TMPL_ELSE -->
<option value="=">=</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="filter_enddate_sign_superior_selected" -->
<option value="&gt;=" selected="selected">&gt;=</option>
<!-- TMPL_ELSE -->
<option value="&gt;=">&gt;=</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="filter_enddate_sign_inferior_selected" -->
<option value="&lt;=" selected="selected">&lt;=</option>
<!-- TMPL_ELSE -->
<option value="&lt;=">&lt;=</option>
<!-- /TMPL_IF -->
</select>
<input type="text" size="10" id="filter_enddate" name="filter_enddate" value="<!-- TMPL_VAR Name="filter_enddate" -->" />
<img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="filter_enddate_button" alt="Show Calendar" />
<script type="text/javascript">
//<![CDATA[
Calendar.setup(
{
inputField : "filter_enddate",
ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
button : "filter_enddate_button"
}
);
//]]>
</script>
</li>
<li><label for="filter_amount_sign"> Budget amount:</label>
<select name="filter_amount_sign" id="filter_amount_sign">
<!-- TMPL_IF NAME="filter_amount_sign_equal_selected" -->
<option value="=" selected="selected">=</option>
<!-- TMPL_ELSE -->
<option value="=">=</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="filter_amount_sign_superior_selected" -->
<option value="&gt;=" selected="selected">&gt;=</option>
<!-- TMPL_ELSE -->
<option value="&gt;=">&gt;=</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="filter_amount_sign_inferior_selected" -->
<option value="&lt;=" selected="selected">&lt;=</option>
<!-- TMPL_ELSE -->
<option value="&lt;=">&lt;=</option>
<!-- /TMPL_IF -->
</select>
<input type="text" name="filter_amount" value="<!-- TMPL_VAR NAME="filter_amount" -->" size="8" />
</li>
</ol></fieldset>
<fieldset class="action"><input type="submit" name="filter" value="Search" /></fieldset>
</form>
<table>
<tr>
<th>Book fund</th>
<th>Branch</th>
<th>Start date</th>
<th>End date</th>
<th>Budget amount</th>
<th colspan="2">Actions</th>
</tr>
<!-- TMPL_LOOP name="budget" -->
<!-- TMPL_IF NAME="toggle" -->
<tr class="highlight">
<!-- TMPL_ELSE -->
<tr>
<!-- /TMPL_IF -->
<td><!-- TMPL_VAR NAME="bookfundid" --></td>
<td><!-- TMPL_VAR NAME="branchname" --></td>
<td><!-- TMPL_VAR NAME="startdate" --></td>
<td><!-- TMPL_VAR NAME="enddate" --></td>
<td><!-- TMPL_VAR NAME="budgetamount" --></td>
<td>
<a href="/cgi-bin/koha/admin/aqbudget.pl?op=add_form&amp;aqbudgetid=<!-- TMPL_VAR NAME="aqbudgetid" -->">Edit</a></td><td>
<a href="/cgi-bin/koha/admin/aqbudget.pl?op=delete_confirm&amp;aqbudgetid=<!-- TMPL_VAR NAME="aqbudgetid" -->">Delete</a>
</td>
</tr>
<!-- /TMPL_LOOP --> <!-- budget -->
</table>
<div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
<!-- /TMPL_IF --> <!-- else -->
<!-- TMPL_IF name="add_form" -->
<form action="/cgi-bin/koha/admin/aqbudget.pl" name="Aform" method="post">
<fieldset class="rows">
<legend><!-- TMPL_IF NAME="aqbudgetid" -->Modify<!-- TMPL_ELSE -->Add<!-- /TMPL_IF --> budget</legend>
<input type="hidden" name="op" value="add_validate" />
<input type="hidden" name="checked" value="0" />
<ol> <li>
<span class="label">Book fund: </span>
<input type="hidden" name="bookfundid" value="<!-- TMPL_VAR NAME="bookfundid" -->" />
<!-- TMPL_VAR NAME="bookfundname" -->
</li>
<li>
<label for="startdate">Start date (<!-- TMPL_VAR NAME="dateformat" -->): </label>
<input type="text" size="8" maxlength="10" id="startdate" name="startdate" value="<!-- TMPL_VAR Name="startdate" -->" />
<img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="startdate_button" alt="Show Calendar" />
<script type="text/javascript">
//<![CDATA[
Calendar.setup(
{
inputField : "startdate",
ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
button : "startdate_button"
}
);
//]]>
</script>
</li>
<li>
<label for="enddate">End date (<!-- TMPL_VAR NAME="dateformat" -->): </label>
<input type="text" size="8" maxlength="10" id="enddate" name="enddate" value="<!-- TMPL_VAR Name="enddate" -->" />
<img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="enddate_button" alt="Show Calendar" />
<script type="text/javascript">
//<![CDATA[
Calendar.setup(
{
inputField : "enddate",
ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
button : "enddate_button"
}
);
//]]>
</script>
</li>
<li>
<label for="budgetamount">Budget amount: </label>
<input type="text" name="budgetamount" id="budgetamount" value="<!-- TMPL_VAR NAME="budgetamount" -->" size="8" />
</li>
<li>
<label for="branch">Branch: </label>
<!-- TMPL_IF NAME="disable_branchselection" -->
<!-- Pierrick's note: I've found that a disabled select was not -->
<!-- giving its value to Perl :-/ So I use a hidden field trick -->
<input type="hidden" name="branch" id="branch" value="<!-- TMPL_VAR NAME="branch" -->" />
<select name="branch" disabled="disabled">
<!-- TMPL_ELSE -->
<select name="branch" id="branch">
<!-- /TMPL_IF -->
<option value="">----</option>
<!-- TMPL_LOOP NAME="branches" -->
<!-- TMPL_IF NAME="selected" -->
<option value="<!-- TMPL_VAR NAME="branchcode" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR NAME="branchcode" -->"><!-- TMPL_VAR NAME="branchname" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
</li></ol>
<!-- TMPL_IF NAME="aqbudgetid" -->
<input type="hidden" name="aqbudgetid" value="<!-- TMPL_VAR NAME="aqbudgetid" -->" />
<!-- /TMPL_IF -->
</fieldset>
<fieldset class="action">
<input type="button" value="Submit" onclick="Check(this.form)" /> <a class="cancel" href="/cgi-bin/koha/admin/aqbudget.pl">Cancel</a>
</fieldset>
</form>
<!-- /TMPL_IF --> <!-- add_form -->
<!-- TMPL_IF name="delete_confirm" -->
<fieldset>
<legend>Delete Book Budget?</legend>
<table>
<tr>
<th scope="row">Start date: </th>
<td><!-- TMPL_VAR NAME="startdate" --></td>
</tr>
<tr>
<th scope="row">End date: </th>
<td><!-- TMPL_VAR NAME="enddate" --></td>
</tr>
<tr>
<th scope="row">Budget Amount: </th>
<td><!-- TMPL_VAR NAME="budgetamount" --></td>
</tr>
</table>
</fieldset>
<form action="<!-- TMPL_VAR NAME="action" -->" method="post">
<fieldset class="action">
<input type="hidden" name="op" value="delete_confirmed" />
<input type="hidden" name="aqbudgetid" value="<!-- TMPL_VAR NAME="aqbudgetid" -->" />
<input type="submit" value="Delete this budget" />
<a class="cancel" href="/cgi-bin/koha/admin/aqbudget.pl">Cancel</a>
</fieldset>
</form>
<!-- /TMPL_IF -->
</div>
</div>
<div class="yui-b">
<!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
</div>
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->