aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/DB/Result/Problem.pm2
-rw-r--r--templates/web/default/admin/problem_row.html4
-rw-r--r--templates/web/default/admin/reports.html4
-rw-r--r--templates/web/default/admin/user_edit.html4
-rw-r--r--templates/web/default/admin/users.html6
5 files changed, 11 insertions, 9 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm
index 6cfe45bc0..1174223b5 100644
--- a/perllib/FixMyStreet/DB/Result/Problem.pm
+++ b/perllib/FixMyStreet/DB/Result/Problem.pm
@@ -397,7 +397,7 @@ Returns an arrayref of bodies to which a report was sent.
sub bodies($) {
my $self = shift;
- return [] unless $self->bodies_str;
+ return {} unless $self->bodies_str;
(my $bodies = $self->bodies_str) =~ s/\|.*$//;
my @bodies = split( /,/, $bodies );
@bodies = FixMyStreet::App->model('DB::Body')->search({ id => \@bodies })->all;
diff --git a/templates/web/default/admin/problem_row.html b/templates/web/default/admin/problem_row.html
index f985fdf7f..6c0bce85f 100644
--- a/templates/web/default/admin/problem_row.html
+++ b/templates/web/default/admin/problem_row.html
@@ -11,7 +11,9 @@
<td>[% PROCESS value_or_nbsp value=problem.name %]</td>
<td>[% PROCESS value_or_nbsp value=problem.user.email %]</td>
<td>[%- IF edit_body_contacts -%]
- <a href="[% c.uri_for('body', problem.bodies_str ) %]">[% PROCESS value_or_nbsp value=problem.bodies_str %]</a>
+ [% FOR body IN problem.bodies.values %]
+ <a href="[% c.uri_for('body', body.id ) %]">[% PROCESS value_or_nbsp value=body.name %]</a>
+ [% END %]
[%- ELSE -%]
[%- PROCESS value_or_nbsp value=problem.bodies_str -%]
[%- END -%]</td>
diff --git a/templates/web/default/admin/reports.html b/templates/web/default/admin/reports.html
index b5e1361cd..600f2b436 100644
--- a/templates/web/default/admin/reports.html
+++ b/templates/web/default/admin/reports.html
@@ -2,7 +2,7 @@
[% PROCESS 'admin/report_blocks.html' %]
<form method="get" action="[% c.uri_for('reports') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
- <label for="search">[% loc('Search:') %]</label> <input type="text" name="search" size="30" id="search">
+ <p><label for="search">[% loc('Search:') %]</label> <input type="text" name="search" size="30" id="search">
</form>
@@ -13,7 +13,7 @@
<th>[% loc('Title') %]</th>
<th>[% loc('Name') %]</th>
<th>[% loc('Email') %]</th>
- <th>[% loc('Council') %]</th>
+ <th>[% loc('Body') %]</th>
<th>[% loc('Category') %]</th>
<th>[% loc('Anonymous') %]</th>
<th>[% loc('Cobrand') %]</th>
diff --git a/templates/web/default/admin/user_edit.html b/templates/web/default/admin/user_edit.html
index f1fc83c05..df1cb221f 100644
--- a/templates/web/default/admin/user_edit.html
+++ b/templates/web/default/admin/user_edit.html
@@ -9,8 +9,8 @@
<ul>
<li>[% loc('Name:') %] <input type='text' name='name' id='name' value='[% user.name | html %]'></li>
<li>[% loc('Email:') %] <input type='text' id='email' name='email' value='[% user.email | html %]'></li>
-<li>[% loc('Council:') %] <select id='body' name='body'>
- <option value=''>[% loc('No council') %]</option>
+<li>[% loc('Body:') %] <select id='body' name='body'>
+ <option value=''>[% loc('No body') %]</option>
[% FOR body IN bodies %]
<option value="[% body.id %]"[% ' selected' IF body.id == user.from_body.id %]>[% body.name %]</option>
[% END %]
diff --git a/templates/web/default/admin/users.html b/templates/web/default/admin/users.html
index b9839e9f7..7e652e559 100644
--- a/templates/web/default/admin/users.html
+++ b/templates/web/default/admin/users.html
@@ -2,7 +2,7 @@
[% PROCESS 'admin/report_blocks.html' %]
<form method="get" action="[% c.uri_for('users') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
- <label for="search">[% loc('Search:') %]</label> <input type="text" name="search" size="30" id="search">
+ <p><label for="search">[% loc('Search:') %]</label> <input type="text" name="search" size="30" id="search">
</form>
@@ -11,7 +11,7 @@
<tr>
<th>[% loc('Name') %]</th>
<th>[% loc('Email') %]</th>
- <th>[% loc('Council') %]</th>
+ <th>[% loc('Body') %]</th>
<th>[% loc('Flagged') %]</th>
<th>*</th>
</tr>
@@ -19,7 +19,7 @@
<tr>
<td>[% PROCESS value_or_nbsp value=user.name %]</td>
<td><a href="[% c.uri_for( 'reports', search => user.email ) %]">[% PROCESS value_or_nbsp value=user.email %]</a></td>
- <td>[% PROCESS value_or_nbsp value=user.from_body.id %]</td>
+ <td>[% PROCESS value_or_nbsp value=user.from_body.name %]</td>
<td>[% user.flagged == 2 ? loc('(Email in abuse table)') : user.flagged ? loc('Yes') : '&nbsp;' %]</td>
<td>[% IF user.id %]<a href="[% c.uri_for( 'user_edit', user.id ) %]">[% loc('Edit') %]</a>[% END %]</td>
</tr>