Permalink
Browse files

display design response on reports view

  • Loading branch information...
1 parent d8a88e8 commit ebeb3ae7f68c5b96b4058fe677dafedcda259456 @rmarianski committed Sep 15, 2011
Showing with 19 additions and 0 deletions.
  1. +9 −0 application/controllers/reports.php
  2. +10 −0 themes/pps/views/reports_view.php
@@ -1047,6 +1047,15 @@ public function view($id = false)
$this->template->content->submitted_first_name = $submitted_first_name;
$this->template->content->submitted_last_name = $submitted_last_name;
$this->template->content->submitted_neighborhood = $submitted_neighborhood;
+
+ // add in design response
+ $design_response_obj = ORM::factory('design_response')->where('incident_id', $incident->id)->find();
+ if ($design_response_obj->id > 0) {
+ $design_response = $design_response_obj->text;
+ } else {
+ $design_response = NULL;
+ }
+ $this->template->content->design_response = $design_response;
}
/**
@@ -56,6 +56,16 @@
<?php endif; ?>
<!-- end questions/responses -->
+
+<?php if ($design_response): ?>
+<div class="report-news">
+<h4>Form response</h4>
+<div class="report-category-list">
+<?php echo $design_response; ?>
+</div>
+</div>
+<?php endif; ?>
+
<!-- start category list -->
<div class="report-news"><h4>Categories</h4></div>
<div class="report-category-list">

0 comments on commit ebeb3ae

Please sign in to comment.