diff options
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Problem.pm | 2 | ||||
-rw-r--r-- | templates/web/base/admin/responsepriorities/list.html | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index 855732f83..13fd74807 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -681,7 +681,7 @@ sub response_priorities { return $self->result_source->schema->resultset('ResponsePriority')->search( { 'me.body_id' => $self->bodies_str_ids, - 'contact.category' => $self->category, + 'contact.category' => [ $self->category, undef ], }, { order_by => 'name', diff --git a/templates/web/base/admin/responsepriorities/list.html b/templates/web/base/admin/responsepriorities/list.html index a269ff909..4c05ca14d 100644 --- a/templates/web/base/admin/responsepriorities/list.html +++ b/templates/web/base/admin/responsepriorities/list.html @@ -5,6 +5,7 @@ <tr> <th> [% loc('Name') %] </th> <th> [% loc('Description') %] </th> + <th> [% loc('Categories') %] </th> <th> </th> </tr> </thead> @@ -13,6 +14,15 @@ <tr [% 'class="is-deleted"' IF p.deleted %]> <td> [% p.name | html %] </td> <td> [% p.description | html %] </td> + <td> + [% UNLESS p.contacts.size %] + <em>[% loc('All categories') %]</em> + [% ELSE %] + [% FOR contact IN p.contacts %] + [% contact.category %][% ',' UNLESS loop.last %] + [% END %] + [% END %] + </td> <td> <a href="[% c.uri_for('', body.id, p.id) %]" class="btn">[% loc('Edit') %]</a> </td> </tr> [% END %] |