本文整理汇总了PHP中ZurmoHtml类的典型用法代码示例。如果您正苦于以下问题:PHP ZurmoHtml类的具体用法?PHP ZurmoHtml怎么用?PHP ZurmoHtml使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ZurmoHtml类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: renderButton
/**
* Render the link or ajax link
* @param string $id the ID of the button
* @param array $button the button configuration which may contain 'label', 'url', 'imageUrl' and 'options' elements.
* See {@link buttons} for more details.
* @param integer $row the row number (zero-based)
* @param mixed $data the data object associated with the row
*/
protected function renderButton($id, $button, $row, $data)
{
if (isset($button['visible']) && !$this->evaluateExpression($button['visible'], array('row' => $row, 'data' => $data))) {
return;
}
$label = isset($button['label']) ? $button['label'] : $id;
if (isset($button['url'])) {
$url = $this->evaluateExpression($button['url'], array('data' => $data, 'row' => $row));
// Not Coding Standard
} else {
$url = '#';
}
$options = isset($button['options']) ? $button['options'] : array();
if (!isset($options['title'])) {
$options['title'] = $label;
}
if (isset($button['ajaxOptions'])) {
unset($options['ajaxOptions']);
echo ZurmoHtml::ajaxLink($label, $url, $button['ajaxOptions'], $options);
} else {
if (isset($button['imageUrl']) && is_string($button['imageUrl'])) {
echo ZurmoHtml::link(CHtml::image($button['imageUrl'], $label), $url, $options);
} else {
echo ZurmoHtml::link($label, $url, $options);
}
}
}
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:35,代码来源:ButtonColumn.php
示例2: renderAmountContent
/**
* Renders amount
* @return string
*/
protected function renderAmountContent()
{
$model = $this->model;
$amount = Yii::app()->numberFormatter->formatCurrency((double) $model->amount->value, $model->amount->currency->code);
$content = ZurmoHtml::tag('p', array('class' => static::DESCRIPTION_CLASS), Zurmo::t('OpportunitiesModule', 'Amount') . $this->overlayKeyValueSeparator . $amount);
return $content;
}
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:11,代码来源:OpportunityDetailsOverlayView.php
示例3: renderEditableSecondValueContent
/**
* @return string
*/
protected function renderEditableSecondValueContent()
{
$htmlOptions = $this->getHtmlOptionsForSecondValue();
$inputContent = $this->form->textField($this->model, 'value', $htmlOptions);
$error = $this->form->error($this->model, 'value', array('inputID' => $this->getSecondValueEditableInputId()), true, true, $this->getSecondValueEditableInputId());
return $inputContent . $error . ZurmoHtml::tag('span', array(), ' ' . Zurmo::t('WorkflowsModule', 'value(s)'));
}
开发者ID:youprofit,项目名称:Zurmo,代码行数:10,代码来源:MixedDropDownTypesForWorkflowActionAttributeElement.php
示例4: renderThemeContent
/**
* Renders the setting as a radio list.
* @return A string containing the element's content.
*/
protected function renderThemeContent()
{
$gameLevel = GameLevel::resolveByTypeAndPerson(GameLevel::TYPE_GENERAL, Yii::app()->user->userModel);
$content = ZurmoHtml::tag('h3', array(), Zurmo::t('Core', 'Theme'));
$content .= ZurmoHtml::radioButtonList($this->getEditableInputName(KanbanBoard::SELECTED_THEME), $this->model->getKanbanBoard()->getSelectedTheme(), $this->resolveThemeColorNamesAndLabelsForLocking($gameLevel), $this->getEditableThemeHtmlOptions(), array(), $this->resolveDataHtmlOptions($gameLevel));
return $content;
}
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:11,代码来源:KanbanBoardOptionsElement.php
示例5: renderControlNonEditable
/**
* Renders the attribute from the model.
* @return The element's content.
*/
protected function renderControlNonEditable()
{
if ($this->model->{$this->attribute} != null) {
$content = DateTimeUtil::convertDbFormattedDateTimeToLocaleFormattedDisplay($this->model->{$this->attribute});
return ZurmoHtml::encode($content);
}
}
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:11,代码来源:DateTimeElement.php
示例6: resolveElementDuringFormLayoutRender
/**
* Override to change the editableTemplate to place the label above the input.
* @see DetailsView::resolveElementDuringFormLayoutRender()
*/
protected function resolveElementDuringFormLayoutRender(&$element)
{
if ($element->getAttribute() == 'name') {
$notification = ZurmoHtml::tag('span', array('class' => 'row-description'), Zurmo::t('MarketingListsModule', 'Name will be publicly viewable by Contacts/Leads to manage their subscriptions'));
$element->editableTemplate = '<th>{label}</th><td colspan="{colspan}">{content}' . $notification . '{error}</td>';
}
}
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:11,代码来源:MarketingListEditView.php
示例7: run
public function run()
{
$id = $this->getId();
$this->htmlOptions['id'] = $id;
if (isset($this->htmlOptions['disabled']) && $this->htmlOptions['disabled'] == 'disabled') {
$tokenListClassSuffix = ' disabled';
} else {
$tokenListClassSuffix = '';
}
echo ZurmoHtml::textField($this->name, null, $this->htmlOptions);
$javaScript = "\$(document).ready(function () { ";
$javaScript .= "\$('#{$id}').tokenInput('{$this->sourceUrl}', { ";
$javaScript .= "queryParam: 'term',";
// Not Coding Standard
if ($this->hintText != null) {
$javaScript .= "hintText: '" . Yii::app()->format->text($this->hintText) . "',";
// Not Coding Standard
}
if ($this->onAdd != null) {
$javaScript .= "onAdd: " . $this->onAdd . ",";
// Not Coding Standard
}
if ($this->onDelete != null) {
$javaScript .= "onDelete: " . $this->onDelete . ",";
// Not Coding Standard
}
if ($this->jsonEncodedIdsAndLabels != null) {
$javaScript .= "prePopulate: " . $this->jsonEncodedIdsAndLabels . ",";
// Not Coding Standard
}
$javaScript .= "preventDuplicates: 'true', classes: {tokenList: 'token-input-list" . $tokenListClassSuffix . "'}";
$javaScript .= "});";
$javaScript .= "});";
Yii::app()->getClientScript()->registerScript(__CLASS__ . '#' . $id, $javaScript);
}
开发者ID:youprofit,项目名称:Zurmo,代码行数:35,代码来源:MultiSelectAutoComplete.php
示例8: renderControlEditable
/**
* Render a hidden input, a text input with an auto-complete
* event, and a select button. These three items together
* form the Opportunity Editable Element
* @return The element's content as a string.
*/
protected function renderControlEditable()
{
$content = null;
$content .= ZurmoHtml::textField('stageToProbabilityMapping_notUsed', null, array('id' => $this->getEditableInputId(), 'style' => "display:none;"));
$fieldData = CustomFieldData::getByName('SalesStages');
if ($fieldData->serializedData != null) {
$values = unserialize($fieldData->serializedData);
if (!is_array($values)) {
$values = array();
}
} else {
$values = array();
}
$stagesToProbabilities = OpportunitiesModule::getStageToProbabilityMappingData();
foreach ($values as $value) {
if (isset($stagesToProbabilities[$value])) {
$probability = $stagesToProbabilities[$value];
} else {
$probability = 0;
}
$htmlOptions = array('name' => $this->getNameForInputField($value), 'value' => $probability);
$element = $this->form->textField($this->model, $this->attribute, $htmlOptions);
$element .= ZurmoHtml::tag('span', array(), $value);
$content .= ZurmoHtml::tag('div', array('class' => 'has-lang-label'), $element);
}
return $content;
}
开发者ID:youprofit,项目名称:Zurmo,代码行数:33,代码来源:StageToProbabilityMappingElement.php
示例9: renderContent
protected function renderContent()
{
$content = $this->renderTitleContent();
$content .= '<ul class="configuration-list">';
$modules = Module::getModuleObjects();
$moduleClassNamesAndLabels = array();
foreach ($modules as $module) {
$moduleTreeMenuItems = $module->getDesignerMenuItems();
if ($module->isEnabled() && !empty($moduleTreeMenuItems)) {
$moduleClassNamesAndLabels[get_class($module)] = $module::getModuleLabelByTypeAndLanguage('Plural');
}
}
asort($moduleClassNamesAndLabels);
foreach ($moduleClassNamesAndLabels as $moduleClassName => $label) {
if (RightsUtil::canUserAccessModule($moduleClassName, Yii::app()->user->userModel)) {
$route = $this->moduleId . '/' . $this->controllerId . '/modulesMenu/';
$content .= ZurmoHtml::openTag('li');
$content .= '<h4>' . $label . '</h4>';
$content .= ZurmoHtml::link(ZurmoHtml::wrapLabel(Zurmo::t('Core', 'Configure')), Yii::app()->createUrl($route, array('moduleClassName' => $moduleClassName)), array('class' => 'white-button'));
$content .= ZurmoHtml::closeTag('li');
}
}
$content .= '</ul>';
return $content;
}
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:25,代码来源:DesignerPageMenuView.php
示例10: renderTabs
protected function renderTabs()
{
$content = ZurmoHtml::link(Zurmo::t('ZurmoModule', 'Library'), '#', array('class' => 'choose-tab active', 'data-view' => 'ImageModalSearchAndListView'));
$content .= ZurmoHtml::link(Zurmo::t('ZurmoModule', 'Upload'), '#', array('class' => 'upload-tab', 'data-view' => 'ImageFilesUploadView'));
$content .= ZurmoHtml::link(Zurmo::t('ZurmoModule', 'Import From Url'), '#', array('class' => 'upload-tab', 'data-view' => 'ImageFilesImportFromUrlView'));
return ZurmoHtml::tag('div', array('class' => 'image-tabs clearfix'), $content);
}
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:7,代码来源:ImageModalSearchAndListAndUploadView.php
示例11: renderContent
protected function renderContent()
{
$imagePath = Yii::app()->themeManager->baseUrl . '/default/images/ajax-loader.gif';
$progressBarImageContent = ZurmoHtml::image($imagePath, 'Progress Bar');
$cs = Yii::app()->getClientScript();
$cs->registerScriptFile($cs->getCoreScriptUrl() . '/jquery.min.js', CClientScript::POS_END);
$zurmoUpgradeStepTwoUrl = Yii::app()->createUrl($this->moduleId . '/' . $this->controllerId . '/stepTwo/');
$loginUrl = Yii::app()->createUrl('zurmo/default');
$content = '<div class="MetadataView">';
$content .= '<table><tr><td>';
$content .= '<div id="upgrade-step-two" style="display:none;">';
$content .= '<table><tr><td>';
$content .= Zurmo::t('InstallModule', 'The next step is to reload the application and upgrade the schema.');
$content .= '<br/><br/>';
$content .= ZurmoHtml::link(Zurmo::t('InstallModule', 'Click Here to continue with next step'), $zurmoUpgradeStepTwoUrl);
$content .= '</td></tr></table>';
$content .= '</div>';
$content .= '<div id="progress-table">';
$content .= '<table><tr><td class="progress-bar">';
$content .= Zurmo::t('InstallModule', 'Upgrade in progress. Please wait.');
$content .= '<br/>';
$content .= $progressBarImageContent;
$content .= '<br/>';
$content .= '</td></tr></table>';
$content .= '</div>';
$content .= Zurmo::t('InstallModule', 'Upgrade Output:');
$content .= '<div id="logging-table">';
$content .= '</div>';
$content .= '</td></tr></table>';
$content .= '</div>';
return $content;
}
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:32,代码来源:UpgradeStepOneCompleteView.php
示例12: render
public function render()
{
$htmlOptions = $this->getHtmlOptions();
$request = Yii::app()->getRequest();
if ($request->enableCsrfValidation && isset($htmlOptions['csrf']) && $htmlOptions['csrf']) {
$htmlOptions['params'][$request->csrfTokenName] = $request->getCsrfToken();
}
if (isset($htmlOptions['params'])) {
$params = CJavaScript::encode($htmlOptions['params']);
unset($htmlOptions['params']);
} else {
$params = '{}';
}
if (isset($htmlOptions['class'])) {
$htmlOptions['class'] .= ' z-button';
} else {
$htmlOptions['class'] = 'z-button';
}
$cs = Yii::app()->getClientScript();
$cs->registerCoreScript('jquery');
$cs->registerCoreScript('yii');
$handler = "jQuery.yii.submitForm(this, '', {$params}); return false;";
if (isset($htmlOptions['onclick'])) {
$htmlOptions['onclick'] = $htmlOptions['onclick'] . $handler;
} else {
$htmlOptions['onclick'] = $handler;
}
$aContent = ZurmoHtml::tag('span', array('class' => 'z-spinner'), null);
$aContent .= ZurmoHtml::tag('span', array('class' => 'z-icon'), null);
$aContent .= ZurmoHtml::tag('span', array('class' => 'z-label'), $this->getLabel());
return ZurmoHtml::link($aContent, '#', $htmlOptions);
}
开发者ID:youprofit,项目名称:Zurmo,代码行数:32,代码来源:SubmitButtonActionElement.php
示例13: resolveLabelAndWrap
protected function resolveLabelAndWrap()
{
if ($this->wrapLabel()) {
return ZurmoHtml::wrapLabel($this->getLabel(), 'button-label');
}
return $this->getLabel();
}
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:7,代码来源:TaskLinkActionElement.php
示例14: renderMergeTagsContent
protected function renderMergeTagsContent()
{
$title = ZurmoHtml::tag('h3', array(), Zurmo::t('Default', 'Merge Tags'));
$view = new MergeTagsView('Campaign', Element::resolveInputIdPrefixIntoString(array(get_class($this->model), 'textContent')), Element::resolveInputIdPrefixIntoString(array(get_class($this->model), 'htmlContent')), false);
$content = $view->render();
return $title . $content;
}
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:7,代码来源:CampaignEditView.php
示例15: renderTestButton
/**
* Render a test button. This link calls a modal
* popup.
* @return The element's content as a string.
*/
protected function renderTestButton()
{
$content = '<span>';
$content .= ZurmoHtml::ajaxLink(ZurmoHtml::wrapLabel(Zurmo::t('EmailMessagesModule', 'Send Test Email')), Yii::app()->createUrl('emailMessages/default/sendTestMessage/', array()), static::resolveAjaxOptionsForTestEmailSettings($this->form->getId()), array('id' => 'SendATestEmailToButton', 'class' => 'EmailTestingButton z-button'));
$content .= '</span>';
return $content;
}
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:12,代码来源:SendATestEmailToElement.php
示例16: renderContent
protected function renderContent()
{
$imagePath = Yii::app()->themeManager->baseUrl . '/default/images/ajax-loader.gif';
$progressBarImageContent = ZurmoHtml::image($imagePath, 'Progress Bar');
$cs = Yii::app()->getClientScript();
$cs->registerScriptFile($cs->getCoreScriptUrl() . '/jquery.min.js', CClientScript::POS_END);
$loginUrl = Yii::app()->createUrl('zurmo/default');
$content = '<div class="MetadataView">';
$content .= '<table><tr><td>';
$content .= '<div id="upgrade-step-two" style="display:none;">';
$content .= '<table><tr><td>';
$content .= Zurmo::t('InstallModule', 'Upgrade process is completed. Please edit perInstance.php file, and disable maintenance mode.');
$content .= '<br/><br/>';
$content .= ZurmoHtml::link(Zurmo::t('InstallModule', 'Click here to access index page, after you disable maintenance mode.'), $loginUrl);
$content .= '</td></tr></table>';
$content .= '</div>';
$content .= '<div id="progress-table">';
$content .= '<table><tr><td class="progress-bar">';
$content .= Zurmo::t('InstallModule', 'Upgrade in progress. Please wait.');
$content .= '<br/>';
$content .= $progressBarImageContent;
$content .= '<br/>';
$content .= '</td></tr></table>';
$content .= '</div>';
$content .= Zurmo::t('InstallModule', 'Upgrade Output:');
$content .= '<div id="logging-table">';
$content .= '</div>';
$content .= '</td></tr></table>';
$content .= '</div>';
return $content;
}
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:31,代码来源:UpgradeStepTwoCompleteView.php
示例17: renderContent
protected function renderContent()
{
$imagePath = Yii::app()->themeManager->baseUrl . '/default/images/ajax-loader.gif';
$progressBarImageContent = ZurmoHtml::image($imagePath, 'Progress Bar');
$cs = Yii::app()->getClientScript();
$cs->registerScriptFile($cs->getCoreScriptUrl() . '/jquery.min.js', CClientScript::POS_END);
$loginUrl = Yii::app()->createUrl('zurmo/default');
$content = '<div class="MetadataView">';
$content .= '<table><tr><td>';
$content .= '<div id="complete-table" style="display:none;">';
$content .= '<table><tr><td>';
$content .= Zurmo::t('InstallModule', 'Congratulations! The demo data has been successfully loaded.');
$content .= '<br/>';
$content .= '<br/>';
$content .= Zurmo::t('InstallModule', 'Click below to go to the login page. The username is <b>super</b>');
$content .= '<br/><br/>';
$content .= ZurmoHtml::link(Zurmo::t('ZurmoModule', 'Sign in'), $loginUrl);
$content .= '</td></tr></table>';
$content .= '</div>';
$content .= '<div id="progress-table">';
$content .= '<table><tr><td class="progress-bar">';
$content .= Zurmo::t('InstallModule', 'Loading demo data. Please wait.');
$content .= '<br/>';
$content .= $progressBarImageContent;
$content .= '<br/>';
$content .= '</td></tr></table>';
$content .= '</div>';
$content .= Zurmo::t('InstallModule', 'Installation Output:');
$content .= '<div id="logging-table">';
$content .= '</div>';
$content .= '</td></tr></table>';
$content .= '</div>';
return $content;
}
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:34,代码来源:InstallDemoDataView.php
示例18: resolveWrapperTdNonEditableByContent
protected function resolveWrapperTdNonEditableByContent($content, array $properties = array())
{
$this->resolveContentWhenColumnIsEmpty($content);
$content = parent::resolveWrapperTdNonEditableByContent($content, $properties);
$content .= ZurmoHtml::tag('td', $this->resolveNonEditableExpanderTdHtmlOptions(), '');
return $content;
}
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:7,代码来源:BuilderColumnElement.php
示例19: renderAfterFormLayout
protected function renderAfterFormLayout($form)
{
$element = new SortableContactWebFormAttributesElement($this->model, 'serializedData', $form);
$content = $element->render();
$content .= ZurmoHtml::hiddenField('getPlacedAttributeAction', Yii::app()->createUrl('contactWebForms/default/getPlacedAttributeByName'));
return $content;
}
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:7,代码来源:ContactWebFormEditAndDetailsView.php
示例20: getCheckboxContent
protected function getCheckboxContent($translatedLabel, $class)
{
$htmlOptions = array('onClick' => 'js:$(".' . $class . '").parentsUntil("li").parent().toggle();');
$label = ZurmoHtml::label($translatedLabel, $translatedLabel, array('class' => 'label-for-marketing-list-widgets'));
$content = ZurmoHtml::checkBox($translatedLabel, true, $htmlOptions) . $label;
return $content;
}
开发者ID:youprofit,项目名称:Zurmo,代码行数:7,代码来源:MarketingListsTogglePortletsLinkActionElement.php
注:本文中的ZurmoHtml类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论