protected function renderContent() { $singularLabel = ProductCategory::getModelLabelByTypeAndLanguage('Singular'); $pluralLabel = Zurmo::t('ProductTemplatesModule', 'Categories'); $content = $this->renderViewToolBar(false); $content .= '<div>'; $content .= $this->renderTreeMenu('productCategory', 'productCategories', $singularLabel); $content .= '</div>'; return $content; }
/** * @return string */ protected function renderControlEditable() { assert('$this->model instanceof Product || $this->model instanceof Product'); $cClipWidget = new CClipWidget(); $cClipWidget->beginClip("ModelElement"); $cClipWidget->widget('application.core.widgets.MultiSelectAutoComplete', array('name' => $this->getNameForIdField(), 'id' => $this->getIdForIdField(), 'jsonEncodedIdsAndLabels' => CJSON::encode($this->getExistingProductCategoriesRelationsIdsAndLabels()), 'sourceUrl' => Yii::app()->createUrl('productTemplates/default/autoCompleteAllProductCategoriesForMultiSelectAutoComplete'), 'htmlOptions' => array('disabled' => $this->getDisabledValue()), 'hintText' => Zurmo::t('ProductsModule', 'Type a ' . ProductCategory::getModelLabelByTypeAndLanguage('SingularLowerCase'), LabelUtil::getTranslationParamsForAllModules()))); $cClipWidget->endClip(); $content = $cClipWidget->getController()->clips['ModelElement']; return $content; }
/** * Override because we do not need to render * the view tool bar or any extra spacing. */ protected function renderContent() { return $this->renderTreeMenu('productCategory', 'productCategories', ProductCategory::getModelLabelByTypeAndLanguage('Plural')); }
protected function getCreateLinkDisplayLabel() { $singularLabel = ProductCategory::getModelLabelByTypeAndLanguage('Singular'); return Zurmo::t('ProductTemplatesModule', 'Create ' . $singularLabel, LabelUtil::getTranslationParamsForAllModules()); }
/** * @return array */ protected static function translatedAttributeLabels($language) { $params = LabelUtil::getTranslationParamsForAllModules(); return array_merge(parent::translatedAttributeLabels($language), array('productTemplate' => Zurmo::t('ProductTemplatesModule', 'ProductTemplatesModuleSingularLabel', $params, null, $language), 'products' => Zurmo::t('ProductsModule', 'ProductsModulePluralLabel', $params, null, $language), 'sellPriceFormula' => Zurmo::t('ProductTemplatesModule', 'Sell Price Formula', array(), null, $language), 'productCategories' => ProductCategory::getModelLabelByTypeAndLanguage('Plural', $language), 'cost' => Zurmo::t('ProductTemplatesModule', 'Cost', array(), null, $language), 'listPrice' => Zurmo::t('ProductTemplatesModule', 'List Price', array(), null, $language), 'sellPrice' => Zurmo::t('ProductTemplatesModule', 'Sell Price', array(), null, $language), 'type' => Zurmo::t('ProductTemplatesModule', 'Type', array(), null, $language), 'status' => Zurmo::t('ProductTemplatesModule', 'Status', array(), null, $language))); }
protected function getHomeLinkLabel() { $pluralLabel = ProductCategory::getModelLabelByTypeAndLanguage('Plural'); return Zurmo::t('ProductTemplatesModule', $pluralLabel . ' Home'); }
/** * Resolve the alert display in html options * @param array $htmlOptions * @return array */ protected function resolveConfirmAlertInHtmlOptions($htmlOptions) { $htmlOptions['confirm'] = Zurmo::t('Core', 'Are you sure you want to delete this {modelLabel}?', array('{modelLabel}' => ProductCategory::getModelLabelByTypeAndLanguage('Singular'))); return $htmlOptions; }
protected function getHomeLinkLabel() { $pluralLabel = ProductCategory::getModelLabelByTypeAndLanguage('Plural'); $pluralLabel = Zurmo::t('ProductTemplatesModule', $pluralLabel, LabelUtil::getTranslationParamsForAllModules()); return Zurmo::t('ProductTemplatesModule', '{pluralLabel} Home', array('{pluralLabel}' => $pluralLabel)); }