当前位置: 首页>>代码示例>>PHP>>正文


PHP TbHtml::buttonDropdown方法代码示例

本文整理汇总了PHP中TbHtml::buttonDropdown方法的典型用法代码示例。如果您正苦于以下问题:PHP TbHtml::buttonDropdown方法的具体用法?PHP TbHtml::buttonDropdown怎么用?PHP TbHtml::buttonDropdown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TbHtml的用法示例。


在下文中一共展示了TbHtml::buttonDropdown方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: renderDataCellContent

 /**
  * Renders the data cell content.
  *
  * @param integer $row the row number (zero-based)
  * @param YdActiveRecord $data the data associated with the row
  */
 protected function renderDataCellContent($row, $data)
 {
     ob_start();
     parent::renderDataCellContent($row, $data);
     $parentContents = ob_get_clean();
     if ($data instanceof CActiveRecord) {
         $links = is_callable(array($data, 'getMenuLinks')) ? call_user_func(array($data, 'getMenuLinks')) : array();
         if ($links) {
             if (is_callable(array($data, 'getUrl'))) {
                 $this->buttonOptions['type'] = TbHtml::BUTTON_TYPE_LINK;
                 $this->buttonOptions['url'] = call_user_func(array($data, 'getUrl'));
             }
             echo '<div class="filter-container">';
             $this->buttonOptions['split'] = true;
             echo TbHtml::buttonDropdown($parentContents, $links, $this->buttonOptions);
             echo '</div>';
         } else {
             $url = is_callable(array($data, 'getUrl')) ? call_user_func(array($data, 'getUrl')) : false;
             if ($url) {
                 $this->buttonOptions['class'] = isset($this->buttonOptions['class']) ? $this->buttonOptions['class'] . ' btn' : 'btn';
                 echo TbHtml::link($parentContents, $url, $this->buttonOptions);
             } else {
                 echo TbHtml::button($parentContents, $this->buttonOptions);
             }
         }
     } else {
         echo TbHtml::button($parentContents, $this->buttonOptions);
     }
 }
开发者ID:cornernote,项目名称:yii-dressing,代码行数:35,代码来源:YdDropdownColumn.php

示例2: renderDisplayModeToggle

    /**
     * Renders the specified summary along with a display mode toggle
     * @param string $summary the HTML for the original summary
     */
    public static function renderDisplayModeToggle($summary, $context)
    {
        ?>
		<div class="row-fluid">
			<div class="span12 pull-right display-mode-toggle">
				<?php 
        echo $summary;
        /* @var $ctrl MediaController */
        $ctrl = Yii::app()->controller;
        // Get the current display mode so we can show an icon next to it
        $currentMode = $ctrl->getDisplayMode($context);
        echo TbHtml::buttonDropdown(Yii::t('DisplayMode', 'Display mode'), array(array('label' => Yii::t('DisplayMode', 'Grid view'), 'url' => array('setDisplayMode', 'mode' => DisplayMode::MODE_GRID, 'context' => $context), 'icon' => $currentMode === DisplayMode::MODE_GRID ? TbHtml::ICON_OK : ''), array('label' => Yii::t('DisplayMode', 'List view'), 'url' => array('setDisplayMode', 'mode' => DisplayMode::MODE_LIST, 'context' => $context), 'icon' => $currentMode === DisplayMode::MODE_LIST ? TbHtml::ICON_OK : '')), array('color' => TbHtml::BUTTON_COLOR_INFO, 'class' => 'fa fa-bars'));
        ?>
			</div>
		</div>
		<?php 
    }
开发者ID:pweisenburger,项目名称:xbmc-video-server,代码行数:21,代码来源:ResultHelper.php

示例3: array

<?php 
$this->beginWidget('yiiwheels.widgets.box.WhBox', array('title' => TbHtml::encode('Length Classes'), 'headerButtons' => array(TbHtml::buttonGroup(array(array('label' => 'Create', 'url' => $this->createUrl('create'), 'icon' => TbHtml::ICON_PLUS, 'class' => 'ylink create'), array('label' => 'List', 'url' => $this->createUrl('index'), 'icon' => TbHtml::ICON_LIST, 'class' => 'active ylink list'), array('label' => 'Manage', 'url' => $this->createUrl('admin'), 'icon' => TbHtml::ICON_WRENCH, 'class' => 'ylink manage')), array('toggle' => TbHtml::BUTTON_TOGGLE_RADIO, 'color' => TbHtml::BUTTON_COLOR_PRIMARY)), '&nbsp;', TbHtml::buttonDropdown('Export', array(array('label' => 'Selected', 'url' => $this->createUrl('exportselected'), 'class' => 'exportSelected'), array('label' => 'All', 'url' => $this->createUrl('exportall'), 'class' => 'exportAll')), array('color' => TbHtml::BUTTON_COLOR_PRIMARY, 'icon' => TbHtml::ICON_DOWNLOAD_ALT, 'class' => 'exportDrop')), TbHtml::linkbutton('View', array('color' => TbHtml::BUTTON_COLOR_PRIMARY, 'url' => $this->createUrl('view'), 'icon' => TbHtml::ICON_EYE_OPEN, 'class' => 'viewDrop hide')), TbHtml::linkbutton('Edit', array('color' => TbHtml::BUTTON_COLOR_PRIMARY, 'url' => $this->createUrl('update'), 'icon' => TbHtml::ICON_EDIT, 'class' => 'updateDrop hide')), '&nbsp;', TbHtml::linkbutton('Delete', array('color' => TbHtml::BUTTON_COLOR_DANGER, 'url' => $this->createUrl('batchdelete'), 'icon' => TbHtml::ICON_TRASH, 'class' => 'deleteSelected')), TbHtml::linkbutton('Delete', array('color' => TbHtml::BUTTON_COLOR_DANGER, 'url' => $this->createUrl('delete'), 'icon' => TbHtml::ICON_TRASH, 'class' => 'delete hide')), '&nbsp;')));
?>
<div id="aMessage"></div>

<div id="viewContent">
	<?php 
$this->renderPartial('_list', array('dataProvider' => $dataProvider));
?>
</div>
<div id="errorText" class="hide"><?php 
echo Yii::t('info', 'An error has occurred');
?>
</div>
<div class="errorTextSort hide"><?php 
echo Yii::t('info', 'An error has occurred during sorting');
?>
</div>
<?php 
$this->endWidget();
开发者ID:Rudianasaja,项目名称:cycommerce,代码行数:20,代码来源:index.php

示例4: array

<div class="form-actions"> 
    <?php echo CHtml::link('Toggle Search', '#', array('class' => 'search-button btn', 'style' => 'float:right')); ?>
</div>
<div class="search-form" style="display:block">
    <?php
    $this->renderPartial('_decisions_filter', array(
        'model' => $model,
    ));
    ?>
</div><!-- search-form -->

<?php
 echo TbHtml::buttonDropdown('Export Data To', array(
    array('label' => 'HTML', 'url' => $this->createUrl('eacDecision/admin',array('format'=>'html'))),
    array('label' => 'PDF', 'url' => $this->createUrl('eacDecision/admin',array('format'=>'pdf'))),
    array('label' => 'EXCEL', 'url' => $this->createUrl('eacDecision/admin',array('format'=>'excel'))),
    //TbHtml::menuDivider(),
    array('label' => 'CSV', 'url' => $this->createUrl('eacDecision/admin',array('format'=>'csv'))),
), array('split' => true,'color'=>TbHtml::BUTTON_COLOR_SUCCESS,'size'=>TbHtml::BUTTON_SIZE_SMALL)); 

$displayable = (!Yii::app()->user->isGuest&&!Yii::app()->user->is_mda)==true ?'':'display:none';
$allowableActions = (!Yii::app()->user->isGuest&&!Yii::app()->user->is_mda)==true ?'{view}':'{view}';

$this->widget('bootstrap.widgets.TbGridView', array(
    'id' => 'eac-decision-grid',
    'type' => TbHtml::GRID_TYPE_STRIPED,
    'dataProvider' => $model->search(),
//	'filter'=>$model,
    'columns' => array(
//        'id',
        // array(
开发者ID:robertgunze,项目名称:eams,代码行数:31,代码来源:admin.php

示例5: array

    array('label' => 'Action', 'url' => '#'),
    array('label' => 'Another action', 'url' => '#'),
    array('label' => 'Something else here', 'url' => '#'),
    TbHtml::menuDivider(),
    array('label' => 'Separate link', 'url' => '#'),
), array('split' => true)); ?></pre>

	<h3>Dropup menus</h3>

	<div class="bs-docs-example">
		<div class="btn-toolbar" style="margin: 0;">
			<?php 
echo TbHtml::buttonDropdown('Dropup', $dropdownConfig, array('split' => true, 'dropup' => true));
?>
			<?php 
echo TbHtml::buttonDropdown('Right dropup', $dropdownConfig, array('split' => true, 'dropup' => true, 'menuOptions' => array('align' => TbHtml::ALIGN_RIGHT)));
?>
		</div>
	</div>

	<pre class="prettyprint linenums">
&lt;?php echo TbHtml::buttonDropdown('Right dropup', array(
    array('label' => 'Action', 'url' => '#'),
    array('label' => 'Another action', 'url' => '#'),
    array('label' => 'Something else here', 'url' => '#'),
    TbHtml::menuDivider(),
    array('label' => 'Separate link', 'url' => '#'),
), array('split' => true, 'dropup' => true, 'menuOptions' => array('align' => TbHtml::ALIGN_RIGHT))); ?></pre>

</section>
开发者ID:yii-twbs,项目名称:yiistrap-docs,代码行数:30,代码来源:components.php

示例6: array

    <pre class="prettyprint linenums">
&lt;?php echo TbHtml::textField('appendedDropdownButton', '',
    array('append' => TbHtml::buttonDropdown('Action', array(...)), 'span' => 2)); ?></pre>

    <div class="bs-docs-example">
        <?php 
echo TbHtml::textField('prependedDropdownButton', '', array('prepend' => TbHtml::buttonDropdown('Action', $dropdownConfig), 'span' => 2));
?>
    </div>
    <pre class="prettyprint linenums">
&lt;?php echo TbHtml::textField('prependedDropdownButton', '',
    array('prepend' => TbHtml::buttonDropdown('Action', array(...)), 'span' => 2)); ?></pre>

    <div class="bs-docs-example">
        <?php 
echo TbHtml::textField('appendedPrependedDropdownButton', '', array('prepend' => TbHtml::buttonDropdown('Action', $dropdownConfig), 'append' => TbHtml::buttonDropdown('Action', $dropdownConfig), 'span' => 2));
?>
    </div>
    <pre class="prettyprint linenums">
&lt;?php echo TbHtml::textField('appendedPrependedDropdownButton', '', array(
    'prepend' => TbHtml::buttonDropdown('Action', array(...)),
    'append' => TbHtml::buttonDropdown('Action', array(..)),
    'span' => 2,
)); ?></pre>

    <div class="bs-docs-example">
        <?php 
echo TbHtml::textField('prependedSplitDropdownButton', '', array('prepend' => TbHtml::splitButtonDropdown('Action', $dropdownConfig)));
?>
        <?php 
echo TbHtml::textField('appendedSplitDropdownButton', '', array('append' => TbHtml::splitButtonDropdown('Action', $dropdownConfig)));
开发者ID:crisu83,项目名称:yiistrap-docs,代码行数:31,代码来源:basics.php

示例7: testButtonDropdown

 public function testButtonDropdown()
 {
     $I = $this->codeGuy;
     $items = array(array('label' => 'Action', 'url' => '#', 'class' => 'item', 'linkOptions' => array('class' => 'link')), array('label' => 'Another action', 'url' => '#'), array('label' => 'Something else here', 'url' => '#'), TbHtml::menuDivider(), array('label' => 'Separate link', 'url' => '#'));
     $html = TbHtml::buttonDropdown('Action', $items, array('class' => 'link', 'dropup' => true, 'groupOptions' => array('class' => 'group'), 'menuOptions' => array('class' => 'menu')));
     $group = $I->createNode($html, 'div.btn-group');
     $I->seeNodeCssClass($group, 'dropup group');
     $I->seeNodeChildren($group, array('a.dropdown-toggle', 'ul.dropdown-menu'));
     $a = $group->filter('a.dropdown-toggle');
     $I->seeNodeCssClass($a, 'link');
     $I->seeNodeAttributes($a, array('data-toggle' => 'dropdown', 'href' => '#'));
     $I->seeNodePattern($a, '/Action </');
     $b = $a->filter('b.caret');
     $I->seeNodeEmpty($b);
     $ul = $group->filter('ul.dropdown-menu');
     foreach ($ul->children() as $i => $liElement) {
         $li = $I->createNode($liElement);
         if ($i === 3) {
             $I->seeNodeCssClass($li, 'divider');
         } else {
             $a = $li->filter('a');
             if ($i === 0) {
                 $I->seeNodeCssClass($li, 'item');
                 $I->seeNodeCssClass($a, 'link');
             }
             $I->seeNodeAttributes($a, array('href' => '#', 'tabindex' => '-1'));
             $I->seeNodeText($a, $items[$i]['label']);
         }
     }
 }
开发者ID:AlexanderGrant1,项目名称:AC41004,代码行数:30,代码来源:TbHtmlTest.php

示例8:

<?php

$menuItem = MenuItem::model()->findByPk($id);
echo TbHtml::buttonDropdown($menuItem->label, $menuItem->getItems(1));
开发者ID:rizaldi-github,项目名称:yii-menu-module,代码行数:4,代码来源:_TbHtml_buttonDropdown.php

示例9: array

<div class='controles'>
<h2>Buscar Boleto Y Referencias</h2>
<div class="form">
<?php 
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('id' => 'form-ventaslevel1', 'enableClientValidation' => true, 'layout' => TbHtml::FORM_LAYOUT_HORIZONTAL, 'method' => 'get', 'action' => array('reportes/buscarBoleto'), 'clientOptions' => array('validateOnSubmit' => true)));
?>
<div class='col-2'>
<?php 
$boton = TbHtml::buttonDropdown('Buscar', array(array('label' => 'Referencia', 'url' => '#', 'class' => 'tipo', 'data-tipo' => 'venta'), array('label' => 'No. Boleto', 'url' => '#', 'class' => 'tipo', 'data-tipo' => 'boleto'), array('label' => 'No. Boleto Reimpreso', 'url' => '#', 'class' => 'tipo', 'data-tipo' => 'reimpresion'), TbHtml::menuDivider(), array('label' => 'Reservación Farmatodo', 'url' => '#', 'class' => 'tipo', 'data-tipo' => 'reservado')), array('color' => TbHtml::BUTTON_COLOR_PRIMARY));
?>
		<?php 
echo TbHtml::textFieldControlGroup('ref', $ref > 0 ? $ref : '', array('span' => 4, 'placeholder' => 'Referencia o número de boleto', 'label' => 'Ingrese la referencia o el número de boleto:', 'id' => 'filtro', 'autofocus' => "autofocus", 'append' => $boton));
?>
	
</div>
    <div class="box1 text-left">
		<?php 
echo TbHtml::hiddenField('tipo');
//echo TbHtml::radioButtonList('tipo',isset($tipo)?$tipo:'venta',array(
//'venta'=>'Referencia',
//'boleto'=>'No. Boleto',
//'reimpresion'=>'Reimpresion',
//));
?>

    </div>

<?php 
$this->endWidget();
?>
开发者ID:cicb,项目名称:tpc,代码行数:30,代码来源:buscarBoleto.php

示例10: array

<?php

$menuItem = MenuItem::model()->findByPk($id);
echo TbHtml::buttonDropdown($menuItem->label, $menuItem->getItems(1), array('split' => true, 'dropup' => true, 'menuOptions' => array('pull' => TbHtml::PULL_RIGHT)));
开发者ID:rizaldi-github,项目名称:yii-menu-module,代码行数:4,代码来源:_TbHtml_buttonDropup.php

示例11: array

    array('label' => 'Action', 'url' => '#'),
    array('label' => 'Another action', 'url' => '#'),
    array('label' => 'Something else here', 'url' => '#'),
    TbHtml::menuDivider(),
    array('label' => 'Separate link', 'url' => '#'),
), array('split' => true)); ?></pre>

   <h3>Dropup menus</h3>

   <div class="bs-docs-example">
      <div class="btn-toolbar" style="margin: 0;">
         <?php 
echo TbHtml::buttonDropdown('Dropup', $dropdownConfig, array('split' => true, 'dropup' => true));
?>
         <?php 
echo TbHtml::buttonDropdown('Right dropup', $dropdownConfig, array('split' => true, 'dropup' => true, 'menuOptions' => array('pull' => TbHtml::PULL_RIGHT)));
?>
      </div>
   </div>

   <pre class="prettyprint linenums">
&lt;?php echo TbHtml::buttonDropdown('Right dropup', array(
    array('label' => 'Action', 'url' => '#'),
    array('label' => 'Another action', 'url' => '#'),
    array('label' => 'Something else here', 'url' => '#'),
    TbHtml::menuDivider(),
    array('label' => 'Separate link', 'url' => '#'),
), array('split' => true, 'dropup' => true, 'menuOptions' => array('pull' => TbHtml::PULL_RIGHT))); ?></pre>

</section>
开发者ID:crisu83,项目名称:yiistrap-docs,代码行数:30,代码来源:components.php

示例12: array

        <?php echo $content; ?>
    </div><!-- content -->
</div>

<div class="span-3 last">
    <div id="sidebar">
        <?php
        echo TbHtml::buttonDropdown('Operaciones', $this->menu, array('color' => TbHtml::BUTTON_COLOR_SUCCESS)
        );
        ?>
    </div><!-- sidebar -->
    <div id="herramientas">
        <?php
        // Solo muestro la barra si la tengo definida con al menos un elemento
        if (count($this->barraherramientas) > 0) {
            echo TbHtml::buttonDropdown('Herramientas', $this->barraherramientas, 
                    array('color' => TbHtml::BUTTON_COLOR_INFO));
        }
        ?>
    </div>     
</div>

<?php
// preparar el widget para mostrar en modal de la ayuda
$this->widget('bootstrap.widgets.TbModal', array(
    'id' => 'ayuda',
    'header' => 'Ayuda',
    'htmlOptions' => array('style' => 'width:950px;height:500px;margin-left:-476px; margin-top:-40px;text-align:center;'),
    'content' => '<div id="ayuda-div"></div>'  // contenido que se actualiza via ajax con la ayuda en pdf
));
$this->endContent();
?>
开发者ID:juankie,项目名称:gestcb9git,代码行数:32,代码来源:column2.php

示例13: array

echo $form->fileField($model, 'thumb_file');
?>
        </div>
        <?php 
echo $form->error($model, 'thumb_file');
?>
    </div>



    <?php 
$dropdownConfig = array(array('label' => '功能模块', 'url' => '#'), TbHtml::menuDivider(), array('label' => '单页', 'url' => '#'));
?>

    <?php 
echo $form->textFieldControlGroup($model, 'url', array('append' => TbHtml::buttonDropdown('更多', $dropdownConfig)));
?>



    <?php 
echo $form->dropDownListControlGroup($model, 'list_view', $this->getPostListViews());
?>

    <?php 
echo $form->dropDownListControlGroup($model, 'page_view', $this->getPostPageViews());
?>

    <?php 
echo $form->dropDownListControlGroup($model, 'content_view', $this->getPostContentViews());
?>
开发者ID:cooltheo,项目名称:fircms,代码行数:31,代码来源:_form.php

示例14: array

<?php

$menuItem = MenuItem::model()->findByPk($id);
echo TbHtml::buttonDropdown($menuItem->label, $menuItem->getItems(1), array('split' => true));
开发者ID:rizaldi-github,项目名称:yii-menu-module,代码行数:4,代码来源:_TbHtml_buttonDropdownSplit.php


注:本文中的TbHtml::buttonDropdown方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。