public function actionListForMarketing()
 {
     $pageSize = Yii::app()->pagination->resolveActiveForCurrentUserByType('listPageSize', get_class($this->getModule()));
     $activeActionElementType = EmailTemplatesForMarketingLinkActionElement::getType();
     $emailTemplate = new EmailTemplate(false);
     $searchForm = new EmailTemplatesSearchForm($emailTemplate);
     $dataProvider = $this->resolveSearchDataProvider($searchForm, $pageSize, 'EmailTemplatesForMarketingStateMetadataAdapter', 'EmailTemplatesSearchView');
     $breadcrumbLinks = static::getListBreadcrumbLinks();
     if (isset($_GET['ajax']) && $_GET['ajax'] == 'list-view') {
         $mixedView = $this->makeListView($searchForm, $dataProvider);
         $view = new EmailTemplatesPageView($mixedView);
     } else {
         $mixedView = $this->makeActionBarSearchAndListView($searchForm, $dataProvider, 'SecuredActionBarForMarketingSearchAndListView', null, $activeActionElementType);
         $view = new EmailTemplatesPageView(MarketingDefaultViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $mixedView, $breadcrumbLinks, 'MarketingBreadCrumbView'));
     }
     echo $view->render();
 }
 /**
  * @return array
  */
 public static function getDefaultMetadata()
 {
     $metadata = array('global' => array('toolbar' => array('elements' => array(array('type' => 'MarketingCreateLink', 'htmlOptions' => array('class' => 'icon-create')), array('type' => 'MarketingDashboardLink', 'htmlOptions' => array('class' => 'icon-marketing-dashboard')), array('type' => 'MarketingListsLink', 'htmlOptions' => array('class' => 'icon-marketing-lists')), array('type' => EmailTemplatesForMarketingLinkActionElement::getType(), 'htmlOptions' => array('class' => 'icon-email-templates')), array('type' => 'CampaignsLink', 'htmlOptions' => array('class' => 'icon-marketing-campaigns'))))));
     return $metadata;
 }