Пример #1
0
/assets/css/gAnalytics.css" rel="stylesheet">
<h1><?php 
echo __('Main dashboard');
?>
</h1>
<hr/>
<div class="row">
    <div class="col-md-4">
        <div class="panel panel-default">
            <div class="panel-heading"><?php 
echo __('Server info');
?>
</div>
            <div class="panel-body">
                <?php 
echo \Ffcms\Core\Helper\HTML\Table::display(['table' => ['class' => 'table table-bordered'], 'tbody' => ['items' => [[['text' => __('FFCMS version')], ['text' => $stats['ff_version']]], [['text' => __('PHP version')], ['text' => $stats['php_version']]], [['text' => __('OS name')], ['text' => $stats['os_name']]], [['text' => __('Database')], ['text' => $stats['database_name']]], [['text' => __('Files size')], ['text' => $stats['file_size']]], [['text' => __('Load average')], ['text' => $stats['load_avg']]]]]]);
?>
            </div>
        </div>
    </div>
    <div class="col-md-4">
        <div class="panel panel-default">
            <div class="panel-heading"><?php 
echo __('Directories and files');
?>
</div>
            <div class="panel-body">
                <?php 
$items = [];
foreach ($check->chmodCheck as $dir => $success) {
    $class = 'label-success';
Пример #2
0
</div>
<?php 
$appTableItems = null;
foreach ($apps as $app) {
    /** @var $app Apps\ActiveRecord\App */
    if ($app->type !== 'app') {
        continue;
    }
    $route = $app->sys_name . '/index';
    $icoStatus = null;
    $actions = \App::$View->render('native/macro/app_actions', ['controller' => $app->sys_name]);
    // set action icons based on app status
    if ((int) $app->disabled !== 0) {
        $icoStatus = ' <i class="fa fa-pause" style="color: #ff0000;"></i>';
    } elseif ($app->checkVersion() !== true) {
        $icoStatus = ' <i class="fa fa-exclamation" style="color: #ffbd26;"></i>';
        $actions = Url::link(['application/update', $app->sys_name], '<i class="fa fa-wrench"></i>');
    } else {
        $icoStatus = ' <i class="fa fa-check" style="color: #008000;"></i>';
    }
    $appTableItems[] = [['text' => $app->id . $icoStatus, 'html' => true, '!secure' => true], ['text' => Url::link([$route], $app->getLocaleName()), 'html' => true], ['text' => '<a target="_blank" href="' . \App::$Alias->scriptUrl . '/' . Str::lowerCase($route) . '">' . $route . '</a>', 'html' => true], ['text' => $app->version], ['text' => Date::convertToDatetime($app->updated_at, Date::FORMAT_TO_HOUR)], ['text' => $actions, 'property' => ['class' => 'text-center'], 'html' => true]];
}
?>

<div class="table-responsive">
    <?php 
echo Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => '#'], ['text' => __('Application')], ['text' => __('User interface')], ['text' => __('Version')], ['text' => __('Activity')], ['text' => __('Actions')]]], 'tbody' => ['items' => $appTableItems]]);
?>
</div>

Пример #3
0
use Ffcms\Core\Helper\Url;
/** @var $widget object */
/** @var $this object */
/** @var $model object */
$this->title = __('Turn on/off');
$this->breadcrumbs = [Url::to('main/index') => __('Main'), Url::to('widget/index') => __('Widgets'), __('Turn on/off')];
?>

<h1><?php 
echo __('Widget turn on/off');
?>
</h1>
<hr />

<?php 
echo Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => __('Param')], ['text' => __('Value')]]], 'tbody' => ['items' => [[['text' => __('Name')], ['text' => $widget->getLocaleName()]], [['text' => __('System name')], ['text' => $widget->sys_name]], [['text' => __('Last update')], ['text' => Date::convertToDatetime($widget->updated_at, DATE::FORMAT_TO_SECONDS)]], [['text' => __('Status')], ['text' => (int) $widget->disabled === 0 ? 'On' : 'Off'], 'property' => ['class' => (int) $widget->disabled === 0 ? 'alert-success' : 'alert-danger']]]]]);
?>

<?php 
$form = new Form($model, ['class' => 'form-horizontal', 'method' => 'post', 'action' => '', 'enctype' => 'multipart/form-data']);
?>

<?php 
echo $form->start();
?>

<div class="col-md-12">
    <?php 
echo $form->submitButton(__('Switch'), ['class' => 'btn btn-primary']);
?>
    <?php 
Пример #4
0
<?php

use Ffcms\Core\Helper\Url;
$this->title = __('Demoapp authorized');
$this->breadcrumbs = [Url::to('main/index') => __('Home'), Url::to('demoapp/index') => __('Demo index'), __('Authorized view')];
?>
<h1>Demoapp - only authorized</h1>
<hr />
<p>Hello! You are authorized user and you can see this page!</p>
<?php 
echo \Ffcms\Core\Helper\HTML\Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => 'Param'], ['text' => 'Value']]], 'tbody' => ['items' => [[['type' => 'text', 'text' => 'User ID'], ['type' => 'text', 'text' => \App::$User->identity()->id]], [['type' => 'text', 'text' => 'User email'], ['type' => 'text', 'text' => \App::$User->identity()->email]], [['type' => 'text', 'text' => 'User Login'], ['type' => 'text', 'text' => \App::$User->identity()->login]], [['type' => 'text', 'text' => 'Profile DUMP'], ['type' => 'text', 'text' => \App::$User->identity()->getProfile()]]]]]);
Пример #5
0
</h1>
<hr />
<p><?php 
echo __('Are you sure to make this item public?');
?>
</p>
<?php 
$items = [];
foreach ($records as $record) {
    /** @var $record \Apps\ActiveRecord\Content */
    $items[] = [['text' => $record->id], ['text' => $record->getLocaled('title')], ['text' => Simplify::parseUserLink($record->author_id), 'html' => true], ['text' => Date::convertToDatetime($record->created_at, Date::FORMAT_TO_HOUR)]];
}
?>

<div class="table-responsive">
    <?php 
echo Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => '#'], ['text' => __('Title')], ['text' => __('Author')], ['text' => __('Date')]]], 'tbody' => ['items' => $items]]);
?>
</div>

<?php 
$form = new Form($model, ['class' => 'form-horizontal']);
echo $form->start();
?>

<?php 
echo $form->submitButton(__('Publish'), ['class' => 'btn btn-warning']);
?>

<?php 
echo $form->finish();
Пример #6
0
use Ffcms\Core\Helper\HTML\Form;
use Ffcms\Core\Helper\Url;
/** @var \Apps\Model\Admin\Main\EntityUpdate $entityModel */
/** @var \Apps\Model\Admin\Main\FormUpdateDatabase $dbModel */
/** @var \Apps\Model\Admin\Main\FormUpdateDownload $downloadModel */
$this->breadcrumbs = [Url::to('main/index') => __('Main'), __('Updates')];
$this->title = __('Updates');
?>
<h1><?php 
echo __('Update manager');
?>
</h1>
<hr />
<div class="table-responsive">
<?php 
echo \Ffcms\Core\Helper\HTML\Table::display(['table' => ['class' => 'table table-striped table-hover'], 'tbody' => ['items' => [[['text' => __('Scripts version')], ['text' => $entityModel->scriptVersion], 'property' => ['class' => $entityModel->haveRemoteNew ? 'warning' : null]], [['text' => __('Database version')], ['text' => $entityModel->dbVersion], 'property' => ['class' => !$entityModel->versionsEqual ? 'danger' : null]], [['text' => __('Last version')], ['text' => $entityModel->lastVersion], 'property' => ['class' => $entityModel->haveRemoteNew ? 'success' : null]]]]]);
?>
</div>
<?php 
if (!$entityModel->versionsEqual) {
    ?>
    <p><?php 
    echo __('Seems like scripts and database of your website have different versions. You should do update right now or your website can working unstable');
    ?>
</p>
    <p><?php 
    echo __('This updates for database will be applied:');
    ?>
</p>
    <?php 
    $items = [];
Пример #7
0
<?php 
echo __('Example of usage internalization in template. Test var: %var%', ['var' => 'some value']);
?>

<hr />

<!-- Example of usage listing builder -->
<?php 
echo Listing::display(['type' => 'ul', 'property' => ['id' => 'primary'], 'items' => [['type' => 'text', 'text' => 'Text li item', 'property' => ['class' => 'text-text'], 'html' => false], ['type' => 'link', 'link' => ['main/index'], 'text' => 'Link li item', 'property' => ['class' => 'text-text'], 'html' => false, 'activeClass' => 'active'], ['type' => 'link', 'link' => ['main/read', 'somePath1', 'somePath2', ['a' => 'wtf', 'd' => 'test']], 'text' => 'Link li item with params', 'html' => false, 'linkProperty' => ['id' => 'link1', 'class' => 'btn btn-info']]]]);
?>

<hr />

<!-- Example of usage navigation builder -->
<?php 
echo Nav::display(['property' => ['class' => 'nav-tabs'], 'tabAnchor' => 'n', 'items' => [['type' => 'link', 'text' => 'Link to main', 'link' => ['main/index', 'test']], ['type' => 'tab', 'text' => 'Tab 1', 'content' => 'This is tab 1 content with allowed <s>html</s> data!', 'htmlContent' => true], ['type' => 'tab', 'text' => 'Tab 2', 'content' => 'This is tab 2 content'], ['type' => 'tab', 'text' => 'Tab 3', 'content' => 'This is a tab 3 content']]]);
?>

<hr />

<!-- Example of usage navbar builder -->
<?php 
echo Navbar::display(['nav' => ['class' => 'navbar-default'], 'property' => ['id' => 'headmenu', 'class' => 'navbar-nav'], 'brand' => ['link' => 'main/to', 'text' => 'FFCMS'], 'collapseId' => 'collapse-object', 'items' => [['link' => ['main/index'], 'text' => 'Link 1', 'property' => ['class' => 'test1'], 'position' => 'left'], ['link' => 'main/other', 'text' => 'Link 2', 'position' => 'left'], ['link' => 'main/read', 'text' => 'Link 7', 'position' => 'right'], 'plaintext']]);
?>

<hr />

<!-- Example of usage Table builder -->
<?php 
echo Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => 'id'], ['text' => 'name'], ['text' => 'family']], 'property' => ['id' => 'thead_main']], 'tbody' => ['property' => ['id' => 'tbodym'], 'items' => [[['text' => '0'], ['text' => 'Ivan'], ['text' => 'Ivanov']], [0 => ['text' => '1', 'property' => ['class' => 'test-td']], 1 => ['text' => 'Ivan'], 2 => ['text' => 'Petrov'], 'property' => ['class' => 'g-class']], [['text' => '2'], ['text' => '<b>Petr^</b>', 'html' => true], ['text' => 'Groznyi']]]]]);
Пример #8
0
            foreach ($route as $source => $target) {
                $dynamicItems[] = [['text' => $env], ['text' => $source], ['text' => $target], ['text' => Url::link(['main/deleteroute', null, null, ['type' => 'Callback', 'loader' => $env, 'path' => $source]], '<i class="fa fa-remove"></i>'), 'property' => ['class' => 'text-center'], 'html' => true]];
            }
        }
    }
}
?>
        <?php 
echo Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => __('Environment')], ['text' => __('Source path')], ['text' => __('Target path')], ['text' => __('Actions')]]], 'tbody' => ['items' => $staticItems]]);
?>
    </div>
    <div class="col-md-6">
        <h2><?php 
echo __('Dynamic(callback) routes');
?>
</h2>
        <?php 
echo Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => __('Environment')], ['text' => __('Inject controller')], ['text' => __('Target class')], ['text' => __('Actions')]]], 'tbody' => ['items' => $dynamicItems]]);
?>
    </div>
</div>
<?php 
if (count($staticItems) < 1 && count($dynamicItems) < 1) {
    ?>
    <p class="alert alert-warning"><?php 
    echo __('Custom routes is not yet found');
    ?>
</p>
<?php 
}
echo Url::link(['main/addroute'], '<i class="fa fa-plus"></i> ' . __('New route'), ['class' => 'btn btn-primary']);
Пример #9
0
    echo '<p class="alert alert-warning">' . __('Answers is not founded') . '</p>';
    return;
}
$items = [];
$moderateIsFound = false;
foreach ($records as $item) {
    $commentObject = $item->getCommentPost();
    $message = Text::cut(\App::$Security->strip_tags($item->message), 0, 75);
    $moderate = (bool) $item->moderate;
    if ($moderate) {
        $moderateIsFound = true;
    }
    $items[] = [1 => ['text' => $item->id], 2 => ['text' => ($moderate ? '<i class="fa fa-exclamation text-warning"></i> ' : null) . Url::link(['comments/read', $commentObject->id, null, ['#' => '#answer-' . $item->id]], $message), 'html' => true], 3 => ['text' => Simplify::parseUserLink((int) $item->user_id, $item->guest_name, 'user/update'), 'html' => true], 4 => ['text' => '<a href="' . App::$Alias->scriptUrl . $commentObject->pathway . '" target="_blank">' . Str::sub($commentObject->pathway, 0, 20) . '...</a>', 'html' => true], 5 => ['text' => Date::convertToDatetime($item->created_at, Date::FORMAT_TO_HOUR)], 6 => ['text' => Url::link(['comments/read', $commentObject->id], '<i class="fa fa-list fa-lg"></i>') . ' ' . Url::link(['comments/delete', 'answer', $item->id], '<i class="fa fa-trash-o fa-lg"></i>'), 'html' => true, 'property' => ['class' => 'text-center']], 'property' => ['class' => 'checkbox-row' . ($moderate !== false ? ' alert-warning' : null)]];
}
$moderateAccept = false;
if ($moderateIsFound) {
    $moderateAccept = ['type' => 'submit', 'class' => 'btn btn-warning', 'value' => __('Publish'), 'formaction' => Url::to('comments/publish', 'answer')];
}
?>

<div class="table-responsive">
<?php 
echo Table::display(['table' => ['class' => 'table table-bordered table-hover'], 'thead' => ['titles' => [['text' => '#'], ['text' => __('Answer')], ['text' => __('Author')], ['text' => __('Page')], ['text' => __('Date')], ['text' => __('Actions')]]], 'tbody' => ['items' => $items], 'selectableBox' => ['attachOrder' => 1, 'form' => ['method' => 'GET', 'class' => 'form-horizontal', 'action' => Url::to('comments/delete', 'answer')], 'selector' => ['type' => 'checkbox', 'name' => 'selected[]', 'class' => 'massSelectId'], 'buttons' => [['type' => 'submit', 'class' => 'btn btn-danger', 'value' => __('Delete selected'), 'formaction' => Url::to('comment/delete', 'answer')], $moderateAccept]]]);
?>
</div>

<div class="text-center">
    <?php 
echo $pagination->display(['class' => 'pagination pagination-centered']);
?>
</div>
Пример #10
0
        </div>
    </div>
<?php 
$widgetTableItems = null;
foreach ($widgets as $widget) {
    /** @var $widget Apps\ActiveRecord\App */
    $route = $widget->sys_name . '/index';
    $icoStatus = null;
    $actions = $this->render('native/macro/widget_actions', ['controller' => $widget->sys_name]);
    if ((int) $widget->disabled !== 0) {
        $icoStatus = ' <i class="fa fa-pause" style="color: #ff0000;"></i>';
    } elseif ($widget->checkVersion() !== true) {
        $icoStatus = ' <i class="fa fa-exclamation" style="color: #ffbd26;"></i>';
        $actions = Url::link(['widget/update', $widget->sys_name], '<i class="fa fa-wrench"></i>');
    } else {
        $icoStatus = ' <i class="fa fa-check" style="color: #008000;"></i>';
    }
    $widgetTableItems[] = [['text' => $widget->id . $icoStatus, 'html' => true, '!secure' => true], ['text' => Url::link([$route], $widget->getLocaleName()), 'html' => true], ['text' => $widget->version], ['text' => Date::convertToDatetime($widget->updated_at, Date::FORMAT_TO_HOUR)], ['text' => $actions, 'property' => ['class' => 'text-center'], 'html' => true]];
}
?>

<?php 
if ($widgetTableItems === null || count($widgetTableItems) < 1) {
    echo '<p class="alert alert-info">' . __('Installed widgets is not founded') . '</p>';
}
?>


<?php 
echo Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => '#'], ['text' => __('Widget')], ['text' => __('Version')], ['text' => __('Activity')], ['text' => __('Actions')]]], 'tbody' => ['items' => $widgetTableItems]]);
Пример #11
0
use Ffcms\Core\Helper\HTML\Table;
use Ffcms\Core\Helper\Url;
/** @var $tplPath string */
/** @var $appRoute string */
/** @var $scriptsVersion string */
/** @var $dbVersion string */
// set global meta-title as apply dynamic property for {$this} object
$this->title = __('Demo app');
$this->breadcrumbs = [Url::to('main/index') => __('Main'), Url::to('application/index') => __('Applications'), __('Demo app')];
echo $this->render('_tabs', null, $tplPath);
?>

<h1><?php 
echo __('Demo app');
?>
</h1>
<hr />
<p>
    <?php 
echo __('Hello! This is demonstration of usage FFCMS application package system!');
?>
.
    <?php 
echo __('Below you can see some information about this package');
?>
:
</p>

<?php 
echo Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => __('Param')], ['text' => __('Value')]]], 'tbody' => ['items' => [[['type' => 'text', 'text' => 'Application source'], ['type' => 'text', 'text' => $appRoute]], [['type' => 'text', 'text' => 'Scripts version'], ['type' => 'text', 'text' => $scriptsVersion]], [['type' => 'text', 'text' => 'Database version'], ['type' => 'text', 'text' => $dbVersion]]]]]);
Пример #12
0
</h2>
<hr />
<?php 
echo \Ffcms\Core\Helper\HTML\Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => __('Service')], ['text' => __('Version/Status')]]], 'tbody' => ['items' => [[['text' => 'PHP'], ['text' => $model->phpVersion], 'property' => ['class' => $model->checkPhpVersion() ? 'alert-success' : 'alert-danger']], [['text' => 'PHP::PDO'], ['text' => $model->pdo ? 'On' : 'Off'], 'property' => ['class' => $model->pdo ? 'alert-success' : 'alert-danger']], [['text' => 'PHP::GD'], ['text' => $model->gd ? 'On' : 'Off'], 'property' => ['class' => $model->gd ? 'alert-success' : 'alert-danger']]]]]);
?>
<h2><?php 
echo __('Checking chmod');
?>
</h2>
<hr />
<?php 
$chmodItems = [];
foreach ($model->chmodCheck as $dir => $status) {
    $chmodItems[] = [['text' => $dir], ['text' => $status ? 'Ok' : 'Error'], 'property' => ['class' => $status ? 'alert-success' : 'alert-danger']];
}
echo \Ffcms\Core\Helper\HTML\Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => __('Path')], ['text' => __('Status')]]], 'tbody' => ['items' => $chmodItems]]);
?>

<h2 id="license">The MIT License</h2>
<textarea class="form-control" rows="5">
Copyright (c) 2015-2016 FFCMS, Mihail Pyatinskyi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Пример #13
0
    <div class="row">
        <div class="col-md-12">
            <?php 
echo Url::link(['profile/fieldupdate', 0], '<i class="fa fa-plus"></i> ' . __('Add field'), ['class' => 'btn btn-primary pull-right']);
?>
        </div>
    </div>
<?php 
if ($records->count() > 0) {
    $items = [];
    foreach ($records as $row) {
        $labelClass = 'label';
        if ($row->type === 'link') {
            $labelClass .= ' label-primary';
        } else {
            $labelClass .= ' label-default';
        }
        $items[] = [['text' => $row->id], ['text' => $row->getLocaled('name')], ['text' => '<span class="' . $labelClass . '">' . $row->type . '</span>', 'html' => true], ['text' => '<code>' . ($row->reg_cond == 0 ? '!' : null) . 'preg_match("' . $row->reg_exp . '", input)' . '</code>', 'html' => true], ['text' => Url::link(['profile/fieldupdate', $row->id], '<i class="fa fa-pencil fa-lg"></i> ', ['html' => true]) . Url::link(['profile/fielddelete', $row->id], '<i class="fa fa-trash-o fa-lg"></i>', ['html' => true]), 'html' => true, 'property' => ['class' => 'text-center']]];
    }
    ?>

    <?php 
    echo Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => 'id'], ['text' => __('Title')], ['text' => __('Type')], ['text' => __('Rule')], ['text' => __('Actions')]]], 'tbody' => ['items' => $items]]);
} else {
    ?>
    <p class="alert alert-warning"><?php 
    echo __('No additional fields is add yet!');
    ?>
</p>
<?php 
}
Пример #14
0
?>

<?php 
echo $this->render('profile/_tabs');
?>

<h1><?php 
echo __('Field delete');
?>
</h1>
<hr />
<p><?php 
echo __('Are you sure to delete this custom field?');
?>
</p>
<?php 
echo Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => __('Param')], ['text' => __('Value')]]], 'tbody' => ['items' => [[['text' => $model->getLabel('name')], ['text' => $model->name[\App::$Request->getLanguage()]]], [['text' => $model->getLabel('type')], ['text' => $model->type]], [['text' => $model->getLabel('reg_exp')], ['text' => ($model->reg_cond == 0 ? '!' : null) . 'preg_match("' . $model->reg_exp . '", $input)']]]]]);
$form = new Form($model, ['class' => 'form-horizontal', 'action' => '', 'method' => 'post']);
?>

<?php 
echo $form->start();
?>

<div class="col-md-12"><?php 
echo $form->submitButton(__('Delete'), ['class' => 'btn btn-danger']);
?>
</div>

<?php 
echo $form->finish(false);
Пример #15
0
// set page meta title
$this->title = __('Demo app');
// set breadcrumbs
$this->breadcrumbs = [Url::to('main/index') => __('Home'), __('Demo index')];
?>

<h1><?php 
echo __('Demo app index');
?>
</h1>
<hr />
<p><?php 
echo __('This is a front-end page demoapp package. Here you can see some examples of usage.');
?>
</p>
<p><?php 
echo __('Example of usage ActiveRecord result rendering in table');
?>
:</p>
<?php 
// build items from sql query (activerecord usage)
$items = [];
foreach ($records as $row) {
    $items[] = [['text' => $row->id], ['text' => $row->text]];
}
// display table with specified structure
echo Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => 'id'], ['text' => 'text']]], 'tbody' => ['items' => $items]]);
?>
<p>Other pages example:</p>
<?php 
echo \Ffcms\Core\Helper\HTML\Listing::display(['type' => 'ul', 'id' => 'example-listing', 'items' => [['type' => 'link', 'link' => ['demoapp/pass', '123', 'test'], 'text' => 'Pass id=123, add=test to action'], ['type' => 'link', 'link' => ['demoapp/auth'], 'text' => 'Only for authorized users page']]]);
Пример #16
0
<h1><?php 
echo __('Feedback requests');
?>
</h1>
<?php 
echo $this->render('feedback/_authTabs');
?>

<?php 
if ($records->count() < 1) {
    echo '<p class="alert alert-warning">' . __('No requests is founded') . '</p>';
    return;
}
$items = [];
foreach ($records as $item) {
    $items[] = [['text' => $item->id], ['text' => Url::link(['feedback/read', $item->id, $item->hash], Text::cut($item->message, 0, 40)), 'html' => true], ['text' => (int) $item->closed === 1 ? '<span class="label label-danger">' . __('Closed') . '</span>' : '<span class="label label-success">' . __('Opened') . '</span>', 'html' => true, '!secure' => true], ['text' => Date::convertToDatetime($item->created_at, Date::FORMAT_TO_HOUR)], ['text' => Date::convertToDatetime($item->updated_at, Date::FORMAT_TO_HOUR)]];
}
?>

<?php 
echo \Ffcms\Core\Helper\HTML\Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => '#'], ['text' => __('Message')], ['text' => __('Status')], ['text' => __('Created')], ['text' => __('Updated')]]], 'tbody' => ['items' => $items]]);
?>


<div class="text-center">
    <?php 
echo $pagination->display(['class' => 'pagination pagination-centered']);
?>
</div>
Пример #17
0
echo $this->render('user/_tabs');
?>

<h1><?php 
echo __('Delete users');
?>
</h1>
<hr />
<p><?php 
echo __('Are you sure to delete this users?');
?>
</p>
<?php 
$items = [];
foreach ($model->users as $user) {
    /** @var \Apps\ActiveRecord\User $user */
    $items[] = [['text' => $user->getParam('id')], ['text' => $user->getParam('email')], ['text' => $user->getParam('login')], ['text' => $user->getProfile()->getNickname()], ['text' => Date::convertToDatetime($user->created_at, Date::FORMAT_TO_HOUR)]];
}
?>

<?php 
echo Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => '#'], ['text' => __('Email')], ['text' => __('Login')], ['text' => __('Nickname')], ['text' => __('Register date')]]], 'tbody' => ['items' => $items]]);
?>


<?php 
$form = new Form($model, ['class' => 'form-horizontal', 'method' => 'post', 'action' => '']);
echo $form->start();
echo $form->submitButton(__('Delete'), ['class' => 'btn btn-danger']) . "&nbsp;";
echo Url::link(['user/index'], __('Cancel'), ['class' => 'btn btn-default']);
echo $form->finish();
Пример #18
0
</h1>
<hr />

<?php 
$items = [];
foreach ($records as $role) {
    $permissions = explode(';', $role->permissions);
    $permissionsLabel = null;
    foreach ($permissions as $perm) {
        $labelMark = null;
        if (Str::startsWith('admin/', $perm)) {
            $labelMark = 'label-warning';
        } elseif ($perm === 'global/all') {
            $labelMark = 'label-danger';
        } else {
            $labelMark = 'label-default';
        }
        $permissionsLabel .= '<span class="label ' . $labelMark . '">' . $perm . '</span> ';
    }
    $items[] = [['text' => $role->id], ['text' => $role->name], ['text' => $permissionsLabel, 'html' => true], ['text' => Url::link(['user/groupupdate', $role->id], '<i class="fa fa-pencil fa-lg"></i>'), 'property' => ['class' => 'text-center'], 'html' => true]];
}
?>

<div class="pull-right"><?php 
echo Url::link(['user/groupupdate', '0'], __('Add group'), ['class' => 'btn btn-primary']);
?>
</div>

<?php 
echo Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => 'id'], ['text' => __('Name')], ['text' => __('Permissions')], ['text' => __('Actions')]], 'property' => ['id' => 'thead_main']], 'tbody' => ['items' => $items]]);
Пример #19
0
<hr />
<?php 
if ($records !== null && $records->count() > 0) {
    ?>
    <?php 
    $items = [];
    foreach ($records as $row) {
        $userProfile = $row->getUser()->getProfile();
        $userNick = \Ffcms\Core\Helper\Simplify::parseUserNick($userProfile->user_id, __('No name'));
        $items[] = [['text' => Url::link(['profile/show', $row->target_id], $userNick, ['target' => '_blank']), 'html' => true], ['text' => $row->comment], ['text' => Date::convertToDatetime($row->created_at, Date::FORMAT_TO_DAY)], ['text' => Url::link(['profile/unblock', $row->target_id], '<i class="fa fa-times"></i>'), 'html' => true, 'property' => ['class' => 'text-center']]];
    }
    ?>


    <?php 
    echo Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => __('User')], ['text' => __('Comment')], ['text' => __('Add date')], ['text' => __('Actions')]]], 'tbody' => ['items' => $items]]);
    ?>
    <div class="text-center">
        <?php 
    echo $pagination->display(['class' => 'pagination pagination-centered']);
    ?>
    </div>
<?php 
} else {
    ?>
<p><?php 
    echo __('No users in blacklist!');
    ?>
</p>
<?php 
}
Пример #20
0
use Ffcms\Core\Helper\Type\Str;
use Ffcms\Core\Helper\Url;
$this->title = __('Profile list');
$this->breadcrumbs = [Url::to('main/index') => __('Main'), Url::to('application/index') => __('Applications'), __('Profile')];
?>

<?php 
echo $this->render('profile/_tabs');
?>

<h1><?php 
echo __('Profile list');
?>
</h1>
<hr />
<?php 
$items = [];
foreach ($records as $profile) {
    $items[] = [['text' => $profile->id], ['text' => $profile->User()->login . '/' . $profile->User()->email], ['text' => $profile->nick], ['text' => Str::startsWith('0000-', $profile->birthday) ? __('None') : Date::convertToDatetime($profile->birthday)], ['text' => ($profile->rating > 0 ? '+' : null) . $profile->rating], ['text' => Url::link(['profile/update', $profile->id], '<i class="fa fa-pencil fa-lg"></i> ') . Url::link(['user/delete', $profile->User()->id], '<i class="fa fa-trash-o fa-lg"></i>'), 'html' => true, 'property' => ['class' => 'text-center']]];
}
?>

<?php 
echo Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => 'id'], ['text' => 'login/email'], ['text' => __('Nickname')], ['text' => __('Birthday')], ['text' => __('Rating')], ['text' => __('Actions')]]], 'tbody' => ['items' => $items]]);
?>

<div class="text-center">
    <?php 
echo $pagination->display(['class' => 'pagination pagination-centered']);
?>
</div>
Пример #21
0
<h1><?php 
echo __('User list');
?>
</h1>
<hr />
<?php 
$items = [];
foreach ($records as $user) {
    $items[] = [1 => ['text' => $user->id], 2 => ['text' => $user->email], 3 => ['text' => $user->login], 4 => ['text' => $user->getRole()->name], 5 => ['text' => Date::convertToDatetime($user->created_at, Date::FORMAT_TO_DAY)], 6 => ['text' => Url::link(['user/update', $user->id], '<i class="fa fa-pencil fa-lg"></i>') . Url::link(['user/delete', $user->id], ' <i class="fa fa-trash-o fa-lg"></i>'), 'html' => true, 'property' => ['class' => 'text-center']], 'property' => ['class' => 'checkbox-row' . ($user->approve_token != '0' ? ' alert-warning' : null)]];
}
?>

<div class="pull-right">
    <?php 
echo Url::link(['user/invite'], __('Send invite'), ['class' => 'btn btn-primary']);
?>
    <?php 
echo Url::link(['user/update', '0'], __('Add user'), ['class' => 'btn btn-primary']);
?>
</div>

<?php 
echo Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => '#'], ['text' => __('Email')], ['text' => __('Login')], ['text' => __('Role')], ['text' => __('Register date')], ['text' => __('Actions')]]], 'tbody' => ['items' => $items], 'selectableBox' => ['attachOrder' => 1, 'form' => ['method' => 'GET', 'class' => 'form-horizontal', 'action' => Url::to('user/delete')], 'selector' => ['type' => 'checkbox', 'name' => 'selected[]', 'class' => 'massSelectId'], 'buttons' => [['type' => 'submit', 'class' => 'btn btn-danger', 'value' => __('Delete selected')]]]]);
?>

<div class="text-center">
    <?php 
echo $pagination->display(['class' => 'pagination pagination-centered']);
?>
</div>
Пример #22
0
<?php

use Ffcms\Core\Helper\Date;
use Ffcms\Core\Helper\HTML\Table;
use Ffcms\Core\Helper\Url;
/** @var \Apps\ActiveRecord\FeedbackPost|\Apps\ActiveRecord\FeedbackAnswer $record */
/** @var \Apps\Model\Admin\Feedback\FormAnswerAdd|null $model */
$this->title = __('Feedback delete');
$this->breadcrumbs = [Url::to('main/index') => __('Main'), Url::to('application/index') => __('Applications'), Url::to('feedback/index') => __('Feedback'), __('Delete message')];
echo $this->render('feedback/_tabs');
?>
<h1><?php 
echo __('Delete feedback message');
?>
</h1>
<hr />
<div class="table-responsive">
    <?php 
echo Table::display(['table' => ['class' => 'table table-bordered'], 'tbody' => ['items' => [[['text' => __('Sender')], ['text' => $record->name . ' (' . $record->email . ')']], [['text' => __('Date')], ['text' => Date::convertToDatetime($record->created_at, Date::FORMAT_TO_HOUR)]], [['text' => __('Message')], ['text' => $record->message]]]]]);
?>
</div>
<form action="" method="post">
    <input type="submit" name="deleteFeedback" value="<?php 
echo __('Delete');
?>
" class="btn btn-danger" />
    <?php 
echo Url::link(['feedback/index'], __('Cancel'), ['class' => 'btn btn-default']);
?>
</form>
Пример #23
0
<?php

/** @var $this object */
/** @var $model Apps\Model\Admin\Application\FormUpdate */
use Ffcms\Core\Helper\HTML\Form;
use Ffcms\Core\Helper\Url;
$this->title = __('Update app');
$this->breadcrumbs = [Url::to('main/index') => __('Main'), Url::to('application/index') => __('Applications'), __('Update')];
?>
<h1><?php 
echo __('Update app');
?>
</h1>
<hr />
<?php 
echo \Ffcms\Core\Helper\HTML\Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => __('App name')], ['text' => __('Script version')], ['text' => __('DB version')], ['text' => __('Last changes')]]], 'tbody' => ['items' => [[['text' => $model->name], ['text' => $model->scriptVersion], ['text' => $model->dbVersion], ['text' => $model->date]]]]]);
?>

<?php 
$form = new Form($model, ['class' => 'form-horizontal', 'method' => 'post']);
?>

<?php 
echo $form->start();
?>

<?php 
echo $form->submitButton(__('Try update'), ['class' => 'btn btn-primary']);
?>

<?php 
Пример #24
0
<?php

use Ffcms\Core\Helper\Date;
use Ffcms\Core\Helper\HTML\Table;
use Ffcms\Core\Helper\Url;
/** @var $this object */
/** @var $records Apps\ActiveRecord\UserLog */
$this->title = __('Logs');
$this->breadcrumbs = [Url::to('main/index') => __('Home'), Url::to('profile/show', \App::$User->identity()->getId()) => __('Profile'), __('Logs')];
?>

<?php 
echo $this->render('profile/_settingsTab');
?>

<h2><?php 
echo __('My logs');
?>
</h2>
<hr />
<?php 
if ($records === null || $records->count() < 1) {
    echo __('No logs is available');
    return;
}
$logs = [];
foreach ($records->get() as $log) {
    $logs[] = [['type' => 'text', 'text' => $log->id], ['type' => 'text', 'text' => $log->type], ['type' => 'text', 'text' => $log->message], ['type' => 'text', 'text' => Date::convertToDatetime($log->created_at, Date::FORMAT_TO_HOUR)]];
}
echo Table::display(['table' => ['class' => 'table table-striped'], 'thead' => ['titles' => [['text' => '#'], ['text' => __('Type')], ['text' => __('Message')], ['text' => __('Date')]]], 'tbody' => ['items' => $logs]]);
Пример #25
0
                <?php 
echo __('Sender info');
?>
            </div>
            <div class="panel-body">
                <?php 
$uInfo = 'no';
if ((int) $record->user_id > 0) {
    $user = \App::$User->identity($record->user_id);
    if ($user !== null && $user->getId() > 0) {
        $uInfo = Url::link(['user/update', $user->getId()], $user->getProfile()->getNickname());
    }
}
?>
                <?php 
echo Table::display(['table' => ['class' => 'table table-striped'], 'tbody' => ['items' => [[['text' => __('Name')], ['text' => $record->name]], [['text' => __('Email')], ['text' => $record->email]], [['text' => __('Auth')], ['text' => $uInfo, 'html' => true]], [['text' => 'IP'], ['text' => $record->ip]]]]]);
?>
            </div>
        </div>
    </div>
</div>

<?php 
if ($record->getAnswers()->count() > 0) {
    ?>
    <?php 
    foreach ($record->getAnswers()->get() as $answer) {
        ?>
        <div class="panel <?php 
        echo (int) $answer->is_admin === 1 ? 'panel-success' : 'panel-default';
        ?>
Пример #26
0
    $actionIcons .= Url::link(['content/update', $content->id], '<i class="fa fa-pencil fa-lg"></i> ');
    if ($type === 'trash') {
        $actionIcons .= Url::link(['content/restore', $content->id], '<i class="fa fa-refresh fa-lg"></i>');
    } else {
        $actionIcons .= Url::link(['content/delete', $content->id], '<i class="fa fa-trash-o fa-lg"></i>');
    }
    if (!(bool) $content->display) {
        $moderate = true;
    }
    $items[] = ['property' => ['class' => 'checkbox-row' . (!(bool) $content->display ? ' alert-warning' : null)], 1 => ['text' => $content->id, 'html' => true, '!secure' => true], 2 => ['text' => (!(bool) $content->display ? '<i class="fa fa-exclamation text-warning"></i> ' : null) . Url::link(['content/update', $content->id], $content->getLocaled('title')), 'html' => true], 3 => ['text' => $content->getCategory()->getLocaled('title')], 4 => ['text' => '<a href="' . $frontLink . '" target="_blank">' . $frontPath . '</a>', 'html' => true], 5 => ['text' => Date::convertToDatetime($content->updated_at, Date::FORMAT_TO_SECONDS)], 6 => ['text' => $actionIcons, 'html' => true, 'property' => ['class' => 'text-center']]];
}
$selectBox = false;
if ($type !== 'trash') {
    $acceptButton = false;
    if ($moderate === true) {
        $acceptButton = ['type' => 'submit', 'class' => 'btn btn-warning', 'value' => __('Publish'), 'formaction' => Url::to('content/publish')];
    }
    $selectBox = ['attachOrder' => 1, 'form' => ['method' => 'GET', 'class' => 'form-horizontal', 'action' => Url::to('content/globdelete')], 'selector' => ['type' => 'checkbox', 'name' => 'selected[]', 'class' => 'massSelectId'], 'buttons' => [['type' => 'submit', 'class' => 'btn btn-danger', 'value' => __('Delete selected')], $acceptButton]];
}
?>
<div class="table-responsive">
<?php 
echo Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => '#'], ['text' => __('Title')], ['text' => __('Category')], ['text' => __('Pathway')], ['text' => __('Date')], ['text' => __('Actions')]]], 'tbody' => ['items' => $items], 'selectableBox' => $selectBox]);
?>
</div>

<div class="text-center">
    <?php 
echo $pagination->display(['class' => 'pagination pagination-centered']);
?>
</div>