コード例 #1
0
ファイル: main.php プロジェクト: phpffcms/ffcms
?>
/assets/img/logo.png" alt="logo" class="img-responsive" />
            </div>
            <div class="col-md-10">
                <h1>FFCMS 3</h1>
                <small><?php 
echo __('Fast, flexibility content management system with MVC framework inside!');
?>
</small>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12 body-container">
                <div class="pull-right">
                    <?php 
echo \Widgets\Basic\LanguageSwitcher::widget();
?>
                </div>
                <?php 
$notify = \App::$Session->getFlashBag()->all();
if (Obj::isArray($notify) && count($notify) > 0) {
    echo \App::$View->render('native/macro/notify', ['notify' => $notify]);
}
echo $body;
?>
            </div>
        </div>
    </div>
    <script src="<?php 
echo \App::$Alias->getVendor('js', 'jquery');
?>
コード例 #2
0
ファイル: main.php プロジェクト: phpffcms/ffcms
?>
';
        var script_lang = '<?php 
echo \App::$Request->getLanguage();
?>
';
        var site_url = '<?php 
echo \App::$Alias->baseUrl;
?>
';
    </script>
</head>
<body>
<header class="container nopadding">
<?php 
$items = LanguageSwitcher::widget(['onlyArrayItems' => true]);
if (\App::$User->isAuth()) {
    $userId = \App::$User->identity()->getId();
    // show 'add content' button if current controller is Content and user add is enabled
    if (\App::$Request->getController() === 'Content' && (bool) AppRecord::getConfig('app', 'Content', 'userAdd')) {
        $items[] = ['type' => 'link', 'link' => ['content/update'], 'text' => '<i class="fa fa-plus"></i> ' . __('Add content'), 'html' => true, 'position' => 'right'];
    }
    $accountDropdown[] = ['link' => ['profile/show', $userId], 'text' => __('My profile')];
    $accountDropdown[] = ['link' => ['profile/messages'], 'text' => __('Messages') . ' <span class="badge" id="pm-count-block">0</span>', 'html' => true, '!secure' => true];
    $accountDropdown[] = ['link' => ['profile/notifications'], 'text' => __('Notifications') . ' <span class="badge" id="notify-count-block">0</span>', 'html' => true, '!secure' => true];
    if ((bool) AppRecord::getConfig('app', 'Content', 'userAdd')) {
        $accountDropdown[] = ['link' => ['content/my'], 'text' => __('My content')];
    }
    $accountDropdown[] = ['link' => ['profile/settings'], 'text' => __('Settings')];
    $items[] = ['type' => 'dropdown', 'text' => '<i class="fa fa-user"></i> ' . __('Account') . ' <span class="badge" id="summary-count-block">0</span>', 'html' => true, '!secure' => true, 'position' => 'right', 'items' => $accountDropdown];
    if (\App::$User->identity()->getRole()->can('Admin/Main/Index')) {
コード例 #3
0
ファイル: main.php プロジェクト: phpffcms/ffcms
            <a class="navbar-brand" href="<?php 
echo App::$Alias->baseUrl;
?>
">FFCMS<sup>3</sup> <?php 
echo __('Dashboard');
?>
</a>
        </div>
        <!-- /.navbar-header -->

        <?php 
$notifyStats = new EntityNotificationStats();
?>

        <?php 
echo \Widgets\Basic\LanguageSwitcher::widget(['css' => ['class' => 'nav navbar-top-links navbar-left']]);
?>

        <ul class="nav navbar-top-links navbar-right">
            <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                    <i class="fa fa-bell fa-fw"></i> <?php 
echo __('Fast Access');
?>
                    <span class="badge <?php 
echo $notifyStats->total > 0 ? 'alert-warning' : null;
?>
"><?php 
echo $notifyStats->total;
?>
</span>