Esempio n. 1
0
echo $_button_group->getDirection();
?>
		<?php 
echo $_button_group->getAlign();
?>
		<?php 
echo $_button_group->getDrop();
?>
		<?php 
echo Html::getClasses($_button_group->attributes);
?>
	"
	<?php 
echo $_button_group->getTypeToggle() ? ' data-toggle="' . $_button_group->getTypeToggle() . '"' : '';
?>
	<?php 
echo Html::getData($_button_group->attributes);
?>
>
<?php 
/** @var $button Button */
foreach ((array) $_button_group->getItems() as $button) {
    $_button = clone $button;
    if ($_button_group->getTypeToggle()) {
        $_button->setTag(Button::TAG_BUTTON)->setUrl('');
    }
    echo (string) $_button;
}
echo (string) $_button_group->getDropdownMenu();
?>
</div>
Esempio n. 2
0
    {
    }
}
/** @var \BootstrapPHP\Alert $alert */
$_alert = clone $alert;
?>
<div
	<?php 
echo Html::getId($_alert->attributes);
?>
	class="
		alert
		<?php 
echo $_alert->getType();
?>
		<?php 
echo $_alert->getBlock() ? 'alert-block ' : '';
?>
		<?php 
echo Html::getClasses($_alert->attributes);
?>
	"
	<?php 
echo Html::getData($_alert->attributes);
?>
>
	<a href="#" class="close" data-dismiss="alert">&times;</a>
	<?php 
echo $_alert->getText();
?>
</div>
Esempio n. 3
0
        list($_text, $_url, $_attributes) = $_breadcrumb;
        ?>
			<li
				<?php 
        echo $_attributes ? Html::getId($_attributes) : '';
        ?>
				class="
					<?php 
        echo $_url == false ? 'active' : '';
        ?>
					<?php 
        echo $_attributes ? Html::getClasses($_attributes) : '';
        ?>
				"
				<?php 
        echo $_attributes ? Html::getData($_attributes) : '';
        ?>
			>
<?php 
        if ($_url) {
            ?>
					<a href="<?php 
            echo $_url;
            ?>
"><?php 
            echo $_text;
            ?>
</a>
<?php 
        } else {
            ?>
?>

>
<?php 
foreach ($_dropdown_menu->getItems() as $item) {
    $disabled = $item->isDisabled() ? 'disabled' : '';
    $icon = $item->getIcon() ? Html::getIcon($item->getIcon(), $item->isDisabled()) . '&nbsp;' : '<i class="i"></i>';
    $text = $item->getText();
    $attributes = $item->getAttributes();
    $id = '';
    $classes = '';
    $data = '';
    if ($attributes) {
        $id = Html::getId($attributes);
        $classes = Html::getClasses($attributes);
        $data = Html::getData($attributes);
    }
    if ($item instanceof BootstrapPHP\LinkDropdownMenuItem) {
        /** @var BootstrapPHP\LinkDropdownMenuItem $item */
        if ($item->getText() === BootstrapPHP\DropdownMenu::DIVIDER) {
            ?>
				<li class="divider"></li>
<?php 
        } else {
            ?>
				<li class="<?php 
            echo $disabled;
            ?>
">
					<a
						tabindex="-1"
Esempio n. 5
0
if (false) {
    class view_label
    {
    }
}
/** @var Label|Badge $label */
$_label = clone $label;
?>
<span
	<?php 
echo Html::getId($_label->attributes);
?>
	class="
		<?php 
echo $_label::NAME;
?>
		<?php 
echo $_label->getType() ? $_label::NAME . '-' . $_label->getType() : '';
?>
		<?php 
echo Html::getClasses($_label->attributes);
?>
	"
	<?php 
echo Html::getData($_label->attributes);
?>
>
	<?php 
echo $_label->getText();
?>
</span>
Esempio n. 6
0
use BootstrapPHP\Helpers\Html;
use BootstrapPHP\Helpers\View;
use BootstrapPHP\Button;
if (false) {
    class view_button
    {
    }
}
/** @var \BootstrapPHP\Button $button */
$_button = clone $button;
$icon_white = $_button->getType() === Button::TYPE_DEFAULT || $_button->getType() === Button::TYPE_LINK ? false : true;
$_icon = $_button->getIcon() ? Html::getIcon($_button->getIcon(), $icon_white) . '&nbsp;' : '';
$_text = $_button->getText();
// Формирование строки атрибутов кнопки
$_attribute = "\r\n\t" . Html::getId($_button->attributes) . "\r\n\tclass='\r\n\t\tbtn\r\n\t\t{$_button->getType()}\r\n\t\t{$_button->getSize()}\r\n\t\t{$_button->getWidth()}\r\n\t\t" . ($_button->isEnable() === false ? 'disabled' : '') . "\r\n\t\t" . Html::getClasses($_button->attributes) . "\r\n\t'\r\n\t" . ($_button->isEnable() === false && $_button->getTag() === $_button::TAG_BUTTON ? 'disabled' : '') . "\r\n\t" . ($_button->getToggle() ? 'data-toggle="button"' : '') . "\r\n\t" . ($_button->getTextLoading() ? 'data-loading-text="' . htmlspecialchars($_button->getTextLoading(), \ENT_QUOTES) . '"' : '') . ' ' . Html::getData($_button->attributes);
// Оборачиваем текст кнопки в выбранный тэг
switch ($_button->getTag()) {
    case $_button::TAG_BUTTON:
        $_buffer = '<button type="submit" ' . $_attribute . '>' . $_icon . $_text . '</button>';
        break;
    case $_button::TAG_A:
        $_buffer = '<a ' . ($_button->getUrl() ? 'href="' . $_button->getUrl() . '" ' : '') . $_attribute . '>' . $_icon . $_text . '</a>';
        break;
    case $_button::TAG_INPUT:
        $_buffer = '<input type="submit" value="' . $_text . '" ' . $_attribute . '></input>';
        break;
}
// Если нужно оборачиваем кнопку в тэг формы
if ($_button->getUrl() and ($_button->getTag() === $_button::TAG_BUTTON or $_button->getTag() === $_button::TAG_INPUT)) {
    $_buffer = '<form action="' . $_button->getUrl() . '" method="get">' . $_buffer . '</form>';
Esempio n. 7
0
	"
	tabindex="-1"
	role="dialog"
	aria-hidden="true"
	<?php 
echo $_modal->getBackdrop() ? 'data-backdrop="' . $_modal->getBackdrop() . '"' : '';
?>
	<?php 
echo $_modal->getBodyUrl() ? 'data-remote="' . $_modal->getBodyUrl() . '"' : '';
?>
 	data-keyboard="<?php 
echo $_modal->getKeyboard() ? 'true' : 'false';
?>
"
	<?php 
echo Html::getData($_modal->attributes);
?>
>
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
		<h3><?php 
echo $_modal->getHeader();
?>
</h3>
	</div>
	<div class="modal-body">
		<?php 
echo $_modal->getBody();
?>
	</div>
<?php 
use BootstrapPHP\Helpers\Html;
use BootstrapPHP\ButtonGroup;
if (false) {
    class view_button_toolbar
    {
    }
}
/** @var \BootstrapPHP\ButtonToolbar $button_toolbar */
$_button_toolbar = clone $button_toolbar;
?>
<div
	<?php 
echo Html::getId($_button_toolbar->attributes);
?>
	class="
		btn-toolbar
		<?php 
echo Html::getClasses($_button_toolbar->attributes);
?>
	"
	<?php 
echo Html::getData($_button_toolbar->attributes);
?>
>
<?php 
/** @var ButtonGroup $button_group */
foreach ((array) $_button_toolbar->getItems() as $button_group) {
    echo (string) $button_group;
}
?>
</div>
Esempio n. 9
0
<?php

use BootstrapPHP\Helpers\Html;
if (false) {
    class view_icon
    {
    }
}
/** @var \BootstrapPHP\Icon $icon */
$_icon = clone $icon;
?>
<i
	<?php 
echo Html::getId($_icon->attributes);
?>
	class="<?php 
echo $_icon->getType() . ' ' . ($_icon->getWhite() ? 'icon-white ' : '') . Html::getClasses($_icon->attributes);
?>
"
	<?php 
echo Html::getData($_icon->attributes);
?>
></i>
Esempio n. 10
0
?>
			<?php 
echo Html::getClasses($_tabs->attributes);
?>
		"
		<?php 
echo Html::getData($_tabs->attributes);
?>
	>
<?php 
/**	@var \BootstrapPHP\Base\NavItemBase $item */
foreach ($_tabs->getItems() as $item) {
    $_attributes = $item->getAttributes();
    $id = $_attributes ? Html::getId($_attributes) : '';
    $classes = $_attributes ? Html::getClasses($_attributes) : '';
    $data = $_attributes ? Html::getData($_attributes) : '';
    ?>
			<li
				class ="
					<?php 
    echo $item->getActive() ? 'active' : '';
    ?>
					<?php 
    echo $item->getDisabled() ? 'disabled' : '';
    ?>
					<?php 
    echo $item instanceof DropdownNavItem ? 'dropdown' : '';
    ?>
				"
			>
<?php