Esempio n. 1
0
 function display($tpl = null)
 {
     $task = JRequest::getWord('task');
     if ($task == 'editElement' || $task == 'addElement') {
         $id = JRequest::getVar('elementId');
         TOOLBAR_enmasse::_COUPONELEMENT_NEW();
         $element = JModel::getInstance('couponElement', 'enmasseModel')->getById($id);
         $this->assignRef('element', $element);
     } else {
         TOOLBAR_enmasse::_SMENU();
         TOOLBAR_enmasse::_COUPON();
         $couponBgUrl = JModel::getInstance('coupon', 'enmasseModel')->getCouponBgUrl();
         $couponElementList = JModel::getInstance('couponElement', 'enmasseModel')->listAll();
         $this->assignRef('couponBgUrl', $couponBgUrl);
         $this->assignRef('couponElementList', $couponElementList);
     }
     parent::display($tpl);
 }