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


PHP TbHtml::tag方法代码示例

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


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

示例1: renderButtons

 /**
  * Renders the buttons in this form.
  * @return string the rendering result.
  */
 public function renderButtons()
 {
     $buttons = array();
     foreach ($this->getButtons() as $button) {
         $buttons[] = $this->renderElement($button);
     }
     return !empty($buttons) ? TbHtml::tag('div', array('class' => 'form-actions'), implode("\n", $buttons)) : '';
 }
开发者ID:nicovicz,项目名称:reward-point,代码行数:12,代码来源:TbForm.php

示例2: renderElement

 /**
  * Renders a single element which could be an input element, a sub-form, a string, or a button.
  * @param mixed $element the form element to be rendered.
  * @return string the rendering result
  */
 public function renderElement($element)
 {
     if (is_string($element)) {
         if (($e = $this[$element]) === null && ($e = $this->getButtons()->itemAt($element)) === null) {
             return $element;
         } else {
             $element = $e;
         }
     }
     if ($element->getVisible()) {
         if ($element instanceof CFormInputElement) {
             if ($element->type === 'hidden') {
                 return TbHtml::tag('div', array('class' => 'hidden'), $element->render());
             }
         }
         return $element->render();
     }
     return '';
 }
开发者ID:mfavetti,项目名称:LimeSurvey,代码行数:24,代码来源:TbForm.php

示例3: testTag

 public function testTag()
 {
     $I = $this->codeGuy;
     $html = TbHtml::tag('div', array('textAlign' => TbHtml::TEXT_ALIGN_RIGHT, 'pull' => TbHtml::PULL_RIGHT, 'span' => 3), 'Content');
     $div = $I->createNode($html, 'div');
     $I->seeNodeCssClass($div, 'pull-right span3 text-right');
 }
开发者ID:AlexanderGrant1,项目名称:AC41004,代码行数:7,代码来源:TbHtmlTest.php

示例4: normalizeTabs

 /**
  * Normalizes the tab configuration.
  * @param array $tabs the tab configuration.
  * @param array $panes a reference to the panes array.
  * @param integer $i the running index.
  * @return array the items.
  */
 protected static function normalizeTabs($tabs, &$panes, $i = 0)
 {
     $menuItems = array();
     foreach ($tabs as $tabOptions) {
         if (isset($tabOptions['visible']) && $tabOptions['visible'] === false) {
             continue;
         }
         $menuItem = array();
         $menuItem['icon'] = self::popOption('icon', $tabOptions);
         $menuItem['label'] = self::popOption('label', $tabOptions, '');
         $menuItem['active'] = self::getOption('active', $tabOptions, false);
         $menuItem['disabled'] = self::popOption('disabled', $tabOptions, false);
         $menuItem['itemOptions'] = self::popOption('itemOptions', $tabOptions, array());
         $menuItem['linkOptions'] = self::popOption('linkOptions', $tabOptions, array());
         $items = self::popOption('items', $tabOptions, array());
         if (!empty($items)) {
             $menuItem['linkOptions']['data-toggle'] = 'dropdown';
             $menuItem['items'] = self::normalizeTabs($items, $panes, $i);
         } else {
             $paneOptions = self::popOption('paneOptions', $tabOptions, array());
             $id = $paneOptions['id'] = self::popOption('id', $tabOptions, 'tab_' . ++$i);
             $menuItem['linkOptions']['data-toggle'] = 'tab';
             $menuItem['url'] = '#' . $id;
             $paneOptions = self::addClassName('tab-pane', $paneOptions);
             if (self::popOption('fade', $tabOptions, true)) {
                 $paneOptions = self::addClassName('fade', $paneOptions);
             }
             if (self::popOption('active', $tabOptions, false)) {
                 $paneOptions = self::addClassName('active in', $paneOptions);
             }
             $paneContent = self::popOption('content', $tabOptions, '');
             $panes[] = TbHtml::tag('div', $paneOptions, $paneContent);
         }
         $menuItems[] = $menuItem;
     }
     return $menuItems;
 }
开发者ID:jackycgq,项目名称:advanced,代码行数:44,代码来源:TbHtml.php

示例5: testHybridCol

 public function testHybridCol()
 {
     $I = $this->codeGuy;
     $html = TbHtml::tag('div', array('xs' => 12, 'md' => 8), 'Content');
     $div = $I->createNode($html, 'div');
     $I->seeNodeCssClass($div, array('col-xs-12', 'col-md-8'));
 }
开发者ID:noonnightcoder,项目名称:bakou-pos-apsara,代码行数:7,代码来源:TbHtmlTest.php

示例6: run

    /**
     * Runs the widget.
     */
    public function run()
    {
        list($name, $id) = $this->resolveNameID();
        $this->resolveId($id);
        if ($this->hasModel()) {
            $input = TbHtml::activeFileField($this->model, $this->attribute, $this->htmlOptions);
        } else {
            $input = TbHtml::fileField($name, $this->value, $this->htmlOptions);
        }
        echo TbHtml::tag('span', $this->buttonOptions, $this->label . ' ' . $input);
        if ($this->assetPath !== false) {
            $this->publishAssets($this->assetPath);
            $this->registerCssFile('css/jquery.fileupload-ui.css');
            if ($this->registerJs) {
                $this->getClientScript()->registerCoreScript('jquery');
                $this->registerScriptFile('js/vendor/jquery.ui.widget.js', CClientScript::POS_END);
                $this->registerScriptFile('js/jquery.iframe-transport.js', CClientScript::POS_END);
                $this->registerScriptFile('js/jquery.fileupload.js', CClientScript::POS_END);
            }
        }
        if ($this->bindPlugin) {
            TbArray::defaultValue('dataType', 'json', $this->pluginOptions);
            $options = !empty($this->pluginOptions) ? CJavaScript::encode($this->pluginOptions) : '';
            $script = <<<EOD
jQuery('#{$id}')
    .fileupload({$options})
    .prop('disabled', !jQuery.support.fileInput)
    .parent().addClass(jQuery.support.fileInput ? undefined : 'disabled');
EOD;
            $this->getClientScript()->registerScript(__CLASS__ . '#' . $id, $script);
        }
    }
开发者ID:juanprua,项目名称:yiistrap-widgets,代码行数:35,代码来源:TbFileUpload.php

示例7: actionEditorSubzona

 public function actionEditorSubzona($EventoId, $FuncionesId, $ZonasId, $SubzonaId, $modo = 'completo')
 {
     // Muestra un editor de lugares ordenados por filas de una subzona dada
     $subzona = Subzona::model()->findByPk(compact('EventoId', 'FuncionesId', 'ZonasId', 'SubzonaId'));
     if (is_object($subzona)) {
         //
         if ($modo == "completo") {
             // Se renderiza toda la pagina del editor
             $this->render('editorSubzona', compact('subzona'));
         } else {
             //Sino solo se renderiza parcialmente la tabla con los lugares actualizados
             $this->renderPartial('_subzona', compact('subzona'));
         }
     } else {
         echo TbHtml::tag('strong', array(), 'No se encontraron subzonas.');
     }
     //throw new Exception("Error al procesar su petición, vefique integridad de parametros ", 3);
 }
开发者ID:cicb,项目名称:tpc,代码行数:18,代码来源:DistribucionesController.php

示例8: foreach

    <?php
echo TbHtml::blockAlert(TbHtml::ALERT_COLOR_WARNING, 'No completar los tipos de práctica que no se van a analizar.');
  $i=1; 
          
    foreach ($tiposdepractica as $tp){  

        $valor="";
        $cantidad="";
        
        echo "<div class='control-group'>";
        echo TbHtml::tag("span", array('class' => 'control-label'),$tp->nombre);
        echo "<div class='controls'>";  
        echo TbHtml::textField(get_class($model)."[$i][valor]",array('value'=>$valor),array( 'style' => 'width:50px','prepend' => '$')); 
       // echo TbHtml::labelTb('Cada', array('style' => 'display:inline;margin:0 0 0 10px;'));
        echo TbHtml::textField(get_class($model)."[$i][cadaxprac]",array('value'=>$cantidad),array( 'style' => 'width:50px;','prepend' => 'Cada','append' => 'prácticas', 'span' => 2));
        //echo TbHtml::labelTb('prácticas', array('style' => 'display:inline;'));
        echo "</div></div>"; 
        $i++;
    }

   // Envío el id del tipo de coseguro a descontar
   //echo TbHtml::hiddenField("Descuentocoseguro['iddescuentocoseguro']",$model->iddescuentocoseguro);
    
   
 ?>
开发者ID:juankie,项目名称:gestcb9git,代码行数:25,代码来源:_form_valores2.php

示例9: run

 /**
  * Runs the widget.
  */
 public function run()
 {
     $brand = $this->brandLabel !== false ? TbHtml::navbarBrandLink($this->brandLabel, $this->brandUrl, $this->brandOptions) : '';
     ob_start();
     foreach ($this->items as $item) {
         if (is_string($item)) {
             echo $item;
         } else {
             $widgetClassName = TbArray::popValue('class', $item);
             if ($widgetClassName !== null) {
                 $this->controller->widget($widgetClassName, $item);
             }
         }
     }
     $items = ob_get_clean();
     ob_start();
     if ($this->collapse !== false) {
         TbHtml::addCssClass('navbar-collapse', $this->collapseOptions);
         ob_start();
         /* @var TbCollapse $collapseWidget */
         $collapseWidget = $this->controller->widget('\\TbCollapse', array('toggle' => false, 'content' => $items, 'htmlOptions' => $this->collapseOptions));
         $collapseContent = ob_get_clean();
         echo TbHtml::tag('div', array('class' => 'navbar-header'), TbHtml::navbarCollapseLink('#' . $collapseWidget->getId()) . $brand);
         echo $collapseContent;
     } else {
         echo TbHtml::tag('div', array('class' => 'navbar-header'), $brand);
         echo $items;
     }
     $containerContent = ob_get_clean();
     $containerOptions = TbArray::popValue('containerOptions', $this->htmlOptions, array());
     TbHtml::addCssClass($this->fluid ? 'container-fluid' : 'container', $containerOptions);
     ob_start();
     echo TbHtml::openTag('div', $containerOptions);
     echo $containerContent;
     echo '</div>';
     $content = ob_get_clean();
     echo TbHtml::navbar($content, $this->htmlOptions);
 }
开发者ID:mfavetti,项目名称:LimeSurvey,代码行数:41,代码来源:TbNavbar.php

示例10: array

<?php

$status = $model->ZonasBanVen;
$zid = $model->ZonasId;
$fid = $model->FuncionesId;
$eid = $model->EventoId;
$pid = $model->PuntosventaId;
$padre = $model->puntoventa->tipoid == 0;
$nombre = $model->puntoventa->PuntosventaNom;
echo CHtml::openTag('li', array('id' => "nodo-{$zid}-{$pid}", 'class' => 'nodo ', 'style' => 'border-top:1px dashed #888;'));
//LI NODO
$mas = "";
if (isset($padre) and $padre) {
    # Si tiene hijos muestra el boton de +
    $mas = TbHtml::link(' ', array('distribuciones/verRamaCargo', 'EventoId' => $eid, 'FuncionesId' => $fid, 'ZonasId' => $zid, 'PuntosventaId' => $pid), array('class' => 'nodo-toggle fa fa-plus-square', 'id' => "link-{$zid}-" . $pid, 'data-uid' => "{$zid}-{$pid}", 'data-estado' => 'inicial', 'style' => 'margin:5px'));
}
echo CHtml::openTag('div', array('
				class' => 'text-left', 'style' => 'width:100%;'));
echo TbHtml::textField("ZonasFacCarSer-{$zid}-{$pid}", $model->ZonasFacCarSer, array('class' => 'input-mini text-center ZonasFacCarSer', 'data-zid' => $zid, 'data-pid' => $pid, 'prepend' => $mas, 'append' => $nombre . ' '));
echo CHtml::closeTag('div');
echo TbHtml::tag('div', array('id' => "hijos-{$zid}-{$pid}", ''));
echo CHtml::closeTag('li');
开发者ID:cicb,项目名称:tpc,代码行数:22,代码来源:_nodoCargo.php

示例11: array

    //$usrval->UsrValRef2='funciones.FuncionesId';
    $usrval->usrValIdRef2 = 'TODAS';
    $this->widget('bootstrap.widgets.TbGridView', array('id' => 'usrval-grid', 'dataProvider' => $usrval->search(), 'template' => "{items}\n{pager}", 'type' => 'striped hover', 'columns' => array(array('header' => 'Evento', 'value' => 'coalesce(@$data->evento->EventoNom,$data->usrValIdRef)'), array('header' => 'Funcion', 'value' => 'coalesce(@$data->funcion->funcionesTexto,$data->usrValIdRef2)'), array('class' => 'CButtonColumn', 'header' => '', 'template' => ' {eliminar} {permisos} ', 'buttons' => array('eliminar' => array('label' => '<span class="text-error fa fa-times-circle"> Quitar</span>', 'url' => 'Yii::app()->createUrl("usuarios/desasignarEvento",array(
													"id"=>$data->UsuarioId,
													"evento"=>$data->usrValIdRef,
													"nick"=>"' . $model->UsuariosNick . '",
													"funcion"=>$data->usrValIdRef2))', 'click' => 'function(event){
													$.get( $(this).attr("href")).done( function(){ $.fn.yiiGridView.update("usrval-grid"); });
													event.preventDefault(); }'), 'permisos' => array('label' => TbHtml::button('Reportes', array('class' => 'btn btn-info', 'data-toggle' => 'modal', 'data-target' => '#modal-permisos-reportes'))))))));
    ?>
		</div><!-- asignacion de eventos-->
<?php 
    $asignadosHtml = TbHtml::openTag('div', array('class' => 'text-center'));
    $asignadosHtml .= TbHtml::dropDownList('eventos_asignados', 0, CHtml::listData($model->getEventosAsignados(), 'EventoId', 'EventoNom'), array('class' => 'span3 ', 'empty' => 'SELECCIONE UN EVENTO'));
    $asignadosHtml .= "<br/><br/>";
    $asignadosHtml .= TbHtml::tag('table', array('id' => 'tabla-reportes'), '');
    $asignadosHtml .= TbHtml::closeTag('div');
    $this->widget('bootstrap.widgets.TbModal', array('id' => 'modal-permisos-reportes', 'header' => 'Reportes permitidos', 'htmlOptions' => array('class' => 'text-center'), 'content' => $asignadosHtml, 'footer' => TbHtml::button('Cerrar', array('data-dismiss' => 'modal'))));
    ?>



<br />
<?php 
    $this->widget('bootstrap.widgets.TbModal', array('id' => 'conModal', 'header' => 'Cambio de contraseña', 'content' => $this->renderPartial('_cambioContrasena', array('model' => $model), true, true), 'footer' => implode(' ', array(CHtml::ajaxSubmitButton('Confirmar', Yii::app()->createUrl('usuarios/cambiarClave', array('id' => $model->UsuariosId, 'nick' => $model->UsuariosNick)), array('type' => 'POST', 'data' => 'js:{up: $("#up").val() }', 'success' => 'js:function(string){ $("#formulario").html(string);
													$("#btn-cambiar-clave").attr("data-dismiss","modal");
													$("#btn-cambiar-clave").val("Continuar...");
						 }'), array('class' => 'btn btn-primary ', 'disabled' => true, 'data-dismiss' => false, 'id' => 'btn-cambiar-clave')), TbHtml::button('Cerrar', array('data-dismiss' => 'modal'))))));
    ?>

开发者ID:cicb,项目名称:tpc,代码行数:29,代码来源:form.php

示例12: array

<?php

echo CHtml::openTag('div', array('id' => 'zona-' . $model->ZonasId));
?>
	<div class="row-fluid" style="display:block; margin-bottom:10px" >

<?php 
echo $editar ? TbHtml::link(' ', $this->createUrl('eliminarZona'), array('data-zid' => $model->ZonasId, 'class' => 'btn-eliminar-zona btn btn-danger fa fa-2x fa-minus-circle pull-left', 'title' => 'Eliminar Zona ' . $model->ZonasId)) : "";
echo TbHtml::tag('span', array('class' => 'panel-head '), "Zona " . $model->ZonasNum . ":" . $model->ZonasId);
?>
	</div>
<table class="table table-condensed ">
	<tr class="gris-head">
		<th>Tipo de acceso</th>
		<th>Nombre de zona</th>
		<th>Subzonas</th>
		<th>Num. Asientos</th>
		<th>Precio</th>
		<th>Acciones</th>
		<th>Cargo por servicio</th>
	</tr>
	<tr>
	    <td>
	    	<?php 
echo CHtml::dropDownList('ZonasTipo', $model->ZonasTipo, array(1 => 'General', 2 => 'Numerada'), array('class' => 'ZonasTipo', 'disabled' => !$editar, 'id' => 'ZonasTipo-' . $model->ZonasId, 'data-id' => $model->ZonasId));
?>
	    </td>
		<td>
<?php 
echo TbHtml::textField('ZonasAli', $model->ZonasAli, array('class' => 'input-medium ZonasAli', 'data-id' => $model->ZonasId));
?>
开发者ID:cicb,项目名称:tpc,代码行数:31,代码来源:_zona.php

示例13: array

echo TbHtml::link(' Regresar', array('editor', 'EventoId' => $model->EventoId, 'FuncionesId' => $model->FuncionesId, 'scenario' => 'editar', '#' => 'zona-' . $model->ZonasId), array('class' => 'btn fa fa-arrow-left', 'style' => 'margin:10px'));
echo TbHtml::buttonGroup(array(array('id' => 'btn-agregar-fila', 'label' => ' Agregar fila', 'class' => 'fa fa-plus btn btn-success', 'url' => array('agregarFila', 'EventoId' => $model->EventoId, 'FuncionesId' => $model->FuncionesId, 'ZonasId' => $model->ZonasId), 'title' => 'Agregar una Fila'), array('label' => ' Generar asientos', 'class' => 'fa fa-delicious btn-primary', 'id' => 'btn-generar-numerados', 'url' => array('generarNumerados', 'EventoId' => $model->EventoId, 'FuncionesId' => $model->FuncionesId, 'ZonasId' => $model->ZonasId), 'title' => 'Generar todos los Asientos')));
?>
<br />
<br />
</div>
<div class='row-fluid '>
<table border="0" class="table items table-bordered table-hover" id="tabla-filas">
	<tr>
		<th>#</th>
		<th></th>
		<th>No. Fila</th>
		<?php 
for ($i = 0; $i < $model->ZonasCantSubZon; $i++) {
    echo TbHtml::tag('th', array('colspan' => 2), "Subzona " . ($i + 1));
    echo TbHtml::tag('th', array(), "Ctd.");
}
?>
		<th>Total</th>
	</tr>
<?php 
//for ($i=1;$i<=($model->nfilas);$i++) {
foreach ($model->disfilas as $fila) {
    $this->actionVerFila($model->EventoId, $model->FuncionesId, $model->ZonasId, $fila->FilasId);
}
?>

</table>


</div>
开发者ID:cicb,项目名称:tpc,代码行数:31,代码来源:editorFilas.php

示例14: foreach

<?php 
echo TbHtml::openTag('tr');
foreach ($asientos as $asiento) {
    //Por cada Asiento
    echo TbHtml::tag('td', array(), $asiento->LugaresLug);
}
echo TbHtml::closeTag('tr');
开发者ID:cicb,项目名称:tpc,代码行数:7,代码来源:_filaAsiento.php

示例15: array

<?php

$fid = $model->FilasId;
$sid = $model->SubzonaId;
$zid = $model->ZonasId;
echo TbHtml::tag('td', array(), TbHtml::textField('LugaresIni', $model->LugaresIni, array('class' => 'input-mini text-center pull-right LugaresIni limite ', 'data-fid' => $fid, 'data-sid' => $sid, 'data-zid' => $zid, 'id' => "LugaresIni-{$sid}-{$fid}")));
echo TbHtml::tag('td', array(), TbHtml::textField('LugaresFin', $model->LugaresFin, array('class' => 'input-mini text-center pull-left LugaresFin limite ', 'data-fid' => $fid, 'data-sid' => $sid, 'data-zid' => $zid, 'id' => "LugaresFin-{$sid}-{$fid}")));
echo TbHtml::tag('td', array(), TbHtml::textField('FilasCanLug', $model->FilasCanLug, array('class' => 'input-mini text-center pull-left FilasCanLug ', 'data-fid' => $fid, 'data-sid' => $sid, 'data-zid' => $zid, 'id' => "FilasCanLug-{$sid}-{$fid}", 'readonly' => true, 'disabled' => true)));
开发者ID:cicb,项目名称:tpc,代码行数:8,代码来源:_fila.php


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