protected function resolveTabbedContent($plainTextContent, $htmlContent, $activeTab = 'text') { $this->registerTabbedContentScripts(); $textClass = 'active-tab'; $htmlClass = null; if ($activeTab == 'html') { $textClass = null; $htmlClass = 'active-tab'; } $textTabHyperLink = ZurmoHtml::link($this->renderTextContentAreaLabel(), '#tab1', array('class' => $textClass)); $htmlTabHyperLink = ZurmoHtml::link($this->renderHtmlContentAreaLabel(), '#tab2', array('class' => $htmlClass)); $tagsGuideLink = null; if ($this->form) { $controllerId = $this->getControllerId(); $moduleId = $this->getModuleId(); $modelId = $this->model->id; $tagsGuideLinkElement = new MergeTagGuideAjaxLinkActionElement($controllerId, $moduleId, $modelId); $tagsGuideLink = $tagsGuideLinkElement->render(); } $tabContent = ZurmoHtml::tag('div', array('class' => 'tabs-nav'), $textTabHyperLink . $htmlTabHyperLink . $tagsGuideLink); $plainTextDiv = ZurmoHtml::tag('div', array('id' => 'tab1', 'class' => $textClass . ' tab email-template-' . static::TEXT_CONTENT_INPUT_NAME), $plainTextContent); $htmlContentDiv = ZurmoHtml::tag('div', array('id' => 'tab2', 'class' => $htmlClass . ' tab email-template-' . static::HTML_CONTENT_INPUT_NAME), $htmlContent); return ZurmoHtml::tag('div', array('class' => 'email-template-content'), $tabContent . $plainTextDiv . $htmlContentDiv); }
/** * @return string */ protected function renderMergeTagGuideContent() { $element = new MergeTagGuideAjaxLinkActionElement('default', 'emailTemplates', 'notUsed', array('htmlOptions' => array('namespace' => 'mergetag'))); return ZurmoHtml::tag('div', array('class' => 'mergetags-guide-link'), $element->render()); }