aboutsummaryrefslogtreecommitdiffstats
path: root/web-admin
diff options
context:
space:
mode:
authorlouise <louise>2009-11-12 14:03:18 +0000
committerlouise <louise>2009-11-12 14:03:18 +0000
commit9a8c045566ad2d932699f9845d9c2e67149e5917 (patch)
tree7a4977d813ef84560c1b5d39f82eeacb7d863145 /web-admin
parent4888795d1d5deb6f5bb387020b4988948a1bc6a8 (diff)
Adding cobrand info to admin interface
Diffstat (limited to 'web-admin')
-rwxr-xr-xweb-admin/index.cgi23
1 files changed, 15 insertions, 8 deletions
diff --git a/web-admin/index.cgi b/web-admin/index.cgi
index 100558360..37c429c03 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.73 2009-10-26 15:42:12 matthew Exp $
+# $Id: index.cgi,v 1.74 2009-11-12 14:03:18 louise Exp $
#
-my $rcsid = ''; $rcsid .= '$Id: index.cgi,v 1.73 2009-10-26 15:42:12 matthew Exp $';
+my $rcsid = ''; $rcsid .= '$Id: index.cgi,v 1.74 2009-11-12 14:03:18 louise Exp $';
use strict;
@@ -427,13 +427,13 @@ sub admin_reports {
my $search_n = 0;
$search_n = int($search) if $search =~ /^\d+$/;
my $results = select_all("select id, council, category, title, name,
- email, anonymous, created, confirmed, state, service, lastupdate,
+ email, anonymous, cobrand, cobrand_data, created, confirmed, state, service, lastupdate,
whensent, send_questionnaire from problem where id=? or email ilike
'%'||?||'%' or name ilike '%'||?||'%' or title ilike '%'||?||'%' or
detail ilike '%'||?||'%' or council like '%'||?||'%' order by created", $search_n,
$search, $search, $search, $search, $search);
print $q->start_table({border=>1, cellpadding=>2, cellspacing=>0});
- print $q->Tr({}, $q->th({}, ['ID', 'Title', 'Name', 'Email', 'Council', 'Category', 'Anonymous', 'Created', 'State', 'When sent', '*']));
+ print $q->Tr({}, $q->th({}, ['ID', 'Title', 'Name', 'Email', 'Council', 'Category', 'Anonymous', 'Cobrand', 'Created', 'State', 'When sent', '*']));
foreach (@$results) {
my $url = $_->{id};
$url = $q->a({ -href => mySociety::Config::get('BASE_URL') . '/report/' . $_->{id} }, $url)
@@ -451,9 +451,11 @@ sub admin_reports {
$state .= "<br>Last&nbsp;update:&nbsp;$lastupdate" if $_->{state} eq 'confirmed';
$state .= '</small>';
my $anonymous = $_->{anonymous} ? 'Yes' : 'No';
+ my $cobrand = $_->{cobrand};
+ $cobrand .= "<br>" . $_->{cobrand_data};
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,
+ $category, $anonymous, $cobrand, $created, $state, $whensent,
$q->a({ -href => NewURL($q, page=>'report_edit', id=>$_->{id}) }, 'Edit')
]));
}
@@ -510,7 +512,7 @@ sub admin_edit_report {
my $northing = int($row{northing}+0.5);
my $questionnaire = $row{send_questionnaire} ? 'Yes' : 'No';
my $used_map = $row{used_map} ? 'used map' : "didn't use map";
-
+
my $photo = '';
$photo = '<li><img align="top" src="' . mySociety::Config::get('BASE_URL') . '/photo?id=' . $row{id} . '">
<input type="checkbox" id="remove_photo" name="remove_photo" value="1">
@@ -546,6 +548,8 @@ sub admin_edit_report {
<li>Sent: $row{whensent} $resend
<li>Last update: $row{lastupdate}
<li>Service: $row{service}
+<li>Cobrand: $row{cobrand}
+<li>Cobrand data: $row{cobrand_data}
<li>Going to send questionnaire? $questionnaire
$photo
</ul>
@@ -562,13 +566,14 @@ EOF
sub admin_show_updates {
my ($q, $updates) = @_;
print $q->start_table({border=>1, cellpadding=>2, cellspacing=>0});
- print $q->Tr({}, $q->th({}, ['ID', 'State', 'Name', 'Email', 'Created', 'Text', '*']));
+ print $q->Tr({}, $q->th({}, ['ID', 'State', 'Name', 'Email', 'Created', 'Cobrand', 'Text', '*']));
foreach (@$updates) {
my $url = $_->{id};
$url = $q->a({ -href => mySociety::Config::get('BASE_URL') . '/report/' . $_->{problem_id} . '#' . $_->{id} },
$url) if $_->{state} eq 'confirmed';
+ my $cobrand = $_->{cobrand} . '<br>' . $_->{cobrand_data};
print $q->Tr({}, $q->td([ $url, $_->{state}, $_->{name} || '',
- $_->{email}, $_->{created}, $_->{text},
+ $_->{email}, $_->{created}, $cobrand, $_->{text},
$q->a({ -href => NewURL($q, page=>'update_edit', id=>$_->{id}) }, 'Edit')
]));
}
@@ -616,6 +621,8 @@ sub admin_edit_update {
<li>$state
<li>Name: <input type="text" name="name" id="name" value="$row{name}"> (blank to go anonymous)
<li>Email: <input type="text" id="email" name="email" value="$row{email}">
+<li>Cobrand: $row{cobrand}
+<li>Cobrand data: $row{cobrand_data}
<li>Created: $row{created}
$photo
</ul>