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


PHP TbHtml::icon方法代码示例

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


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

示例1: renderField

    /**
     * Renders the input file field
     */
    public function renderField()
    {
        list($name, $id) = $this->resolveNameID();
        TbArray::defaultValue('id', $id, $this->htmlOptions);
        TbArray::defaultValue('name', $name, $this->htmlOptions);
        echo CHtml::openTag('div', $this->htmlOptions);
        echo CHtml::openTag('div', array('class' => 'input-prepend bfh-timepicker-toggle', 'data-toggle' => 'bfh-timepicker'));
        echo CHtml::tag('span', array('class' => 'add-on'), TbHtml::icon(TbHtml::ICON_TIME));
        if ($this->hasModel()) {
            echo CHtml::activeTextField($this->model, $this->attribute, $this->inputOptions);
        } else {
            echo CHtml::textField($name, $this->value, $this->inputOptions);
        }
        echo CHtml::closeTag('div');
        echo '<div class="bfh-timepicker-popover">
				<table class="table">
				<tbody>
					<tr>
						<td class="hour">
						<a class="next" href="#"><i class="icon-chevron-up"></i></a><br>
						<input type="text" class="input-mini" readonly><br>
						<a class="previous" href="#"><i class="icon-chevron-down"></i></a>
						</td>
						<td class="separator">:</td>
						<td class="minute">
						<a class="next" href="#"><i class="icon-chevron-up"></i></a><br>
						<input type="text" class="input-mini" readonly><br>
						<a class="previous" href="#"><i class="icon-chevron-down"></i></a>
						</td>
					</tr>
				</tbody>
				</table>
			</div>';
        echo CHtml::closeTag('div');
    }
开发者ID:2amigos,项目名称:yiiwheels,代码行数:38,代码来源:WhTimePickerHelper.php

示例2: helpBlock

 /**
  * Generates a nicely formatted help block, useful to explain what a form or 
  * a page does. Nothing is rendered if the "showHelpBlocks" setting is set 
  * to false.
  * @param string $content the block content
  * @return string the HTML for the help block
  */
 public static function helpBlock($content)
 {
     if (!Setting::getBoolean('showHelpBlocks')) {
         return;
     }
     $output = CHtml::openTag('p', array('class' => 'form-help'));
     $output .= TbHtml::icon(TbHtml::ICON_EXCLAMATION_SIGN);
     $output .= $content;
     $output .= CHtml::closeTag('p');
     return $output;
 }
开发者ID:pweisenburger,项目名称:xbmc-video-server,代码行数:18,代码来源:FormHelper.php

示例3: run

 /**
  * Runs the widget
  */
 public function run()
 {
     // Don't render links for spectators
     if (Yii::app()->user->role === User::ROLE_SPECTATOR) {
         return;
     }
     if (!$this->checkLinks()) {
         echo CHtml::tag('p', array('class' => 'missing-video-file'), TbHtml::icon(TBHtml::ICON_WARNING_SIGN) . Yii::t('RetrieveMediaWidget', 'The file(s) for this item is not available'));
         return;
     }
     $this->renderForm();
 }
开发者ID:pweisenburger,项目名称:xbmc-video-server,代码行数:15,代码来源:RetrieveMediaWidget.php

示例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)
 {
     /* @var $am CAuthManager|AuthBehavior */
     $am = Yii::app()->getAuthManager();
     if ($am->hasParent($this->itemName, $data['name'])) {
         echo TbHtml::linkButton(TbHtml::icon(TbHtml::ICON_REMOVE), array('color' => TbHtml::BUTTON_COLOR_LINK, 'size' => TbHtml::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 TbHtml::linkButton(TbHtml::icon(TbHtml::ICON_REMOVE), array('color' => TbHtml::BUTTON_COLOR_LINK, 'size' => TbHtml::BUTTON_SIZE_MINI, 'url' => array('removeChild', 'itemName' => $this->itemName, 'childName' => $data['name']), 'rel' => 'tooltip', 'title' => Yii::t('AuthModule.main', 'Remove')));
         }
     }
 }
开发者ID:ivko,项目名称:yii-auth,代码行数:17,代码来源:AuthItemRemoveColumn.php

示例5: getDataCellContent

 /**
  * {@inheritDoc}
  * @see CGridColumn::getDataCellContent()
  */
 public function getDataCellContent($row)
 {
     $data = $this->grid->dataProvider->data[$row];
     if (is_bool($this->value)) {
         $value = $this->value;
     } elseif (is_string($this->value)) {
         $value = (bool) $this->evaluateExpression($this->value, array('data' => $data, 'row' => $row));
     } else {
         $value = is_scalar($data) && (bool) $data;
     }
     if ($value) {
         return CHtml::tag('span', array('style' => 'color:green;'), TbHtml::icon('ok'));
     } else {
         return CHtml::tag('span', array('style' => 'color:red;'), TbHtml::icon('remove'));
     }
 }
开发者ID:anastaszor,项目名称:yiipluggable,代码行数:20,代码来源:PBooleanColumn.php

示例6: run

 /**
  * Runs the widget.
  */
 public function run()
 {
     // todo: consider adding control property for displaying breadcrumbs even when empty.
     if (!empty($this->links)) {
         $links = array();
         if ($this->homeLabel !== false) {
             $label = $this->homeLabel !== null ? $this->homeLabel : TbHtml::icon('home');
             $links[$label] = $this->homeUrl !== null ? $this->homeUrl : Yii::app()->homeUrl;
         }
         foreach ($this->links as $label => $url) {
             if (is_string($label) || is_array($url)) {
                 if ($this->encodeLabel) {
                     $label = CHtml::encode($label);
                 }
                 $links[$label] = $url;
             } else {
                 $links[] = $this->encodeLabel ? CHtml::encode($url) : $url;
             }
         }
         echo TbHtml::breadcrumbs($links, $this->htmlOptions);
     }
 }
开发者ID:ShuiMuQinHua,项目名称:yiishop,代码行数:25,代码来源:TbBreadcrumb.php

示例7: renderField

    /**
     * Renders the input file field
     */
    public function renderField()
    {
        list($name, $id) = $this->resolveNameID();
        TbArray::defaultValue('id', $id, $this->htmlOptions);
        TbArray::defaultValue('name', $name, $this->htmlOptions);
        echo CHtml::openTag('div', $this->htmlOptions);
        echo CHtml::openTag('div', array('class' => 'input-prepend bfh-datepicker-toggle', 'data-toggle' => 'bfh-datepicker'));
        echo CHtml::tag('span', array('class' => 'add-on'), TbHtml::icon(TbHtml::ICON_CALENDAR));
        if ($this->hasModel()) {
            echo CHtml::activeTextField($this->model, $this->attribute, $this->inputOptions);
        } else {
            echo CHtml::textField($name, $this->value, $this->inputOptions);
        }
        echo CHtml::closeTag('div');
        echo '<div class="bfh-datepicker-calendar">
				<table class="calendar table table-bordered">
					<thead>
						<tr class="months-header">
							<th class="month" colspan="4">
							<a class="previous" href="#"><i class="icon-chevron-left"></i></a>
							<span></span>
							<a class="next" href="#"><i class="icon-chevron-right"></i></a>
						</th>
						<th class="year" colspan="3">
							<a class="previous" href="#"><i class="icon-chevron-left"></i></a>
							<span></span>
							<a class="next" href="#"><i class="icon-chevron-right"></i></a>
						</th>
						</tr>
						<tr class="days-header">
						</tr>
					</thead>
					<tbody>
					</tbody>
				</table>
			</div>';
        echo CHtml::closeTag('div');
    }
开发者ID:nicovicz,项目名称:reward-point,代码行数:41,代码来源:WhDatePickerHelper.php

示例8: 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 = TbArray::popValue('url', $button);
     if ($url !== '#') {
         $url = $this->evaluateExpression($url, array('data' => $data, 'row' => $row));
     }
     $imageUrl = TbArray::popValue('imageUrl', $button, false);
     $label = TbArray::popValue('label', $button, $id);
     $options = TbArray::popValue('options', $button, array());
     TbArray::defaultValue('title', $label, $options);
     TbArray::defaultValue('rel', 'tooltip', $options);
     if ($icon = TbArray::popValue('icon', $button, false)) {
         echo CHtml::link(TbHtml::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);
         }
     }
 }
开发者ID:optimosolution,项目名称:jasorbd,代码行数:31,代码来源:TbButtonColumn.php

示例9: implode

:</strong><br />
                <?php 
    echo implode(', ', array_values(CHtml::listData($data->positions, 'id', 'name')));
    ?>
            <?php 
}
?>
            </td>
            <td style="text-align: right;">
                <?php 
echo CHtml::link(TbHtml::icon(TbHtml::ICON_EYE_OPEN), array("profiles/view", 'id' => $data->id));
if (Yii::app()->user->checkAccess(User::ROLE_MANAGER) || Yii::app()->user->checkAccess(User::ROLE_VOLONT) && $data->recruiter_id == Yii::app()->user->id) {
    echo " | " . CHtml::link(TbHtml::icon(TbHtml::ICON_EDIT), array("profiles/update", 'id' => $data->id));
}
if (Yii::app()->user->checkAccess(User::ROLE_MANAGER)) {
    echo " | " . CHtml::link(TbHtml::icon(TbHtml::ICON_REMOVE), "#", array('submit' => array('profiles/delete', 'id' => $data->id), 'confirm' => 'Ви впевнені, що хочете видалити цей запис?'));
}
?>
                <div class="to_export">
                <?php 
echo CHtml::label('Експорт анкети', 'export_' . $data->id);
echo CHtml::checkBox('toExport[]', in_array($data->id, $this->toExport), array('value' => $data->id, 'class' => 'toExport', 'id' => 'export_' . $data->id));
?>
                </div>
            </td>
        </tr>
        <tr class="additional <?php 
echo $index % 2 ? 'odd' : 'even';
?>
">
            <td colspan="2">
开发者ID:vorobeyme,项目名称:portal,代码行数:31,代码来源:_list.php

示例10: renderDataCellContent

 /**
  * Renders the data cell content.
  * This method renders the view, update and toggle buttons in the data cell.
  * @param integer $row the row number (zero-based)
  * @param mixed $data the data associated with the row
  */
 protected function renderDataCellContent($row, $data)
 {
     $checked = CHtml::value($data, $this->name);
     $toggleOptions = $this->toggleOptions;
     $toggleOptions['icon'] = $checked === null ? $this->emptyIcon : ($checked ? $this->checkedIcon : $this->uncheckedIcon);
     $toggleOptions['url'] = isset($toggleOptions['url']) ? $this->evaluateExpression($toggleOptions['url'], array('data' => $data, 'row' => $row)) : '#';
     if (!$this->displayText) {
         $htmlOptions = TbArray::getValue('htmlOptions', $this->toggleOptions, array());
         $htmlOptions['title'] = $this->getButtonLabel($checked);
         $htmlOptions['rel'] = 'tooltip';
         echo CHtml::link(TbHtml::icon($toggleOptions['icon']), $toggleOptions['url'], $htmlOptions);
     } else {
         echo TbHtml::button($this->getButtonLabel($checked), $toggleOptions);
     }
 }
开发者ID:nicovicz,项目名称:reward-point,代码行数:21,代码来源:WhToggleColumn.php

示例11: array

        'allowClear' => true,
        'placeholder' => 'Buscar',
        'onclick' => 'js:{var codigocarga=this.value;'
        . 'procesa(codigocarga);'
        . '$("#cargapractica").val("").trigger("change");'
        . '}',
    ),
));

}
echo "</div>";
?>
<div style="clear: both;margin-top:15px;"></div>
<?php
// grilla form practicas 
$i = 0;
$columnas =6;
$filas = 4;
for ($f = 1; $f <= $filas; $f++) {
    echo "<div class='control-group centrado'>";
    for ($col = 1; $col <= $columnas; $col++) {
        echo TbHtml::badge(str_pad($i + 1, 2, "0", STR_PAD_LEFT), array('color' => TbHtml::BADGE_COLOR_WARNING, 'style' => 'margin-left:10px;'));
        echo Tbhtml::textField("codigocarga[$i]", $codigocarga[$i], array("style" => 'width:50px;', 'disabled' => true, 'class' => $i . ' ' . 'practicas', 'rel' => $i));
      if ($accion=='carga'){  echo $form->hiddenField($models_practicas[$i], "[$i]idpractica");}
        echo TbHtml::icon(TbHtml::ICON_REMOVE, array('rel' => $i));
        $i++;
    }
    echo "</div>";
}
echo "</div>";
开发者ID:juankie,项目名称:gestcb9git,代码行数:30,代码来源:_grillapracticas.php

示例12: array

<?php

/**
 * @var $dataProvider CDataProvider
 * @var $this VacanciesController
 */
$this->menu = array(array('label' => Yii::t('main', 'vacancy.create.link'), 'url' => array('create_vacancy')));
$this->widget('bootstrap.widgets.TbGridView', ['dataProvider' => $dataProvider, 'filter' => null, 'columns' => ['id', 'name', ['class' => CDataColumn::class, 'value' => function (Vacancy $object) {
    return $object->user->first_name . " " . $object->user->phone;
}, 'header' => Yii::t('main', 'vacancy.label.user')], 'city.city_name', 'close_time:date', ['class' => CDataColumn::class, 'value' => function (Vacancy $vacancy) {
    return VacancyHelper::statusName($vacancy);
}, 'header' => Yii::t('main', 'vacancy.label.status')], ['class' => CDataColumn::class, 'value' => function (Vacancy $object) {
    return CHtml::link(TbHtml::icon(TbHtml::ICON_EDIT), ["update_vacancy", 'id' => $object->id]);
}, 'type' => 'raw']]]);
开发者ID:asopin,项目名称:portal,代码行数:14,代码来源:index.php

示例13: array

<?php

/* @var $this BackendController */
/* @var $model Backend */
$this->pageTitle = $title = Yii::t('Backend', 'Manage backends');
?>

<h2><?php 
echo $title;
?>
</h2>

<?php 
echo FormHelper::helpBlock(Yii::t('Backend', 'This is where you configure your backends. A 
	backend is an instance of XBMC that the application connects to and serves 
	library contents from. If you specify more than one backend, a new item 
	will appear in the main menu, allowing you to easily switch backends.'));
?>

<?php 
echo TbHtml::linkButton(Yii::t('Backend', 'Create new backend'), array('color' => TbHtml::BUTTON_COLOR_PRIMARY, 'url' => array('create')));
?>

<hr />

<?php 
$this->widget('bootstrap.widgets.TbGridView', array('type' => TbHtml::GRID_TYPE_STRIPED, 'dataProvider' => Backend::model()->dataProvider, 'enableSorting' => false, 'template' => '{items}', 'columns' => array('name', 'hostname', 'port', 'tcp_port', array('name' => 'default', 'header' => Yii::t('Backend', 'Default'), 'type' => 'raw', 'value' => function ($data) {
    return $data->default ? TbHtml::icon(TbHtml::ICON_OK) : '';
}), 'macAddress', 'subnetMask', array('class' => 'bootstrap.widgets.TbButtonColumn', 'template' => '{update} {delete}'))));
开发者ID:Tebro,项目名称:xbmc-video-server,代码行数:29,代码来源:admin.php

示例14: array

//     echo TbHtml::labelTb('Seleccionar Prácticas', array('color' => TbHtml::LABEL_COLOR_WARNING, 'style' => 'margin:20px 0 20px ;font-size:13px;padding:5px;'));
   
     
     echo TbHtml::checkBox('marcatodas', '', array(
    'label' => TbHtml::labelTb('Seleccionar todas las  Prácticas', array('color' => TbHtml::LABEL_COLOR_INFO, 'style' => 'font-size:13px;padding:7px;margin-left: -17px;',)),
    'style'=>'float:right;margin-right:427px',
     )); 
     echo TbHtml::button('Borrar Selección', array('color' => TbHtml::BUTTON_COLOR_DANGER,
      'onclick'=>'js:$("#marcatodas").prop("checked",false);$("#rango").empty();',
      'style'=>'float:right;',
      )); 
    
    echo TbHtml::labelTb("Selecccionar rango de Prácticas",array('color' => TbHtml::LABEL_COLOR_INFO, 'style' => 'font-size:13px;padding:7px;margin: 36px 11px 0 2px ;'));
 
     
     echo TbHtml::ajaxLink(TbHtml::icon(TbHtml::ICON_PLUS), 
            // $url 
          array('Practica/Selectrango'),
             
          // array $ajaxoptions   
           array(   
                'data' => 'js:($("select#idnomenclador").val()) &&($(".tipopract:checked").serialize()+ "&idnomenclador=" + $("select#idnomenclador").val())',
                'type' => 'GET',
                'dataType' => 'html',
            //                     'data' => 'js:"nomenclador=" + $("select#idnomenclador option:selected").text()',
                'url' => CController::createUrl('Practica/selectrango'), //url to call.
            //                    'update' => "#rango",   
                'success' => 'js:function(data){$("#rango").append(data)}'
                    )
       );    
  ?>
开发者ID:juankie,项目名称:gestcb9git,代码行数:31,代码来源:_form_arma_nomenclador.php

示例15:

?>
 <small>ICON_WRENCH</small></li>
        <li><?php 
echo TbHtml::icon(TbHtml::ICON_TASKS);
?>
 <small>ICON_TASKS</small></li>
        <li><?php 
echo TbHtml::icon(TbHtml::ICON_FILTER);
?>
 <small>ICON_FILTER</small></li>
        <li><?php 
echo TbHtml::icon(TbHtml::ICON_BRIEFCASE);
?>
 <small>ICON_BRIEFCASE</small></li>
        <li><?php 
echo TbHtml::icon(TbHtml::ICON_FULLSCREEN);
?>
 <small>ICON_FULLSCREEN</small></li>
    </ul>

    <hr class="bs-docs-separator">

    <h2>How to use</h2>

    <pre class="prettyprint linenums">
&lt;?php echo TbHtml::icon(TbHtml::ICON_GLASS); ?></pre>

    <hr class="bs-docs-separator">

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


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