forked from VisualAppeal/YiiBootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Buttons
t-visualappeal edited this page Aug 23, 2012
·
4 revisions
Create links which looks like buttons.
EBootstrap::ibutton($text, $url = '#', $type = '', $size = '', $disabled = false, $icon = '', $iconWhite = false, $htmlOptions = array(), $block = false);
Type:
- leave empty for default
- primary
- info
- success
- warning
- danger
- inverse
Size:
- large
- leave empty for normal size
- small
Add a button group:
<?php
echo EBootstrap::buttonGroup(array(
EBootstrap::ibutton('Left', '#'),
EBootstrap::ibutton('Middle', '#'),
EBootstrap::ibutton('Right', '#'),
));
?>
Add a button toolbar:
<?php
echo EBootstrap::buttonToolbar(array(
EBootstrap::buttonGroup(array(
EBootstrap::ibutton('1', '#'),
EBootstrap::ibutton('2', '#'),
EBootstrap::ibutton('3', '#'),
)),
EBootstrap::buttonGroup(array(
EBootstrap::ibutton('4', '#'),
EBootstrap::ibutton('5', '#'),
)),
EBootstrap::buttonGroup(array(
EBootstrap::ibutton('6', '#'),
EBootstrap::ibutton('7', '#'),
EBootstrap::ibutton('8', '#'),
EBootstrap::ibutton('9', '#'),
)),
));
?>
Add a dropdown:
<?php
echo EBootstrap::buttonDropdown(EBootstrap::ibutton('Dropdown Button', '#', 'success'), array(
array('text' => 'Submenu 1', 'url' => '#'),
array('text' => 'Submenu 2', 'url' => '#'),
));
?>
Add a dropdown with submenu:
<?php
echo EBootstrap::buttonDropdown(EBootstrap::ibutton('Dropdown Button', '#', 'success'), array(
array('text' => 'Submenu 1', 'url' => '#'),
array('text' => 'Submenu 2', 'url' => '#'),
array(
'text' => 'Sub-Sub Menu',
'url' => '#',
'submenu' => array(
array('text' => 'Sub-Sub 1', 'url' => '#'),
array('text' => 'Sub-Sub 2', 'url' => '#'),
)
),
));
?>
You can use icons for the buttons. Please refer to the Icon demo.