aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xweb-admin/index.cgi16
1 files changed, 10 insertions, 6 deletions
diff --git a/web-admin/index.cgi b/web-admin/index.cgi
index 202bf5d6b..61175269f 100755
--- a/web-admin/index.cgi
+++ b/web-admin/index.cgi
@@ -7,10 +7,10 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: index.cgi,v 1.55 2008-11-07 10:35:54 matthew Exp $
+# $Id: index.cgi,v 1.56 2008-11-07 10:40:29 matthew Exp $
#
-my $rcsid = ''; $rcsid .= '$Id: index.cgi,v 1.55 2008-11-07 10:35:54 matthew Exp $';
+my $rcsid = ''; $rcsid .= '$Id: index.cgi,v 1.56 2008-11-07 10:40:29 matthew Exp $';
use strict;
@@ -413,7 +413,9 @@ sub admin_reports {
print $q->start_table({border=>1, cellpadding=>2, cellspacing=>0});
print $q->th({}, ['ID', 'Title', 'Name', 'Email', 'Council', 'Category', 'Anonymous', 'Created', 'State', 'When sent', '*']);
foreach (@$results) {
- my $url = mySociety::Config::get('BASE_URL') . '/report/' . $_->{id};
+ my $url = $_->{id};
+ $url = $q->a({ -href => mySociety::Config::get('BASE_URL') . '/report/' . $_->{id} }, $url)
+ if $_->{state} eq 'confirmed' || $_->{state} eq 'fixed';
my $council = $_->{council} || ' ';
my $category = $_->{category} || ' ';
(my $confirmed = $_->{confirmed} || '-') =~ s/ (.*?)\..*/ $1/;
@@ -427,7 +429,7 @@ sub admin_reports {
$state .= "<br>Last&nbsp;update:&nbsp;$lastupdate" if $_->{state} eq 'confirmed';
$state .= '</small>';
my $anonymous = $_->{anonymous} ? 'Yes' : 'No';
- print $q->Tr({}, $q->td([ $q->a({ -href => $url }, $_->{id}), $_->{title}, $_->{name}, $_->{email},
+ print $q->Tr({}, $q->td([ $url, $_->{title}, $_->{name}, $_->{email},
$q->a({ -href => NewURL($q, page=>'councilcontacts', area_id=>$council)}, $council),
$category, $anonymous, $created, $state, $whensent,
$q->a({ -href => NewURL($q, page=>'report_edit', id=>$_->{id}) }, 'Edit')
@@ -540,8 +542,10 @@ sub admin_show_updates {
print $q->start_table({border=>1, cellpadding=>2, cellspacing=>0});
print $q->th({}, ['ID', 'State', 'Name', 'Email', 'Created', 'Text', '*']);
foreach (@$updates) {
- my $url = mySociety::Config::get('BASE_URL') . '/report/' . $_->{problem_id} . '#' . $_->{id};
- print $q->Tr({}, $q->td([ $q->a({ -href => $url }, $_->{id}), $_->{state}, $_->{name},
+ my $url = $_->{id};
+ $url = $q->a({ -href => mySociety::Config::get('BASE_URL') . '/report/' . $_->{problem_id} . '#' . $_->{id} },
+ $url) if $_->{state} eq 'confirmed';
+ print $q->Tr({}, $q->td([ $url, $_->{state}, $_->{name},
$_->{email}, $_->{created}, $_->{text},
$q->a({ -href => NewURL($q, page=>'update_edit', id=>$_->{id}) }, 'Edit')
]));