Esempio n. 1
0
echo \mpf\WebApp::get()->title;
?>
</title>
    <?php 
echo \mpf\web\helpers\Html::get()->cssFile(\mpf\WebApp::get()->request()->getWebRoot() . 'main/style.css');
?>
    <?php 
echo \mpf\web\helpers\Html::get()->mpfScriptFile('jquery.js');
?>
    <?php 
echo \mpf\web\helpers\Html::get()->scriptFile(\mpf\WebApp::get()->request()->getWebRoot() . 'main/main.js');
?>
</head>
<body>
<div id="wrapper">
    <div id="site">
        <div id="header">
            <h1><?php 
echo \mpf\web\helpers\Html::get()->link(\mpf\WebApp::get()->request()->getLinkRoot(), \mpf\WebApp::get()->title);
?>
</h1>
            <?php 
\mpf\widgets\menu\Menu::get(['items' => [['url' => [], 'label' => 'Home'], ['url' => ['user', 'login'], 'label' => 'Login', 'visible' => \mpf\WebApp::get()->user()->isGuest()], ['url' => ['user', 'register'], 'label' => 'Register', 'visible' => \mpf\WebApp::get()->user()->isGuest()], ['url' => ['user', 'forgotpassword'], 'label' => 'Forgot Password', 'visible' => \mpf\WebApp::get()->user()->isGuest()], ['class' => 'Label', 'label' => \mpf\WebApp::get()->user()->isGuest() ? 'Welcome Guest!' : 'Welcome ' . \mpf\WebApp::get()->user()->name, 'htmlOptions' => ['style' => 'float:right;'], 'items' => [['url' => ['user', 'profile'], 'label' => 'My Profile'], ['url' => ['user', 'edit'], 'label' => 'Edit My Profile'], ['url' => ['user', 'email'], 'label' => 'Change Email'], ['url' => ['user', 'password'], 'label' => 'Change Password'], ['url' => ['home', 'index', 'admin'], 'label' => 'Administration'], ['url' => ['user', 'logout'], 'label' => 'Logout']]], ['label' => 'Google Login', 'url' => $url = \mpf\WebApp::get()->user()->getGoogleClient() ? \mpf\WebApp::get()->user()->getGoogleClient()->createAuthUrl() : null, 'htmlOptions' => ['style' => 'float:right;'], 'linkHtmlOptions' => ['class' => 'ext-login-button google-login-button'], 'visible' => \mpf\WebApp::get()->user()->isGuest() && trim($url)], ['label' => 'Facebook Login', 'url' => $url = \mpf\WebApp::get()->user()->getFacebookLoginURL(), 'visible' => \mpf\WebApp::get()->user()->isGuest() && trim($url), 'htmlOptions' => ['style' => 'float:right;'], 'linkHtmlOptions' => ['class' => 'ext-login-button facebook-login-button']]]])->display();
?>
        </div>
        <div id="content">
            <?php 
echo \app\components\htmltools\Messages::get()->display();
?>

Esempio n. 2
0
echo \mpf\web\helpers\Html::get()->mpfCssFile('../scripts/jquery-ui/themes/' . \mpf\web\helpers\Html::get()->jqueryUITheme . '/jquery-ui.css');
?>
    <?php 
echo \mpf\web\helpers\Html::get()->mpfScriptFile('jquery-ui/jquery-ui.js');
?>
    <?php 
echo \mpf\web\helpers\Html::get()->scriptFile(\mpf\WebApp::get()->request()->getWebRoot() . 'admin/main.js');
?>
</head>
<body>
<div id="wrapper">
    <div id="site">
        <div id="header">
            <div id="header-bar">
                <h1><?php 
echo \mpf\web\helpers\Html::get()->link(\mpf\WebApp::get()->request()->getLinkRoot(), \mpf\WebApp::get()->title);
?>
</h1>
            </div>
            <div id="menu-bar">
                <?php 
\mpf\widgets\menu\Menu::get(['items' => [['url' => [], 'label' => 'Home'], ['url' => ['user', 'login'], 'label' => 'Login', 'visible' => \mpf\WebApp::get()->user()->isGuest()], ['url' => ['user', 'forgotpassword'], 'label' => 'Forgot Password', 'visible' => \mpf\WebApp::get()->user()->isGuest()], ['class' => 'Label', 'label' => 'Admin', 'visible' => \mpf\WebApp::get()->user()->isConnected(), 'items' => [['url' => ['users', 'index'], 'label' => 'Users', 'visible' => \mpf\WebApp::get()->user()->isConnected(), 'items' => [['url' => ['users', 'index'], 'label' => 'Manage Users'], ['url' => ['users', 'create'], 'label' => 'New User'], ['url' => ['usergroups', 'index'], 'label' => 'Manage Groups'], ['url' => ['usergroups', 'create'], 'label' => 'New Group'], ['url' => ['usertitles', 'index'], 'label' => 'Manage Titles'], ['url' => ['usertitles', 'create'], 'label' => 'New Title']], 'icon' => \mpf\web\AssetsPublisher::get()->mpfAssetFile('images/oxygen/22x22/apps/system-users.png')], ['url' => ['admin', 'config'], 'label' => 'Config', 'icon' => \mpf\web\AssetsPublisher::get()->mpfAssetFile('images/oxygen/22x22/categories/preferences-other.png')], ['url' => ['admin', 'crontab'], 'label' => 'Crontab', 'icon' => \mpf\web\AssetsPublisher::get()->mpfAssetFile('images/oxygen/22x22/categories/applications-system.png')]]], ['class' => 'Label', 'label' => \mpf\WebApp::get()->user()->isGuest() ? 'Welcome Guest!' : 'Welcome ' . \mpf\WebApp::get()->user()->name, 'htmlOptions' => ['style' => 'float:right;'], 'items' => [['url' => ['user', 'profile'], 'label' => 'My Profile', 'icon' => \mpf\web\AssetsPublisher::get()->mpfAssetFile('images/oxygen/22x22/apps/preferences-desktop-user.png')], ['url' => ['user', 'edit'], 'label' => 'Edit My Profile', 'icon' => \mpf\web\AssetsPublisher::get()->mpfAssetFile('images/oxygen/22x22/apps/accessories-text-editor.png')], ['url' => ['user', 'email'], 'label' => 'Change Email', 'icon' => \mpf\web\AssetsPublisher::get()->mpfAssetFile('images/oxygen/22x22/status/mail-unread.png')], ['url' => ['user', 'password'], 'label' => 'Change Password', 'icon' => \mpf\web\AssetsPublisher::get()->mpfAssetFile('images/oxygen/22x22/actions/system-lock-screen.png')], ['url' => ['user', 'logout'], 'label' => 'Logout', 'icon' => \mpf\web\AssetsPublisher::get()->mpfAssetFile('images/oxygen/22x22/status/task-reject.png')]]], ['label' => 'Google Login', 'url' => $url = \mpf\WebApp::get()->user()->getGoogleClient() ? \mpf\WebApp::get()->user()->getGoogleClient()->createAuthUrl() : null, 'htmlOptions' => ['style' => 'float:right;'], 'linkHtmlOptions' => ['class' => 'ext-login-button google-login-button'], 'visible' => \mpf\WebApp::get()->user()->isGuest() && trim($url)], ['label' => 'Facebook Login', 'url' => $url = \mpf\WebApp::get()->user()->getFacebookLoginURL(), 'visible' => \mpf\WebApp::get()->user()->isGuest() && trim($url), 'htmlOptions' => ['style' => 'float:right;'], 'linkHtmlOptions' => ['class' => 'ext-login-button facebook-login-button']]]])->display();
?>
            </div>
        </div>
        <div id="content">
            <?php 
echo \app\components\htmltools\Messages::get()->display();
?>