heroUnit() 공개 정적인 메소드

Generates a jumbotron unit.
public static heroUnit ( string $heading, string $content, array $htmlOptions = [] ) : string
$heading string the heading text.
$content string the content text.
$htmlOptions array additional HTML attributes.
리턴 string the generated hero unit.
예제 #1
0
파일: index.php 프로젝트: robertgunze/eams
<?php
/* @var $this SiteController */

$this->pageTitle=Yii::app()->name;
?>

<?php //echo TbHtml::pageHeader('', Yii::t('strings',CHtml::encode(Yii::app()->name)))?>
<?php if(!empty(Yii::app()->user->getState('pending-decisions-message'))) : ?>
<?php echo TbHtml::alert(TbHtml::ALERT_COLOR_INFO, Yii::app()->user->getState('pending-decisions-message'),array('style'=>'position:fixed;width:50%;height:200px;margin-left:15%;margin-right:15%')); ?>
<?php Yii::app()->user->setState('pending-decisions-message','');?>
<?php endif; ?>

<?php $aboutContent = 
TbHtml::link('',$this->createUrl('//page/update',array('id'=>$model->id)),array('class'=>TbHtml::ICON_PENCIL)).
"
<h3>$model->title</h3>
<div style='font-size:14px;height:150px;'>
$model->body
</div>
" ;

?>
<?php echo TbHtml::heroUnit(null,$aboutContent);?>
예제 #2
0
 public function testHeroUnit()
 {
     $I = $this->codeGuy;
     $html = TbHtml::heroUnit('Heading text', 'Content text', array('class' => 'div', 'headingOptions' => array('class' => 'heading')));
     $hero = $I->createNode($html, 'div.hero-unit');
     $I->seeNodeCssClass($hero, 'div');
     $I->seeNodeText($hero, 'Content text');
     $h1 = $hero->filter('h1');
     $I->seeNodeCssClass($h1, 'heading');
     $I->seeNodeText($h1, 'Heading text');
 }
예제 #3
0
 /**
  * Runs the widget.
  */
 public function run()
 {
     echo TbHtml::heroUnit($this->heading, $this->content, $this->htmlOptions);
 }
예제 #4
0
</section>

<!-- Typography
   ================================================== -->
<section id="typography">

   <div class="page-header">
      <h1>Typography</h1>
   </div>

   <h2>Hero unit</h2>

   <div class="bs-docs-example">
      <?php 
echo TbHtml::heroUnit('Hello, world!', '<p>This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p>' . TbHtml::button('Learn more', array('color' => TbHtml::BUTTON_COLOR_PRIMARY, 'size' => TbHtml::BUTTON_SIZE_LARGE)));
?>
   </div>

   <pre class="prettyprint linenums">
&lt;?php echo TbHtml::heroUnit('Hello, world!', '...'); ?></pre>

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

   <h2>Page header</h2>

   <div class="bs-docs-example">
      <?php 
echo TbHtml::pageHeader('Example page header', 'Subtext for header');
?>
   </div>