<?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);?>
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'); }
/** * Runs the widget. */ public function run() { echo TbHtml::heroUnit($this->heading, $this->content, $this->htmlOptions); }
</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"> <?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>