本文整理汇总了PHP中BsHtml::icon方法的典型用法代码示例。如果您正苦于以下问题:PHP BsHtml::icon方法的具体用法?PHP BsHtml::icon怎么用?PHP BsHtml::icon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BsHtml
的用法示例。
在下文中一共展示了BsHtml::icon方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderButton
/**
* Renders a link button.
* @param string $id the ID of the button
* @param array $button the button configuration which may contain 'label', 'url', 'imageUrl' and 'options' elements.
* @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;
}
$url = BsArray::popValue('url', $button, '#');
if ($url !== '#') {
$url = $this->evaluateExpression($url, array('data' => $data, 'row' => $row));
}
$imageUrl = BsArray::popValue('imageUrl', $button, false);
$label = BsArray::popValue('label', $button, $id);
$options = BsArray::popValue('options', $button, array());
BsArray::defaultValue('data-title', $label, $options);
BsArray::defaultValue('title', $label, $options);
BsArray::defaultValue('data-toggle', 'tooltip', $options);
if ($icon = BsArray::popValue('icon', $button, false)) {
echo CHtml::link(BsHtml::icon($icon), $url, $options);
} else {
if ($imageUrl && is_string($imageUrl)) {
echo CHtml::link(CHtml::image($imageUrl, $label), $url, $options);
} else {
echo CHtml::link($label, $url, $options);
}
}
}
示例2: renderMenuItem
/**
* Renders the content of a menu item.
* Note that the container and the sub-menus are not rendered here.
* @param array $item the menu item to be rendered. Please see {@link items} on what data might be in the item.
* @return string
* @since 1.1.6
*/
protected function renderMenuItem($item)
{
$icon = isset($item['icon']) ? BsHtml::icon($item['icon']) . ' ' : '';
if (isset($item['url'])) {
$label = $this->linkLabelWrapper === null ? $item['label'] : CHtml::tag($this->linkLabelWrapper, $this->linkLabelWrapperHtmlOptions, $item['label']);
return CHtml::link($icon . $label, $item['url'], isset($item['linkOptions']) ? $item['linkOptions'] : array());
} else {
return CHtml::tag('span', isset($item['linkOptions']) ? $item['linkOptions'] : array(), $icon . $item['label']);
}
}
示例3: renderDataCellContent
/**
* Renders the data cell content.
* @param integer $row the row number (zero-based).
* @param mixed $data the data associated with the row.
*/
protected function renderDataCellContent($row, $data)
{
/* @var $am CAuthManager|AuthBehavior */
$am = Yii::app()->getAuthManager();
if ($am->hasParent($this->itemName, $data['name'])) {
echo BsHtml::linkButton(BsHtml::icon(BsHtml::GLYPHICON_REMOVE), array('color' => BsHtml::BUTTON_COLOR_LINK, 'size' => BsHtml::BUTTON_SIZE_MINI, 'url' => array('removeParent', 'itemName' => $this->itemName, 'parentName' => $data['name']), 'rel' => 'tooltip', 'title' => Yii::t('AuthModule.main', 'Remove')));
} else {
if ($am->hasChild($this->itemName, $data['name'])) {
echo BsHtml::linkButton(BsHtml::icon(BsHtml::GLYPHICON_REMOVE), array('color' => BsHtml::BUTTON_COLOR_LINK, 'size' => BsHtml::BUTTON_SIZE_MINI, 'url' => array('removeChild', 'itemName' => $this->itemName, 'childName' => $data['name']), 'rel' => 'tooltip', 'title' => Yii::t('AuthModule.main', 'Remove')));
}
}
}
示例4: renderDataCellContent
/**
* Renders the data cell content.
* @param integer $row the row number (zero-based).
* @param mixed $data the data associated with the row.
*/
protected function renderDataCellContent($row, $data)
{
if (!Yii::app()->user->isAdmin) {
echo BsHtml::linkButton(BsHtml::icon(BsHtml::GLYPHICON_EYE_OPEN), array('color' => BsHtml::BUTTON_COLOR_LINK, 'size' => BsHtml::BUTTON_SIZE_MINI, 'url' => array('view', 'id' => $data->{$this->idColumn}), 'htmlOptions' => array('rel' => 'tooltip', 'title' => Yii::t('AuthModule.main', 'View'))));
}
}
示例5: array
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title><?php
echo CHtml::encode($this->pageTitle);
?>
</title>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<?php
$this->widget('bootstrap3.widgets.BsNavbar', array('collapse' => true, 'brandLabel' => BsHtml::icon(BsHtml::GLYPHICON_HOME), 'brandUrl' => Yii::app()->homeUrl, 'position' => BsHtml::NAVBAR_POSITION_FIXED_TOP, 'items' => array(array('class' => 'bootstrap3.widgets.BsNav', 'type' => 'navbar', 'items' => $mainMenu), array('class' => 'bootstrap3.widgets.BsNav', 'type' => 'navbar', 'items' => array(array('url' => array('/site/login'), 'label' => 'Войти', 'visible' => Yii::app()->getUser()->getIsGuest()), array('url' => array('/admin/index'), 'label' => 'Админцентр', 'visible' => !Yii::app()->getUser()->getIsGuest()), array('url' => array('/site/logout'), 'label' => 'Выйти (' . Yii::app()->getUser()->getName() . ')', 'visible' => !Yii::app()->getUser()->getIsGuest())), 'htmlOptions' => array('pull' => BsHtml::NAVBAR_NAV_PULL_RIGHT), 'visible' => !!Yii::app()->getDb()->username))));
?>
<header class="hidden-xs">
<div class="container">
<div class="logo"><img src="<?php
echo $themePath;
?>
/images/logo.png"></div>
</div>
</header>
<div class="container">
<div class="row marketing">
<div class="content-pathway clearfix">
<?php
$this->widget('bootstrap3.widgets.BsBreadcrumb', array('tagName' => 'div', 'activeLinkTemplate' => '<a href="{url}">{label}</a>', 'inactiveLinkTemplate' => '<span>{label}</span>', 'separator' => '<span class="pathway-separator">»</span>', 'htmlOptions' => array('class' => 'pathway pull-left'), 'links' => $this->breadcrumbs));
?>
示例6: array
<?php
/* @var $this Controller */
$this->beginContent('//layouts/main');
$this->widget('bootstrap.widgets.BsNavbar', array('collapse' => true, 'position' => BsHtml::NAVBAR_POSITION_FIXED_TOP, 'brandLabel' => BsHtml::icon(BsHtml::GLYPHICON_HOME), 'brandUrl' => Yii::app()->homeUrl, 'items' => array(array('class' => 'bootstrap.widgets.BsNav', 'type' => 'navbar', 'activateParents' => true, 'items' => array(array('label' => __('Calendar'), 'url' => array('/calendar'), 'visible' => false), array('label' => __('Organizations'), 'url' => array('/organization')), array('label' => __('Periods'), 'url' => array('/period')), array('label' => __('Tasks'), 'url' => array('/task')), array('label' => __('Users'), 'url' => array('/user')), array('label' => __('Groups'), 'url' => array('/group')), array('label' => __('Reports'), 'url' => array('/reports')))), !Yii::app()->user->isGuest ? array('class' => 'bootstrap.widgets.BsNav', 'type' => 'navbar', 'activateParents' => true, 'items' => array(array('label' => 'Notifications', 'url' => array('notification'), 'icon' => 'glyphicons fa fa-bell'), array('label' => Yii::app()->user->name, 'url' => array('/site/user'), 'items' => array(array('label' => 'Preferences', 'url' => array('/site/user'), 'icon' => BsHtml::GLYPHICON_USER), BsHtml::menuDivider(), array('label' => 'Logout', 'icon' => BsHtml::GLYPHICON_LOG_OUT, 'url' => array('/site/logout'))))), 'htmlOptions' => array('pull' => BsHtml::NAVBAR_NAV_PULL_RIGHT)) : array('class' => 'bootstrap.widgets.BsNav', 'type' => 'navbar', 'activateParents' => true, 'items' => array(array('label' => 'Login', 'url' => array('/site/login'))), 'htmlOptions' => array('pull' => BsHtml::NAVBAR_NAV_PULL_RIGHT)))));
?>
<div class="container" id="page">
<?php
if ($flashMessages = Yii::app()->user->getFlashes()) {
?>
<?php
foreach ($flashMessages as $key => $message) {
?>
<div class="alert alert-<?php
echo $key;
?>
alert-dismissable">
<button class="close" type="button" data-dismiss="alert" aria-hidden="true">×</button>
<?php
echo $message;
?>
</div>
<?php
}
?>
<?php
}
?>
<?php
示例7: renderDataCellContent
/**
* Renders the data cell content.
* @param integer $row the row number (zero-based).
* @param mixed $data the data associated with the row.
*/
protected function renderDataCellContent($row, $data)
{
if ($this->userId !== null) {
echo BsHtml::linkButton(BsHtml::icon(BsHtml::GLYPHICON_REMOVE), array('color' => BsHtml::BUTTON_COLOR_LINK, 'size' => BsHtml::BUTTON_SIZE_MINI, 'url' => array('revoke', 'itemName' => $data['name'], 'userId' => $this->userId), 'rel' => 'tooltip', 'title' => Yii::t('AuthModule.main', 'Revoke')));
}
}
示例8: __
?>
<div class="panel panel-default">
<div class="panel-heading"><?php
echo __('User Dashboard');
?>
</div>
<div class="panel-body">
<div id="messages-area">
</div>
<?php
$form = $this->beginWidget('BsActiveForm', array('id' => 'login-form', 'layout' => BsHtml::FORM_LAYOUT_VERTICAL, 'enableClientValidation' => true, 'clientOptions' => array('validateOnSubmit' => true)));
echo $form->textFieldControlGroup($model, 'login', array('prepend' => BsHtml::icon(BsHtml::GLYPHICON_USER), 'placeholder' => 'Login', 'labelOptions' => array()));
echo $form->passwordFieldControlGroup($model, 'password', array('prepend' => BsHtml::icon(BsHtml::GLYPHICON_LOCK), 'placeholder' => 'Login', 'labelOptions' => array()));
?>
<div style="width: 100%;" class="form-group input-group">
<?php
echo BsHtml::submitButton(__('Sign In'), array('color' => BsHtml::BUTTON_COLOR_PRIMARY, 'name' => 'submit'));
?>
<div style="margin: 8px 10px 0 0" class="pull-right small">
<a class="text-muted " href="/user/reset"><?php
echo __('Reset Password');
?>
</a>
</div>
</div>
<?php
$this->endWidget();
示例9: array
echo Yii::app()->request->baseUrl;
?>
/css/style.css">
<link rel="stylesheet" type="text/css" href="<?php
echo Yii::app()->request->baseUrl;
?>
/css/form.css">
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<?php
$this->widget('bootstrap.widgets.BsNavbar', array('collapse' => true, 'brandLabel' => BsHtml::icon(BsHtml::GLYPHICON_HOME), 'brandUrl' => Yii::app()->homeUrl, 'items' => array(array('class' => 'bootstrap.widgets.BsNav', 'type' => 'navbar', 'activateParents' => true, 'items' => array(array('label' => 'Portfolio', 'url' => array('/page/portfolio')), array('label' => 'Product', 'url' => array('/site/')), array('label' => 'Our Skill', 'url' => array('/site/')), array('label' => 'About', 'url' => array('/site/page', 'view' => 'about')), array('label' => 'Contact', 'url' => array('/site/contact')), array('label' => 'Admin', 'url' => array('#'), 'items' => array(array('label' => 'Backend', 'url' => array('/backend/'), 'icon' => BsHtml::GLYPHICON_USER)), 'visible' => !Yii::app()->user->isGuest), array('label' => 'Login', 'url' => array('/site/login'), 'visible' => Yii::app()->user->isGuest), array('label' => 'Logout (' . Yii::app()->user->name . ')', 'url' => array('/site/logout'), 'visible' => !Yii::app()->user->isGuest))))));
?>
<div class="container" id="page">
<?php
if (isset($this->breadcrumbs)) {
?>
<?php
$this->widget('bootstrap.widgets.BsBreadCrumb', array('links' => $this->breadcrumbs, 'tagName' => 'ul', 'activeLinkTemplate' => '<li><a href="{url}">{label}</a></li>', 'inactiveLinkTemplate' => '<li>{label}</li>'));
?>
<!-- breadcrumbs -->
<?php
}
?>
<?php
示例10: array
<td><?php
echo $model['usu_fono'];
?>
</td>
<td><?php
echo $model['usu_email'];
?>
</td>
<td><?php
echo $model['car_nombre'];
?>
</td>
<td><?php
echo $model['emp_nombre'];
?>
</td>
<td>
<?php
echo BsHtml::Button(BsHtml::icon(BsHtml::GLYPHICON_TRASH) . ' Eliminar', array('color' => BsHtml::BUTTON_COLOR_PRIMARY, 'size' => BsHtml::BUTTON_SIZE_SMALL, 'data-target' => '#Eliminar' . $key, 'data-toggle' => 'modal'));
$this->widget('bootstrap.widgets.BsModal', array('id' => 'Eliminar' . $key, 'header' => "¿Desea eliminar a '" . $model['usu_nombre'] . "' ?", 'content' => "<p>Se quitara de la lista " . $model['usu_nombre'] . "</p>", 'footer' => array(BsHtml::Button('Eliminar de todos modos', array('onclick' => "window.location.href='deleted?rut=" . $model['usu_rut'] . "'", 'color' => BsHtml::BUTTON_COLOR_PRIMARY)), BsHtml::button('Cancelar', array('data-dismiss' => 'modal')))));
?>
<?php
echo BsHtml::Button(BsHtml::icon(BsHtml::GLYPHICON_EDIT) . ' Modificar', array('color' => BsHtml::BUTTON_COLOR_PRIMARY, 'size' => BsHtml::BUTTON_SIZE_SMALL, 'onclick' => "window.location.href='update?rut=" . $model['usu_rut'] . "'"));
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
示例11: array
<title><?php
echo CHtml::encode($this->pageTitle);
?>
</title>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div id="header">
<?php
$this->widget('bootstrap.widgets.BsNavbar', array('brandLabel' => BsHtml::icon(BsHtml::GLYPHICON_HOME), 'brandUrl' => array('default/index'), 'brandOptions' => array('title' => 'Главная страница административной панели', 'data-toggle' => 'tooltip', 'data-placement' => 'bottom'), 'items' => array(array('class' => 'bootstrap.widgets.BsNav', 'encodeLabel' => false, 'type' => 'navbar', 'activateParents' => true, 'items' => $this->_menu_left), array('class' => 'bootstrap.widgets.BsNav', 'encodeLabel' => false, 'type' => 'navbar', 'activateParents' => true, 'items' => $this->_menu_right, 'htmlOptions' => array('pull' => BsHtml::NAVBAR_NAV_PULL_RIGHT, 'style' => 'margin-right: 10px;')))));
?>
</div>
<!--div id="specialPanel">
<?php
/*$this->beginWidget('bootstrap.widgets.BsPanel', array()); ?>
<div class="row">
<div class="col-lg-4">
<p>Здравствуйте, <?= BsHtml::bold($user->_name) ?>!</p>
<p>
Ваша роль:
<?= BsHtml::bsLabel($user->_role, array(
'color' => BsHtml::LABEL_COLOR_PRIMARY,
'style'=>'font-size: 100%;',
)); ?>
示例12: array
</div>
</div>
<div id="sidebar" class="col-lg-3">
<?php
$this->beginWidget('bootstrap.widgets.BsPanel', array('title' => 'Menu', 'contentCssClass' => '', 'htmlOptions' => array('class' => 'panel sticky'), 'type' => BsHtml::PANEL_TYPE_PRIMARY));
?>
<div class="btn-group btn-group-vertical">
<?php
echo BsHtml::submitButton(BsHtml::icon(BsHtml::GLYPHICON_THUMBS_UP) . ' Save');
?>
<?php
echo BsHtml::submitButton(BsHtml::icon(BsHtml::GLYPHICON_PENCIL) . ' Save and Continue Editing', array('name' => 'save_and_continue'));
?>
<?php
$this->widget('application.widgets.SnapMenu', array('items' => $this->menu, 'htmlOptions' => array('class' => 'nav nav-stacked')));
?>
</div>
<?php
$this->endWidget();
?>
</div>
<?php
$this->endWidget();
示例13: array
echo $form->textFieldControlGroup($model, 'user_phone');
?>
<?php
echo $form->textFieldControlGroup($model, 'user_mobile');
?>
<?php
echo $form->textFieldControlGroup($model, 'user_address');
?>
<?php
echo $form->textFieldControlGroup($model, 'user_suburb');
?>
<?php
echo $form->textFieldControlGroup($model, 'user_state');
?>
<?php
echo $form->textFieldControlGroup($model, 'user_postcode');
?>
<?php
echo $form->textAreaControlGroup($model, 'search_customer_notes');
?>
</fieldset>
<div class="form-actions col-md-offset-2 col-md-10">
<?php
echo BsHtml::submitButton(BsHtml::icon(BsHtml::GLYPHICON_SEARCH) . ' Search', array('color' => BsHtml::BUTTON_COLOR_PRIMARY));
?>
</div>
<?php
$this->endWidget();
?>
</div>
示例14: array
<title><?php
echo CHtml::encode($this->pageTitle);
?>
</title>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<?php
$this->widget('bootstrap.widgets.BsNavbar', array('collapse' => true, 'brandLabel' => BsHtml::icon(BsHtml::GLYPHICON_HOME), 'brandUrl' => Yii::app()->homeUrl, 'items' => array(array('class' => 'bootstrap.widgets.BsNav', 'type' => 'navbar', 'activateParents' => true, 'items' => array(array('label' => 'Home', 'url' => array('/site/index')), array('label' => 'Usuarios', 'url' => array('/usuario')), array('label' => 'Roles', 'url' => array('/rol')), array('label' => 'Activos Fijos', 'url' => array('/activosFijos')), array('label' => 'Login', 'url' => array('site/login'), 'visible' => Yii::app()->user->isGuest), array('label' => 'Logout (' . Yii::app()->user->name . ')', 'url' => array('/site/logout'), 'visible' => !Yii::app()->user->isGuest))))));
?>
<div class="container">
<?php
echo $content;
?>
<footer>
<p>© Company 2014</p>
</footer>
</div> <!-- /container -->
</body>
</html>
示例15: array
<?php
$baseUrl = Yii::app()->baseUrl;
Yii::app()->getClientScript()->registerCssFile($baseUrl . '/css/bootstrap.cerulean.min.css')->registerCoreScript('jquery')->registerScriptFile($baseUrl . '/js/bootstrap.js', CClientScript::POS_END);
?>
<link rel="icon" type="image/png" href="<?php
echo $baseUrl;
?>
/images/favicon.png" />
<title><?php
echo CHtml::encode($this->pageTitle);
?>
</title>
</head>
<body>
<div class="container"> <?php
$this->widget('bootstrap.widgets.BsNavbar', array('collapse' => true, 'brandLabel' => BsHtml::icon(BsHtml::GLYPHICON_FIRE) . BsHtml::bold(' Modelo de Evaluación') . BsHtml::small(' Qualitatcorp'), 'brandUrl' => Yii::app()->homeUrl, 'items' => array(array('class' => 'bootstrap.widgets.BsNav', 'type' => 'navbar', 'activateParents' => true, 'items' => array(array('label' => 'Evaluación', 'items' => array(BsHtml::menuHeader(BsHtml::italics('Evaluación')), array('label' => 'Administar Evaluación', 'url' => array('evaluacion/admin')), array('label' => 'Crear preguntas', 'url' => array('evaluacion/create')), BsHtml::menuHeader(BsHtml::italics('Evaluación Trabajador')), array('label' => 'Evaluar Trabajador', 'url' => array('evaluacion/evaluation')), array('label' => 'Resultados Trabajadores', 'url' => array('evaluacion/adminTRA')), BsHtml::menuHeader(BsHtml::italics('Preguntas')), array('label' => 'Administar preguntas', 'url' => array('evaluacion/adminPRE')), array('label' => 'Crear preguntas', 'url' => array('evaluacion/createPRE')), BsHtml::menuHeader(BsHtml::italics('Perfil Tecnico')), array('label' => 'Administar Perfil Tecnico', 'url' => array('evaluacion/adminPT')), array('label' => 'Crear Perfil Tecnico', 'url' => array('evaluacion/createPT')))), array('label' => 'Administración', 'items' => array(BsHtml::menuHeader(BsHtml::italics('Usuarios')), array('label' => 'Administar Usuarios', 'url' => array('usuario/admin')), array('label' => 'Crear Usuario', 'url' => array('usuario/create')), BsHtml::menuHeader(BsHtml::italics('Empresas')), array('label' => 'Administar Empresas', 'url' => array('empresa/admin')), array('label' => 'Crear Empresa', 'url' => array('empresa/create')), BsHtml::menuHeader(BsHtml::italics('Trabajadores')), array('label' => 'Administar Trabajadores', 'url' => array('trabajador/admin')), array('label' => 'Crear Trabajador', 'url' => array('trabajador/create')))))), array('class' => 'bootstrap.widgets.BsNav', 'type' => 'navbar', 'activateParents' => true, 'items' => array(array('label' => 'Login', 'url' => array('/site/login'), 'pull' => BsHtml::NAVBAR_NAV_PULL_RIGHT, 'visible' => Yii::app()->user->isGuest), array('label' => 'Logout (' . Yii::app()->user->name . ')', 'pull' => BsHtml::NAVBAR_NAV_PULL_RIGHT, 'url' => array('/site/logout'), 'visible' => !Yii::app()->user->isGuest)), 'htmlOptions' => array('pull' => BsHtml::NAVBAR_NAV_PULL_RIGHT)))));
?>
<?php
// breadcrumbs
$this->widget('bootstrap.widgets.BsBreadCrumb', array('links' => $this->breadcrumbs, 'tagName' => 'ul', 'activeLinkTemplate' => '<li><a href="{url}">{label}</a></li>', 'inactiveLinkTemplate' => '<li>{label}</li>', 'homeLink' => BsHtml::openTag('li') . BsHtml::icon(BsHtml::GLYPHICON_HOME) . BsHtml::closeTag('li')));
?>
<div class="content">
<?php
echo $content;
?>
</div>
</div>
</body>
</html>