/** * 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>'; }