diff options
Diffstat (limited to 'templates/web/default/admin')
-rw-r--r-- | templates/web/default/admin/bodies.html | 44 | ||||
-rw-r--r-- | templates/web/default/admin/body.html (renamed from templates/web/default/admin/council_contacts.html) | 42 | ||||
-rw-r--r-- | templates/web/default/admin/body_edit.html (renamed from templates/web/default/admin/council_edit.html) | 36 | ||||
-rw-r--r-- | templates/web/default/admin/council_list.html | 47 | ||||
-rw-r--r-- | templates/web/default/admin/flagged.html (renamed from templates/web/default/admin/list_flagged.html) | 2 | ||||
-rw-r--r-- | templates/web/default/admin/problem_row.html | 4 | ||||
-rw-r--r-- | templates/web/default/admin/reports.html (renamed from templates/web/default/admin/search_reports.html) | 2 | ||||
-rw-r--r-- | templates/web/default/admin/stats.html | 6 | ||||
-rw-r--r-- | templates/web/default/admin/user_edit.html | 6 | ||||
-rw-r--r-- | templates/web/default/admin/users.html (renamed from templates/web/default/admin/search_users.html) | 4 |
10 files changed, 95 insertions, 98 deletions
diff --git a/templates/web/default/admin/bodies.html b/templates/web/default/admin/bodies.html new file mode 100644 index 000000000..522bbf956 --- /dev/null +++ b/templates/web/default/admin/bodies.html @@ -0,0 +1,44 @@ +[% INCLUDE 'admin/header.html' title=loc('Council contacts') -%] + +<h2>[% loc('Diligency prize league table') %]</h2> +[% IF edit_activity.count %] +<ul> + [% WHILE ( editor = edit_activity.next ) %] + <li>[% tprintf( loc('%d edits by %s'), editor.get_column('c'), editor.editor ) %]</li> + [% END %] +</ul> +[% ELSE %] +<p> +[% loc('No edits have yet been made.') %] +</p> +[% END %] + +<h2>[% loc('Councils') %]</h2> + +[%- FOREACH body IN bodies %] + [%- SET id = body.id %] + [%- IF body.parent_area %] + [%- + p_area = areas.$body.parent_area + parent = ', ' _ areas.$parent.name + %] + [%- ELSE %] + [%- parent = '' %] + [%- END %] + [%- '<ul>' IF loop.first %] + <li><a href="[% c.uri_for( 'body', id ) %]">[% body.name %] [% parent %]</a> + – + [% IF counts.$id %] + [% tprintf( loc('%d addresses'), counts.$id.c) IF c.cobrand.moniker != 'emptyhomes' %] + [% IF counts.$id.deleted %] + (1+ deleted) + [% ELSIF counts.$id.confirmed != counts.$id.c %] + (some unconfirmed) + [% END %] + [% ELSE %] + no categories + [% END %] + [%- '</ul>' IF loop.last %] +[%- END %] + +[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/default/admin/council_contacts.html b/templates/web/default/admin/body.html index be855cb95..80cd32fef 100644 --- a/templates/web/default/admin/council_contacts.html +++ b/templates/web/default/admin/body.html @@ -1,6 +1,4 @@ -[% INCLUDE 'admin/header.html' title=tprintf(loc('Council contacts for %s'), council_name) -%] - -[% conf = open311.next %] +[% INCLUDE 'admin/header.html' title=tprintf(loc('Council contacts for %s'), body.name) -%] [% IF updated %] <p> @@ -13,14 +11,14 @@ <a href="[% c.uri_for_email( '/around', { pc => example_pc } ) %]">[% tprintf( loc('Example postcode %s'), example_pc ) | html %]</a> | [% END %] [% IF c.cobrand.moniker == 'emptyhomes' %] -<a href="[% c.uri_for( 'search_reports', search => 'area:' _ area_id ) %]">[% loc('List all reported problems' ) %]</a> +<a href="[% c.uri_for( 'reports', search => 'body:' _ body_id ) %]">[% loc('List all reported problems' ) %]</a> [% ELSE %] -<a href="[% c.uri_for_email( '/reports/' _ area_id ) %]">[% loc('List all reported problems' ) %]</a> +<a href="[% c.uri_for_email( '/reports/' _ body_id ) %]">[% loc('List all reported problems' ) %]</a> [% END %] -<a href="[% c.uri_for( 'council_contacts', area_id, { text => 1 } ) %]">[% loc('Text only version') %]</a> +<a href="[% c.uri_for( 'body', body_id, { text => 1 } ) %]">[% loc('Text only version') %]</a> </p> -[% IF open311.count > 0 %] +[% IF body.send_method == 'Open311' %] <h2> Council contacts configured via Open311 </h2> @@ -30,7 +28,7 @@ <p class="error">Do not give these out except to people at the council.</p> [% END %] -<form method="post" action="[% c.uri_for('council_contacts', area_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> +<form method="post" action="[% c.uri_for('body', body_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> <table cellspacing="0" cellpadding="2" border="1"> <tr> @@ -47,11 +45,11 @@ </tr> [% WHILE ( contact = contacts.next ) %] <tr> - <td><a href="[% c.uri_for( 'council_edit', area_id, contact.category ) %]">[% contact.category %]</a></td> + <td><a href="[% c.uri_for( 'body_edit', body_id, contact.category ) %]">[% contact.category %]</a></td> <td>[% contact.email | html %]</td> <td>[% IF contact.confirmed %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td> <td>[% IF contact.deleted %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td> - <td>[% IF conf.can_be_devolved && contact.send_method %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td> + <td>[% IF body.can_be_devolved && contact.send_method %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td> <td>[% contact.editor %]</td> <td>[% contact.note | html %]</td> <td>[% contact.non_public ? loc('Non Public') : loc('Public') %]</td> @@ -62,7 +60,6 @@ </table> <p> - <input type="hidden" name="area_id" value="[% area_id %]"> <input type="hidden" name="posted" value="update"> <input type="hidden" name="token" value="[% token %]"> <input type="submit" name="Update statuses" value="[% loc('Update statuses') %]"> @@ -71,7 +68,7 @@ <h2>[% loc('Add new category') %]</h2> - <form method="post" action="[% c.uri_for('council_contacts', area_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + <form method="post" action="[% c.uri_for('body', body_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> [% IF c.cobrand.moniker != 'emptyhomes' %] <p> @@ -101,7 +98,6 @@ </p> <p> - <input type="hidden" name="area_id" value="[% area_id %]" > <input type="hidden" name="posted" value="new" > <input type="hidden" name="token" value="[% token %]" > <input type="submit" name="Create category" value="[% loc('Create category') %]" > @@ -114,20 +110,20 @@ </form> <h2>[% loc('Configure Open311 integration') %]</h2> - <form method="post" action="[% c.uri_for('council_contacts', area_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + <form method="post" action="[% c.uri_for('body', body_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> <p> <label for="endpoint">Endpoint</label> - <input type="text" name="endpoint" id="endpoint" value="[% conf.endpoint %]" size="50"> + <input type="text" name="endpoint" id="endpoint" value="[% body.endpoint %]" size="50"> </p> <p> <label for="jurisdiction">Jurisdiction</label> - <input type="text" name="jurisdiction" id="jurisdiction" value="[% conf.jurisdiction %]" size="50"> + <input type="text" name="jurisdiction" id="jurisdiction" value="[% body.jurisdiction %]" size="50"> </p> <p> <label for="api_key">Api Key</label> - <input type="text" name="api_key" id="api_key" value="[% conf.api_key %]" size="25"> + <input type="text" name="api_key" id="api_key" value="[% body.api_key %]" size="25"> </p> <p> @@ -135,34 +131,32 @@ <select name="send_method"> <option value=""> -- Select a method -- </option> [% FOR method IN send_methods %] - <option value="[% method %]"[% ' selected' IF conf.send_method == method %]>[% method %]</option> + <option value="[% method %]"[% ' selected' IF body.send_method == method %]>[% method %]</option> [% END %] </select> </p> <p> - <input type="checkbox" name="send_comments"[% ' checked' IF conf.send_comments %]> + <input type="checkbox" name="send_comments"[% ' checked' IF body.send_comments %]> <label for="send_comments" class="inline">Use Open311 comment sending extension</label> </p> <p> <label for"comment_user_id">User to attribute fetched comments to</label> - <input type="text" name="comment_user_id" value="[% conf.comment_user_id %]"> + <input type="text" name="comment_user_id" value="[% body.comment_user_id %]"> </p> <p> - <input type="checkbox" name="suppress_alerts"[% ' checked' IF conf.suppress_alerts %]> + <input type="checkbox" name="suppress_alerts"[% ' checked' IF body.suppress_alerts %]> <label for="suppress_alerts" class="inline">Do not send email alerts on fetched comments to problem creator</label> </p> <p> - <input type="checkbox" name="devolved"[% ' checked' IF conf.can_be_devolved %]> + <input type="checkbox" name="devolved"[% ' checked' IF body.can_be_devolved %]> <label for="devolved" class="inline">Endpoint lookup can be devolved to contacts</label> </p> <p> - <input type="hidden" name="open311_id" value="[% conf.id %]"> - <input type="hidden" name="area_id" value="[% area_id %]"> <input type="hidden" name="posted" value="open311"> <input type="hidden" name="token" value="[% token %]"> <input type="submit" name="Configure Open311" value="[% loc('Configure Open311') %]"> diff --git a/templates/web/default/admin/council_edit.html b/templates/web/default/admin/body_edit.html index 408466b51..7c9ad5fab 100644 --- a/templates/web/default/admin/council_edit.html +++ b/templates/web/default/admin/body_edit.html @@ -1,4 +1,4 @@ -[% INCLUDE 'admin/header.html' title=tprintf(loc('Council contacts for %s'), council_name) -%] +[% INCLUDE 'admin/header.html' title=tprintf(loc('Council contacts for %s'), body.name) -%] [% BLOCK highlightchanged_yesno %] [%- output = loc('No') %] @@ -19,37 +19,43 @@ [% END %] </p> -<form method="post" action="[% c.uri_for('council_contacts', area_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> - <strong>[% loc('Category:') %] </strong>[% contact.category | html %] +<form method="post" action="[% c.uri_for('body', body_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + <p><strong>[% loc('Category:') %] </strong>[% contact.category | html %] <input type="hidden" name="category" value="[% contact.category | html %]" > <input type="hidden" name="token" value="[% token %]" > - <strong>[% loc('Email:') %] </strong> + <p><strong>[% loc('Email:') %] </strong> <input type="text" name="email" value="[% contact.email | html %]" size="30"> - <input type="checkbox" name="confirmed" value="1" id="confirmed"[% ' checked' IF contact.confirmed %]> <label for="confirmed">[% loc('Confirmed' ) %]</label> - <input type="checkbox" name="deleted" value="1" id="deleted"[% ' checked' IF contact.deleted %]> <label for="deleted">[% loc('Deleted') %]</label> - <input type="checkbox" name="non_public" value="1" id="non_public"[% ' checked' IF contact.non_public %]> <label for="non_public">[% loc('Private') %]</label><br> - <strong>[% loc('Note:') %] </strong><textarea name="note" rows="3" cols="40">[% contact.note | html %]</textarea> <br> + <p> + <input type="checkbox" name="confirmed" value="1" id="confirmed"[% ' checked' IF contact.confirmed %]> + <label class="inline" for="confirmed">[% loc('Confirmed' ) %]</label> + <input type="checkbox" name="deleted" value="1" id="deleted"[% ' checked' IF contact.deleted %]> + <label class="inline" for="deleted">[% loc('Deleted') %]</label> + <input type="checkbox" name="non_public" value="1" id="non_public"[% ' checked' IF contact.non_public %]> + <label class="inline" for="non_public">[% loc('Private') %]</label><br> + + <p><strong>[% loc('Note:') %] </strong><textarea name="note" rows="3" cols="40">[% contact.note | html %]</textarea> + [% IF body.can_be_devolved %] <h2>[% loc('Configure Endpoint') %]</h2> - <form method="post" action="[% c.uri_for('council_contacts', area_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + <form method="post" action="[% c.uri_for('body', body_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> <p> - <label for="endpoint">Endpoint</label>: + <label for="endpoint">Endpoint</label> <input type="text" name="endpoint" id="endpoint" value="[% contact.endpoint %]" size="50"> </p> <p> - <label for="jurisdiction">Jurisdiction</label>: + <label for="jurisdiction">Jurisdiction</label> <input type="text" name="jurisdiction" id="jurisdiction" value="[% contact.jurisdiction %]" size="50"> </p> <p> - <label for="api_key">Api Key</label>: + <label for="api_key">Api Key</label> <input type="text" name="api_key" id="api_key" value="[% contact.api_key %]" size="25"> </p> <p> - <label for="send_method">Send Method</label>: + <label for="send_method">Send Method</label> <select name="send_method"> <option value=""> -- Select a method -- </option> [% FOR method IN send_methods %] @@ -57,10 +63,10 @@ [% END %] </select> </p> + [% END %] - <input type="hidden" name="area_id" value="[% area_id %]"> <input type="hidden" name="posted" value="new"> - <input type="submit" name="Save changes" value="[% loc('Save changes') %]"> + <p><input type="submit" name="Save changes" value="[% loc('Save changes') %]"> </form> <h2>[% loc('History') %]</h2> diff --git a/templates/web/default/admin/council_list.html b/templates/web/default/admin/council_list.html deleted file mode 100644 index ac99368fe..000000000 --- a/templates/web/default/admin/council_list.html +++ /dev/null @@ -1,47 +0,0 @@ -[% INCLUDE 'admin/header.html' title=loc('Council contacts') -%] - -[%- BLOCK details %] -[%- IF councils.size == 0 %] - [%- loc('None') %] -[%- ELSE %] -[%- FOREACH council IN councils %] - [%- IF council.parent_area %] - [%- - p_area = areas.$council.parent_area - parent = ', ' _ areas.$parent.name - %] - [%- ELSE %] - [%- parent = '' %] - [%- END %] - [%- '<ul>' IF loop.first %] - <li><a href="[% c.uri_for( 'council_contacts', council ) %]">[% areas.$council.name %] [% parent %][% tprintf( loc('%d addresses'), counts.$council.c) IF counts.$council && c.cobrand.moniker != 'emptyhomes' %]</a> - [%- '</ul>' IF loop.last %] -[%- END %] -[%- END %] -[%- END %] - -<h2>[% loc('Diligency prize league table') %]</h2> -[% IF edit_activity.count %] -<ul> - [% WHILE ( editor = edit_activity.next ) %] - <li>[% tprintf( loc('%d edits by %s'), editor.get_column('c'), editor.editor ) %]</li> - [% END %] -</ul> -[% ELSE %] -<p> -[% loc('No edits have yet been made.') %] -</p> -[% END %] - -<h2>[% loc('Councils') %]</h2> - -<h3>[% loc('No info at all') %]</h3> -[% PROCESS details councils=no_info %] -<h3>[% loc('Currently has 1+ deleted') %]</h3> -[% PROCESS details councils=one_plus_deleted %] -<h3>[% loc('Some unconfirmeds') %]</h3> -[% PROCESS details councils=unconfirmeds %] -<h3>[% loc('All confirmed') %]</h3> -[% PROCESS details councils=all_confirmed %] - -[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/default/admin/list_flagged.html b/templates/web/default/admin/flagged.html index 0b22bccb2..5af92a23c 100644 --- a/templates/web/default/admin/list_flagged.html +++ b/templates/web/default/admin/flagged.html @@ -38,7 +38,7 @@ <tr> <td>[% user.name | html %]</td> <td>[% user.email | html %]</td> - <td><a href="[% c.uri_for( 'search_reports', search => user.email ) %]">list content</a></td> + <td><a href="[% c.uri_for( 'reports', search => user.email ) %]">list content</a></td> </tr> [%- END %] </table> diff --git a/templates/web/default/admin/problem_row.html b/templates/web/default/admin/problem_row.html index ce95f8078..f985fdf7f 100644 --- a/templates/web/default/admin/problem_row.html +++ b/templates/web/default/admin/problem_row.html @@ -10,8 +10,8 @@ <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_council_contacts -%] - <a href="[% c.uri_for('council_contacts', problem.bodies_str ) %]">[% PROCESS value_or_nbsp value=problem.bodies_str %]</a> + <td>[%- IF edit_body_contacts -%] + <a href="[% c.uri_for('body', problem.bodies_str ) %]">[% PROCESS value_or_nbsp value=problem.bodies_str %]</a> [%- ELSE -%] [%- PROCESS value_or_nbsp value=problem.bodies_str -%] [%- END -%]</td> diff --git a/templates/web/default/admin/search_reports.html b/templates/web/default/admin/reports.html index 9702c16a7..b5e1361cd 100644 --- a/templates/web/default/admin/search_reports.html +++ b/templates/web/default/admin/reports.html @@ -1,7 +1,7 @@ [% INCLUDE 'admin/header.html' title=loc('Search Reports') %] [% PROCESS 'admin/report_blocks.html' %] -<form method="get" action="[% c.uri_for('search_reports') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> +<form method="get" action="[% c.uri_for('reports') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> <label for="search">[% loc('Search:') %]</label> <input type="text" name="search" size="30" id="search"> </form> diff --git a/templates/web/default/admin/stats.html b/templates/web/default/admin/stats.html index 234600837..bb42d5b7d 100644 --- a/templates/web/default/admin/stats.html +++ b/templates/web/default/admin/stats.html @@ -81,10 +81,10 @@ </p> <p> - [% loc('Council:') %] <select id='council' name='council'> + [% loc('Council:') %] <select id='body' name='body'> <option value=''>[% loc('No council') %]</option> - [% FOR council IN council_ids %] - <option value="[% council %]"[% ' selected' IF council == selected_council %]>[% council_details.$council.name %]</option> + [% FOR body IN bodies %] + <option value="[% body.id %]"[% ' selected' IF body.id == selected_body %]>[% body.name %]</option> [% END %] </select> </p> diff --git a/templates/web/default/admin/user_edit.html b/templates/web/default/admin/user_edit.html index f6d3be3e3..205e6561e 100644 --- a/templates/web/default/admin/user_edit.html +++ b/templates/web/default/admin/user_edit.html @@ -9,10 +9,10 @@ <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('Council:') %] <select id='council' name='council'> +<li>[% loc('Council:') %] <select id='body' name='body'> <option value=''>[% loc('No council') %]</option> -[% FOR council IN council_ids %] - <option value="[% council %]"[% ' selected' IF council == user.from_body %]>[% council_details.$council.name %]</option> +[% FOR body IN bodies %] + <option value="[% body.id %]"[% ' selected' IF body.id == user.from_body %]>[% body.name %]</option> [% END %] </select> <li>[% loc('Flagged:') %] <input type="checkbox" id="flagged" name="flagged"[% user.flagged ? ' checked' : '' %]></li> diff --git a/templates/web/default/admin/search_users.html b/templates/web/default/admin/users.html index 258fd9adf..12f681741 100644 --- a/templates/web/default/admin/search_users.html +++ b/templates/web/default/admin/users.html @@ -1,7 +1,7 @@ [% INCLUDE 'admin/header.html' title=loc('Search Users') %] [% PROCESS 'admin/report_blocks.html' %] -<form method="get" action="[% c.uri_for('search_users') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> +<form method="get" action="[% c.uri_for('users') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> <label for="search">[% loc('Search:') %]</label> <input type="text" name="search" size="30" id="search"> </form> @@ -18,7 +18,7 @@ [%- FOREACH user IN users %] <tr> <td>[% PROCESS value_or_nbsp value=user.name %]</td> - <td><a href="[% c.uri_for( 'search_reports', search => user.email ) %]">[% PROCESS value_or_nbsp value=user.email %]</a></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 %]</td> <td>[% user.flagged == 2 ? loc('(Email in abuse table)') : user.flagged ? loc('Yes') : ' ' %]</td> <td>[% IF user.id %]<a href="[% c.uri_for( 'user_edit', user.id ) %]">[% loc('Edit') %]</a>[% END %]</td> |