aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Whiteland <dave@mysociety.org>2013-01-11 16:51:12 +0000
committerDave Whiteland <dave@mysociety.org>2013-01-11 16:55:32 +0000
commitc2986fc56a6b627808bbc1f8c27e96a5c414d44d (patch)
tree0f7e0722a78c6bfc32b6f0db89d31559845fad68
parentd8cd1f09f4e6c3eade7226b9b5bfe11571923c21 (diff)
parent55f93e6680a8df52adfbc4f0d57398130201b6f7 (diff)
Merge branch '191z-admin-tables' into zurich
Conflicts: templates/web/zurich/admin/index-dm.html
-rw-r--r--templates/web/default/admin/report_blocks.html8
-rw-r--r--templates/web/zurich/admin/index-dm.html5
-rw-r--r--templates/web/zurich/admin/index-sdm.html9
-rw-r--r--templates/web/zurich/admin/problem_row.html4
-rw-r--r--web/cobrands/zurich/_colours.scss9
-rw-r--r--web/cobrands/zurich/_zurich.scss40
-rw-r--r--web/cobrands/zurich/search-icon-white.pngbin0 -> 209 bytes
-rw-r--r--web/cobrands/zurich/search-icon.pngbin0 -> 209 bytes
8 files changed, 69 insertions, 6 deletions
diff --git a/templates/web/default/admin/report_blocks.html b/templates/web/default/admin/report_blocks.html
index f08529ce7..dbfb8160f 100644
--- a/templates/web/default/admin/report_blocks.html
+++ b/templates/web/default/admin/report_blocks.html
@@ -15,3 +15,11 @@
[% BLOCK flag_button -%]
[% IF user.flagged || user_flagged %]<input type="submit" name="removeuserflag" value="[% loc('Remove flag') %]">[% ELSE %]<input type="submit" name="flaguser" value="[% loc('Flag user') %]" />[% END %]
[%- END %]
+
+[%# note: date format here (i.e., dd.mm.YYYY) currently used by Zurich %]
+[%- USE date_format = DateTime::Format('DateTime::Format::Strptime', { pattern => "%d.%m.%Y" }) %]
+[% BLOCK format_date -%]
+ [%- IF this_date %]
+ [% date_format.format(this_date) %]
+ [% ELSE %][% no_time || '&nbsp;' %][% END %][% no_time = '' %]
+[%- END %]
diff --git a/templates/web/zurich/admin/index-dm.html b/templates/web/zurich/admin/index-dm.html
index 9916dc1b7..e4676b811 100644
--- a/templates/web/zurich/admin/index-dm.html
+++ b/templates/web/zurich/admin/index-dm.html
@@ -15,7 +15,7 @@
[% INCLUDE 'admin/footer.html' %]
[% BLOCK list %]
-<table cellspacing="0" cellpadding="2" border="1">
+<table cellspacing="0" cellpadding="2" border="1" class="admin">
<tr>
<th>[% loc('ID') %]</th>
<th>[% loc('Title') %]</th>
@@ -24,6 +24,9 @@
<th>[% loc('Created') %]</th>
<th>*</th>
</tr>
+ <tr class="filter-row">
+ <td colspan="6"><input type="text" placeholder="[%= loc('Filter report list') %]" /></td>
+ </tr>
[% INCLUDE 'admin/problem_row.html' %]
</table>
[% END %]
diff --git a/templates/web/zurich/admin/index-sdm.html b/templates/web/zurich/admin/index-sdm.html
index 1ecc0bbcb..d7277dd7d 100644
--- a/templates/web/zurich/admin/index-sdm.html
+++ b/templates/web/zurich/admin/index-sdm.html
@@ -13,7 +13,7 @@
[% INCLUDE 'admin/footer.html' %]
[% BLOCK list %]
-<table cellspacing="0" cellpadding="2" border="1">
+<table cellspacing="0" cellpadding="2" border="1" class="admin">
<tr>
<th>[% loc('ID') %]</th>
<th>[% loc('Title') %]</th>
@@ -23,12 +23,15 @@
<th>*</th>
[% END %]
</tr>
+ <tr class="filter-row">
+ <td colspan="6"><input type="text" placeholder="[%= loc('Filter report list') %]" /></td>
+ </tr>
[%- FOR problem IN problems %]
<tr[% ' class="adminhidden"' IF problem.state == 'hidden' %]>
- <td>[% problem.id %]</td>
+ <td class="record-id">[% problem.id %]</td>
<td>[% PROCESS value_or_nbsp value=problem.title %]</td>
<td>[% problem.category %]</td>
- <td>[% PROCESS format_time time=problem.created %]</td>
+ <td>[% PROCESS format_date this_date=problem.created %]</td>
[% IF NOT no_edit %]
<td><a href="[% c.uri_for( 'report_edit', problem.id ) %]">[% loc('Edit') %]</a></td>
[% END %]
diff --git a/templates/web/zurich/admin/problem_row.html b/templates/web/zurich/admin/problem_row.html
index 6f8f73738..75cee6002 100644
--- a/templates/web/zurich/admin/problem_row.html
+++ b/templates/web/zurich/admin/problem_row.html
@@ -14,7 +14,7 @@
[% NEXT IF admin_type == 'sdm' AND p_body.id != body.id %]
[% NEXT IF admin_type == 'dm' AND p_body.id != body.id AND p_body.parent.id != body.id %]
<tr[% ' class="adminhidden"' IF problem.state == 'hidden' %]>
- <td>[%- IF problem.is_visible -%]
+ <td class="record-id">[%- IF problem.is_visible -%]
<a href="[% c.uri_for_email( '/report', problem.id ) %]">[% problem.id %]</a>
[%- ELSE %]
[%- problem.id %]
@@ -22,7 +22,7 @@
<td>[% PROCESS value_or_nbsp value=problem.title %]</td>
<td>[% states.${problem.state} %]</td>
<td>[% PROCESS value_or_nbsp value=problem.category %]</td>
- <td>[% PROCESS format_time time=problem.created %]</td>
+ <td>[% PROCESS format_date this_date=problem.created %]</td>
<td><a href="[% c.uri_for( 'report_edit', problem.id ) %]">[% loc('Edit') %]</a></td>
</tr>
[%- END -%]
diff --git a/web/cobrands/zurich/_colours.scss b/web/cobrands/zurich/_colours.scss
index 8e8f4c9cd..d21bc6e38 100644
--- a/web/cobrands/zurich/_colours.scss
+++ b/web/cobrands/zurich/_colours.scss
@@ -13,3 +13,12 @@ $col_click_map_dark: darken($lighter_blue, 20%);
$col_fixed_label: #00BD08;
$col_fixed_label_dark: #4B8304;
+// 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) \ No newline at end of file
diff --git a/web/cobrands/zurich/_zurich.scss b/web/cobrands/zurich/_zurich.scss
index b71670a92..715cf6e97 100644
--- a/web/cobrands/zurich/_zurich.scss
+++ b/web/cobrands/zurich/_zurich.scss
@@ -30,3 +30,43 @@ a:hover {
#zurich-footer a:hover {
color: #3c3c3c;
}
+
+table.admin {
+ width: 100%;
+ font-size: 0.9em;
+ border: 1px solid $table_border_color;
+ border-collapse:collapse;
+ 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;
+
+ }
+ 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;
+ }
+
+} \ No newline at end of file
diff --git a/web/cobrands/zurich/search-icon-white.png b/web/cobrands/zurich/search-icon-white.png
new file mode 100644
index 000000000..59f3f1f82
--- /dev/null
+++ b/web/cobrands/zurich/search-icon-white.png
Binary files differ
diff --git a/web/cobrands/zurich/search-icon.png b/web/cobrands/zurich/search-icon.png
new file mode 100644
index 000000000..b74f9397f
--- /dev/null
+++ b/web/cobrands/zurich/search-icon.png
Binary files differ