From 7b765baebd15932a8cada71e7e723bca52e35d73 Mon Sep 17 00:00:00 2001 From: Gustavo Martin Morcuende Date: Sun, 20 May 2012 17:49:12 +0200 Subject: [PATCH] Remove pager from Company Category index list. I am going to use just the Tree with the categories. --- .../modules/category/actions/actions.class.php | 7 ++----- .../modules/category/templates/indexSuccess.php | 24 ++-------------------- 2 files changed, 4 insertions(+), 27 deletions(-) diff --git a/apps/companyfront/modules/category/actions/actions.class.php b/apps/companyfront/modules/category/actions/actions.class.php index e144889..b27e802 100644 --- a/apps/companyfront/modules/category/actions/actions.class.php +++ b/apps/companyfront/modules/category/actions/actions.class.php @@ -18,13 +18,10 @@ class categoryActions extends sfActions //Just 1 user owns a company. Should this be improved? $companyId = CompanyTable::getInstance()->findOneByUserId($userId)->getId(); - //Doctrine Query used to show a pager with the Company Categories. + //Doctrine Query used to show a list with the Company Categories. $query=CompanyCategoryTable::getInstance()->getCompanyCategoriesByCompanyIdQuery($companyId); - $this->pager = new sfDoctrinePager('CompanyCategoryDescription', sfConfig::get('app_max_categories_on_pager')); - $this->pager->setQuery($query); - $this->pager->setPage($request->getParameter('page', 1)); - $this->pager->init(); + $this->companyCategories = $query->execute(); } public function executeShow(sfWebRequest $request) diff --git a/apps/companyfront/modules/category/templates/indexSuccess.php b/apps/companyfront/modules/category/templates/indexSuccess.php index e9c8e90..d86021c 100644 --- a/apps/companyfront/modules/category/templates/indexSuccess.php +++ b/apps/companyfront/modules/category/templates/indexSuccess.php @@ -1,25 +1,5 @@

- $pager->getResults())) ?> + $companyCategories)) ?> -haveToPaginate()): ?> - - - -Create new Category + -- 2.1.4