badge() public static method

Generates a badge span.
public static badge ( string $label, array $htmlOptions = [] ) : string
$label string the badge text.
$htmlOptions array additional HTML attributes.
return string the generated span.
Exemplo n.º 1
0
			<td>
				<?php 
echo TbHtml::badge('8', array('style' => TbHtml::STYLE_INFO));
?>
			</td>
			<td>
				<code>&lt;?php echo TbHtml::badge('8', array('style'=>TbHtml::STYLE_INFO)); ?></code>
			</td>
		</tr>
		<tr>
			<td>
				Inverse
			</td>
			<td>
				<?php 
echo TbHtml::badge('10', array('style' => TbHtml::STYLE_INVERSE));
?>
			</td>
			<td>
				<code>&lt;?php echo TbHtml::badge('10', array('style'=>TbHtml::STYLE_INVERSE)); ?></code>
			</td>
		</tr>
		</tbody>
	</table>

</section>

<!-- Typographic components
	================================================== -->
<section id="typography">
Exemplo n.º 2
0
            'dataType' => 'html',
            'url' => CController::createUrl('carga/'.$accion), //url to call.
            'success'=> 'js:function(data){$("#form2").html(data);'
                    . '$("html, body").scrollTop(300); $(".carga_matricula").select2("open");return false;}',
        ),
        'prompt' => 'Seleccionar',  
        
    ));
foreach( CHtml::listData(Prestaciontipo::model()->findAll(array('order' => 'nombre')), 'idprestaciontipo', 'nombrecompuesto') as $key=>$value)echo $value ."&nbsp;&nbsp;&nbsp;";
}



if ($model->mostrarCampo('periodofacturacion')){
    $model->periodofacturacion=Parametro::model()->getParametro('PERIODOCARGA', 'CARGA')->valoralfanumerico;
    echo TbHtml::badge('Periodo '.$model->periodofacturacion, array('color' => TbHtml::BADGE_COLOR_SUCCESS,'style'=>'padding:8px;margin-left:60px;'));
    echo CHtml::hiddenField('Carga[periodofacturacion]',$model->periodofacturacion);
} 
?>











Exemplo n.º 3
0

echo TbHtml::Button(Yii::t('app', 'Save'), array(
    'color' => TbHtml::BUTTON_COLOR_PRIMARY,
    'size' => TbHtml::BUTTON_SIZE_SMALL,
    'style' => 'margin-left:30px;',
    'id'=>'guardar1',
));
echo TbHtml::Button(Yii::t('app', 'Cancel'), array(
    'submit' => array('/site/index'),
    'style' => 'margin-left:30px;',
    'color' => TbHtml::BUTTON_COLOR_DANGER,
    'size' => TbHtml::BUTTON_SIZE_SMALL,
));

  
$ayuda="<p>(*) Graba </p><p>(Enter) Avanza </p><p> (-) Retrocede</p>"  ;
$ayuda= "<p>".TbHtml::badge('Enter', array('color' => TbHtml::BADGE_COLOR_SUCCESS,'style'=>'margin-right:5px;'))."Avanza</p>";
$ayuda.= "<p>".TbHtml::badge('-', array('color' => TbHtml::BADGE_COLOR_IMPORTANT,'style'=>'margin-right:32px;'))."Retrocede</p>";
$ayuda.= "<p>".TbHtml::badge('*', array('color' => TbHtml::BADGE_COLOR_INFO,'style'=>'margin-right:32px;'))."Guarda</p>";

echo TbHtml::popover("Ayuda","Uso del Teclado",$ayuda,array('onclick'=>'return false','style' => 'margin-left:30px;',
'class' => 'btn  btn-success'));


     


?>
</div>
Exemplo n.º 4
0
         <td>
            <?php 
echo TbHtml::badge('8', array('color' => TbHtml::BADGE_COLOR_INFO));
?>
         </td>
         <td>
            <code>&lt;?php echo TbHtml::badge('8', array('color' =>  TbHtml::BADGE_COLOR_INFO)); ?></code>
         </td>
      </tr>
      <tr>
         <td>
            Inverse
         </td>
         <td>
            <?php 
echo TbHtml::badge('10', array('color' => TbHtml::BADGE_COLOR_INVERSE));
?>
         </td>
         <td>
            <code>&lt;?php echo TbHtml::badge('10', array('color' =>  TbHtml::BADGE_COLOR_INVERSE)); ?></code>
         </td>
      </tr>
      </tbody>
   </table>

</section>

<!-- Typography
   ================================================== -->
<section id="typography">
Exemplo n.º 5
0
 public function testBadge()
 {
     $I = $this->codeGuy;
     $html = TbHtml::badge('Badge text', array('color' => TbHtml::BADGE_COLOR_WARNING, 'class' => 'span'));
     $span = $I->createNode($html, 'span.badge');
     $I->seeNodeCssClass($span, 'badge-warning span');
     $I->seeNodeText($span, 'Badge text');
 }
Exemplo n.º 6
0
<legend>Seleccione los ítems para la carga</legend>  

<fieldset>
  
    <?php
    $i = 0;
    foreach ($model_campos_carga->attributes as $key => $value) {
    if ($model_campos_carga->getMetaData()->columns[$key]->comment != "INTERNO") {

        echo "<div class='control-group'>";
        echo "<span class='control-label' style='width:170px;' >";
        echo TbHtml::badge($i + 1, array('color' => TbHtml::BADGE_COLOR_INVERSE, "style" => "margin-right:5px; float:left;"));
        echo TbHtml::labelTb($model_campos_carga->getAttributeLabel($key), array('color' => TbHtml::LABEL_COLOR_INFO, "class" => "centrado", "style" => "width:124px;"));
        echo "</span>";
        echo "<div class='controls'>";
        echo $form->inlineRadioButtonList($models_parametros_carga[$i], "[$i]idopcioncampocarga", CHtml::listData(Opcioncampocarga::model()->findAll(), 'idopcioncampocarga', 'nombre'), $model_campos_carga->getMetaData()->columns[$key]->comment == "NOEDITABLE" ? array('disabled' => 'disabled') : ARRAY());
        echo $form->error($models_parametros_carga[$i], "[$i]idopcioncampocarga");
        echo "</div>";
        echo "</div>";

        if ($key == 'nroafiliado')
            echo $form->textFieldControlGroup($models_parametros_carga[$i], "[$i]longitud", array('size' => 10, 'maxlength' => 10));
       
        echo $form->hiddenfield($models_parametros_carga[$i], "[$i]campo");
        echo $form->hiddenfield($models_parametros_carga[$i], "[$i]idosplan");
        $i++;
    }
}
?>

Exemplo n.º 7
0
                'onclick'=>'js:{var p=cuenta();$("select." + p).val(this.value).trigger("change");'
                . '$(".b" + p).addClass("badge-warning");'
                . '$("#cargapractica").val("").trigger("change");'
                . '}',
             ),

    ));
        echo "</div>";
    
    
    
    for ($f = 1; $f <= $filas; $f++) {
        echo "<div style='margin:10px 0 10px 0;' >";
        for ($col = 1; $col <= 4; $col++) {
            if (isset($models_practicas[$i])) {
                echo TbHtml::badge(str_pad($i+1, 2, "0", STR_PAD_LEFT), array('color' => TbHtml::BADGE_COLOR_DEFAULT,'class' =>'b'.$i,'style'=>'margin-left:20px;'));
               
                $this->widget('yiiwheels.widgets.select2.WhSelect2', array(
                    'model' => $models_practicas[$i],
                    'attribute' => "[$i]idpractica",
                    'language' => 'es',
                    'data' => $data,
                    'htmlOptions' => array(
                        'style' => 'width:110px;margin-top:10px;',
                        'class'=>$i." "."sp",
                        'prompt' => '    '
                    ),
                )); 
               $i++; 
            }
 public function testBadge()
 {
     $I = $this->codeGuy;
     $html = TbHtml::badge('Badge text', array('class' => 'span'));
     $span = $I->createNode($html, 'span.badge');
     $I->seeNodeCssClass($span, 'span');
     $I->seeNodeText($span, 'Badge text');
 }
Exemplo n.º 9
0
        '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>";
Exemplo n.º 10
0
	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
</head>

<body>

<div class="container" id="page">

	<div id="header">
		<div id="logo"><?php //echo CHtml::encode(Yii::app()->name); ?></div>
	</div><!-- header -->

	<div id="mainmenu" >
            <?php 
                ob_start();
                echo TbHtml::badge('2', array('color' => TbHtml::BADGE_COLOR_SUCCESS));
                $indicatorCount = ob_get_contents();
                ob_clean();
            ?>
            <?php  $this->widget('bootstrap.widgets.TbNavbar', array(
                    'brandLabel' => '<strong><span style="color:#56AD56">EAMS </span>TANZANIA</strong>',
                    'display' => TbHtml::NAVBAR_DISPLAY_FIXEDTOP,
                    'items'=>array(
                        //!Yii::app()->user->isGuest?  EamsFacts::loadNotifier():"",
                        array(
                            'class' => 'bootstrap.widgets.TbNav',
			'items'=>array(
                               array('label'=>'EAC Decisions','icon'=>TbHtml::ICON_LIST_ALT, 'url'=>array('/eacDecision/admin'),'visible'=>!Yii::app()->user->isGuest,
                                       'items'=>array(
                                           array('label'=>'Decisions','icon'=>TbHtml::ICON_LIST_ALT, 'url'=>array('/eacDecision/admin'),'visible'=>!Yii::app()->user->isGuest),