diff options
Diffstat (limited to 'templates/web/default/admin/stats.html')
-rw-r--r-- | templates/web/default/admin/stats.html | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/templates/web/default/admin/stats.html b/templates/web/default/admin/stats.html new file mode 100644 index 000000000..ccd41601a --- /dev/null +++ b/templates/web/default/admin/stats.html @@ -0,0 +1,61 @@ +[% INCLUDE 'admin/header.html' title=loc('Stats') %] + +[% IF show_count %] +<p> +<strong>[% tprintf( loc( '%sreports between %s and %s' ), ( unconfirmed ? loc( 'All' ) _ ' ' : loc( 'Confirmed' ) _ ' ' ), start_date.ymd, end_date.ymd ) | html %]</strong> +</p> +<table> + <thead> + <td style="width: 8em"><strong>[% loc('Current state') %]</strong></td> + <td><strong>[% loc('Count') %]</strong></td> + </thead> + [% total = 0 %] + [% WHILE ( state = states.next ) %] + [% total = total + state.get_column( 'count' ) %] + <tr> + <td>[% state.state | html %]</td> + <td>[% state.get_column( 'count' ) %]</td> + </tr> + [% END %] + <tr> + <td><strong>[% loc( 'Total' ) %]</strong></td> + <td><strong>[% total %]</strong></td> + </tr> +</table> + +[% IF unconfirmed %] + <p> + <small>[% loc( 'Note that when including unconfirmed reports we use the date the report was created which may not be in the same month the report was confirmed so the numbers may jump about a little' ) %]</small> + </p> +[% END %] +[% END %] + +[% IF errors %] + [% FOREACH error IN errors %] + <p class="error">[% error %]</p> + [% END %] +[% END %] + +<form method="post" action="[% c.uri_for('stats') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + <p> + <label for="start_date_year">[% loc('Start Year:') %]</label><input type="text" name="start_date_year" id="start_date_year" size="5" value="[% start_date ? start_date.year : '' | html %]" /> + <label for="start_date_month">[% loc('Start month:') %]</label><input type="text" name="start_date_month" id="start_date_month" size="3" value="[% start_date ? start_date.month : '' | html %]" /> + <label for="start_date_day">[% loc('Start day:') %]</label><input type="text" name="start_date_day" id="start_date_day" size="3" value="[% start_date ? start_date.day : '' | html %]" /> + </p> + + <p> + <label for="end_date_year">[% loc('End Year:') %]</label><input type="text" name="end_date_year" id="end_date_year" size="5" value="[% end_date ? end_date.year : '' | html %]" /> + <label for="end_date_month">[% loc('End month:') %]</label><input type="text" name="end_date_month" id="end_date_month" size="3" value="[% end_date ? end_date.month : '' | html %]" /> + <label for="end_date_day">[% loc('End day:') %]</label><input type="text" name="end_date_day" id="end_date_day" size="3" value="[% end_date ? end_date.day : '' | html %]" /> + </p> + + <p> + <input type="checkbox" name="unconfirmed" id="unconfirmed"[% unconfirmed ? ' checked' : '' %] /><label for="unconfirmed">[% loc('Include unconfirmed reports') %]</label> + </p> + + <p> + <input type="submit" name="getcounts" size="30" id="getcounts" value="Get Count" /> + </p> +</form> + +[% INCLUDE 'admin/footer.html' %] |