diff options
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin.pm | 7 | ||||
-rw-r--r-- | templates/web/base/admin/index.html | 16 |
2 files changed, 23 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index 2fda70ad9..27b434f06 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -73,6 +73,13 @@ sub index : Path : Args(0) { $c->forward('stats_by_state'); + my @unsent = $c->model('DB::Problem')->search( { + state => [ 'confirmed' ], + whensent => undef, + bodies_str => { '!=', undef }, + } )->all; + $c->stash->{unsent_reports} = \@unsent; + my $alerts = $c->model('DB::Alert')->summary_report_alerts( $c->cobrand->restriction ); my %alert_counts = diff --git a/templates/web/base/admin/index.html b/templates/web/base/admin/index.html index 66d986aaf..3c510471e 100644 --- a/templates/web/base/admin/index.html +++ b/templates/web/base/admin/index.html @@ -44,6 +44,22 @@ and to receive notices of updates. <input type="submit" value="[% loc('Go') %]"> </form> +[% IF unsent_reports.size %] +<h2>[% loc('Reports waiting to be sent') %]</h2> + +<table cellspacing="0" cellpadding="2" border="1"> + <tr> + <th>[% loc('ID') %]</th> + <th>[% loc('Title') %]</th> + <th>[% loc('Name') %]</th> + <th>[% loc('Body') %]</th> + <th>[% loc('State') %]</th> + <th>*</th> + </tr> + [% INCLUDE 'admin/problem_row.html' problems = unsent_reports %] +</table> +[% END %] + <h2>[% loc('Stats') %]</h2> [% INCLUDE 'status/stats.html' admin_include_users=1 %] |