Koha/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tmpl
Chris Cormack a89c3085cf Bug 1542, fixing filter by area in reports dictionary
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-14 06:59:52 -05:00

327 lines
12 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; Reports &rsaquo; Guided Reports &rsaquo; Dictionary</title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!-- TMPL_INCLUDE NAME="calendar.inc" -->
</head>
<body>
<!-- TMPL_INCLUDE NAME="header.inc" -->
<!-- TMPL_INCLUDE NAME="circ-search.inc" -->
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a> &rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided Reports Wizard</a> &rsaquo; <strong> Dictionary </strong></div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<!-- TMPL_IF NAME="start_dictionary" -->
<!-- TMPL_INCLUDE NAME="dictionary-toolbar.inc" -->
<!-- /TMPL_IF -->
<h1>Dictionary</h1>
<!-- TMPL_IF NAME="start_dictionary" -->
<p>Use the dictionary to define custom criteria for reporting.</p>
<h2>Current Terms</h2>
<form action="/cgi-bin/koha/reports/dictionary.pl" method="post">
<input type="hidden" name="phase" value="View Dictionary" />
Filter by area <select name="areas">
<option value="">All</option>
<!-- TMPL_LOOP NAME="areas" -->
<option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
<!-- /TMPL_LOOP -->
</select>
<input name="submit" value="Go" type="submit" />
</form>
<br />
<table border="1" cellspacing="0" cellpadding="5">
<tr>
<th>Name</th>
<th>Description</th>
<th>Area</th>
<th>Definition</th>
<th>&nbsp;</th>
</tr>
<!-- TMPL_IF NAME="definitions" -->
<!-- TMPL_LOOP NAME="definitions" -->
<tr valign="top">
<td><!-- TMPL_VAR NAME="name" --></td>
<td><!-- TMPL_VAR NAME="description" --></td>
<td><!-- TMPL_VAR NAME="areaname" --></td>
<td><!-- TMPL_VAR NAME="saved_sql" --></td>
<td><form method="post" action="/cgi-bin/koha/reports/dictionary.pl">
<input type="hidden" name="id" value="<!-- TMPL_VAR NAME="id" -->" />
<input type="hidden" name="phase" value="Delete Definition" />
<input type="submit" name="submit" value="Delete Definition" />
</form></td>
</tr>
<!-- /TMPL_LOOP -->
<!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF -->
</table>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="new_dictionary" -->
<form action="/cgi-bin/koha/reports/dictionary.pl" method="post">
<div class="toptabs">
<ul class="ui-tabs-nav">
<li class="ui-tabs-selected"><span class="a">Step 1: Name</span></li>
<li><span class="a">Step 2: Area</span></li>
<li><span class="a">Step 3: Columns</span></li>
<li><span class="a">Step 4: Values</span></li>
</ul>
<div class="tabs-container">
<fieldset class="rows"><legend>Add New Definition</legend><ol>
<li>
<label for="definition_name">Definition Name:</label>
<input type="text" id="definition_name" name="definition_name" />
</li>
<li>
<label for="definition_description">Definition Description:</label>
<textarea name="definition_description" id="definition_description" rows="3" cols="20"></textarea>
</li>
</ol></fieldset>
<fieldset class="action"><input type="hidden" name="phase" value="New Term step 2" />
<input name="submit" value="Next" type="submit" /></fieldset>
</div>
</div>
</form>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="step_2" -->
<div class="toptabs">
<ul class="ui-tabs-nav">
<li><span class="a">Step 1: Name</span></li>
<li class="ui-tabs-selected"><span class="a">Step 2: Area</span></li>
<li><span class="a">Step 3: Columns</span></li>
<li><span class="a">Step 4: Values</span></li>
</ul>
<div class="tabs-container">
<form action="/cgi-bin/koha/reports/dictionary.pl" method="post">
<fieldset class="rows">
<legend>Add New Definition</legend>
<ol><li><input type="hidden" name="phase" value="New Term step 3" />
<input type="hidden" name="definition_name" value="<!-- TMPL_VAR NAME="definition_name" -->" />
<input type="hidden" name="definition_description" value="<!-- TMPL_VAR NAME="definition_description" -->" />
<label for="areas">Select table </label><select name="areas" id="areas">
<!-- TMPL_LOOP NAME="areas" -->
<option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name"--></option>
<!-- /TMPL_LOOP -->
</select></li>
</ol>
</fieldset>
<fieldset class="action"><input name="submit" value="Next" type="submit" /></fieldset>
</form>
</div>
</div>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="step_3" -->
<h1>Add New Definition</h1>
<div class="toptabs">
<ul class="ui-tabs-nav">
<li><span class="a">Step 1: Name</span></li>
<li><span class="a">Step 2: Area</span></li>
<li class="ui-tabs-selected"><span class="a">Step 3: Columns</span></li>
<li><span class="a">Step 4: Values</span></li>
</ul>
<div class="tabs-container">
<form action="/cgi-bin/koha/reports/dictionary.pl" method="post">
<input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
<input type="hidden" name="definition_name" value="<!-- TMPL_VAR NAME="definition_name" -->" />
<input type="hidden" name="definition_description" value="<!-- TMPL_VAR NAME="definition_description" -->" />
<table style="border: 0;"><tr><td><select id="availableColumns" name="oldcolumns2" size="25" style="width:200px;height:300px;">
<!-- TMPL_LOOP NAME="columns" -->
<!-- TMPL_IF NAME="table" -->
<!-- TMPL_IF NAME="__first__" -->
<!-- TMPL_ELSE -->
</optgroup>
<!-- /TMPL_IF -->
<optgroup label="<!-- TMPL_VAR NAME="table"-->">
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR NAME="name" -->">
<!-- TMPL_IF NAME="description" --><!-- TMPL_VAR NAME="description" -->
<!-- TMPL_ELSE -->
<!-- TMPL_VAR NAME="name" -->
<!-- /TMPL_IF -->
</option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</optgroup>
</select></td>
<td><input type="button" name="Add" value="Add" class="button" style="width : 6em; margin-bottom : .5em;" onclick="addColumn()" /><br /><input type="button" name="delete" value="&lt;&lt; Delete" class="button" style="width : 6em;" onclick="delColumn()" /> </td>
<td><select id="selectedColumns" name="columns" size="25" style="width:200px;height:300px;"></select> </td> </tr></table>
<input type="hidden" name="phase" value="New Term step 4" />
<input type="submit" name="submit" value="Next" />
</form>
</div>
</div>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="step_4" -->
<h1>Add New Definition</h1>
<div class="toptabs">
<ul class="ui-tabs-nav">
<li><span class="a">Step 1: Name</span></li>
<li><span class="a">Step 2: Area</span></li>
<li><span class="a">Step 3: Columns</span></li>
<li class="ui-tabs-selected"><span class="a">Step 4: Values</span></li>
</ul>
<div class="tabs-container">
<form action="/cgi-bin/koha/reports/dictionary.pl" method="post">
<input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
<input type="hidden" name="definition_name" value="<!-- TMPL_VAR NAME="definition_name" -->" />
<input type="hidden" name="definition_description" value="<!-- TMPL_VAR NAME="definition_description" -->" />
<input type="hidden" name="columnstring" value="<!-- TMPL_VAR NAME="columnstring" -->" />
<!-- TMPL_LOOP NAME="columns" -->
<p>
<input type="hidden" name="criteria_column" value="<!-- TMPL_VAR NAME="name" -->" />
<!-- TMPL_VAR NAME="name" -->
<!-- TMPL_IF NAME="distinct" -->
<select name="<!-- TMPL_VAR NAME="name" -->_value">
<!-- TMPL_LOOP NAME="values" -->
<option value="<!-- TMPL_VAR NAME="availablevalues"-->"><!-- TMPL_VAR NAME="availablevalues" --></option>
<!-- /TMPL_LOOP -->
</select>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="date" -->
<table>
<tr valign="top">
<td><input type="radio" name="<!-- TMPL_VAR NAME="name" -->_all" value="all" />All dates</td>
<td>OR</td>
<td><input type="radio" name="dates" value="range" />Date range<br />
<table>
<tr>
<td>Start of date range</td>
<td><input type="text" size="10" id="<!-- TMPL_VAR NAME="name" -->_start_value" name="<!-- TMPL_VAR NAME="name" -->_start_value" value="" />
<img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="buttonfrom1" style="cursor: pointer;" />
<script type="text/javascript">
Calendar.setup({
inputField : "<!-- TMPL_VAR NAME="name" -->_start_value",
ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
button : "buttonfrom1",
align : "Tl"
});
</script>
</td>
</tr>
<tr>
<td>End of date range</td>
<td>
<input type="text" size="10" id="<!-- TMPL_VAR NAME="name" -->_end_value" name="<!-- TMPL_VAR NAME="name" -->_end_value" value="" />
<img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="buttonfrom2" style="cursor: pointer;" />
<script type="text/javascript">
Calendar.setup({
inputField : "<!-- TMPL_VAR NAME="name" -->_end_value",
ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
button : "buttonfrom2",
align : "Tl"
});
</script>
</td>
</tr>
</table></td>
</tr>
</table>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="text" -->
<p>Search string matches <input type="text" size="13" name="<!-- TMPL_VAR NAME="name" -->_value" /></p>
<!-- /TMPL_IF -->
</p>
<!-- /TMPL_LOOP -->
<input type="hidden" name="phase" value="New Term step 5" />
<input type="submit" name="submit" value="Next" />
</form>
</div>
</div>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="step_5" -->
<form action="/cgi-bin/koha/reports/dictionary.pl" method="post">
<input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->" />
<input type="hidden" name="definition_name" value="<!-- TMPL_VAR NAME="definition_name" -->" />
<input type="hidden" name="definition_description" value="<!-- TMPL_VAR NAME="definition_description" -->" />
<input type="hidden" name="columnstring" value="<!-- TMPL_VAR NAME="columnstring" -->" />
<h3>Confirm Definition</h3>
<fieldset class="rows"><ol><li>
<span class="label">Name:</span>
<!-- TMPL_VAR NAME="definition_name" -->
</li>
<li>
<span class="label">Description:</span>
<!-- TMPL_VAR NAME="definition_description" -->
</li>
<li>
<span class="label">Area:</span>
<!-- TMPL_VAR NAME="areaname" -->
</li></ol>
<ol><li>
<table>
<tr>
<th>Columns</th>
<th>Values</th>
</tr>
<!-- TMPL_LOOP NAME="criteria_loop" -->
<tr>
<td><!-- TMPL_VAR NAME="name" --></td>
<td><!-- TMPL_VAR NAME="value" --></td>
</tr>
<!-- /TMPL_LOOP -->
</table></li></ol> </fieldset>
<fieldset class="action"><input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="query" -->" />
<input type="hidden" name="phase" value="New Term step 6" />
<input type="submit" name="submit" value="Save" /> </fieldset>
</form>
<!-- /TMPL_IF -->
</div>
</div>
<div class="yui-b">
<!-- TMPL_INCLUDE NAME="guided-reports-view.inc" -->
</div>
</div>
<script type="text/javascript">
//<![CDATA[
function setObjects() {
selectedColumnsObj=document.getElementById('selectedColumns');
availableColumnsObj=document.getElementById('availableColumns');
}
setObjects();
function addColumn() {
for (i=0;i<availableColumnsObj.length;i++) {
if (availableColumnsObj.options[i].selected==true) {
var newColumnObj=document.createElement("OPTION");
newColumnObj.value=availableColumnsObj.options[i].value;
newColumnObj.text=availableColumnsObj.options[i].text;
selectedColumnsObj.appendChild(newColumnObj);
newColumnObj.selected=true;
}
}
}
function delColumn() {
for (i=0;i<=selectedColumnsObj.options.length;i++) {
if (selectedColumnsObj.options.selectedIndex>=0) {
selectedColumnsObj.remove(selectedColumnsObj.options.selectedIndex)
}
}
}
//]]>
</script>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->