aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-06-09 18:33:39 +0100
committerStruan Donald <struan@exo.org.uk>2011-06-09 18:33:39 +0100
commit6642f808d2f53e4b619ef63d50a8c13500ce8333 (patch)
tree85288f7a29b25bb7454025f7750a2d6218a34381
parent714ce37e538a611322667b0a1ce82329c35c94ef (diff)
parentfb26dda031a9409a1716c379d4a86327aa142dd7 (diff)
Merge branch 'migrate_to_catalyst' of ssh://git.mysociety.org/data/git/public/fixmystreet into migrate_to_catalyst
-rw-r--r--db/alert_types.pl2
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin.pm2
-rw-r--r--t/app/controller/alert_new.t5
-rw-r--r--templates/web/default/admin/council_contacts.html32
-rw-r--r--templates/web/default/admin/council_edit.html6
-rw-r--r--templates/web/default/admin/index.html2
-rw-r--r--templates/web/default/admin/list_updates.html2
-rw-r--r--templates/web/default/admin/questionnaire.html4
-rw-r--r--templates/web/default/admin/report_edit.html4
-rw-r--r--templates/web/default/admin/search_reports.html4
-rw-r--r--templates/web/default/admin/update_edit.html4
11 files changed, 36 insertions, 31 deletions
diff --git a/db/alert_types.pl b/db/alert_types.pl
index 115587620..3d1d131dc 100644
--- a/db/alert_types.pl
+++ b/db/alert_types.pl
@@ -35,7 +35,7 @@
_('The latest problems for {{COUNCIL}} reported by users'),
# New problems within a particular ward sent to a particular council
- _('New problems for {{COUNCIL}} within {{WARD}} ward on FixMyStreet'
+ _('New problems for {{COUNCIL}} within {{WARD}} ward on FixMyStreet'),
_('The latest problems for {{COUNCIL}} within {{WARD}} ward reported by users'),
# New problems within a particular voting area (ward, constituency, whatever)
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm
index 15aef8cc1..0c428e7a7 100644
--- a/perllib/FixMyStreet/App/Controller/Admin.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin.pm
@@ -104,7 +104,7 @@ sub index : Path : Args(0) {
$questionnaire_counts{total}
? sprintf( '%.1f',
$questionnaire_counts{1} / $questionnaire_counts{total} * 100 )
- : 'na';
+ : _('n/a');
$c->stash->{questionnaires} = \%questionnaire_counts;
return 1;
diff --git a/t/app/controller/alert_new.t b/t/app/controller/alert_new.t
index 6fc32acbf..5bf7e31dd 100644
--- a/t/app/controller/alert_new.t
+++ b/t/app/controller/alert_new.t
@@ -208,6 +208,7 @@ foreach my $test (
param1 => 2651,
param2 => 2651,
confirmed => 0,
+ delete => 1,
}
)
{
@@ -263,6 +264,10 @@ foreach my $test (
$mech->email_count_is( $test->{confirmed} ? 0 : 1 );
+ if ( $test->{delete} ) {
+ $mech->delete_user($user);
+ $mech->delete_user($alert_user);
+ }
};
}
diff --git a/templates/web/default/admin/council_contacts.html b/templates/web/default/admin/council_contacts.html
index 03b487d9c..e7cacf4f8 100644
--- a/templates/web/default/admin/council_contacts.html
+++ b/templates/web/default/admin/council_contacts.html
@@ -16,14 +16,14 @@
<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>
+ <th>[% loc('Category') %]</th>
+ <th>[% loc('Email') %]</th>
+ <th>[% loc('Confirmed') %]</th>
+ <th>[% loc('Deleted') %]</th>
+ <th>[% loc('Last editor') %]</th>
+ <th>[% loc('Note') %]</th>
+ <th>[% loc('When edited') %]</th>
+ <th>[% loc('Confirm') %]</th>
</tr>
[% WHILE ( contact = contacts.next ) %]
<tr>
@@ -43,41 +43,41 @@
<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">
+ <input type="submit" name="Update statuses" value="[% loc('Update statuses') %]">
</p>
</form>
- <h2>Add new category</h2>
+ <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">
[% IF c.cobrand.moniker != 'emptyhomes' %]
<p>
- <strong>Category: </strong><input type="text" name="category" size="30">
+ <strong>[% loc('Category:') %] </strong><input type="text" name="category" size="30">
</p>
[% END %]
<p>
- <strong>Email: </strong><input type="text" name="email" size="30">
+ <strong>[% loc('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>
+ <label for="confirmed">[% loc('Confirmed') %]</label>
<input type="checkbox" name="deleted" value="1"id="deleted">
- <label for="deleted">Deleted</label>
+ <label for="deleted">[% loc('Deleted') %]</label>
</p>
<p>
- <strong>Note: </strong> <textarea name="note" rows="3" cols="40"></textarea>
+ <strong>[% loc('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" >
+ <input type="submit" name="Create category" value="[% loc('Create category') %]" >
</p>
<div>
diff --git a/templates/web/default/admin/council_edit.html b/templates/web/default/admin/council_edit.html
index 1a6c19a6a..c766bbd08 100644
--- a/templates/web/default/admin/council_edit.html
+++ b/templates/web/default/admin/council_edit.html
@@ -20,15 +20,15 @@
</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 %]
+ <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>
+ <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><br>
- <strong>[% loc('Note: ') %]</strong><textarea name="note" rows="3" cols="40">[% contact.note | html %]</textarea> <br>
+ <strong>[% loc('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">
diff --git a/templates/web/default/admin/index.html b/templates/web/default/admin/index.html
index 85b8c264f..59722a5ed 100644
--- a/templates/web/default/admin/index.html
+++ b/templates/web/default/admin/index.html
@@ -12,7 +12,7 @@
<ul>
<li>[% tprintf( loc('<strong>%d</strong> live problems'), total_problems_live ) %]</li>
- <li>[% tprintf( loc('%d live updates'), comments.confirmed ) %]</li>
+ <li>[% tprintf( loc('%d live updates'), comments.confirmed || 0 ) %]</li>
<li>[% tprintf( loc('%d confirmed alerts, %d unconfirmed'), alerts.1, alerts.0) %]</li>
<li>[% tprintf( loc('%d questionnaires sent &ndash; %d answered (%s%%)'), questionnaires.total, questionnaires.1, questionnaires_pc) %]</li>
<li>[% tprintf( loc('%d council contacts &ndash; %d confirmed, %d unconfirmed'), contacts.total, contacts.1, contacts.0) %]</li>
diff --git a/templates/web/default/admin/list_updates.html b/templates/web/default/admin/list_updates.html
index d17f2141f..a6005bc00 100644
--- a/templates/web/default/admin/list_updates.html
+++ b/templates/web/default/admin/list_updates.html
@@ -10,7 +10,7 @@
<th>[% loc('Anonymous') %]</th>
<th>[% loc('Cobrand') %]</th>
<th>[% loc('Text') %]</th>
- <th>[% loc('*') %]</th>
+ <th>*</th>
</tr>
[% FOREACH update IN updates -%]
<tr[% ' class="hidden"' IF update.state == 'hidden' || ( problem.state && problem.state == 'hidden' ) %]>
diff --git a/templates/web/default/admin/questionnaire.html b/templates/web/default/admin/questionnaire.html
index 5a9c74b5e..baeb7c800 100644
--- a/templates/web/default/admin/questionnaire.html
+++ b/templates/web/default/admin/questionnaire.html
@@ -12,8 +12,8 @@
</tr>
[% ELSE %]
<tr>
- <td>n/a</td>
- <td>n/a</td>
+ <td>[% loc('n/a') %]</td>
+ <td>[% loc('n/a') %]</td>
</tr>
[% END %]
</table>
diff --git a/templates/web/default/admin/report_edit.html b/templates/web/default/admin/report_edit.html
index 1a03da7e1..ef083ca7e 100644
--- a/templates/web/default/admin/report_edit.html
+++ b/templates/web/default/admin/report_edit.html
@@ -15,8 +15,8 @@
<li>[% loc('Co-ordinates:') %] [% problem.latitude %], [% problem.longitude %] ( [% loc('originally entered') %] [% problem.postcode | html %] , [% IF problem.used_map %][% loc('used map') %][% ELSE %][% loc("didn't use map") %][% END %])</li>
<li>[% loc('For council(s):') %] [% IF problem.council %][% problem.council %][% ELSE %]<em>[% loc('None' ) %]</em>[% END %] ([% loc('other areas:') %] [% problem.areas | remove('^,') | remove( ',$' ) %])</li>
<li><label for="anonymous">[% loc('Anonymous:') %]</label> <select name="anonymous" id="anonymous">
-<option [% 'selected ' IF problem.anonymous %]value="1">Yes</option>
-<option [% 'selected ' IF !problem.anonymous %]value="0">No</option>
+<option [% 'selected ' IF problem.anonymous %]value="1">[% loc('Yes') %]</option>
+<option [% 'selected ' IF !problem.anonymous %]value="0">[% loc('No') %]</option>
</select></li>
<li><label for="state">[% loc('State:') %]</label> <select name="state" id="state">
[% FOREACH state IN [ ['confirmed', loc('Open')], ['fixed', loc('Fixed')], ['hidden', loc('Hidden')], ['partial', loc('Partial')],['unconfirmed',loc('Unconfirmed')] ] %]
diff --git a/templates/web/default/admin/search_reports.html b/templates/web/default/admin/search_reports.html
index 3c8b21a71..2406dc73e 100644
--- a/templates/web/default/admin/search_reports.html
+++ b/templates/web/default/admin/search_reports.html
@@ -2,7 +2,7 @@
[% PROCESS 'admin/report_blocks.html' %]
<form method="get" action="[% c.uri_for('search_reports') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
- <label for="search">Search:</label> <input type="text" name="search" size="30" id="search">
+ <label for="search">[% loc('Search:') %]</label> <input type="text" name="search" size="30" id="search">
</form>
@@ -20,7 +20,7 @@
<th>[% loc('Created') %]</th>
<th>[% loc('State') %]</th>
<th>[% loc('When sent') %]</th>
- <th>[% loc('*') %]</th>
+ <th>*</th>
</tr>
[%- FOREACH problem IN problems %]
<tr[% ' class="hidden"' IF problem.state == 'hidden' %]>
diff --git a/templates/web/default/admin/update_edit.html b/templates/web/default/admin/update_edit.html
index 8c6cdcfa7..d7f212052 100644
--- a/templates/web/default/admin/update_edit.html
+++ b/templates/web/default/admin/update_edit.html
@@ -12,8 +12,8 @@
<li><a href="[% c.uri_for_email( '/report', update.problem_id, cobrand_data ) %]#update_[% update.id %]">[% loc('View report on site' )%]</a></li>
<li><label for='detail'>[% loc('Text:') %]</label><br><textarea name='text' id='text' cols=60 rows=10>[% update.text | html %]</textarea></li>
<li><label for="anonymous">[% loc('Anonymous:') %]</label> <select name="anonymous" id="anonymous">
-<option [% 'selected ' IF update.anonymous %]value="1">Yes</option>
-<option [% 'selected ' IF !update.anonymous %]value="0">No</option>
+<option [% 'selected ' IF update.anonymous %]value="1">[% loc('Yes') %]</option>
+<option [% 'selected ' IF !update.anonymous %]value="0">[% loc('No') %]</option>
</select></li>
<li><label for="state">[% loc('State:') %]</label> <select name="state" id="state">
[% FOREACH state IN [ ['confirmed', loc('Open')], ['hidden', loc('Hidden')], ['unconfirmed',loc('Unconfirmed')] ] %]