protected function renderContent()
 {
     $content = $this->renderBannerContent();
     $content .= parent::renderContent();
     return $content;
 }
 protected function renderContent()
 {
     $content = $this->renderTabs();
     return $content . ZurmoHtml::tag('div', array('class' => 'image-tabbed-content'), parent::renderContent());
 }
 /**
  * Renders content for the view.
  * @return A string containing the element's content.
  */
 protected function renderContent()
 {
     $this->renderScriptsContent();
     $this->setView(new AnyContactSelectForEmailMatchingView($this->controllerId, $this->moduleId, $this->selectForm, $this->uniqueId, $this->saveActionId, $this->urlParameters), 0, 0);
     $row = 1;
     // $content = $this->renderEmailMessageContentAndResolveLink();
     if ($this->userCanCreateContact) {
         $this->setView(new ContactInlineCreateForArchivedEmailCreateView($this->controllerId, $this->moduleId, $this->emailMessage->id, $this->contact, $this->uniqueId, $this->saveActionId, $this->urlParameters), $row, 0);
         $row++;
     }
     if ($this->userCanCreateLead) {
         $this->setView(new LeadInlineCreateForArchivedEmailCreateView($this->controllerId, $this->moduleId, $this->emailMessage->id, $this->contact, $this->uniqueId, $this->saveActionId, $this->urlParameters), $row, 0);
     }
     $selectLink = $this->renderSelectLinkContent();
     $createContactLink = ZurmoHtml::link(Zurmo::t('ContactsModule', 'Create ContactsModuleSingularLabel', LabelUtil::getTranslationParamsForAllModules()), '#', array('class' => 'create-link contact-create-link z-action-link'));
     $createLeadLink = ZurmoHtml::link(Zurmo::t('LeadsModule', 'Create LeadsModuleSingularLabel', LabelUtil::getTranslationParamsForAllModules()), '#', array('class' => 'create-link lead-create-link z-action-link'));
     $deleteLink = $this->renderDeleteLink();
     $rules = new EmailMessageMashableActivityRules();
     $content = $rules->renderRelatedModelsByImportanceContent($this->emailMessage);
     $content .= ZurmoHtml::wrapLabel(strval($this->emailMessage), 'email-subject');
     $content .= '<div class="matching-actions-and-content"><div class="email-matching-actions">';
     $content .= $this->renderTitleDivContent($selectLink, $createLeadLink, $createContactLink, $deleteLink);
     $content .= '</div>';
     $content .= parent::renderContent() . '</div>';
     return '<div id="wrapper-' . $this->uniqueId . '" class="email-archive-item">' . $content . '</div>';
 }
Esempio n. 4
0
 /**
  * Renders content for the view.
  * @return A string containing the element's content.
  */
 protected function renderContent()
 {
     Yii::app()->clientScript->registerScript('leadConvertActions', "\n                \$('.account-select-link').click( function()\n                    {\n                        \$('#AccountConvertToView').hide();\n                        \$('#LeadConvertAccountSkipView').hide();\n                        \$('#AccountSelectView').show();\n                        \$('#account-create-title').hide();\n                        \$('#account-skip-title').hide();\n                        \$('#account-select-title').show();\n                        return false;\n                    }\n                );\n                \$('.account-create-link').click( function()\n                    {\n                        \$('#AccountConvertToView').show();\n                        \$('#LeadConvertAccountSkipView').hide();\n                        \$('#AccountSelectView').hide();\n                        \$('#account-create-title').show();\n                        \$('#account-skip-title').hide();\n                        \$('#account-select-title').hide();\n                        return false;\n                    }\n                );\n                \$('.account-skip-link').click( function()\n                    {\n                        \$('#AccountConvertToView').hide();\n                        \$('#LeadConvertAccountSkipView').show();\n                        \$('#AccountSelectView').hide();\n                        \$('#account-create-title').hide();\n                        \$('#account-skip-title').show();\n                        \$('#account-select-title').hide();\n                        return false;\n                    }\n                );\n            ");
     $createLink = ZurmoHtml::link(Zurmo::t('LeadsModule', 'Create AccountsModuleSingularLabel', LabelUtil::getTranslationParamsForAllModules()), '#', array('class' => 'account-create-link'));
     $selectLink = ZurmoHtml::link(Zurmo::t('LeadsModule', 'Select AccountsModuleSingularLabel', LabelUtil::getTranslationParamsForAllModules()), '#', array('class' => 'account-select-link'));
     $skipLink = ZurmoHtml::link(Zurmo::t('LeadsModule', 'Skip AccountsModuleSingularLabel', LabelUtil::getTranslationParamsForAllModules()), '#', array('class' => 'account-skip-link'));
     $content = $this->renderTitleContent();
     $content .= '<div class="lead-conversion-actions">';
     $content .= '<div id="account-select-title">';
     if ($this->userCanCreateAccount) {
         $content .= $createLink . '&#160;' . Zurmo::t('LeadsModule', 'or') . '&#160;';
     }
     $content .= Zurmo::t('LeadsModule', 'Select AccountsModuleSingularLabel', LabelUtil::getTranslationParamsForAllModules()) . '&#160;';
     if ($this->convertToAccountSetting == LeadsModule::CONVERT_ACCOUNT_NOT_REQUIRED) {
         $content .= Zurmo::t('LeadsModule', 'or') . '&#160;' . $skipLink;
     }
     $content .= '</div>';
     $content .= '<div id="account-create-title">';
     $content .= Zurmo::t('LeadsModule', 'Create AccountsModuleSingularLabel', LabelUtil::getTranslationParamsForAllModules()) . '&#160;';
     $content .= Zurmo::t('LeadsModule', 'or') . '&#160;' . $selectLink . '&#160;';
     if ($this->convertToAccountSetting == LeadsModule::CONVERT_ACCOUNT_NOT_REQUIRED) {
         $content .= Zurmo::t('LeadsModule', 'or') . '&#160;' . $skipLink;
     }
     $content .= '</div>';
     if ($this->convertToAccountSetting == LeadsModule::CONVERT_ACCOUNT_NOT_REQUIRED) {
         $content .= '<div id="account-skip-title">';
         if ($this->userCanCreateAccount) {
             $content .= $createLink . '&#160;' . Zurmo::t('LeadsModule', 'or') . '&#160;';
         }
         $content .= $selectLink . '&#160;' . Zurmo::t('LeadsModule', 'or') . '&#160;';
         $content .= Zurmo::t('LeadsModule', 'Skip AccountsModuleSingularLabel', LabelUtil::getTranslationParamsForAllModules()) . '&#160;';
         $content .= '</div>';
     }
     $content .= '</div>';
     //this was missing..
     return '<div class="wrapper">' . $content . parent::renderContent() . '</div>';
 }
 /**
  * Renders content for the view.
  * @return A string containing the element's content.
  */
 protected function renderContent()
 {
     Yii::app()->clientScript->registerScript('leadConvertActions', "\n                \$('.opportunity-create-link').click( function()\n                    {\n                        \$('#OpportunityConvertToView').show();\n                        \$('#LeadConvertOpportunitySkipView').hide();\n                        \$('#opportunity-create-title').show();\n                        \$('#opportunity-skip-title').hide();\n                        return false;\n                    }\n                );\n                \$('.opportunity-skip-link').click( function()\n                    {\n                        \$('#OpportunityConvertToView').hide();\n                        \$('#LeadConvertOpportunitySkipView').show();\n                        \$('#opportunity-create-title').hide();\n                        \$('#opportunity-skip-title').show();\n                        return false;\n                    }\n                );\n            ");
     $createLink = ZurmoHtml::link(Zurmo::t('OpportunitiesModule', 'Create OpportunitiesModuleSingularLabel', LabelUtil::getTranslationParamsForAllModules()), '#', array('class' => 'opportunity-create-link'));
     $skipLink = ZurmoHtml::link(Zurmo::t('LeadsModule', 'Skip OpportunitiesModuleSingularLabel', LabelUtil::getTranslationParamsForAllModules()), '#', array('class' => 'opportunity-skip-link'));
     $content = $this->renderTitleContent();
     $content .= '<div class="lead-conversion-actions">';
     $content .= '<div id="opportunity-create-title">';
     $content .= Zurmo::t('OpportunitiesModule', 'Create OpportunitiesModuleSingularLabel', LabelUtil::getTranslationParamsForAllModules()) . '&#160;';
     if ($this->convertToOpportunitySetting == LeadsModule::CONVERT_OPPORTUNITY_NOT_REQUIRED) {
         $content .= Zurmo::t('Core', 'or') . '&#160;' . $skipLink;
     }
     $content .= '</div>';
     if ($this->convertToOpportunitySetting == LeadsModule::CONVERT_OPPORTUNITY_NOT_REQUIRED) {
         $content .= '<div id="opportunity-skip-title">';
         if ($this->userCanCreateOpportunity) {
             $content .= $createLink . '&#160;' . Zurmo::t('Core', 'or') . '&#160;';
         }
         $content .= Zurmo::t('LeadsModule', 'Skip OpportunitiesModuleSingularLabel', LabelUtil::getTranslationParamsForAllModules()) . '&#160;';
         $content .= '</div>';
     }
     $content .= '</div>';
     //this was missing..
     $content = $content . ZurmoHtml::tag('div', array('class' => 'left-column full-width clearfix'), parent::renderContent());
     return '<div class="wrapper">' . $content . '</div>';
 }