/**
     * Hlavní menu aplikace
     *
     * @param string $name
     * @param mixed  $content
     * @param array  $properties
     */
    public function __construct($name = null, $content = null, $properties = null)
    {
        parent::__construct("Menu", new \Ease\Html\ImgTag('images/LinkQuickTwitterLogo.png', 'NetspotAdmin', 20, 20, ['class' => 'img-rounded']), ['class' => 'navbar-fixed-top']);
        $user = \Ease\Shared::user();
        \Ease\TWB\Part::twBootstrapize();
        if (!$user->getUserID()) {
            //            $this->addMenuItem('<a href="createaccount.php">' . \Ease\TWB\Part::GlyphIcon('leaf') . ' ' . _('Register') . '</a>', 'right');
            $this->addMenuItem('
<li class="divider-vertical"></li>
<li class="dropdown">
<a class="dropdown-toggle" href="login.php" data-toggle="dropdown"><i class="icon-circle-arrow-left"></i> ' . _('Logon') . '<strong class="caret"></strong></a>
<div class="dropdown-menu" style="padding: 15px; padding-bottom: 0px; left: -120px;">
<form method="post" class="navbar-form navbar-left" action="login.php" accept-charset="UTF-8">
<input class="form-control" style="margin-bottom: 15px;" type="text" placeholder="' . _('Username') . '" id="username" name="login">
<input class="form-control" style="margin-bottom: 15px;" type="password" placeholder="' . _('Password') . '" id="password" name="password">
<!-- input style="float: left; margin-right: 10px;" type="checkbox" name="remember-me" id="remember-me" value="1">
<label class="string optional" for="remember-me"> ' . _('zapamatuj si mne') . '</label -->
<input class="btn btn-primary btn-block" type="submit" id="sign-in" value="' . _('Log in') . '">
</form>
</div>', 'right');
        } else {
            $userID = EaseShared::user()->getUserID();
            if ($userID) {
                $myLinksCount = EaseShared::myDbLink()->queryToValue('SELECT COUNT(*) FROM entry WHERE owner=' . $userID);
            } else {
                $myLinksCount = EaseShared::myDbLink()->queryToValue('SELECT COUNT(*) FROM entry');
            }
            $brand = new \Ease\HtmlDivTag('sitelogo', $myLinksCount, ['class' => 'brand']);
            $this->addMenuItem($brand);
            $userMenu = '<li class="dropdown" style="width: 120px; text-align: right; background-image: url( ' . $user->getIcon() . ' ) ;  background-repeat: no-repeat; background-position: left center; background-size: 40px 40px;"><a href="#" class="dropdown-toggle" data-toggle="dropdown">' . $user->getLogin() . ' <b class="caret"></b></a>
<ul class="dropdown-menu" style="text-align: left; left: -60px;">
<li><a href="settings.php">' . \Ease\TWB\Part::GlyphIcon('wrench') . '<i class="icon-cog"></i> ' . _('Settings') . '</a></li>
';
            $this->addMenuItem($userMenu . '
<li><a href="http://v.s.cz/ease.php">' . \Ease\TWB\Part::GlyphIcon('envelope') . ' ' . _('Developer support') . '</a></li>
<li class="divider"></li>
<li><a href="logout.php">' . \Ease\TWB\Part::GlyphIcon('off') . ' ' . _('Logout') . '</a></li>
</ul>
</li>
', 'right');
        }
    }
Example #2
0
<?php

namespace SkeliCZ;

require_once 'includes/SkeliInit.php';
$caution = 'Upozornění!

Vstupujete na stránky se sexuálním obsahem. Kliknutím na \'OK\' potvrzujete, že
';
$oPage->addItem("\n\n");
\Ease\TWB\Part::twBootstrapize();
//$oPage->addItem( new \Ease\TWB\Modal('caution',_('caution'),$caution,['show'=>true]) );
$oPage->addItem("\n\n" . '<!-- Button trigger modal -->
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
  Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">Modal title</h4>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>