Example #1
0
<div class="container" style="height:80%; width:600px;">
<br/>
<h2><div style="text-align:center;">Welcome to Morena e-Salary Slip</div></i></h2>

<p><div style="text-align:center;"><i>MORENA's</i> E-Salary Slip Application</div></p>
<hr/>
<?php 
echo TbHtml::carousel(array(array('image' => Yii::app()->request->baseUrl . '/images/image2.jpg', 'label' => 'PT MANDIRI CIPTA SEJAHTERA', 'caption' => 'MORENA')));
?>
</div><br/><br/>
Example #2
0
 public function testCarousel()
 {
     $I = $this->codeGuy;
     $items = array(array('image' => 'image.png', 'label' => 'First Thumbnail label', 'url' => '#', 'caption' => 'Caption text'), array('image' => 'image.png', 'label' => 'Second Thumbnail label'), array('image' => 'image.png', 'imageOptions' => array('class' => 'image', 'alt' => 'Alternative text')));
     $html = TbHtml::carousel($items, array('id' => 'carousel', 'class' => 'div'));
     $carousel = $I->createNode($html, 'div.carousel');
     $I->seeNodeCssClass($carousel, 'div slide');
     $I->seeNodeAttribute($carousel, 'carousel');
     $I->seeNodeChildren($carousel, array('ol.carousel-indicators', 'div.carousel-inner', 'a.carousel-control', 'a.carousel-control'));
     $inner = $carousel->filter('div.carousel-inner');
     foreach ($inner->children() as $i => $divElement) {
         $div = $I->createNode($divElement);
         $I->seeNodeCssClass($div, 'item');
         switch ($i) {
             case 0:
                 $I->seeNodeCssClass($div, 'active');
                 $I->seeNodeChildren($div, array('a', 'div.carousel-caption'));
                 $a = $div->filter('a');
                 $I->seeNodeAttribute($a, 'href', '#');
                 break;
             case 1:
                 $I->seeNodeChildren($div, array('img', 'div.carousel-caption'));
                 break;
             case 2:
                 $img = $div->filter('img.image');
                 $I->seeNodeAttributes($img, array('src' => 'image.png', 'alt' => 'Alternative text'));
                 break;
         }
     }
 }
Example #3
0
<?php

foreach ($ads as $ad) {
    $items[] = $ad->getAd();
}
echo TbHtml::carousel($items);
Example #4
0
    array('heading' => 'Media heading', 'content' => '...'),
)); ?></pre>

</section>

<!-- Carousel
   ================================================== -->
<section id="carousel">

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

   <div class="bs-docs-example">
      <?php 
echo TbHtml::carousel(array(array('image' => 'holder.js/830x477', 'label' => 'First Thumbnail label', 'caption' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.'), array('image' => 'holder.js/830x477', 'label' => 'Second Thumbnail label', 'caption' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.'), array('image' => 'holder.js/830x477', 'label' => 'Third Thumbnail label', 'caption' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.')));
?>
   </div>

   <pre class="prettyprint linenums">
&lt;?php echo TbHtml::carousel(array(
    array('image' => 'holder.js/830x477', 'label' => 'First Thumbnail label', 'caption' => '...'),
    array('image' => 'holder.js/830x477', 'label' => 'Second Thumbnail label', 'caption' => '...'),
    array('image' => 'holder.js/830x477', 'label' => 'Third Thumbnail label', 'caption' => '...'),
)); ?></pre>

</section>


<!-- Miscellaneous
    ================================================== -->
Example #5
0

	<!-- Carousel
	================================================== -->
	<section id="carousel">
		<div class="page-header">
			<h1>Carousel</h1>
		</div>

		<h2>Example carousel</h2>

		<p>The slideshow below shows a generic plugin and component for cycling through elements like a carousel.</p>

		<div class="bs-docs-example">
			<?php 
echo TbHtml::carousel(array(array('content' => '<img src="holder.js/660x380" />', 'label' => 'First Thumbnail label', 'caption' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.'), array('content' => '<img src="holder.js/660x380" />', 'label' => 'Second Thumbnail label', 'caption' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.'), array('content' => '<img src="holder.js/660x380" />', 'label' => 'Third Thumbnail label', 'caption' => 'Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.')), array('style' => 'width: 660px;'));
?>
		</div>
<pre class="prettyprint linenums">
&lt;?php echo TbHtml::carousel(
    array(
        array(
            'content' =&gt; '&lt;img src=&quot;holder.js/660x380&quot; /&gt;',
            'label'   =&gt; 'First Thumbnail label',
            'caption' =&gt; 'Cras justo odio, dapibus ac facilisis in, egestas eget quam. ...',
        ),
        array(
            'content' =&gt; '&lt;img src=&quot;holder.js/660x380&quot; /&gt;',
            'label'   =&gt; 'Second Thumbnail label',
            'caption' =&gt; 'Cras justo odio, dapibus ac facilisis in, egestas eget quam. ...',
        ),