diff options
Diffstat (limited to 'templates/web/zurich')
-rw-r--r-- | templates/web/zurich/admin/_index_table.html | 17 | ||||
-rw-r--r-- | templates/web/zurich/admin/index-dm.html | 27 | ||||
-rw-r--r-- | templates/web/zurich/admin/index-sdm.html | 26 | ||||
-rw-r--r-- | templates/web/zurich/admin/problem_row.html | 7 | ||||
-rw-r--r-- | templates/web/zurich/admin/report_edit-sdm.html | 14 | ||||
-rw-r--r-- | templates/web/zurich/admin/reports/edit.html | 6 | ||||
-rw-r--r-- | templates/web/zurich/admin/reports/index.html | 19 | ||||
-rw-r--r-- | templates/web/zurich/admin/users/form.html | 43 | ||||
-rw-r--r-- | templates/web/zurich/header.html | 13 | ||||
-rw-r--r-- | templates/web/zurich/maps/zurich.html | 5 | ||||
-rw-r--r-- | templates/web/zurich/report/banner.html | 2 | ||||
-rw-r--r-- | templates/web/zurich/report/new/fill_in_details_form.html | 11 |
12 files changed, 108 insertions, 82 deletions
diff --git a/templates/web/zurich/admin/_index_table.html b/templates/web/zurich/admin/_index_table.html new file mode 100644 index 000000000..232d4dc80 --- /dev/null +++ b/templates/web/zurich/admin/_index_table.html @@ -0,0 +1,17 @@ +<table cellspacing="0" cellpadding="2" border="1"> + <tr> + <th>[% loc('ID') %]</th> + <th>[% loc('Description') %]</th> + [% FOREACH col IN [ [ 'category', loc('Category') ], [ 'created', loc('Submitted') ], [ 'lastupdate', loc('Updated') ], [ 'state', loc('Status') ] ] %] + <th><a href="[% INCLUDE sort_link choice = col.0 %]#[% hash %]">[% col.1 %] [% INCLUDE sort_arrow choice = col.0 %]</a></th> + [% END %] + [% IF include_subdiv %] + <th>[% loc('Subdivision/Body') %]</th> + [% END %] + <th>[% loc('Photo') %]</th> + [% IF NOT no_edit %] + <th class='edit'>*</th> + [% END %] + </tr> +[% INCLUDE 'admin/problem_row.html' %] +</table> diff --git a/templates/web/zurich/admin/index-dm.html b/templates/web/zurich/admin/index-dm.html index 39fa34dcb..eb791e8d2 100644 --- a/templates/web/zurich/admin/index-dm.html +++ b/templates/web/zurich/admin/index-dm.html @@ -6,34 +6,13 @@ </div> <h2 id="submitted">[% loc('Submitted') %]</h2> -[% INCLUDE list, problems = submitted.all, hash = 'submitted' %] +[% INCLUDE 'admin/_index_table.html' problems=submitted.all hash='submitted' %] <h2 id="feedback_pending">Rückmeldung ausstehend</h2> -[% INCLUDE list, problems = approval.all, hash = 'feedback_pending' %] +[% INCLUDE 'admin/_index_table.html' problems=approval.all hash='feedback_pending' %] <h2 id="alle">[% loc('All reports') %]</h2> -[% INCLUDE list, problems = other.all, include_subdiv = 1, hash = 'alle' %] +[% INCLUDE 'admin/_index_table.html' problems=other.all include_subdiv=1 hash='alle' %] [% INCLUDE 'pagination.html', admin = 1, param = 'p', hash = 'alle' %] [% INCLUDE 'admin/footer.html' %] - -[% BLOCK list %] -<table cellspacing="0" cellpadding="2" border="1"> - <tr> - <th>[% loc('ID') %]</th> - <th>[% loc('Description') %]</th> - [% FOREACH col IN [ [ 'category', loc('Category') ], [ 'created', loc('Submitted') ], [ 'lastupdate', loc('Updated') ], [ 'state', loc('Status') ] ] %] - <th><a href="[% INCLUDE sort_link choice = col.0 %]#[% hash %]">[% col.1 %] [% INCLUDE sort_arrow choice = col.0 %]</a></th> - [% END %] - [% IF include_subdiv %] - <th>[% loc('Subdivision/Body') %]</th> - [% END %] - <th>[% loc('Photo') %]</th> - <th class='edit'>*</th> - </tr> - <tr class="filter-row"> - <td colspan="8"><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 68a2fcf62..6155f6a39 100644 --- a/templates/web/zurich/admin/index-sdm.html +++ b/templates/web/zurich/admin/index-sdm.html @@ -2,33 +2,13 @@ [% PROCESS 'admin/report_blocks.html' %] <h2 id="new">[% loc('New reports') %]</h2> -[% INCLUDE list, problems = reports_new.all, hash = 'new' %] +[% INCLUDE 'admin/_index_table.html' problems=reports_new.all hash='new' %] <h2 id="wait">[% loc('Reports awaiting approval') %]</h2> -[% INCLUDE list, problems = reports_unpublished.all, hash = 'wait' %] +[% INCLUDE 'admin/_index_table.html' problems=reports_unpublished.all hash='wait' %] <h2 id="alle">[% loc('Reports published') %]</h2> -[% INCLUDE list, problems = reports_published.all, no_edit = 1, hash = 'alle' %] +[% INCLUDE 'admin/_index_table.html' problems=reports_published.all no_edit=1 hash='alle' %] [% INCLUDE 'pagination.html', admin = 1, param = 'p', hash = 'alle' %] [% INCLUDE 'admin/footer.html' %] - -[% BLOCK list %] -<table cellspacing="0" cellpadding="2" border="1"> - <tr> - <th>[% loc('ID') %]</th> - <th>[% loc('Description') %]</th> - [% FOREACH col IN [ [ 'category', loc('Category') ], [ 'created', loc('Submitted') ], [ 'lastupdate', loc('Updated') ], [ 'state', loc('Status') ] ] %] - <th><a href="[% INCLUDE sort_link choice = col.0 %]#[% hash %]">[% col.1 %] [% INCLUDE sort_arrow choice = col.0 %]</a></th> - [% END %] - <th>[% loc('Photo') %]</th> - [% IF NOT no_edit %] - <th class='edit'>*</th> - [% END %] - </tr> - <tr class="filter-row"> - <td colspan="8"><input type="text" placeholder="[%= loc('Filter report list') %]" /></td> - </tr> -[% INCLUDE 'admin/problem_row.html' %] -</table> -[% END %] diff --git a/templates/web/zurich/admin/problem_row.html b/templates/web/zurich/admin/problem_row.html index 502a7bc39..a2805d6dc 100644 --- a/templates/web/zurich/admin/problem_row.html +++ b/templates/web/zurich/admin/problem_row.html @@ -1,3 +1,5 @@ +[% no_edit = no_edit AND NOT c.req.params.internal ~%] + [%- FOR problem IN problems %] [% SET p_body = problem.bodies.values.0 %] <tr[% @@ -21,14 +23,15 @@ <td>[% prettify_state(problem.state) %] [% IF problem.state == 'feedback pending'; SET cs=problem.get_extra_metadata('closure_status'); - IF cs %] ([% prettify_state(cs) %]) [% END; END %]</td> + IF cs %] ([% prettify_state(cs) %]) [% END; END %] + [% IF problem.non_public %]<br><i>Interne Meldung</i>[% END %]</td> [% IF include_subdiv %] <td> [%- IF p_body.parent.parent.id -%][%# ...it's a subdivision %] [% PROCESS value_or_nbsp value=p_body.name %] [%- ELSIF problem.external_body %] - [% PROCESS value_or_nbsp value=problem.body(c).name %] + [% PROCESS value_or_nbsp value=problem.body.name %] [%- ELSE -%] [%- END -%] diff --git a/templates/web/zurich/admin/report_edit-sdm.html b/templates/web/zurich/admin/report_edit-sdm.html index b468bc7a0..8d1fa464c 100644 --- a/templates/web/zurich/admin/report_edit-sdm.html +++ b/templates/web/zurich/admin/report_edit-sdm.html @@ -85,11 +85,17 @@ <div class="admin-report-edit admin-report-edit--interact"> -<p align="right" class="screen-only"><input [% sdm_disabled %] type="submit" class="btn" name="send_back" value="[% loc('Not for my subdivision') %]"></p> +[% IF problem.non_public %] +<p align="right" class="screen-only"> + <input [% sdm_disabled %] [% sdm_disabled_fixed %] type="submit" class="btn" name="stop_internal" value="Keine interne Meldung"> +</p> +[% END %] + +<p align="right" class="screen-only"><input [% sdm_disabled %] [% sdm_disabled_fixed %] type="submit" class="btn" name="send_back" value="[% loc('Not for my subdivision') %]"></p> [% status_message | safe %] -<p align="right" class="screen-only"><input [% sdm_disabled %] type="submit" class="btn" name="not_contactable" value="[% loc('Customer not contactable') %]"></p> +<p align="right" class="screen-only"><input [% sdm_disabled %] [% sdm_disabled_internal %] [% sdm_disabled_fixed %] type="submit" class="btn" name="not_contactable" value="[% loc('Customer not contactable') %]"></p> <ul class="no-bullets screen-only"> <li> @@ -98,7 +104,7 @@ </li> <li> <label for="status_update">[% loc('New note to DM:') %]</label> - <textarea [% sdm_disabled %] class="form-control" name='status_update' id='status_update' cols=60 rows=4></textarea> + <textarea [% sdm_disabled %] [% sdm_disabled_internal %] [% sdm_disabled_fixed %] class="form-control" name='status_update' id='status_update' cols=60 rows=4></textarea> </li> </ul> @@ -109,7 +115,7 @@ <p class="clearfix screen-only"> <input [% sdm_disabled %] style="float:left" type="submit" class="btn" name="Submit changes" value="[% loc('Submit changes') %]" > - <input [% sdm_disabled %] style="float:right" type="submit" class="btn" name="no_more_updates" value="[% loc('No further updates') %]"> + <input [% sdm_disabled %] [% sdm_disabled_fixed %] style="float:right" type="submit" class="btn" name="no_more_updates" value="[% loc('No further updates') %]"> </p> [% INCLUDE 'admin/list_updates.html' %] diff --git a/templates/web/zurich/admin/reports/edit.html b/templates/web/zurich/admin/reports/edit.html index 147022981..4a35192f0 100644 --- a/templates/web/zurich/admin/reports/edit.html +++ b/templates/web/zurich/admin/reports/edit.html @@ -119,6 +119,10 @@ [% status_message | safe %] +[% IF problem.non_public %] +<p align="right" class="screen-only"><input type="submit" class="btn" name="stop_internal" value="Keine interne Meldung"></p> +[% END %] + <dl [% IF status_message %]class="with-message"[% END %]> <dt class="screen-only"> @@ -268,7 +272,7 @@ [% ELSE %] [% loc('Message to competent body:') %] [% END %] - [% problem.body(c).endpoint %] + [% problem.body.endpoint %] </h2> <div class="admin-external-message"> [% problem.extra.external_message | html_para %] diff --git a/templates/web/zurich/admin/reports/index.html b/templates/web/zurich/admin/reports/index.html index 481dfb49d..e2790309b 100644 --- a/templates/web/zurich/admin/reports/index.html +++ b/templates/web/zurich/admin/reports/index.html @@ -1,4 +1,4 @@ -[% PROCESS 'admin/header.html' title=loc('Search Reports') %] +[% PROCESS 'admin/header.html' title=loc('All Reports') %] [% PROCESS 'admin/report_blocks.html' %] <form method="get" action="[% c.uri_for_action('admin/reports/index') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> @@ -6,21 +6,8 @@ </form> [% IF problems.size %] -<table cellspacing="0" cellpadding="2" border="1"> - <tr> - <th>[% loc('ID') %]</th> - <th>[% loc('Description') %]</th> - [% FOREACH col IN [ [ 'category', loc('Category') ], [ 'created', loc('Submitted') ], [ 'lastupdate', loc('Updated') ], [ 'state', loc('Status') ] ] %] - <th><a href="[% INCLUDE sort_link choice = col.0 %]">[% col.1 %] [% INCLUDE sort_arrow choice = col.0 %]</a></th> - [% END %] - <th>[% loc('Photo') %]</th> - <th class='edit'>*</th> - </tr> - [% INCLUDE 'admin/problem_row.html' %] -</table> - -[% INCLUDE 'pagination.html', admin = 1, param = 'p', pager = problems_pager %] - + [% PROCESS 'admin/_index_table.html' %] + [% INCLUDE 'pagination.html', admin = 1, param = 'p', pager = problems_pager %] [% END %] [% INCLUDE 'admin/list_updates.html' %] diff --git a/templates/web/zurich/admin/users/form.html b/templates/web/zurich/admin/users/form.html new file mode 100644 index 000000000..ec670a28a --- /dev/null +++ b/templates/web/zurich/admin/users/form.html @@ -0,0 +1,43 @@ +<form method="post" id="user_edit" action="[% + SET action_end = user.id || 'add'; + c.uri_for_action( 'admin/users/edit', [ action_end ] ) + %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + <input type="hidden" name="token" value="[% csrf_token %]" > + <input type="hidden" name="submit" value="1" > + + [% INCLUDE 'errors.html' errors = field_errors.values %] + <ul class="no-bullets"> + [% PROCESS 'admin/users/_form_details.html' %] + + <li> + <label for="body">[% loc('Body:') %]</label> + <select class="form-control" id='body' name='body'> + <option value=''>[% loc('No body') %]</option> + [% FOR body IN bodies %] + <option value="[% body.id %]"[% ' selected data-originally-selected' IF body.id == user.from_body.id %]>[% body.name %]</option> + [% END %] + </select> + </li> + + <li> + <label> + [% loc('government-internal') %] + <input type="checkbox" id="flagged" name="flagged"[% user.flagged ? ' checked' : '' %]> + </label> + </li> + + </ul> + <p> + <input type="submit" class="btn" name="Submit changes" value="[% loc('Submit changes') %]" > + </p> + + [% IF user AND NOT user.from_body %] + <ul class="no-bullets danger-zone"> + <li><input class="btn-danger" type="submit" name="logout_everywhere" value="[% loc('Log out of all sessions') %]"> + <li><input class="btn-danger" type="submit" name="anon_everywhere" value="[% loc('Make anonymous on all reports and updates') %]"> + <li><input class="btn-danger" type="submit" name="hide_everywhere" value="[% loc('Hide all reports and updates') %]"> + <li><input class="btn-danger" type="submit" name="remove_account" value="[% loc('Remove account details') %]"> + </ul> + [% END %] + +</form> diff --git a/templates/web/zurich/header.html b/templates/web/zurich/header.html index 347bf6b70..c9343d8d6 100644 --- a/templates/web/zurich/header.html +++ b/templates/web/zurich/header.html @@ -41,11 +41,20 @@ [% pagename = c.req.uri.path %] [% pagename = pagename.replace('/admin/?(\w*).*', '$1') %] + [% IF admin_type == 'super' %] <li [% IF pagename == 'summary' OR pagename == '' %]class="current"[% END %]> <a href="/admin/summary">[% loc('Summary') %]</a> </li> + [% ELSE %] + <li [% IF NOT c.get_param('internal') AND (pagename == 'summary' OR pagename == '') %]class="current"[% END %]> + <a href="/admin/summary">Öffentliche</a> + </li> + <li [% IF c.get_param('internal') AND (pagename == 'summary' OR pagename == '') %]class="current"[% END %]> + <a href="/admin/summary?internal=1">Interne</a> + </li> + [% END %] <li [% IF pagename == 'reports' OR pagename == 'report_edit' %]class="current"[% END %]> - <a href="/admin/reports">[% loc('Reports') %]</a> + <a href="/admin/reports">[% loc('All') %]</a> </li> [% IF admin_type == 'dm' OR admin_type == 'super' %] <li [% IF pagename == 'bodies' OR pagename == 'body' %]class="current"[% END %]> @@ -66,7 +75,7 @@ </li> [% END %] <li class="search-box"> - <form method="get" action="[% c.uri_for('reports') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + <form method="get" action="[% c.uri_for_action('/admin/reports/index') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> <input type="text" name="search" size="20" id="search" placeholder="[% loc('Search reports') %]"> </form> diff --git a/templates/web/zurich/maps/zurich.html b/templates/web/zurich/maps/zurich.html index f3a9bdc7f..8310b0758 100644 --- a/templates/web/zurich/maps/zurich.html +++ b/templates/web/zurich/maps/zurich.html @@ -5,9 +5,4 @@ [% map_html = BLOCK %] [% INCLUDE maps/openlayers.html %] [% INCLUDE maps/wmts_config.html %] -[% UNLESS around_page %] -<p class="sub-map-links" id="sub_map_links"> - [% map_sub_links | safe %] -</p> -[% END %] [% END %] diff --git a/templates/web/zurich/report/banner.html b/templates/web/zurich/report/banner.html index 8814dc986..b8ba7fa43 100644 --- a/templates/web/zurich/report/banner.html +++ b/templates/web/zurich/report/banner.html @@ -1,5 +1,5 @@ [% USE date %] -[% problem_hashref = c.cobrand.problem_as_hashref(problem, c) %] +[% problem_hashref = c.cobrand.problem_as_hashref(problem) %] <div class="banner banner--[% problem_hashref.banner_id %]"> <p>[% problem_hashref.state_t %]</p> </div> diff --git a/templates/web/zurich/report/new/fill_in_details_form.html b/templates/web/zurich/report/new/fill_in_details_form.html index 376429dad..c7ad0fb96 100644 --- a/templates/web/zurich/report/new/fill_in_details_form.html +++ b/templates/web/zurich/report/new/fill_in_details_form.html @@ -51,10 +51,10 @@ [% PROCESS "report/new/category_wrapper.html" %] <label for="form_username_register">[% loc('Your email') %]</label> - [% IF field_errors.username %] - <p class='form-error'>[% field_errors.username %]</p> + [% IF field_errors.username_register %] + <p class='form-error'>[% field_errors.username_register %]</p> [% END %] - <input class="form-control" type="email" value="[% email | html %]" name="username" id="form_username_register" required> + <input class="form-control" type="email" value="[% email | html %]" name="username_register" id="form_username_register" required> <label for="form_name">[% loc('Name') %] [% loc('(optional)') %]</label> [% IF field_errors.name %] @@ -70,7 +70,10 @@ <div class="form-txt-submit-box"> [%# class of submit_sign_in so name can be optional, name of submit_register so it doesn't try and sign us in %] - <p><input class="green-btn js-submit_sign_in" type="submit" name="submit_register" value="[% loc('Submit') %]"> + <p> + <input class="desk-only green-btn js-submit_sign_in" type="submit" name="submit_register" value="[% loc('Submit') %]"> + <input class="mob-only green-btn js-submit_sign_in" type="submit" name="submit_register_mobile" value="[% loc('Submit') %]"> + </p> </div> </div> |