aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Questionnaire.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-05-25 11:52:16 +0100
committerStruan Donald <struan@exo.org.uk>2011-05-25 11:52:16 +0100
commit2bebb13e4c055f8d52bd0d68112cd040b21b3abd (patch)
treedd41a30d522f16ef3ad0852a86f591a65ead2335 /perllib/FixMyStreet/App/Controller/Questionnaire.pm
parentef849541cbe7b200db1bd4af6cdc67e3061d1486 (diff)
parent04f96c0a5558f53456b25ae4e7cffad41a7664cb (diff)
Merge branch 'migrate_to_catalyst' of ssh://git.mysociety.org/data/git/public/fixmystreet into migrate_to_catalyst
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Questionnaire.pm')
-rwxr-xr-xperllib/FixMyStreet/App/Controller/Questionnaire.pm11
1 files changed, 7 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Questionnaire.pm b/perllib/FixMyStreet/App/Controller/Questionnaire.pm
index 8b804e421..0fafcdc2e 100755
--- a/perllib/FixMyStreet/App/Controller/Questionnaire.pm
+++ b/perllib/FixMyStreet/App/Controller/Questionnaire.pm
@@ -202,14 +202,17 @@ sub display : Private {
map { Utils::truncate_coordinate($_) }
( $problem->latitude, $problem->longitude );
- my $problem_text = ''; # Page::display_problem_text($c->fake_q, $problem); # FIXME This needs to be in the template
- $c->stash->{updates} = ''; # FIXME Should be database ResultSet of problem's pdates
+ my $updates = $c->model('DB::Comment')->search(
+ { problem_id => $problem->id, state => 'confirmed' },
+ { order_by => 'confirmed' }
+ );
+ $c->stash->{updates} = $updates;
+
$c->stash->{map_start_html} = FixMyStreet::Map::display_map(
- $c->fake_q,
+ $c, $c->fake_q,
latitude => $problem->latitude,
longitude => $problem->longitude,
pins => [ [ $problem->latitude, $problem->longitude, $problem->state eq 'fixed' ? 'green' : 'red' ] ],
- pre => $problem_text,
);
$c->stash->{map_js} = FixMyStreet::Map::header_js();
$c->stash->{cobrand_form_elements} = $c->cobrand->form_elements('questionnaireForm');