aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin.pm7
-rw-r--r--templates/web/default/admin/flagged.html8
-rw-r--r--templates/web/default/admin/header.html2
-rw-r--r--templates/web/default/admin/problem_row.html46
-rw-r--r--templates/web/default/admin/reports.html6
-rw-r--r--web/cobrands/fixmystreet/_layout.scss53
-rw-r--r--web/cobrands/stevenage/layout.scss2
-rw-r--r--web/cobrands/zurich/_colours.scss9
-rw-r--r--web/cobrands/zurich/layout.scss44
9 files changed, 86 insertions, 91 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm
index bb7ec2381..f69e9ea23 100644
--- a/perllib/FixMyStreet/App/Controller/Admin.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin.pm
@@ -559,9 +559,6 @@ sub reports : Path('reports') {
# will have been turned off
$c->stash->{problems} = [ $problems->all ];
- $c->stash->{edit_body_contacts} = 1
- if ( grep {$_ eq 'body'} keys %{$c->stash->{allowed_pages}});
-
if (is_valid_email($search)) {
$query = [
'user.email' => { ilike => $like_search },
@@ -611,6 +608,10 @@ sub reports : Path('reports') {
$c->stash->{problems} = [ $problems->all ];
$c->stash->{pager} = $problems->pager;
}
+
+ $c->stash->{edit_body_contacts} = 1
+ if ( grep {$_ eq 'body'} keys %{$c->stash->{allowed_pages}});
+
}
sub report_edit : Path('report_edit') : Args(1) {
diff --git a/templates/web/default/admin/flagged.html b/templates/web/default/admin/flagged.html
index 5af92a23c..fc8b1fae1 100644
--- a/templates/web/default/admin/flagged.html
+++ b/templates/web/default/admin/flagged.html
@@ -9,14 +9,8 @@
<th>[% loc('ID') %]</th>
<th>[% loc('Title') %]</th>
<th>[% loc('Name') %]</th>
- <th>[% loc('Email') %]</th>
- <th>[% loc('Council') %]</th>
- <th>[% loc('Category') %]</th>
- <th>[% loc('Anonymous') %]</th>
- <th>[% loc('Cobrand') %]</th>
- <th>[% loc('Created') %]</th>
+ <th>[% loc('Body') %]</th>
<th>[% loc('State') %]</th>
- <th>[% loc('When sent') %]</th>
<th>*</th>
</tr>
[% INCLUDE 'admin/problem_row.html' %]
diff --git a/templates/web/default/admin/header.html b/templates/web/default/admin/header.html
index 93254f5e3..6282bf383 100644
--- a/templates/web/default/admin/header.html
+++ b/templates/web/default/admin/header.html
@@ -1,4 +1,4 @@
-[% INCLUDE 'header.html' admin = 1, bodyclass = 'fullwidthpage' %]
+[% INCLUDE 'header.html' admin = 1, bodyclass = 'fullwidthpage admin' %]
<style type="text/css">
dt { clear: left; float: left; font-weight: bold; }
dd { margin-left: 8em; }
diff --git a/templates/web/default/admin/problem_row.html b/templates/web/default/admin/problem_row.html
index 1533f8dd2..ec8fda6c5 100644
--- a/templates/web/default/admin/problem_row.html
+++ b/templates/web/default/admin/problem_row.html
@@ -1,6 +1,6 @@
[%- FOR problem IN problems %]
<tr[% ' class="adminhidden"' IF problem.state == 'hidden' %]>
- <td>[%- IF problem.is_visible -%]
+ <td class="record-id">[%- IF problem.is_visible -%]
[%- cobrand_data = problem.cobrand_data %]
[%- cobrand_data = c.data_for_generic_problem IF !problem.cobrand %]
<a href="[% c.uri_for_email( '/report', problem.id, cobrand_data ) %]">[% problem.id %]</a>
@@ -8,26 +8,30 @@
[%- problem.id %]
[%- END -%]</td>
<td>[% PROCESS value_or_nbsp value=problem.title %]</td>
- <td>[% PROCESS value_or_nbsp value=problem.name %]</td>
- <td>[% PROCESS value_or_nbsp value=problem.user.email %]</td>
- <td>[%- IF edit_body_contacts -%]
- [% 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>
- <td>[% PROCESS value_or_nbsp value=problem.category %]</td>
- <td>[% IF problem.anonymous %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td>
- <td>[% problem.cobrand %]<br>[% problem.cobrand_data | html %]</td>
- <td>[% PROCESS format_time time=problem.created %]</td>
- <td>[% problem.state %]<small>
- [%- IF problem.is_visible %]<br>[% loc('Confirmed:' ) %]&nbsp;[% PROCESS format_time time=problem.confirmed %][% END -%]
- [%- IF problem.is_fixed %]<br>[% loc('Fixed:') %] [% PROCESS format_time time=problem.lastupdate %][% END -%]
- [%- IF problem.is_closed %]<br>[% loc('Closed:') %] [% PROCESS format_time time=problem.lastupdate %][% END -%]
- [%- IF problem.is_open %]<br>[% loc('Last&nbsp;update:') %] [% PROCESS format_time time=problem.lastupdate %][% END -%]</small>
- </td>
- <td>[% PROCESS format_time time=problem.whensent %]</td>
+ <td>
+ [% PROCESS value_or_nbsp value=problem.name %]
+ <br>[% PROCESS value_or_nbsp value=problem.user.email %]
+ <br>[% loc('Anonymous') %]: [% IF problem.anonymous %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]
+ </td>
+ <td>
+ [% PROCESS value_or_nbsp value=problem.category %]
+ <br>[%- IF edit_body_contacts -%]
+ [% 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 -%]
+ <br>[% problem.cobrand %]<br>[% problem.cobrand_data | html %]
+ </td>
+ <td>[% problem.state %]<br><small>
+ [% loc('Created') %]:&nbsp;[% PROCESS format_time time=problem.created %]
+ <br>[% loc('When sent') %]:&nbsp;[% PROCESS format_time time=problem.whensent %]
+ [%- IF problem.is_visible %]<br>[% loc('Confirmed:' ) %]&nbsp;[% PROCESS format_time time=problem.confirmed %][% END -%]
+ [%- IF problem.is_fixed %]<br>[% loc('Fixed:') %] [% PROCESS format_time time=problem.lastupdate %][% END -%]
+ [%- IF problem.is_closed %]<br>[% loc('Closed:') %] [% PROCESS format_time time=problem.lastupdate %][% END -%]
+ [%- IF problem.is_open %]<br>[% loc('Last&nbsp;update:') %] [% PROCESS format_time time=problem.lastupdate %][% END -%]
+ </small></td>
<td><a href="[% c.uri_for( 'report_edit', problem.id ) %]">[% loc('Edit') %]</a></td>
</tr>
[%- END -%]
diff --git a/templates/web/default/admin/reports.html b/templates/web/default/admin/reports.html
index fab12cfce..d57b2f53e 100644
--- a/templates/web/default/admin/reports.html
+++ b/templates/web/default/admin/reports.html
@@ -11,14 +11,8 @@
<th>[% loc('ID') %]</th>
<th>[% loc('Title') %]</th>
<th>[% loc('Name') %]</th>
- <th>[% loc('Email') %]</th>
<th>[% loc('Body') %]</th>
- <th>[% loc('Category') %]</th>
- <th>[% loc('Anonymous') %]</th>
- <th>[% loc('Cobrand') %]</th>
- <th>[% loc('Created') %]</th>
<th>[% loc('State') %]</th>
- <th>[% loc('When sent') %]</th>
<th>*</th>
</tr>
[% INCLUDE 'admin/problem_row.html' %]
diff --git a/web/cobrands/fixmystreet/_layout.scss b/web/cobrands/fixmystreet/_layout.scss
index 80ac35edc..07f944ffa 100644
--- a/web/cobrands/fixmystreet/_layout.scss
+++ b/web/cobrands/fixmystreet/_layout.scss
@@ -981,6 +981,59 @@ body.frontpage {
}
}
+// Admin tables
+
+$table_border_color: #ccc;
+$table_heading_bg_col: #595959;
+$table_heading_border_col: #7a7a7a;
+$table_heading_col: #fff;
+$table_heading_underline_col: #393939;
+$button_col: #fff;
+$button_bg_col: #a1a1a1; // also search bar (tables)
+
+.admin {
+ table {
+ width: 100%;
+ font-size: 0.9em;
+ border: 1px solid $table_border_color;
+ border-collapse: collapse;
+ margin-bottom: 1em;
+ th, td {
+ padding: 0.666em 0.5em;
+ border: 1px solid $table_border_color;
+ }
+ th {
+ color: white;
+ background-color: $table_heading_bg_col;
+ border-bottom: 2px solid $table_heading_underline_col;
+ border-left: 1px solid $table_heading_border_col;
+ border-right: 1px solid $table_heading_border_col;
+ a:link, a:visited {
+ color: white;
+ }
+ }
+ td.record-id {
+ text-align: center;
+ font-weight: bold;
+ }
+ tr.filter-row td {
+ display: none; /* TODO: reveal when filtering is implemented */
+ padding: 4px 4px 4px 40px;
+ background-color: $button_bg_col;
+ background-image: url('search-icon-white.png');
+ background-position: 14px center;
+ background-repeat: no-repeat;
+ border-bottom: 2px solid $table_border_color;
+ }
+ tr.filter-row td input[type=text] {
+ background-color: #e1e1e1;
+ width: 16em;
+ @include border-radius(4px);
+ border: none;
+ padding: 3px 0.5em;
+ }
+ }
+}
diff --git a/web/cobrands/stevenage/layout.scss b/web/cobrands/stevenage/layout.scss
index 542cffd96..a46c15875 100644
--- a/web/cobrands/stevenage/layout.scss
+++ b/web/cobrands/stevenage/layout.scss
@@ -1,5 +1,5 @@
@import "colours";
-@import "../fixmystreet/layout";
+@import "../fixmystreet/_layout";
// d523b431 - "Stevenage Home page styles"
// 2a23e09f - Moved menu on map page and reverted to full header.
diff --git a/web/cobrands/zurich/_colours.scss b/web/cobrands/zurich/_colours.scss
index 73fb36577..e2a2587f0 100644
--- a/web/cobrands/zurich/_colours.scss
+++ b/web/cobrands/zurich/_colours.scss
@@ -16,12 +16,3 @@ $col_fixed_label_dark: #4B8304;
$mobile_menu_tab_bg_col: #FFFFFF; // the white border and tab on mobile site
$mobile_header_blue: #366AB6; // close match to Zurich logo_portal.jpg
-// Zurich admin tables:
-
-$table_border_color: #ccc;
-$table_heading_bg_col: #595959;
-$table_heading_border_col: #7a7a7a;
-$table_heading_col: #fff;
-$table_heading_underline_col: #393939;
-$button_col: #fff;
-$button_bg_col: #a1a1a1; // also search bar (tables)
diff --git a/web/cobrands/zurich/layout.scss b/web/cobrands/zurich/layout.scss
index 46ea45856..2b16636b9 100644
--- a/web/cobrands/zurich/layout.scss
+++ b/web/cobrands/zurich/layout.scss
@@ -1,5 +1,5 @@
@import "colours";
-@import "../fixmystreet/layout";
+@import "../fixmystreet/_layout";
@import "zurich";
// Things to override from parent stylesheet
@@ -286,48 +286,6 @@ body.mappage.admin .content {
#zurich-footer {
margin: 2em auto 3em auto;
}
-
- table {
- width: 100%;
- font-size: 0.9em;
- border: 1px solid $table_border_color;
- border-collapse: collapse;
- margin-bottom: 1em;
- th, td {
- padding: 0.666em 0.5em;
- border: 1px solid $table_border_color;
- }
- th {
- color: white;
- background-color: $table_heading_bg_col;
- border-bottom: 2px solid $table_heading_underline_col;
- border-left: 1px solid $table_heading_border_col;
- border-right: 1px solid $table_heading_border_col;
- a:link, a:visited {
- color: white;
- }
- }
- td.record-id {
- text-align: center;
- font-weight: bold;
- }
- tr.filter-row td {
- display: none; /* TODO: reveal when filtering is implemented */
- padding: 4px 4px 4px 40px;
- background-color: $button_bg_col;
- background-image: url('search-icon-white.png');
- background-position: 14px center;
- background-repeat: no-repeat;
- border-bottom: 2px solid $table_border_color;
- }
- tr.filter-row td input[type=text] {
- background-color: #e1e1e1;
- width: 16em;
- @include border-radius(4px);
- border: none;
- padding: 3px 0.5em;
- }
- }
}
.admin-nav-wrapper {