Generates a popover.
public static popover ( string $label, string $title, string $content, array $htmlOptions = [] ) : string | ||
$label | string | the popover link label text. |
$title | string | the popover title text. |
$content | string | the popover content text. |
$htmlOptions | array | additional HTML attributes. |
return | string | the generated popover. |
public function testPopover() { $I = $this->codeGuy; $html = TbHtml::popover('Link', 'Heading text', 'Content text', array('class' => 'link')); $a = $I->createNode($html, 'a[rel=popover]'); $I->seeNodeCssClass($a, 'link'); $I->seeNodeAttributes($a, array('title' => 'Heading text', 'data-content' => 'Content text', 'data-toggle' => 'popover', 'href' => '#')); $I->seeNodeText($a, 'Link'); }
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>
<div class="bs-docs-example tooltip-demo"> <ul class="bs-docs-tooltip-examples"> <li><?php echo TbHtml::popover('Popover on top', 'Popover on top', 'Vivamus sagittis lacus vel augue laoreet rutrum faucibus.', array('class' => 'btn', 'placement' => TbHtml::POPOVER_PLACEMENT_TOP)); ?> </li> <li><?php echo TbHtml::popover('Popover on right', 'Popover on right', 'Vivamus sagittis lacus vel augue laoreet rutrum faucibus.', array('class' => 'btn', 'placement' => TbHtml::POPOVER_PLACEMENT_RIGHT)); ?> </li> <li><?php echo TbHtml::popover('Popover on bottom', 'Popover on bottom', 'Vivamus sagittis lacus vel augue laoreet rutrum faucibus.', array('class' => 'btn', 'placement' => TbHtml::POPOVER_PLACEMENT_BOTTOM)); ?> </li> <li><?php echo TbHtml::popover('Popover on left', 'Popover on left', 'Vivamus sagittis lacus vel augue laoreet rutrum faucibus.', array('class' => 'btn', 'placement' => TbHtml::POPOVER_PLACEMENT_LEFT)); ?> </li> </ul> </div> </section> <!-- Alerts ================================================== --> <section id="alerts"> <div class="page-header"> <h1>Alerts <small>Styles for success, warning, and error messages</small></h1> </div>