}).tablesorterPager({
container: $("#pagertable_reports"),
positionFixed: false,
- size: 50
+ size: 20
});
});
//]]>
</script>
</head>
-<body>
+<body id="rep_guided_reports_start" class="rep">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'circ-search.inc' %]
<div id="bd">
<div id="yui-main">
<div class="yui-b">
+ [% INCLUDE "reports-toolbar.inc" %]
[% IF ( start ) %]
<h2>Guided Reports</h2>
[% IF ( saved1 ) %]
[% IF ( savedreports ) %]<h1>Saved Reports</h1>
-<span id="pagertable_reports" class="pager">
- <form class="formpager"> <strong>page(s)</strong> :
- <img src="[% interface %]/prog/img/first.png" class="first"/>
- <img src="[% interface %]/prog/img/prev.png" class="prev"/>
- <input type="text" size="5" class="pagedisplay"/>
- <img src="[% interface %]/prog/img/next.png" class="next"/>
- <img src="[% interface %]/prog/img/last.png" class="last"/>
- , entries/page:
- <select class="pagesize">
- <option value="10">10</option>
- <option value="25" selected="selected">25</option>
- <option value="50">50</option>
- <option value="100">100</option>
- <option value="200">200</option>
- </select>
- </form>
-</span>
+<div id="pagertable_reports">
+[% INCLUDE 'table-pager.inc' perpage='20' %]
+</div>
<table id="table_reports" class="tablesorter">
<thead>
<optgroup label="[% column.table %]">
[% ELSE %]
<option value="[% column.name %]">
-[% IF ( column.description ) %][% column.description %]
+[% IF ( column.description ) %][% column.description %] / [% column.name %]
[% ELSE %]
[% column.name %]
[% END %]
<h1>Enter parameters for report [% name %]:</h1>
[% IF ( notes ) %]<p>[% notes %]</p>[% END %]
[% FOREACH sql_param IN sql_params %]
- <p>[% sql_param.entry %]: [% sql_param.input %]</p>
+ [% IF sql_param.input == 'date' %]
+ <p>
+ [% sql_param.entry %]: <input id="date_[% sql_param_entry %]" type="text" value="" size="10" name="sql_params">
+ <img id="date_picker_[% sql_param_entry %]" alt="Show Calendar" src="/intranet-tmpl/prog/en/lib/calendar/cal.gif">
+ <script type="text/javascript">
+ Calendar.setup( {
+ inputField : "date_[% sql_param_entry %]",
+ ifFormat : "%Y-%m-%d",
+ button : "date_picker_[% sql_param_entry %]"
+ } );
+ </script>
+ </p>
+ [% ELSE %]
+ <p>[% sql_param.entry %]: [% sql_param.input %]</p>
+ [% END %]
[% END %]
<input type='submit' value='Run the report'/>
</form>
<h1>[% name %]</h1>
[% IF ( notes ) %]<p>[% notes %]</p>[% END %]
[% IF ( unlimited_total ) %]<p>Total number of rows matching the (unlimited) query is [% unlimited_total %].</p>[% END %]
-<pre id="sql_output">[% sql %]</pre>
+<pre id="sql_output">[% sql |html %]</pre>
<div class="pages">[% pagination_bar %]</div>
[% UNLESS ( errors ) %]
<table>
<fieldset class="rows">
<legend>Create Report From SQL</legend>
<ol>
- <li><label for="reportname">Report Name:</label> <input type="text" id="reportname" name="reportname" [% IF ( reportname ) %] value="[% reportname %]"[% END %] /> </li>
- <li><label for="notes">Notes:</label> <textarea id="notes" name="notes" cols="50" rows="2">[% DEFAULT notes="" %]</textarea></li>
+ <li><label for="reportname">Report Name:</label>
+ [% IF ( reportname ) %]<input type="text" id="reportname" name="reportname" value="[% reportname %]" />
+ [% ELSE %]<input type="text" id="reportname" name="reportname" />[% END %]
+ </li>
+ <li><label for="notes">Notes:</label> <textarea id="notes" name="notes" cols="50" rows="2">[% notes %]</textarea></li>
<li><label for="types">Type:</label>
<select id="types" name="types">
<option value="1">Tabular</option>
<fieldset class="rows">
<legend>SQL:</legend>
<div style="margin:1em;">
-<textarea id="sql" name="sql" cols="50" rows="10">[% DEFAULT sql="" %]</textarea>
+<textarea id="sql" name="sql" cols="50" rows="10">[% sql %]</textarea>
</div>
</fieldset>
<fieldset class="action"><input type="hidden" name="phase" value="Save Report" />
-<input type="submit" name="submit" value="Save Report" /></fieldset>
+<input type="submit" name="submit" value="Save Report" /> <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved" class="cancel">Cancel</a>
+</fieldset>
</form>
[% END %]
[% END %]
[% IF ( showsql ) %]
-<textarea id="sql">[% sql %]</textarea>
+<fieldset class="rows">
+ <legend>[% reportname %]</legend>
+ <ol>
+ [% IF ( notes ) %]<li><span class="label">Notes:</span> [% notes %]</li>[% ELSE %][% END %]
+ <li><textarea id="sql">[% sql %]</textarea></li>
+ </ol>
+</fieldset>
[% END %]
[% IF ( editsql ) %]
<input type="hidden" name="phase" value="Update SQL" />
<input type="hidden" name="id" value="[% id %]"/>
<fieldset class="rows">
-<legend>Edit SQL</legend>
+<legend>Edit SQL report</legend>
<ol>
-<li><label for="reportname">Report Name:</label><input type="text" id="reportname" name="reportname" value="[% reportname %]" /></li>
+<li><label for="reportname">Report Name:</label><input type="text" id="reportname" name="reportname" value="[% reportname %]" size="50" /></li>
<li><label for="notes">Notes:</label><textarea id="notes" name="notes" cols="50" rows="2">[% notes %]</textarea></li>
<li><textarea id="sql" name="sql" rows="10" cols="60">[% sql %]</textarea></li>
</ol>
</fieldset>
<fieldset class="action">
-<input type="submit" name="submit" value="Update SQL" /></fieldset>
+<input type="submit" name="submit" value="Update SQL" /> <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved" class="cancel">Cancel</a>
+</fieldset>
</form>
[% IF ( save_successful ) %]
[% UNLESS ( errors ) %]
<h2>Your report has been saved</h2>
-<p>The report you have created has now been saved. You can now</p>
+<h4>[% reportname %]</h4>
<ul>
[% IF ( id ) %]
<li><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&phase=Run%20this%20report">Run this report</a></li>