diff options
Diffstat (limited to 'templates/web')
-rw-r--r-- | templates/web/default/admin/council_contacts.html | 89 | ||||
-rw-r--r-- | templates/web/default/admin/council_contacts.txt | 4 | ||||
-rw-r--r-- | templates/web/default/admin/council_edit.html | 62 | ||||
-rw-r--r-- | templates/web/default/report/display.html | 2 |
4 files changed, 156 insertions, 1 deletions
diff --git a/templates/web/default/admin/council_contacts.html b/templates/web/default/admin/council_contacts.html new file mode 100644 index 000000000..03b487d9c --- /dev/null +++ b/templates/web/default/admin/council_contacts.html @@ -0,0 +1,89 @@ +[% INCLUDE 'admin/header.html' title=tprintf(loc('Council contacts for %s'), council_name) -%] + +<p> +<em>[% updated %]</em> +</p> + +<p> +[% IF example_pc %] +<a href="[% c.uri_for( '/around', { pc => example_pc } ) %]">[% tprintf( loc('Example postcode %s'), example_pc ) | html %]</a> | +[% END %] +<a href="[% c.uri_for( '/reports', { council => area_id } ) %]">[% loc('List all reported problems' ) %]</a> +<a href="[% c.uri_for( 'council_contacts', area_id, { text => 1 } ) %]">[% loc('Text only version') %]</a> +</p> + +<form method="post" action="[% c.uri_for('council_contacts', area_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + + <table cellspacing="0" cellpadding="2" border="1"> + <tr> + <th>Category</th> + <th>Email</th> + <th>Confirmed</th> + <th>Deleted</th> + <th>Last editor</th> + <th>Note</th> + <th>When edited</th> + <th>Confirm</th> + </tr> + [% WHILE ( contact = contacts.next ) %] + <tr> + <td><a href="[% c.uri_for( 'council_edit', area_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>[% contact.editor %]</td> + <td>[% contact.note | html %]</td> + <td>[% contact.whenedited.ymd _ ' ' _ contact.whenedited.hms %]</td> + <td><input type="checkbox" name="confirmed" value="[% contact.category %]"></td> + </tr> + [% END %] + </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="Update statuses"> + </p> + </form> + + <h2>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"> + + [% IF c.cobrand.moniker != 'emptyhomes' %] + <p> + <strong>Category: </strong><input type="text" name="category" size="30"> + </p> + [% END %] + + <p> + <strong>Email: </strong><input type="text" name="email" size="30"> + </p> + + <p> + <input type="checkbox" name="confirmed" value="1" id="confirmed"> + <label for="confirmed">Confirmed</label> + + <input type="checkbox" name="deleted" value="1"id="deleted"> + <label for="deleted">Deleted</label> + </p> + + <p> + <strong>Note: </strong> <textarea name="note" rows="3" cols="40"></textarea> + </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="Create category" > + </p> + + <div> + <input type="hidden" name=".cgifields" value="confirmed" > + <input type="hidden" name=".cgifields" value="deleted" > + </div> + </form> + +[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/default/admin/council_contacts.txt b/templates/web/default/admin/council_contacts.txt new file mode 100644 index 000000000..2d1e04bfa --- /dev/null +++ b/templates/web/default/admin/council_contacts.txt @@ -0,0 +1,4 @@ +[% WHILE ( contact = contacts.next ) -%] +[%- NEXT IF contact.deleted || ! contact.confirmed %] +[% contact.category %] [% contact.email %] +[%- END %] diff --git a/templates/web/default/admin/council_edit.html b/templates/web/default/admin/council_edit.html new file mode 100644 index 000000000..c9ce0e602 --- /dev/null +++ b/templates/web/default/admin/council_edit.html @@ -0,0 +1,62 @@ +[% INCLUDE 'admin/header.html' title=tprintf(loc('Council contacts for %s'), council_name) -%] + +[% BLOCK highlightchanged_yesno %] +[%- output = loc('No') %] +[%- IF new.$value %][% output = loc('Yes') %][% END %] +[%- IF old && old.$value != new.$value %]<strong>[% output %]</strong>[% ELSE %][% output %][% END %] +[%- END %] + +[% BLOCK highlightchanged %] +[%- IF old && old.$value != new.$value %]<strong>[% new.$value %]</strong>[% ELSE %][% new.$value %][% END %] +[%- END %] +<p> +<em>[% updated %]</em> +</p> + +<p> +[% IF example_pc %] +<a href="[% c.uri_for( '/around', { pc => example_pc } ) %]">[% tprintf( loc('Example postcode %s'), example_pc ) | html %]</a> +[% END %] +</p> + +<form method="post" action="[% c.uri_for('council_contacts', area_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + <strong>Category: </strong>test + <input type="hidden" name="category" value="[% contact.category | html %]" > + <input type="hidden" name="token" value="[% token %]" >1 + <strong> 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">Confirmed</label> + <input type="checkbox" name="deleted" value="1" id="deleted"[% ' checked' IF contact.deleted %]> <label for="deleted">Deleted</label><br> + + <strong>Note: </strong><textarea name="note" rows="3" cols="40">[% contact.note | html %]</textarea> <br> + + <input type="hidden" name="area_id" value="[% area_id %]"> + <input type="hidden" name="posted" value="new"> + <input type="submit" name="Save changes" value="Save changes"> +</form> + +<h2>History</h2> +<table border="1"> + <tr> + <th>When edited</th> + <th>Email</th> + <th>Confirmed</th> + <th>Deleted</th> + <th>Editor</th> + <th>Note</th> + </tr> + [%- prev = '' %] + [%- WHILE ( contact = history.next ) %] + <tr> + <td>[% contact.whenedited.ymd _ ' ' _ contact.whenedited.hms %]</td> + <td>[% PROCESS highlightchanged old=prev new=contact value='email' %]</td> + <td>[% PROCESS highlightchanged_yesno old=prev new=contact value='confirmed' %]</td> + <td>[% PROCESS highlightchanged_yesno old=prev new=contact value='deleted' %]</td> + <td>[% contact.editor %]</td> + <td>[% contact.note | html %]</td> + </tr> + [%- prev = contact %] + [%- END %] +</table> + +[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/default/report/display.html b/templates/web/default/report/display.html index fdef6c775..4fa58c1db 100644 --- a/templates/web/default/report/display.html +++ b/templates/web/default/report/display.html @@ -44,7 +44,7 @@ <form action="[% c.uri_for( '/alert/subscribe' ) %]" method="post" id="email_alert_box"> <p>[% loc('Receive email when updates are left on this problem.' ) %]</p> <label class="n" for="alert_rznvy">[% loc('Email') %]</label> - <input type="text" name="rznvy" id="alert_rznvy" value="[% email %]" size="30"> + <input type="text" name="rznvy" id="alert_rznvy" value="[% email | html %]" size="30"> <input type="hidden" name="id" value="[% problem.id %]"> <input type="hidden" name="type" value="updates"> <input type="submit" value="[% loc('Subscribe') %]"> |