From: Gustavo Martin Morcuende Date: Wed, 16 May 2012 01:54:22 +0000 (+0200) Subject: Language Company Category fields. X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=38c3d54c4f1f87eb9226400b845b2aa0124f36fd;p=mobi%2F.git Language Company Category fields. Using the user's language to show the name of the company category fields related to one ad. --- diff --git a/apps/companyfront/modules/ad/actions/actions.class.php b/apps/companyfront/modules/ad/actions/actions.class.php index 8e78acd..dddc753 100644 --- a/apps/companyfront/modules/ad/actions/actions.class.php +++ b/apps/companyfront/modules/ad/actions/actions.class.php @@ -51,6 +51,7 @@ class adActions extends sfActions $this->pager->init(); + $this->userLanguageId = $this->getUser()->getGuardUser()->getLanguage()->getId(); $this->languageCode = $language->getCode(); } diff --git a/apps/companyfront/modules/ad/templates/_list.php b/apps/companyfront/modules/ad/templates/_list.php index 09e66bd..bad7921 100644 --- a/apps/companyfront/modules/ad/templates/_list.php +++ b/apps/companyfront/modules/ad/templates/_list.php @@ -18,7 +18,8 @@ <?php echo $ad->getAdName() ?> - getAd()->getCompanyCategId() ?> + getCategGeneralFromIdDAOImpl($userLanguageId, $ad->getAd()->getCompanyCategId())->get(0)->company_categ_name?> + getAdName() ?> ', 'ad/delete?id='.$ad->getAd()->getId(), array('method' => 'delete', 'confirm' => 'Are you sure?')) ?> diff --git a/apps/companyfront/modules/ad/templates/indexSuccess.php b/apps/companyfront/modules/ad/templates/indexSuccess.php index 5c2dfd1..810802e 100644 --- a/apps/companyfront/modules/ad/templates/indexSuccess.php +++ b/apps/companyfront/modules/ad/templates/indexSuccess.php @@ -12,7 +12,7 @@ - $pager->getResults())) ?> + $pager->getResults(), 'userLanguageId' => $userLanguageId)) ?> haveToPaginate()): ?>