Exemplo n.º 1
0
 * Config 'html' and 'head' tag.
 */
$j->head()->title('Examples');
/**
 * Create and config a page object.
 */
$p = new Page('examples');
$p->theme('b')->title('Examples');
$p->header()->theme('a');
$p->header()->addButton('Home', './', '', 'home');
//Get the Button Added and Set Attributes
$p->header()->items()->get(1)->attribute('data-iconpos', 'notext')->attribute('rel', 'external');
/**
 * Create and config a new listview object and add Items.
 */
$list1 = new Listview();
$list1->splitIcon('search')->splitTheme('c');
$list1->addDivider('Beginner', '2')->inset(true);
$list1->addBasic('Basic Example', 'example-1.php');
$list1->items()->get(1)->add('<a href="example-1.php" rel="external" target="_blank"></a>');
$list1->addBasic('Adding Pages', 'example-2.php');
$list1->items()->get(2)->add('<a href="example-2.php" rel="external" target="_blank"></a>');
$list1->addDivider('Intermediate', '3');
$list1->addBasic('Adding Objects', 'example-3.php');
$list1->items()->get(4)->add('<a href="example-3.php.txt" rel="external" target="_blank"></a>');
$list1->addBasic('Adding Form Elements', 'example-4.php');
$list1->items()->get(5)->add('<a href="example-4.php.txt" rel="external" target="_blank"></a>');
$list1->addBasic('Adding Listview', 'example-5.php');
$list1->items()->get(6)->add('<a href="example-5.php.txt" rel="external" target="_blank"></a>');
$list1->addDivider('Advanced', '3');
$list1->add('<li><a href="custom-css.php" rel="external">Custom CSS</a><a href="custom-css.php.txt" rel="external" target="_blank"></a></li>');
Exemplo n.º 2
0
/**
 * Create and config a new listview object and add Split Items.
 */
$p->addContent('<h3>Split</h3>');
$list4 = new Listview();
$list4->inset(true)->splitIcon('gear')->splitTheme('c');
$list4->addDivider('Unread Messages', '11')->dividerTheme('c')->countTheme('b');
$list4->addSplit('Account 1', '#', '#', '09');
$list4->addSplit('Account 2', '#', '#', '02');
$list4->addSplit('Account 3', '#', '#', '00');
$p->addContent($list4);
/**
 * Create and config a new listview object and add Nested Items.
 */
$p->addContent('<h3>Nested</h3>');
$list5 = new Listview();
$list5->inset(true)->theme('a');
$list5->addDivider('Cars');
$fiat = new Listview();
$fiat->addBasic('Bravo', 'example-5.php');
$fiat->addBasic('Linea', 'example-5.php');
$fiat->addBasic('Punto', 'example-5.php');
$list5->addNested('Fiat', $fiat);
$gm = new Listview();
$gm->addBasic('Celta', 'example-5.php');
$gm->addBasic('Agile', 'example-5.php');
$gm->addBasic('Vectra', 'example-5.php');
$list5->addNested('GM', $gm);
$honda = new Listview();
$honda->addBasic('Fit', 'example-5.php');
$honda->addBasic('City', 'example-5.php');
Exemplo n.º 3
0
            <span class="sr-only">Next</span>
  </a>
    </div>

    <div class="body-content">

        <div class="row">   
              <?php 
foreach ($notice as $key => $value) {
    ?>
              <div class="col-lg-4">
                <h5><span class="glyphicon glyphicon-bell"></span><?php 
    echo $value['title'];
    echo Html::a('more>>', ['notice/list', 'category' => $key], ['class' => 'pull-right']);
    ?>
</h5>
                
                <hr class="hr" />
                <?php 
    echo Listview::widget(['dataProvider' => $value['dataProvider'], 'options' => ['tag' => 'ul'], 'summary' => '', 'itemOptions' => ['tag' => 'li'], 'itemView' => function ($model, $key, $index, $widget) {
        return Html::a(Html::encode(mb_substr($model->title, 0, 15)), ['notice/detail', 'id' => $model->id], ['title' => $model->title]);
    }]);
    ?>
              </div>
             <?php 
}
?>
        </div>
    </div>
</div>
Exemplo n.º 4
0
        /**
         * Creating a new Listview. This will be added as a nested item.
         */
        $lv_cars = new Listview();
        foreach ($brand->car as $car) {
            $lv_cars->addBasic($car, '#');
        }
        /**
         * Adding Nested Item (Other Listview);
         */
        $lv->addNested($brand->name, $lv_cars);
    }
}
/**
 * Adding Source Code Links.
 */
$list = new Listview();
$li = $list->addBasic('cars.xml', 'cars.xml', '', true);
$li->rel('external')->target('_blank');
$li = $list->addBasic('simple-xml.php', 'simple-xml.php.txt', '', true);
$li->rel('external')->target('_blank');
$lv->addDivider('S');
$lv->addNested('Source Code', $list);
/**
 * Add the page to iMobile object.
 */
$iMobile->addPage($p);
/**
 * Generate the HTML code.
 */
echo $iMobile;