本文整理汇总了PHP中BsHtml::button方法的典型用法代码示例。如果您正苦于以下问题:PHP BsHtml::button方法的具体用法?PHP BsHtml::button怎么用?PHP BsHtml::button使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BsHtml
的用法示例。
在下文中一共展示了BsHtml::button方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
/* @var $this UserController */
/* @var $model User */
$this->breadcrumbs = array('Users' => array('index'), 'Manage');
$this->menu = array(array('icon' => 'glyphicon glyphicon-list', 'label' => 'List User', 'url' => array('index')), array('icon' => 'glyphicon glyphicon-plus-sign', 'label' => 'Create User', 'url' => array('create')));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$('#user-grid').yiiGridView('update', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>
<?php
echo BsHtml::pageHeader('Manage', 'Users');
?>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><?php
echo BsHtml::button('Advanced search', array('class' => 'search-button', 'icon' => BsHtml::GLYPHICON_SEARCH, 'color' => BsHtml::BUTTON_COLOR_PRIMARY), '#');
?>
</h3>
</div>
<div class="panel-body">
<p>
You may optionally enter a comparison operator (<b><</b>, <b><=</b>, <b>></b>, <b>>=</b>, <b>
<></b>
or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
</p>
<div class="search-form" style="display:none">
<?php
$this->renderPartial('_search', array('model' => $model));
?>
</div>
示例2: array
?>
-<?php
echo $val->ACT_FICTICIO;
?>
<small><?php
echo $val->ACT_NOMBRE;
?>
</small><br>
<?php
}
?>
<?php
if (!$value->actions) {
?>
No hay nada
<?php
}
?>
</div>
</div>
</div>
<?php
}
?>
</div>
<div>
<?php
echo BsHtml::button('Contraer Modulos', array('color' => BsHtml::BUTTON_COLOR_PRIMARY, 'onclick' => "\$('.acc').collapse('hide')"));
echo BsHtml::button('Expandir Modulos', array('color' => BsHtml::BUTTON_COLOR_INFO, 'onclick' => "\$('.acc').collapse('show')"));
?>
</div>
示例3: array
<?php
$this->breadcrumbs = array('Box-O-Matic' => array('/snapcms/boxomatic/index'), 'Customers');
$this->page_heading = 'Customers';
Yii::app()->clientScript->registerScript('search', "\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('user-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
$this->menu = array(array('icon' => 'glyphicon glyphicon-plus-sign', 'label' => 'Create Customer', 'url' => array('user/create')), array('icon' => 'glyphicon glyphicon-export', 'label' => 'Export Customers', 'url' => array('user/export')));
Yii::app()->clientScript->registerScript('initPageSize', <<<EOD
\t\$('.change-pageSize').live('change', function() {
\t\t\$.fn.yiiGridView.update('user-grid',{ data:{ pageSize: \$(this).val() }})
\t});
EOD
, CClientScript::POS_READY);
$this->beginWidget('bootstrap.widgets.BsPanel', array('title' => BsHtml::button('Advanced search', array('data-toggle' => 'collapse', 'data-target' => '#search-form', 'class' => 'search-button', 'icon' => BsHtml::GLYPHICON_SEARCH, 'color' => BsHtml::BUTTON_COLOR_PRIMARY), '#')));
?>
<div id="search-form" class="search-form collapse">
<?php
echo $this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->
<?php
$dataProvider = $model->search();
?>
<?php
$pageSize = Yii::app()->user->getState('pageSize', 10);
?>
<?php
$this->widget('bootstrap.widgets.BsGridView', array('id' => 'user-grid', 'cssFile' => '', 'dataProvider' => $dataProvider, 'summaryText' => 'Displaying {start}-{end} of {count} result(s). ' . CHtml::dropDownList('pageSize', $pageSize, array(5 => 5, 10 => 10, 20 => 20, 50 => 50, 100 => 100), array('class' => 'change-pageSize')) . ' rows per page', 'filter' => $model, 'columns' => array('id', 'first_name', 'last_name', 'email', array('name' => 'balance', 'value' => 'SnapFormat::currency($data->balance)'), array('name' => 'tag_name_search', 'filter' => Tag::getUsedTags('Users'), 'value' => 'CHtml::value($data,"tag_names")'), array('class' => 'bootstrap.widgets.BsButtonColumn', 'template' => '{view}{update}{delete}{login}{reset_password}', 'buttons' => array('login' => array('label' => '<i class="glyphicon glyphicon-user"></i>', 'url' => 'array("user/loginAs","id"=>$data->id)', 'options' => array('title' => 'Login As')), 'reset_password' => array('label' => '<i class="glyphicon glyphicon-lock"></i>', 'url' => 'array("user/resetPassword","id"=>$data->id)', 'options' => array('confirm' => 'Are you sure you want to reset this user\'s password and send them a welcome email?', 'title' => 'Reset Password')))))));
$this->endWidget();
示例4: renderButton
/**
* Renders the button
*/
public function renderButton()
{
if (!empty($this->buttonOptions) && is_array($this->buttonOptions)) {
BsArray::defaultValue('data-toggle', 'modal', $this->buttonOptions);
if ($this->remote !== null) {
$this->buttonOptions['data-remote'] = CHtml::normalizeUrl($this->remote);
}
$selector = '#' . $this->htmlOptions['id'];
$label = BsArray::popValue('label', $this->buttonOptions, 'button');
$attr = isset($this->buttonOptions['data-remote']) ? 'data-target' : 'href';
BsArray::defaultValue($attr, $selector, $this->buttonOptions);
echo BsHtml::button($label, $this->buttonOptions);
}
}
示例5: array
?>
<tr>
<td><?php
echo $key + 1;
?>
</td>
<td><?php
echo $model->emp_nombre;
?>
</td>
<td><?php
echo $model->lic_fecha_creacion;
?>
</td>
<td><?php
echo $model->lic_usos;
?>
</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->emp_nombre}' ?", 'content' => "<p>Se quitara de la lista {$model->emp_nombre}</p>", 'footer' => array(BsHtml::Button('Eliminar de todos modos', array('onclick' => "window.location.href='deleteLI/{$model->lic_id}'", 'color' => BsHtml::BUTTON_COLOR_PRIMARY)), BsHtml::button('Cancelar', array('data-dismiss' => 'modal')))));
echo BsHtml::Button(BsHtml::icon(BsHtml::GLYPHICON_EDIT) . ' Modificar', array('color' => BsHtml::BUTTON_COLOR_PRIMARY, 'size' => BsHtml::BUTTON_SIZE_SMALL, 'onclick' => "window.location.href='updateLI/{$model->lic_id}'"));
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
示例6: foreach
?>
<div class="row">
<?php
foreach ($model as $key => $value) {
?>
<div class="col-sm-6 col-md-4">
<div class="thumbnail">
<?php
echo CHtml::link(BsHtml::imageThumbnail(Yii::app()->request->baseUrl . "/images/modulo/" . $value->PER_IMG, '', $htmlOptions = array('style' => 'width: 350px; height: 300px;border-radius: 15px;margin-top: 5px;')), array('evaluacion/module/' . $value->PER_ID));
?>
<h3><?php
echo $value->PER_NOMBRE;
?>
</h3>
<p><?php
echo $value->PER_DESCRIPCION;
?>
</p>
<?php
echo BsHtml::button('Módulos', array('color' => BsHtml::BUTTON_COLOR_PRIMARY, 'onclick' => "window.location.href='module/{$value->PER_ID}'"));
?>
<?php
echo BsHtml::button('Preguntas', array('color' => BsHtml::BUTTON_COLOR_INFO, 'onclick' => "window.location.href='demo/{$value->PER_ID}'"));
?>
</div>
</div>
<?php
}
?>
</div>
示例7: foreach
<div class="row">
<table class="table table-bordered table-striped">
<tr>
<th style="width:20px">#</th>
<th>Módulo</th>
<th style="width:85px">Opciones</th>
</tr>
<?php
foreach ($model as $key => $value) {
?>
<tr>
<td><?php
echo $key + 1;
?>
</td>
<td><?php
echo $value->MOD_NOMBRE;
?>
</td>
<td><?php
echo BsHtml::button('Empezar', array('color' => BsHtml::BUTTON_COLOR_PRIMARY, 'size' => BsHtml::BUTTON_SIZE_MINI));
?>
</td>
</tr>
<?php
}
?>
</table>
</div>