public function actionListForWorkflow()
 {
     $pageSize = Yii::app()->pagination->resolveActiveForCurrentUserByType('listPageSize', get_class($this->getModule()));
     $activeActionElementType = EmailTemplatesForWorkflowLinkActionElement::getType();
     $emailTemplate = new EmailTemplate(false);
     $searchForm = new EmailTemplatesSearchForm($emailTemplate);
     $dataProvider = $this->resolveSearchDataProvider($searchForm, $pageSize, 'EmailTemplatesForWorkflowStateMetadataAdapter', '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, 'SecuredActionBarForWorkflowsSearchAndListView', null, $activeActionElementType);
         $view = new EmailTemplatesPageView(WorkflowDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $mixedView, $breadcrumbLinks, 'WorkflowBreadCrumbView'));
     }
     echo $view->render();
 }
 /**
  * @return array
  */
 public static function getDefaultMetadata()
 {
     $metadata = array('global' => array('toolbar' => array('elements' => array(array('type' => 'WorkflowCreateLink', 'htmlOptions' => array('class' => 'icon-create')), array('type' => 'WorkflowsLink', 'htmlOptions' => array('class' => 'icon-workflows')), array('type' => EmailTemplatesForWorkflowLinkActionElement::getType(), 'htmlOptions' => array('class' => 'icon-email-templates')), array('type' => 'ByTimeWorkflowInQueuesLink', 'htmlOptions' => array('class' => 'icon-by-time-workflow-in-queues')), array('type' => 'WorkflowMessageInQueuesLink', 'htmlOptions' => array('class' => 'icon-by-workflow-message-in-queues')), array('type' => 'WorkflowManageOrderLink', 'htmlOptions' => array('class' => 'icon-by-workflow-manage-order'))))));
     return $metadata;
 }