Skip to content

Commit 4b16a66

Browse files
committed
layout fix, +messages
1 parent 55ae4cf commit 4b16a66

File tree

6 files changed

+110
-184
lines changed

6 files changed

+110
-184
lines changed

backend/views/layouts/main.php

Lines changed: 24 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
<img src="/img/128x128.png" alt="..." class="img-circle profile_img">
4848
</div>
4949
<div class="profile_info">
50-
<span>Welcome,</span>
51-
<h2><?= Yii::$app->user->identity->username; ?></h2>
50+
<span><?= \Yii::t('app-backend', 'Welcome');?>,</span>
51+
<h2><?= (Yii::$app->user->isGuest)? \Yii::t('app-backend', 'Guest'):Yii::$app->user->identity->username; ?></h2>
5252
</div>
5353
</div>
5454
<!-- /menu prile quick info -->
@@ -59,69 +59,23 @@
5959
<div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
6060

6161
<div class="menu_section">
62-
<h3>General</h3>
62+
<h3><?= \Yii::t('app-backend', 'General');?></h3>
6363
<?=
6464
\yiister\gentelella\widgets\Menu::widget(
6565
[
6666
"items" => [
67-
["label" => "Home", "url" => "/", "icon" => "home"],
68-
["label" => "Layout", "url" => ["site/layout"], "icon" => "files-o"],
69-
["label" => "Error page", "url" => ["site/error-page"], "icon" => "close"],
67+
["label" => \Yii::t('app-backend', 'Dashboard'), "url" => "/", "icon" => "home"],
68+
["label" => \Yii::t('app-model', 'Users'), "url" => ["/user/admin"], "icon" => "users"],
69+
["label" => \Yii::t('app-model', 'Email Form'), "url" => ["/email-form/index"], "icon" => "envelope"],
7070
[
71-
"label" => "Widgets",
72-
"icon" => "th",
71+
"label" => \Yii::t('app-backend', 'Admin'),
7372
"url" => "#",
74-
"items" => [
75-
["label" => "Menu", "url" => ["site/menu"]],
76-
["label" => "Panel", "url" => ["site/panel"]],
77-
],
78-
],
79-
[
80-
"label" => "Badges",
81-
"url" => "#",
82-
"icon" => "table",
83-
"items" => [
84-
[
85-
"label" => "Default",
86-
"url" => "#",
87-
"badge" => "123",
88-
],
89-
[
90-
"label" => "Success",
91-
"url" => "#",
92-
"badge" => "new",
93-
"badgeOptions" => ["class" => "label-success"],
94-
],
95-
[
96-
"label" => "Danger",
97-
"url" => "#",
98-
"badge" => "!",
99-
"badgeOptions" => ["class" => "label-danger"],
100-
],
101-
],
102-
],
103-
[
104-
"label" => "Multilevel",
105-
"url" => "#",
106-
"icon" => "table",
73+
"icon" => "cog",
10774
"items" => [
10875
[
109-
"label" => "Second level 1",
110-
"url" => "#",
111-
],
112-
[
113-
"label" => "Second level 2",
114-
"url" => "#",
115-
"items" => [
116-
[
117-
"label" => "Third level 1",
118-
"url" => "#",
119-
],
120-
[
121-
"label" => "Third level 2",
122-
"url" => "#",
123-
],
124-
],
76+
"label" => \Yii::t('app-model', 'Log'),
77+
"url" => ['/log/index'],
78+
"icon" => "bug",
12579
],
12680
],
12781
],
@@ -166,23 +120,18 @@
166120
<li class="">
167121
<a href="javascript:;" class="user-profile dropdown-toggle" data-toggle="dropdown"
168122
aria-expanded="false">
169-
<img src="/img/128x128.png" alt=""><?= Yii::$app->user->identity->username; ?>
123+
<img src="/img/128x128.png" alt=""><?= (Yii::$app->user->isGuest)? \Yii::t('app-backend', 'Guest'):Yii::$app->user->identity->username; ?>
170124
<span class=" fa fa-angle-down"></span>
171125
</a>
172126
<ul class="dropdown-menu dropdown-usermenu pull-right">
173-
<li><a href="javascript:;"> Profile</a>
127+
<li><a href="/user/admin/update-profile?id=1"><?= \Yii::t('app-model', 'Profile');?></a>
174128
</li>
175129
<li>
176-
<a href="javascript:;">
177-
<span class="badge bg-red pull-right">50%</span>
178-
<span>Settings</span>
130+
<a href="/user/security/logout" data-method="post">
131+
<i class="fa fa-sign-out pull-right"></i>
132+
<?= \Yii::t('app-model', 'Log out');?>
179133
</a>
180134
</li>
181-
<li>
182-
<a href="javascript:;">Help</a>
183-
</li>
184-
<li><a href="login.html"><i class="fa fa-sign-out pull-right"></i> Log Out</a>
185-
</li>
186135
</ul>
187136
</li>
188137

@@ -195,44 +144,16 @@
195144
<ul id="menu1" class="dropdown-menu list-unstyled msg_list" role="menu">
196145
<li>
197146
<a>
198-
<span class="image">
199-
<img src="http://placehold.it/128x128" alt="Profile Image"/>
200-
</span>
201-
<span>
202-
<span>John Smith</span>
203-
<span class="time">3 mins ago</span>
204-
</span>
205-
<span class="message">
206-
Film festivals used to be do-or-die moments for movie makers. They were where...
207-
</span>
208-
</a>
209-
</li>
210-
<li>
211-
<a>
212-
<span class="image">
213-
<img src="http://placehold.it/128x128" alt="Profile Image"/>
214-
</span>
215-
<span>
216-
<span>John Smith</span>
217-
<span class="time">3 mins ago</span>
218-
</span>
219-
<span class="message">
220-
Film festivals used to be do-or-die moments for movie makers. They were where...
221-
</span>
222-
</a>
223-
</li>
224-
<li>
225-
<a>
226-
<span class="image">
227-
<img src="http://placehold.it/128x128" alt="Profile Image"/>
228-
</span>
147+
<span class="image">
148+
<img src="http://placehold.it/128x128" alt="Profile Image"/>
149+
</span>
229150
<span>
230-
<span>John Smith</span>
231-
<span class="time">3 mins ago</span>
232-
</span>
151+
<span>John Smith</span>
152+
<span class="time">3 mins ago</span>
153+
</span>
233154
<span class="message">
234-
Film festivals used to be do-or-die moments for movie makers. They were where...
235-
</span>
155+
Film festivals used to be do-or-die moments for movie makers. They were where...
156+
</span>
236157
</a>
237158
</li>
238159
<li>

backend/views/site/index.php

Lines changed: 31 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,39 @@
22

33
/* @var $this yii\web\View */
44

5-
$this->title = 'My Yii Application';
5+
$this->title = \Yii::t('app-backend', 'Dashboard');
66
?>
77
<div class="site-index">
8-
9-
<div class="jumbotron">
10-
<h1>Congratulations!</h1>
11-
12-
<p class="lead">You have successfully created your Yii-powered application.</p>
13-
14-
<p><a class="btn btn-lg btn-success" href="http://www.yiiframework.com">Get started with Yii</a></p>
15-
</div>
16-
17-
<div class="body-content">
18-
19-
<div class="row">
20-
<div class="col-lg-4">
21-
<h2>Heading</h2>
22-
23-
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
24-
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
25-
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
26-
fugiat nulla pariatur.</p>
27-
28-
<p><a class="btn btn-default" href="http://www.yiiframework.com/doc/">Yii Documentation &raquo;</a></p>
29-
</div>
30-
<div class="col-lg-4">
31-
<h2>Heading</h2>
32-
33-
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
34-
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
35-
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
36-
fugiat nulla pariatur.</p>
37-
38-
<p><a class="btn btn-default" href="http://www.yiiframework.com/forum/">Yii Forum &raquo;</a></p>
39-
</div>
40-
<div class="col-lg-4">
41-
<h2>Heading</h2>
42-
43-
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
44-
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
45-
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
46-
fugiat nulla pariatur.</p>
47-
48-
<p><a class="btn btn-default" href="http://www.yiiframework.com/extensions/">Yii Extensions &raquo;</a></p>
49-
</div>
8+
<div class="row tile_count">
9+
<div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
10+
<span class="count_top"><i class="fa fa-user"></i> Total Users</span>
11+
<div class="count">2500</div>
12+
<span class="count_bottom"><i class="green">4% </i> From last Week</span>
13+
</div>
14+
<div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
15+
<span class="count_top"><i class="fa fa-clock-o"></i> Average Time</span>
16+
<div class="count">123.50</div>
17+
<span class="count_bottom"><i class="green"><i class="fa fa-sort-asc"></i>3% </i> From last Week</span>
18+
</div>
19+
<div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
20+
<span class="count_top"><i class="fa fa-user"></i> Total Males</span>
21+
<div class="count green">2,500</div>
22+
<span class="count_bottom"><i class="green"><i class="fa fa-sort-asc"></i>34% </i> From last Week</span>
23+
</div>
24+
<div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
25+
<span class="count_top"><i class="fa fa-user"></i> Total Females</span>
26+
<div class="count">4,567</div>
27+
<span class="count_bottom"><i class="red"><i class="fa fa-sort-desc"></i>12% </i> From last Week</span>
28+
</div>
29+
<div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
30+
<span class="count_top"><i class="fa fa-user"></i> Total Collections</span>
31+
<div class="count">2,315</div>
32+
<span class="count_bottom"><i class="green"><i class="fa fa-sort-asc"></i>34% </i> From last Week</span>
33+
</div>
34+
<div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
35+
<span class="count_top"><i class="fa fa-user"></i> Total Connections</span>
36+
<div class="count">7,325</div>
37+
<span class="count_bottom"><i class="green"><i class="fa fa-sort-asc"></i>34% </i> From last Week</span>
5038
</div>
51-
5239
</div>
5340
</div>

backend/views/site/login.php

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
/**
3+
* Message translations.
4+
*
5+
* This file is automatically generated by 'yii message/extract' command.
6+
* It contains the localizable messages extracted from source code.
7+
* You may modify this file by translating the extracted messages.
8+
*
9+
* Each array element represents the translation (value) of a message (key).
10+
* If the value is empty, the message is considered as not translated.
11+
* Messages that no longer need translation will have their translations
12+
* enclosed between a pair of '@@' marks.
13+
*
14+
* Message string can be used with plural forms format. Check i18n section
15+
* of the guide for details.
16+
*
17+
* NOTE: this file must be saved in UTF-8 encoding.
18+
*/
19+
return [
20+
'Admin' => 'Административное',
21+
'Dashboard' => 'Панель управления',
22+
'General' => 'Главное',
23+
'Guest' => 'Гость',
24+
'Welcome' => 'Привет',
25+
];

common/messages/ru-RU/app-forms.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
* NOTE: this file must be saved in UTF-8 encoding.
1818
*/
1919
return [
20-
'Delete' => '',
21-
'Update' => '',
20+
'Delete' => 'Удалить',
21+
'Update' => 'Обновить',
2222
];
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
/**
3+
* Message translations.
4+
*
5+
* This file is automatically generated by 'yii message/extract' command.
6+
* It contains the localizable messages extracted from source code.
7+
* You may modify this file by translating the extracted messages.
8+
*
9+
* Each array element represents the translation (value) of a message (key).
10+
* If the value is empty, the message is considered as not translated.
11+
* Messages that no longer need translation will have their translations
12+
* enclosed between a pair of '@@' marks.
13+
*
14+
* Message string can be used with plural forms format. Check i18n section
15+
* of the guide for details.
16+
*
17+
* NOTE: this file must be saved in UTF-8 encoding.
18+
*/
19+
return [
20+
'Email Form' => 'Email Form',
21+
'Log' => 'Лог',
22+
'Log out' => 'Выход',
23+
'Message' => 'Сообщение',
24+
'Phone' => 'Телефон',
25+
'Profile' => 'Профиль',
26+
'Users' => 'Пользователи',
27+
'Verification Code' => 'Код верификации',
28+
];

0 commit comments

Comments
 (0)