Adding formatting to Saved Results for Reports
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / reports / guided_reports_start.tmpl
index 2eacace..6e9d0bb 100644 (file)
@@ -13,7 +13,7 @@
 
 <div id="doc3" class="yui-t2">
 
-   <div id="bd">
+    <div id="bd">
     <div id="yui-main">
     <div class="yui-b">
 
      <h2>Guided Reports</h2>
      <p>Use the guided reports engine to create non standard reports.
 This feature aims to provide some middle ground between the built in
-canned reports and requiring a DBA to write the SQL code for you.</p>
+canned reports and writing custom SQL reports.</p>
      <form action="/cgi-bin/koha/reports/guided_reports.pl">
-     <h3>Build and Run existing Reports</h3>                                                                                         
+     <h3>Build And Run Reports</h3>                                                                                          
                <input type="submit" name="phase" value="Build new"/>
                <input type="submit" name="phase" value="Used saved"/>
                <input type="submit" name="phase" value="Create report from SQL"/>
 <!--           <input type="submit" name="phase" value="Create Compound Report"/> -->
-<h3>Define Custom Criteria</h3>
+</form>
+<h3>Reports Dictionary</h3>
 <p>Use the reports dictionary to define custom criteria to use in your
 reports</p>
+<form action="/cgi-bin/koha/reports/dictionary.pl">
 <input type="submit" name="phase" value="View Dictionary"/>
-       </form>
+</form>
 <!-- /TMPL_IF -->
 
 <!-- TMPL_IF NAME="saved1" -->
 <h1>Load Saved Reports</h1>
-Choose the report from the list
+<p>Choose the report to run from the list</p>
+<table>
 <form action="/cgi-bin/koha/reports/guided_reports.pl">
-<select name="reports">
+<th>Report Name</th><th>Type</th><th>Notes</th><th>Saved Results</th><th>Saved SQL</th><th>Delete</th>
 <!-- TMPL_LOOP NAME="savedreports" -->
-<option value="<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="report_name"--></option>
+<tr><td><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&phase=Run%20this%20report"><!-- TMPL_VAR NAME="report_name" --></td>
+<td><!-- TMPL_VAR NAME="type" --></td>
+<td><!-- TMPL_VAR NAME="notes" --></td>
+<td><!-- TMPL_IF NAME="date_run" --><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=retrieve%20results&id=<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="date_run" --></a><!-- /TMPL_IF -->
+</td>
+<td><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&phase=Show%20SQL">Show SQL</a></td>
+<td><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=<!-- TMPL_VAR NAME="id" -->&phase=Delete%20Saved">Delete</a></td></tr>
 <!-- /TMPL_LOOP -->
-</select>
-<input type="submit" name="phase" value="Run this report">
 </form>
+</table>
 <!-- /TMPL_IF -->
 
 
@@ -61,7 +69,8 @@ Choose the report from the list
 <!-- /TMPL_LOOP -->
 </select>
 <br />
-<input type="submit" name="phase" value="Report on this Area">
+<input type=button value="Back" onClick="history.go(-1)">
+ <input type="submit" name="phase" value="Report on this Area">
 </form>
 <!-- /TMPL_IF -->
 
@@ -77,19 +86,23 @@ Choose the report from the list
 <!-- /TMPL_LOOP -->
 </select>
 <br />
-<input type="submit" name="phase" value="Choose this type">
+<input type=button value="Back" onClick="history.go(-1)">
+ <input type="submit" name="phase" value="Choose this type">
 <br />
 </form>
 Tabular:
-<img src="http://staff-crc.dev.kohalibrary.com/intranet-tmpl/prog/img/reports-tabular-graphic.gif" />
-Summary:
-<img src="http://staff-crc.dev.kohalibrary.com/intranet-tmpl/prog/img/reports-summary-graphic.gif" />
+<img src="/intranet-tmpl/prog/img/reports-tabular-graphic.gif" />
+<!--- Summary and Matrix reports have not yet been implemented-->
+<!--Summary:
+<img src="/intranet-tmpl/prog/img/reports-summary-graphic.gif" />
 Matrix:
-<img src="http://staff-crc.dev.kohalibrary.com/intranet-tmpl/prog/img/reports-matrix-graphic.gif" />
+<img src="/intranet-tmpl/prog/img/reports-matrix-graphic.gif" />-->
+
 <!-- /TMPL_IF -->
 
 <!-- TMPL_IF NAME="build3" -->
 <h3>Step 3 of 6: Select Columns for Display</h3>
+<p>Note: Be careful selecting when selecting columns. If your choice is too broad it could result in a very large report that will either not complete, or slow your system down.</p>
 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
        <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
        <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
@@ -117,6 +130,7 @@ Matrix:
 <select id="selectedColumns" name="columns" multiple size="25" style="width:200px;height:300px;"></select>
 <input type="button" name="delete" value="delete" class="button" onClick="delColumn()"/>
 
+<input type=button value="Back" onClick="history.go(-1)">
 <input type="submit" name="phase" value="Choose these columns">
 </form>
 <!-- /TMPL_IF -->
@@ -134,8 +148,9 @@ Matrix:
 NAME="name" -->"> <!-- TMPL_VAR NAME="description" --> 
 </td>
 <!-- TMPL_IF NAME="date" -->
-<input type="text" size="10" id="<!-- TMPL_VAR NAME="name" -->_value" name="<!-- TMPL_VAR NAME="name" -->_value" value="" >                                             
-<img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="buttonfrom1" style="cursor: pointer;"  />                 
+<td><input type="text" size="10" id="<!-- TMPL_VAR NAME="name"
+-->_value" name="<!-- TMPL_VAR NAME="name" -->_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" -->_value",                               
@@ -144,19 +159,19 @@ button         : "buttonfrom1",
 align          : "Tl" 
 });     
 </script>          
-
+</td></tr>
 <!-- TMPL_ELSE -->
 <td><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>
-
+</td></tr>
 <!-- /TMPL_IF -->
 <!-- /TMPL_LOOP -->
-</td></tr></table><br />
+</table><br />
 <!-- TMPL_IF NAME="definitions" -->
-Dictionary Definitions <br />
+<h4>Dictionary Definitions</h4> <br />
 <table>
 <!-- TMPL_LOOP NAME="definitions" -->
 
@@ -166,7 +181,8 @@ TMPL_VAR NAME="id" -->"> <!-- TMPL_VAR NAME="name" --></td></tr>
 <!-- /TMPL_LOOP -->
 </table>
 <!-- /TMPL_IF -->
-<input type="submit" name="phase" value="Choose these criteria">
+<input type=button value="Back" onClick="history.go(-1)">
+ <input type="submit" name="phase" value="Choose these criteria">
 </form>
 <!-- /TMPL_IF -->
 
@@ -182,8 +198,8 @@ TMPL_VAR NAME="id" -->"> <!-- TMPL_VAR NAME="name" --></td></tr>
 <table>
 <!-- TMPL_LOOP NAME="total_by" -->
 <tr><td><input type=checkbox name="total_by" value="<!-- TMPL_VAR
-NAME="name" -->"> <!-- TMPL_VAR NAME="name"-->
-<select name="<!-- TMPL_VAR NAME="name" -->_tvalue">
+NAME="name" -->"> <!-- TMPL_VAR NAME="name"--></td>
+<td><select name="<!-- TMPL_VAR NAME="name" -->_tvalue">
 
 <!-- TMPL_LOOP NAME="select" -->
 <option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="value" --></option>
@@ -193,13 +209,14 @@ NAME="name" -->"> <!-- TMPL_VAR NAME="name"-->
 </td></tr>
 <!-- /TMPL_LOOP -->
 </table>
-<input type="submit" name="phase" value="Choose Totals">
+<input type=button value="Back" onClick="history.go(-1)">
+ <input type="submit" name="phase" value="Choose These Operations">
 </form>
 <!-- /TMPL_IF -->
 
 
 <!-- TMPL_IF NAME="build6" -->
-<h3>Step 6 of 6: Select the ordering</h3>
+<h3>Step 6 of 6: Select how you want the report ordered</h3>
 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
 <input type="hidden" name="area" value="<!-- TMPL_VAR NAME="area" -->">
 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
@@ -209,7 +226,7 @@ NAME="name" -->"> <!-- TMPL_VAR NAME="name"-->
 <input type="hidden" name="totals" value="<!-- TMPL_VAR NAME="totals" -->">
 <table><!-- TMPL_LOOP NAME="order_by" -->
 <tr><td><input type=checkbox name="order_by" value="<!-- TMPL_VAR
-NAME="name" -->"> <!-- TMPL_VAR NAME="name"-->
+NAME="name" -->"> <!-- TMPL_VAR NAME="name"--></td><td>
 <select name="<!-- TMPL_VAR NAME="name" -->_ovalue">
 
 <!-- TMPL_LOOP NAME="select" -->
@@ -221,7 +238,8 @@ NAME="name" -->"> <!-- TMPL_VAR NAME="name"-->
 <!-- /TMPL_LOOP -->
 </table>
 <br />
-<input type="submit" name="phase" value="Build Report">
+<input type=button value="Back" onClick="history.go(-1)">
+ <input type="submit" name="phase" value="Build Report">
 </form>
 <!-- /TMPL_IF -->
 
@@ -238,6 +256,7 @@ NAME="name" -->"> <!-- TMPL_VAR NAME="name"-->
 <!-- /TMPL_IF -->
 
 <!-- TMPL_IF NAME="save" -->
+<h1>Save Your Custom Report</h1>
 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
 <input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
 <input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
@@ -249,12 +268,13 @@ Notes: <textarea name="notes"></textarea><br />
 
 <!-- TMPL_IF NAME="execute" -->
 <h1>Show results</h1>
-<h2>Report Name</h2>
-<p>Report description</p>
+<h2><!-- TMPL_VAR NAME="name" --></h2>
+<p><!-- TMPL_VAR NAME="notes" --></p>
 <table>
 <!-- TMPL_LOOP NAME="results" -->
 <!-- TMPL_VAR NAME="row" -->
 <!-- /TMPL_LOOP -->
+<p>Download the report</p>
 </table>
 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
 <select name="format">
@@ -267,6 +287,7 @@ Notes: <textarea name="notes"></textarea><br />
 <!-- /TMPL_IF -->
 
 <!-- TMPL_IF NAME="create" -->
+<h1>Create Report From SQL</h1>
 <form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
 Report Name: <input type="text" name="reportname"> <br />
 Type:
@@ -303,6 +324,48 @@ Sub report:<select name="subreport">
 <!-- TMPL_VAR NAME="master" --> <br />
 <!-- TMPL_VAR NAME="subsql" -->
 <!-- /TMPL_IF -->
+
+
+<!-- TMPL_IF NAME="retresults" -->
+<h1>Saved Report Results</h1>
+<h2><!-- TMPL_VAR NAME="name" --></h2>
+<p><!-- TMPL_VAR NAME="notes" --></p>
+<table>
+<!-- TMPL_LOOP NAME="results" -->
+<!-- TMPL_VAR NAME = "row" -->
+<!-- /TMPL_LOOP -->
+</table>
+<p>Download the report</p>
+</table>
+<form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
+<select name="format">
+<option value="csv">Comma Separated Text</option>
+<option value="tab">Tab Separated Text</option>
+</select>
+<input type="submit" name="phase" value="Export">
+<input type="hidden" name="sql" value="<!-- TMPL_VAR NAME="sql" -->">
+</form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="showsql" -->
+<!-- TMPL_VAR NAME="sql" -->
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="save_successful" -->
+<!-- TMPL_VAR NAME="sql" -->
+<h1>Save Your Custom Report</h1>
+<h2>Your report has been saved</h2>
+<p>The report you have created has now been saved. You can now</p>
+<ul>
+       <li>Access this report from the: <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Used+saved">Saved Reports Page</a></li>
+       <li>Schedule this report to run using the: <a href="/cgi-bin/koha/tools/scheduler.pl">Scheduler Tool</a></li>
+       <li>Return to: <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Used+saved">Guided Reports</a></li>
+</ul>
+
+
+
+<!-- /TMPL_IF -->
+
 </div>
 </div>
 </div>