add backend theme AdminLte, bind reception/transaction to a permission

This commit is contained in:
2015-11-23 19:55:49 +01:00
parent e13866d7da
commit bcae71155e
25 changed files with 993 additions and 128 deletions

View File

@@ -1,27 +1,45 @@
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $name string */
/* @var $message string */
/* @var $exception Exception */
use yii\helpers\Html;
$this->title = $name;
?>
<div class="site-error">
<!-- Main content -->
<section class="content">
<h1><?= Html::encode($this->title) ?></h1>
<div class="error-page">
<h2 class="headline text-info"><i class="fa fa-warning text-yellow"></i></h2>
<div class="alert alert-danger">
<?= nl2br(Html::encode($message)) ?>
<div class="error-content">
<h3><?= $name ?></h3>
<p>
<?= nl2br(Html::encode($message)) ?>
</p>
<p>
The above error occurred while the Web server was processing your request.
Please contact us if you think this is a server error. Thank you.
Meanwhile, you may <a href='<?= Yii::$app->homeUrl ?>'>return to dashboard</a> or try using the search
form.
</p>
<form class='search-form'>
<div class='input-group'>
<input type="text" name="search" class='form-control' placeholder="Search"/>
<div class="input-group-btn">
<button type="submit" name="submit" class="btn btn-primary"><i class="fa fa-search"></i>
</button>
</div>
</div>
</form>
</div>
</div>
<p>
The above error occurred while the Web server was processing your request.
</p>
<p>
Please contact us if you think this is a server error. Thank you.
</p>
</div>
</section>

View File

@@ -2,16 +2,11 @@
/* @var $this yii\web\View */
$this->title = 'My Yii Application';
$this->title = Yii::$app->name;
?>
<div class="site-index">
<div class="jumbotron">
<h1>Web Admin</h1>
<p class="lead">Üdvözöljük adminisztrációs felületünkön</p>
</div>
</div>

View File

@@ -1,35 +1,59 @@
<?php
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model \common\models\LoginForm */
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
$this->title = 'Bejelentkezés';
$this->title = Yii::t('common/site' , 'Login');
$this->params['breadcrumbs'][] = $this->title;
$fieldOptions1 = [
'options' => ['class' => 'form-group has-feedback'],
'inputTemplate' => "{input}<span class='glyphicon glyphicon-envelope form-control-feedback'></span>"
];
$fieldOptions2 = [
'options' => ['class' => 'form-group has-feedback'],
'inputTemplate' => "{input}<span class='glyphicon glyphicon-lock form-control-feedback'></span>"
];
?>
<div class="site-login">
<h1><?= Html::encode($this->title) ?></h1>
<p><?php echo Yii::t('common/site' , 'Please fill out the following fields to login:') ?> </p>
<div class="row">
<div class="col-lg-5">
<?php $form = ActiveForm::begin(['id' => 'login-form']); ?>
<?= $form->field($model, 'username') ?>
<?= $form->field($model, 'password')->passwordInput() ?>
<?= $form->field($model, 'rememberMe')->checkbox() ?>
<div class="form-group">
<?= Html::submitButton( Yii::t('common/site' ,'Login'), ['class' => 'btn btn-primary', 'name' => 'login-button']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<div class="login-box">
<div class="login-logo">
<a href="#"><b>Fitness</b>Adminisztráció</a>
</div>
</div>
<!-- /.login-logo -->
<div class="login-box-body">
<p class="login-box-msg">Kérem jelentkezzen be</p>
<?php $form = ActiveForm::begin(['id' => 'login-form', 'enableClientValidation' => false]); ?>
<?= $form
->field($model, 'username', $fieldOptions1)
->label(false)
->textInput(['placeholder' => $model->getAttributeLabel('username')]) ?>
<?= $form
->field($model, 'password', $fieldOptions2)
->label(false)
->passwordInput(['placeholder' => $model->getAttributeLabel('password')]) ?>
<div class="row">
<div class="col-xs-6">
<?= $form->field($model, 'rememberMe')->checkbox() ?>
</div>
<!-- /.col -->
<div class="col-xs-6">
<?= Html::submitButton('Bejelentkezés', ['class' => 'btn btn-primary btn-block btn-flat', 'name' => 'login-button']) ?>
</div>
<!-- /.col -->
</div>
<?php ActiveForm::end(); ?>
</div>
<!-- /.login-box-body -->
</div><!-- /.login-box -->