Exemple #1
0
<?php

use Ffcms\Core\Helper\HTML\Bootstrap\Nav;
if (!\App::$User->isAuth()) {
    return null;
}
echo Nav::display(['property' => ['class' => 'nav-tabs'], 'items' => [['type' => 'link', 'text' => __('New request'), 'link' => 'feedback/create'], ['type' => 'link', 'text' => __('My requests'), 'link' => 'feedback/list']]]);
Exemple #2
0
<?php

use Ffcms\Core\Helper\HTML\Bootstrap\Nav;
?>

<?php 
echo Nav::display(['property' => ['class' => 'nav-tabs nav-justified'], 'items' => [['type' => 'link', 'text' => __('User list'), 'link' => ['user/index']], ['type' => 'link', 'text' => __('Group management'), 'link' => ['user/grouplist']], ['type' => 'link', 'text' => __('Settings'), 'link' => ['user/settings']]]]);
Exemple #3
0
<?php

use Ffcms\Core\Helper\HTML\Bootstrap\Nav;
use Ffcms\Core\Helper\Type\Str;
if (Str::likeEmpty($rating)) {
    $rating = 0;
}
$items = [];
$items[] = ['type' => 'link', 'link' => ['profile/index', 'all'], 'text' => __('All')];
if ($rating === 1) {
    $items[] = ['type' => 'link', 'link' => ['profile/index', 'rating'], 'text' => __('Rating')];
}
$items[] = ['type' => 'link', 'link' => ['profile/search'], 'text' => __('Search')];
?>

<?php 
echo Nav::display(['property' => ['class' => 'nav-tabs'], 'activeOrder' => 'id', 'items' => $items]);
Exemple #4
0
<?php

use Ffcms\Core\Helper\HTML\Bootstrap\Nav;
?>

<?php 
echo Nav::display(['property' => ['class' => 'nav-tabs nav-justified'], 'items' => [['type' => 'link', 'text' => __('Feedback list'), 'link' => ['feedback/index']], ['type' => 'link', 'text' => __('Settings'), 'link' => ['feedback/settings']]], 'activeOrder' => 'action']);
Exemple #5
0
<!-- Example internalization. File with translation: /Apps/View/Front/default/i18n/ru.php -->
<?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']]]]]);
Exemple #6
0
$form = new Form($model, ['class' => 'form-horizontal', 'action' => '']);
?>

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

<?php 
$items = [];
foreach (\App::$Properties->get('languages') as $lang) {
    $items[] = ['type' => 'tab', 'text' => __('Lang') . ': ' . Str::upperCase($lang), 'content' => $form->field('title.' . $lang, 'text', ['class' => 'form-control'], __('Enter category title, visible for users')) . $form->field('description.' . $lang, 'text', ['class' => 'form-control'], __('Enter category description')), 'html' => true, 'active' => $lang === \App::$Request->getLanguage(), '!secure' => true];
}
?>

<?php 
echo Nav::display(['property' => ['class' => 'nav-pills'], 'blockProperty' => ['class' => 'nav-locale-block nav-border'], 'tabAnchor' => 'category-update-locale', 'items' => $items]);
?>

<?php 
$pathProperty = ['class' => 'form-control'];
if ((int) $model->id == '1') {
    $pathProperty['disabled'] = '';
} else {
    echo $form->field('dependId', 'select', ['class' => 'form-control', 'options' => $model->categoryList(), 'optionsKey' => true], __('Select owner category for this category'));
}
?>

<?php 
echo $form->field('path', 'text', $pathProperty, __('Enter category path slug for URI building'));
echo $form->field('configs.showDate', 'checkbox', null, __('Display dates of content in this category?'));
echo $form->field('configs.showRating', 'checkbox', null, __('Display rating for items in this category?'));
Exemple #7
0
    <style>
        .image-item {
            height: 100px;
            margin: 0 auto;
        }
    </style>
</head>
<body>
<h2 class="text-center"><?php 
echo __('File browser');
?>
</h2>
<div class="row">
    <div class="col-md-12">
        <?php 
echo \Ffcms\Core\Helper\HTML\Bootstrap\Nav::display(['property' => ['class' => 'nav-tabs'], 'tabAnchor' => 'n', 'items' => [['type' => 'link', 'text' => __('Images'), 'link' => ['ckbrowser/browse', 'images', null, ['CKEditor' => $callbackName, 'CKEditorFuncNum' => $callbackId]]], ['type' => 'link', 'text' => __('Flash'), 'link' => ['ckbrowser/browse', 'flash', null, ['CKEditor' => $callbackName, 'CKEditorFuncNum' => $callbackId]]], ['type' => 'link', 'text' => __('Files'), 'link' => ['ckbrowser/browse', 'files', null, ['CKEditor' => $callbackName, 'CKEditorFuncNum' => $callbackId]]]]]);
?>
    </div>
</div>

<div class="row" style="padding-top: 10px;margin-left: 5px;">
    <?php 
if ($files !== null && count($files) > 0) {
    ?>
        <?php 
    foreach ($files as $file) {
        ?>
            <div class="col-md-2 well" style="margin-left: 5px;">
                <div class="text-center"><strong><?php 
        echo Str::lastIn($file, '/', true);
        ?>
Exemple #8
0
<?php

echo \Ffcms\Core\Helper\HTML\Bootstrap\Nav::display(['property' => ['class' => 'nav-tabs'], 'tabAnchor' => 'login-form', 'activeOrder' => 'action', 'items' => [['type' => 'link', 'link' => 'user/login', 'text' => __('Log In')], ['type' => 'link', 'link' => 'user/signup', 'text' => __('Sign Up')], ['type' => 'link', 'link' => 'user/recovery', 'text' => __('Recovery')]]]);
Exemple #9
0
$form = new Form($model, ['class' => 'form-horizontal', 'action' => '', 'method' => 'post']);
?>

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

<?php 
$nameTab = [];
foreach (\App::$Properties->get('languages') as $lang) {
    $nameTab[] = ['type' => 'tab', 'text' => __('Lang') . ': ' . Str::upperCase($lang), 'content' => $form->field('name.' . $lang, 'text', ['class' => 'form-control'], __('Define field name, which be displayed for user for current language locale')), 'active' => $lang === \App::$Request->getLanguage(), 'html' => true, '!secure' => true];
}
?>

<?php 
echo Nav::display(['property' => ['class' => 'nav-pills'], 'blockProperty' => ['class' => 'nav-locale-block nav-border'], 'tabAnchor' => 'fieldlist', 'items' => $nameTab]);
?>

<?php 
echo $form->field('type', 'select', ['class' => 'form-control', 'options' => ['text', 'link']], __('Select type of additional field'));
echo $form->field('reg_exp', 'text', ['class' => 'form-control'], __('Set regular expression to validate input data from user for this field. Example: /^[0-9]*$/'));
echo $form->field('reg_cond', 'select', ['class' => 'form-control', 'options' => ['0' => __('Reverse (exclude) condition'), '1' => __('Direct (include) condition')], 'optionsKey' => true], __('Specify condition type of validation expression. Direct - if(cond), reverse - if(!cond)'));
if ($model->reg_exp) {
    ?>
<div class="row">
    <div class="col-md-3">
        <label class="pull-right"><?php 
    echo __('How it work');
    ?>
</label>
    </div>
Exemple #10
0
<?php

use Ffcms\Core\Helper\HTML\Bootstrap\Nav;
?>

<?php 
echo Nav::display(['property' => ['class' => 'nav-tabs nav-justified'], 'items' => [['type' => 'link', 'text' => __('Profile list'), 'link' => ['profile/index']], ['type' => 'link', 'text' => __('Profile fields'), 'link' => ['profile/fieldlist']], ['type' => 'link', 'text' => __('Settings'), 'link' => ['profile/settings']]]]);
Exemple #11
0
<?php

use Ffcms\Core\Helper\HTML\Bootstrap\Nav;
?>

<?php 
echo Nav::display(['property' => ['class' => 'nav-tabs nav-justified'], 'items' => [['type' => 'link', 'text' => __('Demo index'), 'link' => ['demoapp/index']], ['type' => 'link', 'text' => __('Demo form'), 'link' => ['demoapp/form']], ['type' => 'link', 'text' => __('Settings'), 'link' => ['demoapp/settings']]], 'activeOrder' => 'action']);
Exemple #12
0
$debugTab .= $form->field('debug.cookie.value', 'text', ['class' => 'form-control'], __('Set cookie value for enable debug bar panel'));
$langTab = $form->field('singleLanguage', 'select', ['class' => 'form-control', 'options' => \App::$Translate->getAvailableLangs()], __('Default language of website'));
$langTab .= $form->field('multiLanguage', 'checkbox', null, __('Must we use multi language system in site pathway'));
$langTab .= $form->field('baseLanguage', 'text', ['class' => 'form-control', 'disabled' => null], __('Website base script language. Do not change it'));
$langTab .= $form->field('languages', 'checkboxes', ['options' => App::$Translate->getAvailableLangs()], __('Website available languages'));
$databaseTab = '<p>' . __('Do not change any information in this tab if you not sure what you do!') . '</p>';
$databaseTab .= $form->field('database.driver', 'select', ['class' => 'form-control', 'options' => ['mysql', 'sqlite', 'pgsql']], __('Database connection driver'));
$databaseTab .= $form->field('database.host', 'text', ['class' => 'form-control'], __('Database connection host name'));
$databaseTab .= $form->field('database.database', 'text', ['class' => 'form-control'], __('Database name or path to sqlite created file database'));
$databaseTab .= $form->field('database.username', 'text', ['class' => 'form-control'], __('User name for database connection'));
$databaseTab .= $form->field('database.password', 'text', ['class' => 'form-control'], __('Password for user of database connection'));
$databaseTab .= $form->field('database.charset', 'text', ['class' => 'form-control']);
$databaseTab .= $form->field('database.collation', 'text', ['class' => 'form-control']);
$databaseTab .= $form->field('database.prefix', 'text', ['class' => 'form-control'], __('Database tables prefix'));
$otherTab = '<p>' . __('There you can change specified configs depends of other platforms. GA = google analytics.') . '</p>';
$otherTab .= $form->field('gaClientId', 'text', ['class' => 'form-control'], __('Google oAuth2 client id. This id will be used to display google.analytics info. Client ID looks like: xxxxxx.apps.googleusercontent.com'));
$otherTab .= $form->field('gaTrackId', 'text', ['class' => 'form-control'], __('Set google analytics tracking id for your website. Track id looks like: UA-XXXXXX-Y'));
$otherTab .= $form->field('trustedProxy', 'text', ['class' => 'form-control'], __('Set trusted proxy list to accept X-FORWARDED data. Example: 103.21.244.15,103.22.200.0/22'));
?>

<?php 
echo \Ffcms\Core\Helper\HTML\Bootstrap\Nav::display(['property' => ['class' => 'nav-tabs'], 'tabAnchor' => 'obj-settings', 'items' => [['type' => 'tab', 'text' => __('Base'), 'content' => $baseTab, 'html' => true, '!secure' => true], ['type' => 'tab', 'text' => __('Themes'), 'content' => $themeTab, 'html' => true, '!secure' => true], ['type' => 'tab', 'text' => __('Localization'), 'content' => $langTab, 'html' => true, '!secure' => true], ['type' => 'tab', 'text' => __('Database'), 'content' => $databaseTab, 'html' => true, '!secure' => true], ['type' => 'tab', 'text' => __('Debug'), 'content' => $debugTab, 'html' => true, '!secure' => true], ['type' => 'tab', 'text' => __('Other'), 'content' => $otherTab, 'html' => true, '!secure' => true]]]);
?>

    <div class="col-md-9 col-md-offset-3"><?php 
echo $form->submitButton(__('Save'), ['class' => 'btn btn-primary']);
?>
</div>

<?php 
echo $form->finish();
Exemple #13
0
<?php

echo \Ffcms\Core\Helper\HTML\Bootstrap\Nav::display(['property' => ['class' => 'nav-tabs'], 'tabAnchor' => 'settings-tb', 'activeOrder' => 'action', 'items' => [['type' => 'link', 'link' => 'profile/avatar', 'text' => __('Avatar')], ['type' => 'link', 'link' => 'profile/settings', 'text' => __('Profile')], ['type' => 'link', 'link' => 'profile/password', 'text' => __('Password')], ['type' => 'link', 'link' => 'profile/ignore', 'text' => __('Blacklist')], ['type' => 'link', 'link' => 'profile/log', 'text' => __('Logs')]]]);
Exemple #14
0
<?php

use Ffcms\Core\Helper\HTML\Bootstrap\Nav;
?>

<?php 
echo Nav::display(['property' => ['class' => 'nav-tabs nav-justified'], 'items' => [['type' => 'link', 'text' => __('Content list'), 'link' => ['content/index']], ['type' => 'link', 'text' => __('Categories manage'), 'link' => ['content/categories']], ['type' => 'link', 'text' => __('Settings'), 'link' => ['content/settings']]], 'activeOrder' => 'action']);
Exemple #15
0
<?php

use Ffcms\Core\Helper\HTML\Bootstrap\Nav;
?>

<?php 
echo Nav::display(['property' => ['class' => 'nav-tabs nav-justified'], 'activeOrder' => 'action', 'items' => [['type' => 'link', 'text' => __('Comments list'), 'link' => ['comments/index']], ['type' => 'link', 'text' => __('Answers list'), 'link' => ['comments/answerlist']], ['type' => 'link', 'text' => __('Settings'), 'link' => ['comments/settings']]]]);
Exemple #16
0
<h1><?php 
echo __('Content edit');
?>
</h1>
<hr />
<?php 
$form = new Form($model, ['class' => 'form-horizontal', 'enctype' => 'multipart/form-data']);
echo $form->start();
?>

<?php 
$items = [];
foreach (\App::$Properties->get('languages') as $lang) {
    $items[] = ['type' => 'tab', 'text' => __('Lang') . ': ' . Str::upperCase($lang), 'content' => $form->field('title.' . $lang, 'text', ['class' => 'form-control'], __('Please, enter the title of your material for current language locale')) . $form->field('text.' . $lang, 'textarea', ['class' => 'form-control wysiwyg', 'rows' => 7, 'html' => true]), 'html' => true, 'active' => $lang === \App::$Request->getLanguage(), '!secure' => true];
}
echo Nav::display(['property' => ['class' => 'nav-pills'], 'blockProperty' => ['class' => 'nav-locale-block'], 'tabAnchor' => 'content-update-general-locale', 'items' => $items]);
?>

<?php 
echo $form->field('path', 'text', ['class' => 'form-control'], __('Set path slug for content item. Allowed items: a-z, 0-9, -'));
echo $form->field('categoryId', 'select', ['class' => 'form-control', 'size' => 4, 'options' => ContentCategory::getSortedCategories(), 'optionsKey' => true], __('Select content category'));
?>

<?php 
echo $form->field('poster', 'file', null, __('Select poster image for this content'));
?>

<div class="col-md-offset-3 col-md-9">
    <?php 
echo $form->submitButton(__('Save'), ['class' => 'btn btn-primary']);
?>