protected function renderContent() { $content = '<div>'; $content .= Zurmo::t('LeadsModule', 'LeadsModulePluralLabel and ContactsModulePluralLabel are the same records, ' . 'just in a different status. To create a LeadsModuleSingularLowerCaseLabel ' . 'field, create a ContactsModuleSingularLowerCaseLabel field, and then it ' . 'will be placeable in the LeadsModulePluralLowerCaseLabel layouts.', LabelUtil::getTranslationParamsForAllModules()); $content .= '</div>' . "\n"; return $content; }
/** * Runs a query to get all the dates for meetings based on SearchAttributeData. Then the data is processed * and @returns a data array of dates and quantity. Quantity stands for how many meetings in a given date. * (non-PHPdoc) * @see CalendarDataProvider::getData() */ public function getData() { $sql = $this->makeSqlQuery(); $rows = ZurmoRedBean::getAll($sql); $data = array(); foreach ($rows as $row) { $localTimeZoneAdjustedDate = DateTimeUtil::convertDbFormattedDateTimeToLocaleFormattedDisplay($row['startdatetime'], 'medium', null); if (isset($data[$localTimeZoneAdjustedDate])) { $data[$localTimeZoneAdjustedDate]['quantity'] = $data[$localTimeZoneAdjustedDate]['quantity'] + 1; } else { $data[$localTimeZoneAdjustedDate] = array('date' => $localTimeZoneAdjustedDate, 'quantity' => 1, 'dbDate' => $row['startdatetime']); } } foreach ($data as $key => $item) { if ($item['quantity'] == 1) { $label = Zurmo::t('MeetingsModule', '{quantity} MeetingsModuleSingularLabel', array_merge(LabelUtil::getTranslationParamsForAllModules(), array('{quantity}' => $item['quantity']))); } else { $label = Zurmo::t('MeetingsModule', '{quantity} MeetingsModulePluralLabel', array_merge(LabelUtil::getTranslationParamsForAllModules(), array('{quantity}' => $item['quantity']))); } $data[$key]['label'] = $label; if ($item['quantity'] > 5) { $quantityClassSuffix = 6; } else { $quantityClassSuffix = $item['quantity']; } $data[$key]['className'] = 'calendar-events-' . $quantityClassSuffix; } return $data; }
public static function getTranslatedRightsLabels() { $params = LabelUtil::getTranslationParamsForAllModules(); $labels = array(); $labels[self::RIGHT_ACCESS_ACCOUNT_ACCOUNT_AFFILIATIONS] = Zurmo::t('MarketingModule', 'Access AccountsModuleSingularLabel to AccountsModuleSingularLabel Affiliations Tab', $params); return $labels; }
/** * @return bool|string */ protected function renderContent() { $this->registerScripts(); if ($this->cookieValue == self::HIDDEN_COOKIE_VALUE) { $style = "style=display:none;"; // Not Coding Standard } else { $style = null; } $content = '<div id="' . self::PANEL_ID . '" ' . $style . '>'; $content .= '<h1>' . Zurmo::t('MarketingModule', 'How does Email Marketing work in Zurmo?', LabelUtil::getTranslationParamsForAllModules()) . '</h1>'; $content .= '<div id="marketing-intro-steps" class="clearfix">'; $content .= '<div class="third"><h3>' . Zurmo::t('Core', 'Step') . '<strong>1<span>➜</span></strong></h3>'; $content .= '<p><strong>' . Zurmo::t('MarketingModule', 'Group') . '</strong>'; $content .= Zurmo::t('MarketingModule', 'Group together the email recipients into a list, use different lists for different purposes'); $content .= '</p>'; $content .= '</div>'; $content .= '<div class="third"><h3>' . Zurmo::t('Core', 'Step') . '<strong>2<span>➜</span></strong></h3>'; $content .= '<p><strong>' . Zurmo::t('MarketingModule', 'Create') . '</strong>'; $content .= Zurmo::t('MarketingModule', 'Create the template for the email you are going to send, import and use either full, ' . 'rich HTML templates or plain text'); $content .= '</p>'; $content .= '</div>'; $content .= '<div class="third"><h3>' . Zurmo::t('Core', 'Step') . '<strong>3</strong></h3>'; $content .= '<p><strong>' . Zurmo::t('MarketingModule', 'Launch') . '</strong>'; $content .= Zurmo::t('MarketingModule', 'Create a campaign where you can schedule your email to go out, pick the List(s) of recipients, ' . 'add and schedule autoresponders and track your overall campaign performance'); $content .= '</p>'; $content .= '</div>'; $content .= '</div>'; $content .= $this->renderHideLinkContent(); $content .= '</div>'; return $content; }
protected static function translatedAttributeLabels($language) { $params = LabelUtil::getTranslationParamsForAllModules(); $paramsForAffiliations = $params; $paramsForAffiliations['{primaryAccount}'] = AccountAccountAffiliationsModule::resolveAccountRelationLabel('Singular', 'primary'); $paramsForAffiliations['{secondaryAccount}'] = AccountAccountAffiliationsModule::resolveAccountRelationLabel('Singular', 'secondary'); return array_merge(parent::translatedAttributeLabels($language), array('account' => Zurmo::t('AccountsModule', 'Parent AccountsModuleSingularLabel', $params, null, $language), 'accounts' => Zurmo::t('AccountsModule', 'AccountsModulePluralLabel', $params, null, $language), 'annualRevenue' => Zurmo::t('AccountsModule', 'Annual Revenue', array(), null, $language), 'billingAddress' => Zurmo::t('AccountsModule', 'Service Address', array(), null, $language), 'contacts' => Zurmo::t('ContactsModule', 'ContactsModulePluralLabel', $params, null, $language), 'description' => Zurmo::t('ZurmoModule', 'Description', array(), null, $language), 'employees' => Zurmo::t('AccountsModule', 'Employees', array(), null, $language), 'industry' => Zurmo::t('ZurmoModule', 'Industry', array(), null, $language), 'latestActivityDateTime' => Zurmo::t('ZurmoModule', 'Latest Activity Date Time', array(), null, $language), 'meetings' => Zurmo::t('MeetingsModule', 'MeetingsModulePluralLabel', $params, null, $language), 'name' => Zurmo::t('Core', 'Name', array(), null, $language), 'notes' => Zurmo::t('NotesModule', 'NotesModulePluralLabel', $params, null, $language), 'officePhone' => Zurmo::t('ZurmoModule', 'Office Phone', array(), null, $language), 'officeFax' => Zurmo::t('ZurmoModule', 'Office Fax', array(), null, $language), 'opportunities' => Zurmo::t('OpportunitiesModule', 'OpportunitiesModulePluralLabel', $params, null, $language), 'contracts' => Zurmo::t('ContractsModule', 'ContractsModulePluralLabel', $params, null, $language), 'primaryAccountAffiliations' => Zurmo::t('AccountAccountAffiliationsModule', '{primaryAccount} Affiliations', $paramsForAffiliations, null, $language), 'primaryEmail' => Zurmo::t('ZurmoModule', 'Primary Email', array(), null, $language), 'secondaryAccountAffiliations' => Zurmo::t('AccountAccountAffiliationsModule', '{secondaryAccount} Affiliations', $paramsForAffiliations, null, $language), 'secondaryEmail' => Zurmo::t('ZurmoModule', 'Secondary Email', array(), null, $language), 'shippingAddress' => Zurmo::t('AccountsModule', 'Shipping Address', array(), null, $language), 'tasks' => Zurmo::t('TasksModule', 'TasksModulePluralLabel', $params, null, $language), 'type' => Zurmo::t('Core', 'Type', array(), null, $language), 'website' => Zurmo::t('ZurmoModule', 'Website', array(), null, $language))); }
public static function getTranslatedRightsLabels() { $params = LabelUtil::getTranslationParamsForAllModules(); $labels = array(); $labels[self::RIGHT_CREATE_OPPORTUNITIES] = Zurmo::t('OpportunitiesModule', 'Create OpportunitiesModulePluralLabel', $params); $labels[self::RIGHT_DELETE_OPPORTUNITIES] = Zurmo::t('OpportunitiesModule', 'Delete OpportunitiesModulePluralLabel', $params); $labels[self::RIGHT_ACCESS_OPPORTUNITIES] = Zurmo::t('OpportunitiesModule', 'Access OpportunitiesModulePluralLabel Tab', $params); return $labels; }
public static function getTranslatedRightsLabels() { $params = LabelUtil::getTranslationParamsForAllModules(); $labels = array(); $labels[self::RIGHT_CREATE_DEPARTMENTREFERENCES] = Zurmo::t('DepartmentReferencesModule', 'Create DepartmentReferencesModulePluralLabel', $params); $labels[self::RIGHT_DELETE_DEPARTMENTREFERENCES] = Zurmo::t('DepartmentReferencesModule', 'Delete DepartmentReferencesModulePluralLabel', $params); $labels[self::RIGHT_ACCESS_DEPARTMENTREFERENCES] = Zurmo::t('DepartmentReferencesModule', 'Access DepartmentReferencesModulePluralLabel Tab', $params); return $labels; }
/** * @return array */ public static function getTranslatedRightsLabels() { $params = LabelUtil::getTranslationParamsForAllModules(); $labels = array(); $labels[self::RIGHT_CREATE_CALENDAR] = Zurmo::t('CalendarsModule', 'Create CalendarsModulePluralLabel', $params); $labels[self::RIGHT_DELETE_CALENDAR] = Zurmo::t('CalendarsModule', 'Delete CalendarsModulePluralLabel', $params); $labels[self::RIGHT_ACCESS_CALENDAR] = Zurmo::t('CalendarsModule', 'Access CalendarsModulePluralLabel Tab', $params); return $labels; }
public static function getTranslatedRightsLabels() { $params = LabelUtil::getTranslationParamsForAllModules(); $labels = array(); $labels[self::RIGHT_CREATE_UNITOFMEASURES] = Zurmo::t('UnitofmeasuresModule', 'Create UnitofmeasuresModulePluralLabel', $params); $labels[self::RIGHT_DELETE_UNITOFMEASURES] = Zurmo::t('UnitofmeasuresModule', 'Delete UnitofmeasuresModulePluralLabel', $params); $labels[self::RIGHT_ACCESS_UNITOFMEASURES] = Zurmo::t('UnitofmeasuresModule', 'Access UnitofmeasuresModulePluralLabel Tab', $params); return $labels; }
public static function getTranslatedRightsLabels() { $params = LabelUtil::getTranslationParamsForAllModules(); $labels = array(); $labels[self::RIGHT_CREATE_MEETINGS] = Zurmo::t('MeetingsModule', 'Create MeetingsModulePluralLabel', $params); $labels[self::RIGHT_DELETE_MEETINGS] = Zurmo::t('MeetingsModule', 'Delete MeetingsModulePluralLabel', $params); $labels[self::RIGHT_ACCESS_MEETINGS] = Zurmo::t('MeetingsModule', 'Access MeetingsModulePluralLabel', $params); return $labels; }
public static function getTranslatedRightsLabels() { $params = LabelUtil::getTranslationParamsForAllModules(); $labels = array(); $labels[self::RIGHT_CREATE_PRODUCTS] = Zurmo::t('ProductsModule', 'Create ProductsModulePluralLabel', $params); $labels[self::RIGHT_DELETE_PRODUCTS] = Zurmo::t('ProductsModule', 'Delete ProductsModulePluralLabel', $params); $labels[self::RIGHT_ACCESS_PRODUCTS] = Zurmo::t('ProductsModule', 'Access ProductsModulePluralLabel Tab', $params); return $labels; }
/** * @return array */ public static function getTranslatedRightsLabels() { $params = LabelUtil::getTranslationParamsForAllModules(); $labels = array(); $labels[self::RIGHT_CREATE_CONTACT_WEB_FORMS] = Zurmo::t('ContactWebFormsModule', 'Create ContactsModuleSingularLabel Web Forms', $params); $labels[self::RIGHT_DELETE_CONTACT_WEB_FORMS] = Zurmo::t('ContactWebFormsModule', 'Delete ContactsModuleSingularLabel Web Forms', $params); $labels[self::RIGHT_ACCESS_CONTACT_WEB_FORMS] = Zurmo::t('ContactWebFormsModule', 'Access ContactsModuleSingularLabel Web Forms Tab', $params); return $labels; }
protected function renderLabel() { $label = Zurmo::t('LeadsModule', 'ContactsModuleSingularLabel or LeadsModuleSingularLabel', LabelUtil::getTranslationParamsForAllModules()); if ($this->form === null) { return $this->getFormattedAttributeLabel(); } $id = $this->getIdForHiddenField(); return $this->form->labelEx($this->model, $this->attribute, array('for' => $id, 'label' => $label)); }
public static function getTranslatedRightsLabels() { $params = LabelUtil::getTranslationParamsForAllModules(); $labels = array(); $labels[self::RIGHT_CREATE_LEADS] = Zurmo::t('LeadsModule', 'Create LeadsModulePluralLabel', $params); $labels[self::RIGHT_DELETE_LEADS] = Zurmo::t('LeadsModule', 'Delete LeadsModulePluralLabel', $params); $labels[self::RIGHT_ACCESS_LEADS] = Zurmo::t('LeadsModule', 'Access LeadsModulePluralLabel Tab', $params); $labels[self::RIGHT_CONVERT_LEADS] = Zurmo::t('LeadsModule', 'Convert LeadsModulePluralLabel', $params); return $labels; }
/** * There are several scenarios that can occur where a user has access to matching email messages, but is missing other * rights in order to properly utilize the matching mechanism. This method checks for those conditions, and * if present, will alert the user that there is a misconfiguration and they should contact their administrator. * Scenario #1 - User does not have access to contacts or leads. You need to have at least one to be able to match. */ public static function resolveCanUserProperlyMatchMessage($userCanAccessContacts, $userCanAccessLeads) { assert('is_bool($userCanAccessContacts)'); assert('is_bool($userCanAccessLeads)'); //Scenario #1 - User does not have access to contacts or leads if (!$userCanAccessContacts && !$userCanAccessLeads) { $scenarioSpecificContent = Zurmo::t('EmailMessagesModule', 'Matching archived emails requires access to either ContactsModulePluralLowerCaseLabel' . ' or LeadsModulePluralLowerCaseLabel both of which you do not have. Please contact your administrator.', LabelUtil::getTranslationParamsForAllModules()); static::processAccessFailure(false, $scenarioSpecificContent); Yii::app()->end(0, false); } }
protected function getMenuItems() { $items = array(); if (RightsUtil::doesUserHaveAllowByRightName('ProductsModule', ProductsModule::getCreateRight(), Yii::app()->user->userModel)) { $items[] = array('label' => Zurmo::t('ProductsModule', 'Create ProductsModuleSingularLabel', LabelUtil::getTranslationParamsForAllModules()), 'url' => Yii::app()->createUrl('products/default/create')); } if (!empty($items)) { return $items; } return null; }
/** * Based on the current theme, retrieve the email notification template for text content and replace the * content tags with the appropriate strings */ public static function resolveNotificationTextTemplate($bodyContent) { assert('is_string($bodyContent)'); $url = Yii::app()->createAbsoluteUrl('users/default/configurationEdit', array('id' => Yii::app()->user->userModel->id)); $htmlTemplate = self::getNotificationTextTemplate(); $htmlContent = array(); $htmlContent['{bodyContent}'] = $bodyContent; $htmlContent['{sourceContent}'] = Zurmo::t('EmailMessagesModule', 'This message sent from Zurmo', LabelUtil::getTranslationParamsForAllModules()); $htmlContent['{preferenceContent}'] = Zurmo::t('EmailMessagesModule', 'Manage your email preferences') . ZurmoHtml::link(null, $url); return strtr($htmlTemplate, $htmlContent); }
public function testResolveMetadataForLanguageLocalization() { //Test AccountsModulePluralLabel $metadata = AccountsModule::getMetadata(); AccountsModule::setMetadata($metadata); $metadata = AccountsModule::getMetadata(); $this->assertEquals("eval:Zurmo::t('AccountsModule', 'AccountsModulePluralLabel', \$translationParams)", $metadata['global']['tabMenuItems'][0]['label']); $resolveVariableName = 'translationParams'; $params = LabelUtil::getTranslationParamsForAllModules(); MetadataUtil::resolveEvaluateSubString($metadata, $resolveVariableName, $params); $this->assertEquals('Accounts', $metadata['global']['tabMenuItems'][0]['label']); }
/** * @return string */ protected function getHomeLinkLabel() { if ($this->moduleId == 'projects') { return Zurmo::t('ProjectsModule', 'ProjectsModulePluralLabel', LabelUtil::getTranslationParamsForAllModules()); } elseif ($this->moduleId == 'accounts') { return Zurmo::t('AccountsModule', 'AccountsModulePluralLabel', LabelUtil::getTranslationParamsForAllModules()); } elseif ($this->moduleId == 'contacts') { return Zurmo::t('ContactsModule', 'ContactsModulePluralLabel', LabelUtil::getTranslationParamsForAllModules()); } elseif ($this->moduleId == 'opportunities') { return Zurmo::t('OpportunitiesModule', 'OpportunitiesModulePluralLabel', LabelUtil::getTranslationParamsForAllModules()); } }
/** * @param User $user * @return null|string|void * @throws NotSupportedException */ public static function getVariableStateModuleLabel(User $user) { assert('$user->id > 0'); $adapterName = ContactsUtil::resolveContactStateAdapterByModulesUserHasAccessTo('LeadsModule', 'ContactsModule', $user); if ($adapterName === false) { return null; } elseif ($adapterName == 'LeadsStateMetadataAdapter') { return Zurmo::t('LeadsModule', 'LeadsModulePluralLabel', LabelUtil::getTranslationParamsForAllModules()); } elseif ($adapterName == 'ContactsStateMetadataAdapter') { return Zurmo::t('ContactsModule', 'ContactsModulePluralLabel', LabelUtil::getTranslationParamsForAllModules()); } elseif ($adapterName === null) { return Zurmo::t('ContactsModule', 'ContactsModulePluralLabel and LeadsModulePluralLabel', LabelUtil::getTranslationParamsForAllModules()); } else { throw new NotSupportedException(); } }
protected function renderInlineEditContent() { if (null != ($messageContent = RequiredAttributesValidViewUtil::resolveValidView('NotesModule', $this->getInlineEditViewClassName()))) { $message = Zurmo::t('NotesModule', 'The NotesModulePluralLabel form cannot be displayed.', LabelUtil::getTranslationParamsForAllModules()); $message .= '<br/>' . $messageContent . '<br/><br/>'; return $message; } $note = new Note(); $note->activityItems->add($this->params["relationModel"]); $inlineViewClassName = $this->getInlineEditViewClassName(); $urlParameters = array('redirectUrl' => $this->getPortletDetailsUrl()); //After save, the url to go to. $uniquePageId = get_called_class(); $inlineView = new $inlineViewClassName($note, 'default', 'notes', 'inlineCreateSave', $urlParameters, $uniquePageId); return $inlineView->render(); }
public function testGetTranslationParamsForAllModules() { $this->assertEquals('en', Yii::app()->languageHelper->getForCurrentUser()); $params = LabelUtil::getTranslationParamsForAllModules(); $this->assertEquals('Account', $params['AccountsModuleSingularLabel']); $this->assertEquals('account', $params['AccountsModuleSingularLowerCaseLabel']); $this->assertEquals('Accounts', $params['AccountsModulePluralLabel']); $this->assertEquals('accounts', $params['AccountsModulePluralLowerCaseLabel']); $metadata = AccountsModule::getMetadata(); $metadata['global']['singularModuleLabels'] = array('en' => 'company'); $metadata['global']['pluralModuleLabels'] = array('en' => 'companies'); AccountsModule::setMetadata($metadata); Yii::app()->languageHelper->flushModuleLabelTranslationParameters(); $params = LabelUtil::getTranslationParamsForAllModules(); $this->assertEquals('Company', $params['AccountsModuleSingularLabel']); $this->assertEquals('company', $params['AccountsModuleSingularLowerCaseLabel']); $this->assertEquals('Companies', $params['AccountsModulePluralLabel']); $this->assertEquals('companies', $params['AccountsModulePluralLowerCaseLabel']); }
public function actionList() { $pageSize = Yii::app()->pagination->resolveActiveForCurrentUserByType('listPageSize', get_class($this->getModule())); $gameReward = new GameReward(false); $searchForm = new GameRewardsSearchForm($gameReward); $listAttributesSelector = new ListAttributesSelector('GameRewardsListView', get_class($this->getModule())); $searchForm->setListAttributesSelector($listAttributesSelector); $dataProvider = $this->resolveSearchDataProvider($searchForm, $pageSize, null, 'GameRewardsSearchView'); $title = Zurmo::t('GameRewardsModule', 'GameRewardsModulePluralLabel', LabelUtil::getTranslationParamsForAllModules()); $breadCrumbLinks = array($title); if (isset($_GET['ajax']) && $_GET['ajax'] == 'list-view') { $mixedView = $this->makeListView($searchForm, $dataProvider); $view = new GameRewardsPageView($mixedView); } else { $mixedView = $this->makeActionBarSearchAndListView($searchForm, $dataProvider); $view = new GameRewardsPageView(ZurmoDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $mixedView, $breadCrumbLinks, 'GameRewardBreadCrumbView')); } echo $view->render(); }
/** * There are several scenarios that can occur where a user has the right to convert, but is missing other * rights in order to properly utilize the convert mechanism. This method checks for those conditions, and * if present, will alert the user that there is a misconfiguration and they should contact their administrator. * Scenario #1 - User does not have access to contacts * Scenario #2 - User cannot access accounts and an account is required for conversion */ public static function resolveCanUserProperlyConvertLead($userCanAccessContacts, $userCanAccessAccounts, $convertToAccountSetting) { assert('is_bool($userCanAccessContacts)'); assert('is_bool($userCanAccessAccounts)'); assert('is_int($convertToAccountSetting)'); $userCanConvertProperly = true; //Scenario #1 - User does not have access to contacts if (!$userCanAccessContacts) { $scenarioSpecificContent = Zurmo::t('LeadsModule', 'Conversion requires access to the ContactsModulePluralLowerCaseLabel' . ' module which you do not have. Please contact your administrator.', LabelUtil::getTranslationParamsForAllModules()); $userCanConvertProperly = false; } elseif (!$userCanAccessAccounts && $convertToAccountSetting == LeadsModule::CONVERT_ACCOUNT_REQUIRED) { $scenarioSpecificContent = Zurmo::t('LeadsModule', 'Conversion is set to require an AccountsModuleSingularLowerCaseLabel. Currently' . ' you do not have access to the AccountsModulePluralLowerCaseLabel module.' . ' Please contact your administrator.', LabelUtil::getTranslationParamsForAllModules()); $userCanConvertProperly = false; } if ($userCanConvertProperly) { return; } static::processAccessFailure(false, $scenarioSpecificContent); Yii::app()->end(0, false); }
protected function renderFormLayout($form = null) { $content = '<table class="form-fields">'; $content .= '<colgroup>'; $content .= '<col style="width:100%" />'; $content .= '</colgroup>'; $content .= '<tbody>'; $content .= '<tr>'; $content .= '<th>' . Zurmo::t('LeadsModule', 'Complete LeadsModuleSingularLowerCaseLabel conversion without ' . 'selecting or creating an AccountsModuleSingularLowerCaseLabel.', LabelUtil::getTranslationParamsForAllModules()) . '</th>'; $content .= '</tr>'; $content .= '</tbody>'; $content .= '</table>'; $cancelLink = new CancelConvertLinkActionElement($this->controllerId, $this->moduleId, $this->modelId); $content .= '<div class="view-toolbar-container clearfix"><div class="form-toolbar">'; $element = new SaveButtonActionElement($this->controllerId, $this->moduleId, null, array('htmlOptions' => array('name' => 'AccountSkip', 'id' => 'AccountSkip', 'params' => array('AccountSkip' => true)), 'label' => Zurmo::t('ZurmoModule', 'Next'))); $content .= $element->render(); $content .= $cancelLink->render(); $content .= '</div></div>'; return $content; }
/** * @return string */ public function render() { $content = null; $metricsClass = $this->getMetricsPortletClass(); $membersClass = $this->getMembersPortletClass(); $autorespondersClass = $this->getAutorespondersPortletClass(); if ($membersClass) { $membersTranslatedLabel = Zurmo::t('LeadsModule', 'ContactsModulePluralLabel/LeadsModulePluralLabel', LabelUtil::getTranslationParamsForAllModules()); $content .= $this->getCheckboxContent($membersTranslatedLabel, $membersClass); } if ($autorespondersClass) { $autorespondersTranslatedLabel = Zurmo::t('MarketingListsModule', 'Autoresponders'); $content .= $this->getCheckboxContent($autorespondersTranslatedLabel, $autorespondersClass); } if ($metricsClass) { $membersTranslatedLabel = Zurmo::t('HomeModule', 'Dashboard'); $content .= $this->getCheckboxContent($membersTranslatedLabel, $metricsClass); } return ZurmoHtml::tag('div', $this->getHtmlOptions(), $content); }
/** * @return null or string containing create link */ public function render() { $items = array(); if (RightsUtil::doesUserHaveAllowByRightName('ProductsModule', ProductsModule::getCreateRight(), Yii::app()->user->userModel)) { $items[] = array('label' => Zurmo::t('ProductsModule', 'Create ProductsModuleSingularLabel', LabelUtil::getTranslationParamsForAllModules()), 'url' => Yii::app()->createUrl('products/default/create')); } if (RightsUtil::doesUserHaveAllowByRightName('ProductTemplatesModule', ProductTemplatesModule::getCreateRight(), Yii::app()->user->userModel)) { $items[] = array('label' => Zurmo::t('ProductTemplatesModule', 'Create ProductTemplatesModuleSingularLabel', LabelUtil::getTranslationParamsForAllModules()), 'url' => Yii::app()->createUrl('productTemplates/default/create')); $items[] = array('label' => Zurmo::t('ProductTemplatesModule', 'Create Category'), 'url' => Yii::app()->createUrl('productTemplates/category/create')); } if (!empty($items)) { $menuItems = array('label' => $this->getLabel(), 'url' => null, 'items' => $items); $cClipWidget = new CClipWidget(); $cClipWidget->beginClip("ActionMenu"); $cClipWidget->widget('application.core.widgets.MbMenu', array('htmlOptions' => array('id' => 'MashableInboxCreateDropdown'), 'items' => array($menuItems))); $cClipWidget->endClip(); return $cClipWidget->getController()->clips['ActionMenu']; } return null; }
protected function renderIntroContent() { $content = '<h1>' . Zurmo::t('GameRewardsModule', 'How do Game Rewards work in Zurmo?', LabelUtil::getTranslationParamsForAllModules()) . '</h1>'; $content .= '<div id="game-rewards-redemption-intro-steps" class="module-intro-steps clearfix">'; $content .= '<div class="third"><h3>' . Zurmo::t('Core', 'Step') . '<strong>1<span>➜</span></strong></h3>'; $content .= '<p><strong>' . Zurmo::t('GameRewardsModule', 'Earn') . '</strong>'; $content .= Zurmo::t('GameRewardsModule', 'Collect coins as you level up, earn badges, ' . 'and complete collections. You will also find coins as you use the application'); $content .= '</p>'; $content .= '</div>'; $content .= '<div class="third"><h3>' . Zurmo::t('Core', 'Step') . '<strong>2<span>➜</span></strong></h3>'; $content .= '<p><strong>' . Zurmo::t('ZurmoModule', 'Redeem') . '</strong>'; $content .= Zurmo::t('GameRewardsModule', 'Use coins to redeem rewards added by your manager and HR department'); $content .= '</p>'; $content .= '</div>'; $content .= '<div class="third"><h3>' . Zurmo::t('Core', 'Step') . '<strong>3<span>➜</span></strong></h3>'; $content .= '<p><strong>' . Zurmo::t('GameRewardsModule', 'Enjoy') . '</strong>'; $content .= Zurmo::t('GameRewardsModule', 'You work hard so you should enjoy your reward. ' . 'Then keep using the application to redeem more rewards'); $content .= '</p>'; $content .= '</div>'; $content .= '</div>'; $this->registerScripts(); return $content; }
protected function renderBasicIntroContent() { $params = LabelUtil::getTranslationParamsForAllModules(); $content = '<h1>' . Zurmo::t('ZurmoModule', 'How does security work in Zurmo?', $params) . '</h1>'; $content .= '<div id="security-basic-intro" class="module-intro-steps clearfix">'; $content .= '<div class="third security-rights"><span class="icon"></span>'; $content .= '<p><strong>' . Zurmo::t('ZurmoModule', 'Rights') . '</strong>'; $content .= Zurmo::t('ZurmoModule', 'Rights control who can access modules, create records, and delete records in a module.'); $content .= '</p>'; $content .= '</div>'; $content .= '<div class="third security-permissions"><span class="icon"></span>'; $content .= '<p><strong>' . Zurmo::t('ZurmoModule', 'Permissions') . '</strong>'; $content .= Zurmo::t('ZurmoModule', 'Permissions control who can read, write, and delete specific records.'); $content .= '</p>'; $content .= '</div>'; $content .= '<div class="third security-roles"><span class="icon"></span>'; $content .= '<p><strong>' . Zurmo::t('ZurmoModule', 'Roles') . '</strong>'; $content .= Zurmo::t('ZurmoModule', 'Roles expand visibility allowing managers to read/write their employees\' records.'); $content .= '</p>'; $content .= '</div>'; $content .= '</div>'; return $content; }
/** * Renders introduction content * @return string */ protected function renderIntroContent() { $content = '<h1>' . Zurmo::t('ProjectsModule', 'How do Projects work in Zurmo?', LabelUtil::getTranslationParamsForAllModules()) . '</h1>'; $content .= '<div id="projects-intro-steps" class="module-intro-steps clearfix">'; $content .= '<div class="third project-create"><span class="icon"></span>'; $content .= '<p><strong>' . Zurmo::t('Core', 'Create') . '</strong>'; $content .= Zurmo::t('ProjectsModule', 'Create projects, add tasks and work using an agile methodology'); $content .= '</p>'; $content .= '</div>'; $content .= '<div class="third project-collaborate"><span class="icon"></span>'; $content .= '<p><strong>' . Zurmo::t('Core', 'Collaborate') . '</strong>'; $content .= Zurmo::t('ProjectsModule', 'Collaborate with users on tasks to get things done'); $content .= '</p>'; $content .= '</div>'; $content .= '<div class="third project-track"><span class="icon"></span>'; $content .= '<p><strong>' . Zurmo::t('Core', 'Track') . '</strong>'; $content .= Zurmo::t('ProjectsModule', 'Subscribe to notifications and track progress against milestones'); $content .= '</p>'; $content .= '</div>'; $content .= '</div>'; $this->registerScripts(); return $content; }