Пример #1
0
 *
 * (c) Dektrium project <http://github.com/dektrium>
 *
 * For the full copyright and license information, please view the LICENSE.md
 * file that was distributed with this source code.
 */
use yii\helpers\Html;
use yii\web\View;
/**
 * @var View $this
 * @var \common\models\cf\PersonsRecord $user
 */
$this->title = $user->fullName;
$this->params['breadcrumbs'][] = ['label' => Yii::t('user', 'Users'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
echo \common\widgets\CardSwipe::widget(['url' => ['/card/swipe'], 'postPropertyName' => 'id', 'callback' => 'function(id, e) {
        //если карта отличается от карты данного пользователя то виджет посылает запрос на сервер и выполняет редирект как обычно..
        return (id !== "' . ($user->card !== null ? $user->card->HardID : 0) . '")
    }']);
?>
<div class="row" id="user-update">
    <h1 class="page-header"><?php 
echo Html::encode($this->title);
?>
</h1>
    <?php 
echo $content;
?>
</div>
<?php 
$this->registerJs("\n\$(function(){\n    var button = \$('#charge-button').focus()\n})\n", View::POS_READY);
Пример #2
0
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?php 
echo Html::csrfMetaTags();
?>
    <title><?php 
echo Html::encode($this->title);
?>
</title>
    <?php 
$this->head();
?>
</head>
<body class="login-page">
    <div class="background-image"></div>
    <?php 
echo \common\widgets\CardSwipe::widget(['url' => ['/user/security/card-login'], 'postPropertyName' => 'Login']);
?>
    <div class="content">
    <?php 
$this->beginBody();
?>

        <?php 
echo $content;
?>

    <?php 
$this->endBody();
?>
    </div>
</body>
Пример #3
0
echo Html::csrfMetaTags();
?>
    <title><?php 
echo Html::encode($this->title);
?>
</title>
    <?php 
$this->head();
?>
</head>
<body class="sidebar-mini" style="padding-top: 51px">
<?php 
$this->beginBody();
?>
    <?php 
echo \common\widgets\CardSwipe::widget(['url' => ['/card/swipe'], 'postPropertyName' => 'id']);
?>
    <header class="slide-reveal hidden-print">
        <?php 
\yii\bootstrap\NavBar::begin(['brandLabel' => '<p class="text-success">' . Yii::$app->name . '</p>', 'renderInnerContainer' => true, 'innerContainerOptions' => ['class' => 'container-fluid'], 'options' => ['class' => 'navbar-default navbar-fixed-top']]);
?>
        <?php 
echo \yii\bootstrap\Nav::widget(['encodeLabels' => false, 'items' => [['label' => '<i class="fa fa-male"></i> Пользователи', 'url' => ['/user/admin/list'], 'items' => [['label' => '<i class="fa fa-male"></i> Пользователи', 'url' => ['/user/admin/list'], 'visible' => $user->can('/user/admin/list')], ['label' => '<i class="fa fa-users"></i> Группы', 'url' => ['/group/index'], 'visible' => $user->can('/group/index')], ['label' => '<i class="fa fa-line-chart"></i> Уровни', 'url' => ['/levels/index'], 'visible' => $user->can('/levels/index')], ['label' => '<i class="fa fa-user-times"></i> Настройка прав', 'url' => ['/rbac/assignment/index'], 'visible' => $identity->isAdmin]]], ['label' => '<i class="fa fa-child"></i> Услуги', 'url' => ['/service/index'], 'visible' => $user->can('/service/index')], ['label' => '<i class="fa fa-star"></i> Акции', 'url' => ['/action/index'], 'visible' => $user->can('/action/index')], ['label' => '<i class="fa fa-file-excel-o"></i> Отчет', 'url' => ['/reports/index'], 'visible' => $user->can('/reports/index')], ['label' => '<i class="fa fa-cog"></i>', 'items' => [['label' => '<i class="fa fa-bar-chart"></i> Статистика', 'url' => ['/statistics/index'], 'visible' => $user->can('/statistics/index')], ['label' => '<i class="fa fa-file-text-o"></i> Журнал', 'url' => ['/logs/index'], 'visible' => $user->can('/logs/index')], ['label' => '<i class="fa fa-plug"></i> Объекты', 'url' => ['/objects/index'], 'visible' => $user->can('/objects/index')], ['label' => '<i class="fa fa-globe"></i> Залы', 'url' => ['/rooms/index'], 'visible' => $user->can('/rooms/index')]]]], 'options' => ['class' => 'nav navbar-nav visible-xs']]);
?>
        <?php 
echo \yii\bootstrap\Nav::widget(['encodeLabels' => false, 'items' => [['label' => ($identity->ServiceCard ? '<i class="fa fa-fw fa-user-md"></i> ' : '<i class="fa fa-fw fa-user"></i> ') . $identity->fullName, 'items' => [['label' => '<span class="glyphicon glyphicon-credit-card"></span> Счет', 'url' => ['/user/admin/update', 'id' => $identity->id]], ['label' => '<span class="glyphicon glyphicon-stats"></span> Моя статистика', 'url' => ['/finances/person', 'id' => $identity->id]], ['label' => '<span class="glyphicon glyphicon-log-out"></span> Выйти', 'url' => ['/user/security/logout'], 'linkOptions' => ['data-method' => 'post']]]], ['label' => Html::img($assetUrl . '/img/logoff.gif'), 'url' => ['/user/security/logout'], 'linkOptions' => ['data-method' => 'post', 'style' => 'padding: 0;', 'class' => 'hidden-xs']]], 'options' => ['class' => 'nav navbar-nav navbar-right']]);
?>
        <?php 
\yii\bootstrap\NavBar::end();
?>
    </header>
Пример #4
0
<?php

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
/**
 * User: leo
 * Date: 08.10.15
 * Time: 3:18
 */
$this->title = $broken ? Yii::t('app', 'Change broken card') : Yii::t('app', 'Change card');
echo \common\widgets\CardSwipe::widget(['url' => ['/person/change-card-swipe', 'id' => $id, 'broken' => $broken], 'postPropertyName' => 'HardID']);
?>
<div class="person-card-update">
    <h1><?php 
echo Html::a('<span class="glyphicon glyphicon-arrow-left"></span>', ['/user/admin/update', 'id' => $user->ID]);
?>
 <?php 
echo Html::encode($this->title);
?>
 </h1>
    <div class="card-record-form">
        <div class="panel panel-default">
            <div class="panel-body">
                <h2 class="panel-heading">Проведите новую карту</h2>
            </div>
        </div>
    </div>
</div>
Пример #5
0
use dektrium\user\models\User;
use yii\bootstrap\ActiveForm;
use yii\bootstrap\Nav;
use yii\helpers\Html;
use yii\web\View;
/**
 * @var View $this
 * @var User $user
 */
$this->title = Yii::t('user', 'Create a user account');
$this->params['breadcrumbs'][] = ['label' => Yii::t('user', 'Users'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>

<?php 
echo \common\widgets\CardSwipe::widget(['url' => ['/user/admin/create'], 'postPropertyName' => 'HardID']);
?>
<div class="row">
    <div class="col-md-3">
        <div class="panel panel-default">
            <div class="panel-body">
                <?php 
echo Nav::widget(['options' => ['class' => 'nav-pills nav-stacked'], 'items' => [['label' => Yii::t('user', 'Account details'), 'url' => ['/user/admin/create']], ['label' => Yii::t('user', 'Profile details'), 'options' => ['class' => 'disabled', 'onclick' => 'return false;']], ['label' => Yii::t('user', 'Information'), 'options' => ['class' => 'disabled', 'onclick' => 'return false;']]]]);
?>
            </div>
        </div>
    </div>
    <div class="col-md-9">
        <div class="panel panel-default">
            <div class="panel-body">
                <h2 class="panel-heading">Проведите новую карту</h2>