aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web')
-rw-r--r--templates/web/default/admin/bodies.html30
-rw-r--r--templates/web/default/admin/user-form.html18
-rw-r--r--templates/web/default/admin/user_edit.html16
-rw-r--r--templates/web/default/admin/users.html13
-rwxr-xr-xtemplates/web/default/around/display_location.html3
-rw-r--r--templates/web/default/report/new/category.html3
-rw-r--r--templates/web/zurich/admin/body.html3
-rw-r--r--templates/web/zurich/admin/header.html16
-rw-r--r--templates/web/zurich/admin/reports.html12
-rw-r--r--templates/web/zurich/auth/sign_out.html8
-rw-r--r--templates/web/zurich/footer.html9
11 files changed, 88 insertions, 43 deletions
diff --git a/templates/web/default/admin/bodies.html b/templates/web/default/admin/bodies.html
index d6c706fce..ccd2e801b 100644
--- a/templates/web/default/admin/bodies.html
+++ b/templates/web/default/admin/bodies.html
@@ -2,14 +2,31 @@
[% INCLUDE 'admin/edit-league.html' %]
+<table cellspacing="0" cellpadding="2" border="1">
+ <tr>
+ <th>[% loc('Name') %]</th>
+ [% IF c.cobrand.moniker == 'zurich' %]
+ <th>[% loc('Email') %]</th>
+ [% ELSE %]
+ <th>[% loc('Category') %]</th>
+ [% END %]
+ </tr>
[%- FOREACH body IN bodies %]
[%- SET id = body.id %]
- [%- '<ul>' IF loop.first %]
[% NEXT IF c.cobrand.moniker == 'zurich' AND admin_type == 'dm' AND (body.parent OR body.bodies) %]
- <li><a href="[% c.uri_for( 'body', id ) %]">[% body.name %]</a>
- [%- ', ' _ body.parent.name IF body.parent -%]
- [% IF c.cobrand.moniker != 'zurich' %]
- &ndash;
+ <tr>
+ <td>
+ [% IF c.cobrand.moniker == 'zurich' %]
+ [% FILTER repeat(4*body.api_key) %]&nbsp;[% END %]
+ [% END %]
+ <a href="[% c.uri_for( 'body', id ) %]">[% body.name %]</a>
+ [% IF c.cobrand.moniker != 'zurich' %]
+ [%- ', ' _ body.parent.name IF body.parent -%]
+ [% END %]
+ </td>
+ [% IF c.cobrand.moniker == 'zurich' %]
+ <td>[% body.endpoint %]</td>
+ [% ELSE %]
[% IF counts.$id %]
[% tprintf( loc('%d addresses'), counts.$id.c) IF c.cobrand.moniker != 'emptyhomes' %]
[% IF counts.$id.deleted %]
@@ -21,8 +38,9 @@
no categories
[% END %]
[% END %]
- [%- '</ul>' IF loop.last %]
+ </tr>
[%- END %]
+</table>
<h2>[% loc('Add body') %]</h2>
[% INCLUDE 'admin/body-form.html', body='' %]
diff --git a/templates/web/default/admin/user-form.html b/templates/web/default/admin/user-form.html
new file mode 100644
index 000000000..eec54d447
--- /dev/null
+++ b/templates/web/default/admin/user-form.html
@@ -0,0 +1,18 @@
+<form method="post" action="[% c.uri_for( 'user_edit', user.id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
+ <input type="hidden" name="token" value="[% token %]" >
+ <input type="hidden" name="submit" value="1" >
+ <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('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 %]
+ </select>
+ [% IF c.cobrand.moniker != 'zurich' %]
+ <li>[% loc('Flagged:') %] <input type="checkbox" id="flagged" name="flagged"[% user.flagged ? ' checked' : '' %]></li>
+ [% END %]
+ </ul>
+ <input type="submit" name="Submit changes" value="[% loc('Submit changes') %]" >
+</form>
diff --git a/templates/web/default/admin/user_edit.html b/templates/web/default/admin/user_edit.html
index df1cb221f..d69c873a3 100644
--- a/templates/web/default/admin/user_edit.html
+++ b/templates/web/default/admin/user_edit.html
@@ -3,20 +3,6 @@
[% status_message %]
-<form method="post" action="[% c.uri_for( 'user_edit', user.id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
- <input type="hidden" name="token" value="[% token %]" >
- <input type="hidden" name="submit" value="1" >
-<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('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 %]
-</select>
-<li>[% loc('Flagged:') %] <input type="checkbox" id="flagged" name="flagged"[% user.flagged ? ' checked' : '' %]></li>
-</ul>
-<input type="submit" name="Submit changes" value="[% loc('Submit changes') %]" ></form>
+[% INCLUDE 'admin/user-form.html' %]
[% INCLUDE 'admin/footer.html' %]
diff --git a/templates/web/default/admin/users.html b/templates/web/default/admin/users.html
index 7e652e559..de0b74746 100644
--- a/templates/web/default/admin/users.html
+++ b/templates/web/default/admin/users.html
@@ -2,17 +2,19 @@
[% PROCESS 'admin/report_blocks.html' %]
<form method="get" action="[% c.uri_for('users') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
- <p><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" value="[% searched | html %]">
</form>
-
[% IF searched %]
+
<table cellspacing="0" cellpadding="2" border="1">
<tr>
<th>[% loc('Name') %]</th>
<th>[% loc('Email') %]</th>
<th>[% loc('Body') %]</th>
+ [% IF c.cobrand.moniker != 'zurich' %]
<th>[% loc('Flagged') %]</th>
+ [% END %]
<th>*</th>
</tr>
[%- FOREACH user IN users %]
@@ -20,12 +22,19 @@
<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.name %]</td>
+ [% IF c.cobrand.moniker != 'zurich' %]
<td>[% user.flagged == 2 ? loc('(Email in abuse table)') : user.flagged ? loc('Yes') : '&nbsp;' %]</td>
+ [% END %]
<td>[% IF user.id %]<a href="[% c.uri_for( 'user_edit', user.id ) %]">[% loc('Edit') %]</a>[% END %]</td>
</tr>
[%- END -%]
</table>
+[% ELSE %]
+
+<h2>[% loc('Add user') %]</h2>
+[% INCLUDE 'admin/user-form.html' %]
+
[% END %]
[% INCLUDE 'admin/footer.html' %]
diff --git a/templates/web/default/around/display_location.html b/templates/web/default/around/display_location.html
index 85f89e130..c9586c393 100755
--- a/templates/web/default/around/display_location.html
+++ b/templates/web/default/around/display_location.html
@@ -52,6 +52,9 @@
[% map_html %]
<p id='sub_map_links'>
+ [% IF c.cobrand.moniker == 'zurich' %]
+ <a class="hidden-nojs" id="map_layer_toggle" href="">Stadtplan</a>
+ [% END %]
[% IF c.req.params.no_pins %]
<a id='hide_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => 0 } ) %]'>[% loc('Show pins') %]</a>
[% ELSE %]
diff --git a/templates/web/default/report/new/category.html b/templates/web/default/report/new/category.html
index 8bff539c4..f2ef529f2 100644
--- a/templates/web/default/report/new/category.html
+++ b/templates/web/default/report/new/category.html
@@ -7,7 +7,8 @@
<select name='category' id='form_category'[% ' onchange="form_category_onchange()"' IF category_extras.size %]>
[% FOREACH cat_op IN category_options %]
[% cat_op_lc = cat_op | lower %]
- <option value='[% cat_op | html %]'[% ' selected' IF report.category == cat_op || category == cat_op_lc %]>[% cat_op | html %]</option>
+ <option value='[% cat_op | html %]'[% ' selected' IF report.category == cat_op || category == cat_op_lc -%]
+ >[% IF loop.first %][% cat_op %][% ELSE %][% cat_op | html %][% END %]</option>
[% END %]
</select>
[% END %]
diff --git a/templates/web/zurich/admin/body.html b/templates/web/zurich/admin/body.html
index 143e61f83..dd1b0b844 100644
--- a/templates/web/zurich/admin/body.html
+++ b/templates/web/zurich/admin/body.html
@@ -1,4 +1,5 @@
[% INCLUDE 'admin/header.html' title=tprintf(loc('Council contacts for %s'), body.name) -%]
+[% PROCESS 'admin/report_blocks.html' %]
[% IF updated %]
<p>
@@ -21,7 +22,7 @@
<td>[% contact.email | html %]</td>
<td>[% contact.editor %]</td>
<td>[% contact.note | html %]</td>
- <td>[% contact.whenedited.ymd _ ' ' _ contact.whenedited.hms %]</td>
+ <td>[% PROCESS format_date this_date=contact.whenedited %]</td>
</tr>
[% END %]
</table>
diff --git a/templates/web/zurich/admin/header.html b/templates/web/zurich/admin/header.html
index 7e2337e6d..d0c399a83 100644
--- a/templates/web/zurich/admin/header.html
+++ b/templates/web/zurich/admin/header.html
@@ -22,18 +22,24 @@ select { width: auto; }
<div class="admin-nav">
<ul>
[% pagename = c.req.uri.path %]
- [% pagename = pagename.replace('/admin/?(\w*)', '$1') %]
+ [% pagename = pagename.replace('/admin/?(\w*).*', '$1') %]
<li [% IF pagename == 'summary' OR pagename == '' %]class="current"[% END %]>
<a href="/admin/summary">[% loc('Summary') %]</a>
</li>
+ <li [% IF pagename == 'reports' OR pagename == 'report_edit' %]class="current"[% END %]>
+ <a href="/admin/reports">[% loc('Reports') %]</a>
+ </li>
[% IF admin_type == 'dm' OR admin_type == 'super' %]
- <li [% IF pagename == 'bodies' %]class="current"[% END %]>
+ <li [% IF pagename == 'bodies' OR pagename == 'body' %]class="current"[% END %]>
<a href="/admin/bodies">[% loc('Bodies') %]</a>
</li>
- <li [% IF pagename == 'reports' %]class="current"[% END %]>
- <a href="/admin/reports">[% loc('Reports') %]</a>
+ [% END %]
+ [% IF admin_type == 'super' %]
+ <li [% IF pagename == 'users' OR pagename == 'user_edit' %]class="current"[% END %]>
+ <a href="/admin/users">[% loc('Users') %]</a>
</li>
+ [% END %]
<li class="search-box">
<form method="get" action="[% c.uri_for('reports') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
<input type="text" name="search" size="20" id="search" placeholder="[% loc('Search reports') %]">
@@ -43,9 +49,7 @@ select { width: auto; }
</div>
<!-- | <a href="timeline">Timeline</a> -->
<!-- | <a href="questionnaire">Survey</a> -->
- <!-- | <a href="/admin/users">[% loc('Users') %]</a> -->
<!-- | <a href="flagged">Flagged</a> -->
<!-- | <a href="stats">Stats</a> -->
-[% END %]
<h1 style="clear:both;">[% title %]</h1>
diff --git a/templates/web/zurich/admin/reports.html b/templates/web/zurich/admin/reports.html
index 0a3b5d568..f8c022630 100644
--- a/templates/web/zurich/admin/reports.html
+++ b/templates/web/zurich/admin/reports.html
@@ -1,14 +1,20 @@
[% PROCESS 'admin/header.html' title=loc('Search Reports') %]
[% PROCESS 'admin/report_blocks.html' %]
+<form method="get" action="[% c.uri_for('reports') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
+ <p><label for="search">[% loc('Search:') %]</label> <input type="text" name="search" size="30" id="search" value="[% searched | html %]">
+</form>
+
+
[% IF searched %]
<table cellspacing="0" cellpadding="2" border="1">
<tr>
<th>[% loc('ID') %]</th>
- <th>[% loc('Title') %]</th>
- <th>[% loc('State') %]</th>
+ <th>[% loc('Description') %]</th>
<th>[% loc('Category') %]</th>
- <th>[% loc('Created') %]</th>
+ <th>[% loc('Submitted') %]</th>
+ <th>[% loc('Updated') %]</th>
+ <th>[% loc('Status') %]</th>
<th>*</th>
</tr>
[% INCLUDE 'admin/problem_row.html', page = 'search' %]
diff --git a/templates/web/zurich/auth/sign_out.html b/templates/web/zurich/auth/sign_out.html
new file mode 100644
index 000000000..fa2f6fd69
--- /dev/null
+++ b/templates/web/zurich/auth/sign_out.html
@@ -0,0 +1,8 @@
+[% INCLUDE 'header.html', title = loc('Sign out'), bodyclass = 'fullwidthpage' %]
+
+<h1>[% loc('You have been signed out') %]</h1>
+
+<p>Please feel free to <a href="[% c.uri_for('/admin') %]">sign in again</a>, or
+go back to the <a href="/">front page</a>.</p>
+
+[% INCLUDE 'footer.html' %]
diff --git a/templates/web/zurich/footer.html b/templates/web/zurich/footer.html
index f01e6671d..6b8ad004d 100644
--- a/templates/web/zurich/footer.html
+++ b/templates/web/zurich/footer.html
@@ -11,15 +11,6 @@
[% tprintf(loc('Hi %s'), c.user.name || c.user.email) %]
</p><p><a href="/auth/sign_out">[% loc('sign out') %]</a>
</p>
- [% ELSE %]
- <ul id="main-menu">
- <li><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %]
- >[% loc("Report a problem") %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[%
- %]<li><[% IF c.req.uri.path == '/reports' %]span[% ELSE %]a href="/reports"[% END
- %]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]></li>[%
- %]<li><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END
- %]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li>
- </ul>
[% END %]
</div>
</div>