summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
Diffstat (limited to 'application')
-rw-r--r--application/controllers/FilterController.php12
-rw-r--r--application/views/scripts/filter/index.phtml24
-rw-r--r--application/views/scripts/person/index.phtml22
3 files changed, 28 insertions, 30 deletions
diff --git a/application/controllers/FilterController.php b/application/controllers/FilterController.php
index 6a80ab9..37aafb4 100644
--- a/application/controllers/FilterController.php
+++ b/application/controllers/FilterController.php
@@ -16,14 +16,10 @@ class FilterController extends Zend_Controller_Action
public function indexAction()
{
- try{
- $data = $this->_filtermapper->fetchAll();
- print_r(
- $view = new Zend_View();
-
- // tell it to use htmlentities as the escaping callback
- $view->setEscape('htmlentities');
- #echo $view->render();
+ try{
+ $this->_filtermapper = new Application_Model_FilterMapper();
+ $this->view->filters = $this->_filtermapper->fetchAll();
+
}catch (Zend_Exception $e) {
echo "Error message 2: " . $e->getMessage() . "\n";
}
diff --git a/application/views/scripts/filter/index.phtml b/application/views/scripts/filter/index.phtml
index bace90f..7162786 100644
--- a/application/views/scripts/filter/index.phtml
+++ b/application/views/scripts/filter/index.phtml
@@ -1 +1,23 @@
-<br /><br /><center>View script for controller <b>Filter</b> and script/action name <b>index</b></center> \ No newline at end of file
+<h1>Filters</h1>
+<?php if ($this->filters): ?>
+
+ <!-- A table of filters. -->
+ <table>
+ <tr>
+ <th>filterid</th>
+ </tr>
+ <?php foreach ($this->filters as $filter): ?>
+ <tr>
+ <td><?php echo $this->escape($filter->title) ?></td>
+ </tr>
+ <?php endforeach ?>
+
+
+
+ </table>
+
+<?php else: ?>
+
+ <p>There are no filters to display.</p>
+
+<?php endif;?>
diff --git a/application/views/scripts/person/index.phtml b/application/views/scripts/person/index.phtml
index 710e08f..1ba7791 100644
--- a/application/views/scripts/person/index.phtml
+++ b/application/views/scripts/person/index.phtml
@@ -1,21 +1 @@
-<?php if ($this->filters): ?>
-
- <!-- A table of filters. -->
- <table>
- <tr>
- <th>filterid</th>
- </tr>
-
- <?php foreach ($this->filters as $key => $val): ?>
- <tr>
- <td><?php echo $this->escape($val['title']) ?></td>
- </tr>
- <?php endforeach; ?>
-
- </table>
-
-<?php else: ?>
-
- <p>There are no filters to display.</p>
-
-<?php endif;?>
+<br /><br /><center>View script for controller <b>Person</b> and script/action name <b>index</b></center>