本文整理汇总了PHP中ZurmoHtml::wrapLabel方法的典型用法代码示例。如果您正苦于以下问题:PHP ZurmoHtml::wrapLabel方法的具体用法?PHP ZurmoHtml::wrapLabel怎么用?PHP ZurmoHtml::wrapLabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZurmoHtml
的用法示例。
在下文中一共展示了ZurmoHtml::wrapLabel方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
示例2: resolveLabelAndWrap
protected function resolveLabelAndWrap()
{
if ($this->wrapLabel()) {
return ZurmoHtml::wrapLabel($this->getLabel(), 'button-label');
}
return $this->getLabel();
}
示例3: 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;
}
示例4: renderContent
protected function renderContent()
{
$nextPageUrl = Yii::app()->createUrl($this->moduleId . '/' . $this->controllerId . '/checkSystem/');
$content = '<div class="MetadataView">';
$content .= '<table><tr><td>';
$content .= Zurmo::t('InstallModule', 'Welcome to Zurmo. Before getting started, we need some information ' . 'on the database. You will need to know the following items before proceeding:');
$content .= '<br/>';
$content .= '<br/>';
$content .= '<ul>';
$content .= '<li>' . Zurmo::t('InstallModule', 'Database host') . '</li>';
$content .= '<li>' . Zurmo::t('InstallModule', 'Database admin username') . '</li>';
$content .= '<li>' . Zurmo::t('InstallModule', 'Database admin password') . '</li>';
$content .= '<li>' . Zurmo::t('InstallModule', 'Database name') . '</li>';
$content .= '<li>' . Zurmo::t('InstallModule', 'Database username') . '</li>';
$content .= '<li>' . Zurmo::t('InstallModule', 'Database password') . '</li>';
$content .= '<li>' . Zurmo::t('InstallModule', 'Memcache host') . '</li>';
$content .= '<li>' . Zurmo::t('InstallModule', 'Memcache port number') . '</li>';
$content .= '</ul>';
$content .= Zurmo::t('InstallModule', 'In all likelihood, these items were supplied to you by your Web Host. ' . 'If you do not have this information, then you will need to contact ' . 'them before you can continue. If you\'re all ready...');
$content .= '<br/><br/>';
$content .= ZurmoHtml::link(ZurmoHtml::wrapLabel(Zurmo::t('InstallModule', 'Click to start')), $nextPageUrl, array('class' => 'z-button'));
$content .= '</td></tr></table>';
$content .= '</div>';
return $content;
}
示例5: renderActionBarContent
protected function renderActionBarContent()
{
$currentPageUrl = Yii::app()->createUrl($this->moduleId . '/' . $this->controllerId . '/runDiagnostic/');
$content = '<br/><br/>';
$content .= ZurmoHtml::link(ZurmoHtml::wrapLabel(Zurmo::t('InstallModule', 'Recheck System')), $currentPageUrl, array('class' => 'z-button'));
return $content;
}
示例6: resolveLabelAndWrap
/**
* @return string
*/
protected function resolveLabelAndWrap()
{
if ($this->wrapLabel()) {
$content = ZurmoHtml::tag('i', array('class' => 'icon-create'), '');
return $content . ZurmoHtml::wrapLabel($this->getLabel(), 'button-label');
}
return $this->getLabel();
}
示例7: renderWarningBoxByMessage
/**
* @param string $message
* @return string
*/
public static function renderWarningBoxByMessage($message)
{
assert('$message != null && is_string($message)');
$content = ZurmoHtml::wrapLabel(' ', 'ui-icon ui-icon-info') . $message;
$innerContent = ZurmoHtml::tag('p', array(), $content);
$innerDiv = ZurmoHtml::tag('div', array('class' => 'ui-state-warning ui-corner-all'), $innerContent);
return ZurmoHtml::tag('div', array('class' => 'ui-widget'), $innerDiv);
}
示例8: renderContent
protected function renderContent()
{
$url = Yii::app()->createUrl('/users/default/edit', array('id' => $this->userId));
$content = '<div class="' . $this->getIconName() . '">';
$content .= $this->getMessageContent();
$content .= ZurmoHtml::link(ZurmoHtml::wrapLabel($this->getCreateLinkDisplayLabel()), $url, array('class' => 'z-button green-button'));
$content .= '</div>';
return $content;
}
示例9: renderContent
protected function renderContent()
{
$params = array('label' => $this->getCreateLinkDisplayLabel());
$url = Yii::app()->createUrl($this->resolveUrl(), array('id' => Yii::app()->user->userModel->id, 'redirectUrl' => $this->redirectUrl));
$content = '<div class="' . $this->getIconName() . '">';
$content .= $this->getMessageContent();
$content .= ZurmoHtml::link(ZurmoHtml::wrapLabel($this->getCreateLinkDisplayLabel()), $url, array('class' => 'z-button green-button'));
$content .= '</div>';
return $content;
}
示例10: renderTestButton
/**
* Render a test button. This link calls a modal
* popup.
* @return The element's content as a string.
*/
protected function renderTestButton()
{
$id = 'testImapConnection';
$content = '<span>';
$params = array();
$this->resolveParamsFromModel($this->model, $params);
$content .= ZurmoHtml::ajaxLink(ZurmoHtml::wrapLabel(Zurmo::t('ZurmoModule', 'Test Connection')), Yii::app()->createUrl('emailMessages/default/testImapConnection/', $params), static::resolveAjaxOptionsForTestEmailSettings($this->form->getId()), array('id' => $id, 'class' => 'EmailTestingButton z-button'));
$content .= '</span>';
return $content;
}
示例11: renderContent
/**
* @return string
*/
protected function renderContent()
{
$params = array('label' => $this->getCreateLinkDisplayLabel());
$url = Yii::app()->createUrl('/sendGrid/default/configurationEditOutbound');
$content = '<div class="' . $this->getIconName() . '">';
$content .= $this->getMessageContent();
$content .= ZurmoHtml::link(ZurmoHtml::wrapLabel($this->getCreateLinkDisplayLabel()), $url, array('class' => 'z-button green-button'));
$content .= '</div>';
return $content;
}
示例12: run
/**
* This function overrides the run method from CJuiDatePicker and fixes the jQuery issue for the Datepicker showing
* wrong language in the portlet views popup.
*/
public function run()
{
list($name, $id) = $this->resolveNameID();
if (isset($this->htmlOptions['id'])) {
$id = $this->htmlOptions['id'];
} else {
$this->htmlOptions['id'] = $id;
}
if (isset($this->htmlOptions['name'])) {
$name = $this->htmlOptions['name'];
} else {
$this->htmlOptions['name'] = $name;
}
if (!isset($this->options['currentText'])) {
$this->options['currentText'] = ZurmoHtml::wrapLabel(Zurmo::t('Core', 'Now'));
}
if (!isset($this->options['closeText'])) {
$this->options['closeText'] = ZurmoHtml::wrapLabel(Zurmo::t('Core', 'Done'));
}
if ($this->flat === false) {
if ($this->hasModel()) {
echo ZurmoHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions);
} else {
echo ZurmoHtml::textField($name, $this->value, $this->htmlOptions);
}
} else {
if ($this->hasModel()) {
echo ZurmoHtml::activeHiddenField($this->model, $this->attribute, $this->htmlOptions);
$attribute = $this->attribute;
$this->options['defaultDate'] = $this->model->{$attribute};
} else {
echo ZurmoHtml::hiddenField($name, $this->value, $this->htmlOptions);
$this->options['defaultDate'] = $this->value;
}
if (!isset($this->options['onSelect'])) {
$this->options['onSelect'] = "js:function( selectedDate ) { jQuery('#{$id}').val(selectedDate);}";
// Not Coding Standard
}
$id = $this->htmlOptions['id'] = $this->htmlOptions['id'] . '_container';
$this->htmlOptions['name'] = $this->htmlOptions['name'] . '_container';
echo ZurmoHtml::tag('div', $this->htmlOptions, '');
}
$options = CJavaScript::encode($this->options);
$js = "jQuery('#{$id}').datepicker({$options});";
if ($this->language != '' && $this->language != 'en') {
$this->registerScriptFile($this->i18nScriptFile);
$js = "jQuery(function(){jQuery('#{$id}').datepicker(jQuery.extend({showMonthAfterYear:false}, jQuery.datepicker.regional['{$this->language}'], {$options}));})";
}
$cs = Yii::app()->getClientScript();
if (isset($this->defaultOptions)) {
$this->registerScriptFile($this->i18nScriptFile);
$cs->registerScript(__CLASS__, $this->defaultOptions !== null ? 'jQuery.datepicker.setDefaults(' . CJavaScript::encode($this->defaultOptions) . ');' : '');
}
$cs->registerScript(__CLASS__ . '#' . $id, $js);
}
示例13: renderContent
protected function renderContent()
{
$url = $this->getCreateMeetingUrl();
$content = ZurmoHtml::openTag('div', array('class' => $this->getIconName()));
$content .= $this->getMessageContent();
if (RightsUtil::doesUserHaveAllowByRightName('MeetingsModule', MeetingsModule::getCreateRight(), Yii::app()->user->userModel)) {
$content .= ZurmoHtml::link(ZurmoHtml::wrapLabel($this->getCreateLinkDisplayLabel()), $url, array('class' => 'z-button green-button'));
}
$content .= ZurmoHtml::closeTag('div');
return $content;
}
示例14: renderFluidContent
public static function renderFluidContent($content)
{
assert('$content == null || is_string($content)');
if ($content != null) {
// Begin Not Coding Standard
Yii::app()->clientScript->registerScript('TruncateTitleText', "\n \$(function() {\n \$('.truncated-title').ThreeDots({ max_rows:1 });\n });");
// End Not Coding Standard
$innerContent = ZurmoHtml::wrapLabel(strip_tags($content), 'ellipsis-content');
$content = ZurmoHtml::wrapLabel($innerContent, 'truncated-title');
return $content;
}
}
示例15: renderActionBarContent
protected function renderActionBarContent()
{
$failedIndexId = CheckServicesUtil::CHECK_FAILED;
$requiredIndexId = ServiceHelper::REQUIRED_SERVICE;
$currentPageUrl = Yii::app()->createUrl($this->moduleId . '/' . $this->controllerId . '/checkSystem/');
$nextPageUrl = Yii::app()->createUrl($this->moduleId . '/' . $this->controllerId . '/settings/');
$content = ZurmoHtml::link(ZurmoHtml::wrapLabel(Zurmo::t('InstallModule', 'Recheck System')), $currentPageUrl, array('class' => 'default-btn'));
if (count($this->checkResultsDisplayData[$failedIndexId][$requiredIndexId]) == 0) {
$content .= ' <span class="install-or">' . Zurmo::t('Core', 'or') . '</span> ';
$content .= ZurmoHtml::link(ZurmoHtml::wrapLabel(Zurmo::t('Core', 'Continue')), $nextPageUrl, array('class' => 'z-button'));
}
return $content;
}