Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
test-project
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Junaid Rahman pv
test-project
Commits
788e30a1
Commit
788e30a1
authored
Sep 01, 2016
by
Junaid Rahman pv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modified tables and added extra functions
parent
1e394749
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
382 additions
and
128 deletions
+382
-128
_form.php
backend/modules/business/views/business/_form.php
+116
-22
create.php
backend/modules/business/views/business/create.php
+0
-1
index.php
backend/modules/business/views/business/index.php
+1
-1
_form.php
backend/modules/location/views/district/_form.php
+38
-13
create.php
backend/modules/location/views/district/create.php
+0
-1
index.php
backend/modules/location/views/district/index.php
+9
-2
_form.php
backend/modules/location/views/state/_form.php
+29
-11
create.php
backend/modules/location/views/state/create.php
+0
-2
index.php
backend/modules/location/views/state/index.php
+10
-3
common.php
backend/views/layouts/common.php
+91
-72
Business.php
common/models/Business.php
+30
-0
District.php
common/models/District.php
+29
-0
State.php
common/models/State.php
+29
-0
No files found.
backend/modules/business/views/business/_form.php
View file @
788e30a1
...
...
@@ -12,48 +12,142 @@ use yii\widgets\ActiveForm;
<?php
$form
=
ActiveForm
::
begin
();
?>
<?=
$form
->
field
(
$model
,
'category_id'
)
->
textInput
()
?>
<div
id=
"myTabContent"
class=
"tab-content"
>
<div
class=
"tab-pane fade in active"
id=
"info"
>
<div
class=
"page-header"
>
<h3>
Info
</h3>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'district
_id'
)
->
textInput
()
?>
<?=
$form
->
field
(
$model
,
'category
_id'
)
->
textInput
()
?>
<?=
$form
->
field
(
$model
,
'domain_name'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'name'
)
->
textInput
([
'maxlength'
=>
true
]
)
?>
<?=
$form
->
field
(
$model
,
'district_id'
)
->
textInput
(
)
?>
<?=
$form
->
field
(
$model
,
'slug'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'address
'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'domain_name
'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'landmark'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'mobile_no
'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'name
'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'toll_free_no'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'contact_no
'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'slug
'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'fax'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'email
'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'address
'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'description'
)
->
textarea
([
'rows'
=>
6
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'logo_base_url
'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'landmark
'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'logo_path'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'latitude
'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'mobile_no
'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'logitude'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'status'
)
->
textInput
(
)
?>
<?=
$form
->
field
(
$model
,
'toll_free_no'
)
->
textInput
([
'maxlength'
=>
true
]
)
?>
<?=
$form
->
field
(
$model
,
'created_at'
)
->
textInput
()
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'updated_at'
)
->
textInput
()
?>
<?=
$form
->
field
(
$model
,
'contact_no'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'fax'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'email'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'description'
)
->
textarea
([
'rows'
=>
6
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'logo_base_url'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'logo_path'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'latitude'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'logitude'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-3"
>
<?=
$form
->
field
(
$model
,
'status'
)
->
dropDownList
(
$model
::
statuses
())
?>
</div>
</div>
<div
class=
"form-group"
>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
Yii
::
t
(
'backend'
,
'Create'
)
:
Yii
::
t
(
'backend'
,
'Update'
),
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
</div>
</div>
<div
class=
"form-group"
>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
Yii
::
t
(
'backend'
,
'Create'
)
:
Yii
::
t
(
'backend'
,
'Update'
),
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
</div>
<?php
ActiveForm
::
end
();
?>
...
...
backend/modules/business/views/business/create.php
View file @
788e30a1
...
...
@@ -12,7 +12,6 @@ $this->params['breadcrumbs'][] = $this->title;
?>
<div
class=
"business-create"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?=
$this
->
render
(
'_form'
,
[
'model'
=>
$model
,
...
...
backend/modules/business/views/business/index.php
View file @
788e30a1
...
...
@@ -24,7 +24,7 @@ $this->params['breadcrumbs'][] = $this->title;
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
'id'
,
//
'id',
'category_id'
,
'district_id'
,
'domain_name'
,
...
...
backend/modules/location/views/district/_form.php
View file @
788e30a1
...
...
@@ -2,6 +2,8 @@
use
yii\helpers\Html
;
use
yii\widgets\ActiveForm
;
use
yii\helpers\ArrayHelper
;
use
common\models\State
;
/* @var $this yii\web\View */
/* @var $model common\models\District */
...
...
@@ -12,20 +14,43 @@ use yii\widgets\ActiveForm;
<?php
$form
=
ActiveForm
::
begin
();
?>
<?=
$form
->
field
(
$model
,
'state_id'
)
->
textInput
()
?>
<div
id=
"myTabContent"
class=
"tab-content"
>
<div
class=
"tab-pane fade in active"
id=
"info"
>
<div
class=
"page-header"
>
<h3>
Info
</h3>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'state_id'
)
->
dropDownList
(
ArrayHelper
::
map
(
State
::
find
()
->
all
(),
'id'
,
'name'
))
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?php
echo
$form
->
field
(
$model
,
'name'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?php
echo
$form
->
field
(
$model
,
'slug'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-3"
>
<?=
$form
->
field
(
$model
,
'status'
)
->
dropDownList
(
$model
::
statuses
())
?>
</div>
</div>
<div
class=
"form-group"
>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
Yii
::
t
(
'backend'
,
'Create'
)
:
Yii
::
t
(
'backend'
,
'Update'
),
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
</div>
</div>
<?=
$form
->
field
(
$model
,
'name'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'slug'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'status'
)
->
textInput
()
?>
<?=
$form
->
field
(
$model
,
'created_at'
)
->
textInput
()
?>
<?=
$form
->
field
(
$model
,
'updated_at'
)
->
textInput
()
?>
<div
class=
"form-group"
>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
Yii
::
t
(
'backend'
,
'Create'
)
:
Yii
::
t
(
'backend'
,
'Update'
),
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
</div>
<?php
ActiveForm
::
end
();
?>
...
...
backend/modules/location/views/district/create.php
View file @
788e30a1
...
...
@@ -12,7 +12,6 @@ $this->params['breadcrumbs'][] = $this->title;
?>
<div
class=
"district-create"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?=
$this
->
render
(
'_form'
,
[
'model'
=>
$model
,
...
...
backend/modules/location/views/district/index.php
View file @
788e30a1
...
...
@@ -24,11 +24,18 @@ $this->params['breadcrumbs'][] = $this->title;
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
'id'
,
//
'id',
'state_id'
,
'name'
,
'slug'
,
'status'
,
[
'class'
=>
\common\grid\EnumColumn
::
className
(),
'attribute'
=>
'status'
,
'enum'
=>
[
Yii
::
t
(
'backend'
,
'In Active'
),
Yii
::
t
(
'backend'
,
'Active'
)
],
],
// 'created_at',
// 'updated_at',
...
...
backend/modules/location/views/state/_form.php
View file @
788e30a1
...
...
@@ -12,18 +12,36 @@ use yii\widgets\ActiveForm;
<?php
$form
=
ActiveForm
::
begin
();
?>
<?=
$form
->
field
(
$model
,
'name'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<div
id=
"myTabContent"
class=
"tab-content"
>
<div
class=
"tab-pane fade in active"
id=
"info"
>
<div
class=
"page-header"
>
<h3>
Info
</h3>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?php
echo
$form
->
field
(
$model
,
'name'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?php
echo
$form
->
field
(
$model
,
'slug'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-3"
>
<?=
$form
->
field
(
$model
,
'status'
)
->
dropDownList
(
$model
::
statuses
())
?>
</div>
</div>
<div
class=
"form-group"
>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
Yii
::
t
(
'backend'
,
'Create'
)
:
Yii
::
t
(
'backend'
,
'Update'
),
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
</div>
</div>
<?=
$form
->
field
(
$model
,
'slug'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'status'
)
->
textInput
()
?>
<?=
$form
->
field
(
$model
,
'created_at'
)
->
textInput
()
?>
<?=
$form
->
field
(
$model
,
'updated_at'
)
->
textInput
()
?>
<div
class=
"form-group"
>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
Yii
::
t
(
'backend'
,
'Create'
)
:
Yii
::
t
(
'backend'
,
'Update'
),
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
</div>
<?php
ActiveForm
::
end
();
?>
...
...
backend/modules/location/views/state/create.php
View file @
788e30a1
...
...
@@ -12,8 +12,6 @@ $this->params['breadcrumbs'][] = $this->title;
?>
<div
class=
"state-create"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?=
$this
->
render
(
'_form'
,
[
'model'
=>
$model
,
])
?>
...
...
backend/modules/location/views/state/index.php
View file @
788e30a1
...
...
@@ -24,11 +24,18 @@ $this->params['breadcrumbs'][] = $this->title;
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
'id'
,
//
'id',
'name'
,
'slug'
,
'status'
,
'created_at'
,
[
'class'
=>
\common\grid\EnumColumn
::
className
(),
'attribute'
=>
'status'
,
'enum'
=>
[
Yii
::
t
(
'backend'
,
'In Active'
),
Yii
::
t
(
'backend'
,
'Active'
)
],
],
//'created_at',
// 'updated_at',
[
'class'
=>
'yii\grid\ActionColumn'
],
...
...
backend/views/layouts/common.php
View file @
788e30a1
...
...
@@ -43,18 +43,18 @@ $bundle = BackendAsset::register($this);
<li
id=
"log-dropdown"
class=
"dropdown notifications-menu"
>
<a
href=
"#"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
>
<i
class=
"fa fa-warning"
></i>
<span
class=
"label label-danger"
>
<span
class=
"label label-danger"
>
<?=
\backend\models\SystemLog
::
find
()
->
count
()
?>
</span>
</a>
<ul
class=
"dropdown-menu"
>
<li
class=
"header"
>
<?=
Yii
::
t
(
'backend'
,
'You have {num} log items'
,
[
'num'
=>
\backend\models\SystemLog
::
find
()
->
count
()])
?>
</li>
<li
class=
"header"
>
<?=
Yii
::
t
(
'backend'
,
'You have {num} log items'
,
[
'num'
=>
\backend\models\SystemLog
::
find
()
->
count
()])
?>
</li>
<li>
<!-- inner menu: contains the actual data -->
<ul
class=
"menu"
>
<?php
foreach
(
\backend\models\SystemLog
::
find
()
->
orderBy
([
'log_time'
=>
SORT_DESC
])
->
limit
(
5
)
->
all
()
as
$logEntry
)
:
?>
<?php
foreach
(
\backend\models\SystemLog
::
find
()
->
orderBy
([
'log_time'
=>
SORT_DESC
])
->
limit
(
5
)
->
all
()
as
$logEntry
)
:
?>
<li>
<a
href=
"
<?=
Yii
::
$app
->
urlManager
->
createUrl
([
'/log/view'
,
'id'
=>
$logEntry
->
id
])
?>
"
>
<a
href=
"
<?=
Yii
::
$app
->
urlManager
->
createUrl
([
'/log/view'
,
'id'
=>
$logEntry
->
id
])
?>
"
>
<i
class=
"fa fa-warning
<?=
$logEntry
->
level
==
\yii\log\Logger
::
LEVEL_ERROR
?
'text-red'
:
'text-yellow'
?>
"
></i>
<?=
$logEntry
->
category
?>
</a>
...
...
@@ -70,13 +70,17 @@ $bundle = BackendAsset::register($this);
<!-- User Account: style can be found in dropdown.less -->
<li
class=
"dropdown user user-menu"
>
<a
href=
"#"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
>
<img
src=
"
<?=
Yii
::
$app
->
user
->
identity
->
userProfile
->
getAvatar
(
$this
->
assetManager
->
getAssetUrl
(
$bundle
,
'img/anonymous.jpg'
))
?>
"
class=
"user-image"
>
<img
src=
"
<?=
Yii
::
$app
->
user
->
identity
->
userProfile
->
getAvatar
(
$this
->
assetManager
->
getAssetUrl
(
$bundle
,
'img/anonymous.jpg'
))
?>
"
class=
"user-image"
>
<span>
<?=
Yii
::
$app
->
user
->
identity
->
username
?>
<i
class=
"caret"
></i></span>
</a>
<ul
class=
"dropdown-menu"
>
<!-- User image -->
<li
class=
"user-header light-blue"
>
<img
src=
"
<?=
Yii
::
$app
->
user
->
identity
->
userProfile
->
getAvatar
(
$this
->
assetManager
->
getAssetUrl
(
$bundle
,
'img/anonymous.jpg'
))
?>
"
class=
"img-circle"
alt=
"User Image"
/>
<img
src=
"
<?=
Yii
::
$app
->
user
->
identity
->
userProfile
->
getAvatar
(
$this
->
assetManager
->
getAssetUrl
(
$bundle
,
'img/anonymous.jpg'
))
?>
"
class=
"img-circle"
alt=
"User Image"
/>
<p>
<?=
Yii
::
$app
->
user
->
identity
->
username
?>
<small>
...
...
@@ -86,19 +90,19 @@ $bundle = BackendAsset::register($this);
<!-- Menu Footer-->
<li
class=
"user-footer"
>
<div
class=
"pull-left"
>
<?=
Html
::
a
(
Yii
::
t
(
'backend'
,
'Profile'
),
[
'/sign-in/profile'
],
[
'class'
=>
'btn btn-default btn-flat'
])
?>
<?=
Html
::
a
(
Yii
::
t
(
'backend'
,
'Profile'
),
[
'/sign-in/profile'
],
[
'class'
=>
'btn btn-default btn-flat'
])
?>
</div>
<div
class=
"pull-left"
>
<?=
Html
::
a
(
Yii
::
t
(
'backend'
,
'Account'
),
[
'/sign-in/account'
],
[
'class'
=>
'btn btn-default btn-flat'
])
?>
<?=
Html
::
a
(
Yii
::
t
(
'backend'
,
'Account'
),
[
'/sign-in/account'
],
[
'class'
=>
'btn btn-default btn-flat'
])
?>
</div>
<div
class=
"pull-right"
>
<?=
Html
::
a
(
Yii
::
t
(
'backend'
,
'Logout'
),
[
'/sign-in/logout'
],
[
'class'
=>
'btn btn-default btn-flat'
,
'data-method'
=>
'post'
])
?>
<?=
Html
::
a
(
Yii
::
t
(
'backend'
,
'Logout'
),
[
'/sign-in/logout'
],
[
'class'
=>
'btn btn-default btn-flat'
,
'data-method'
=>
'post'
])
?>
</div>
</li>
</ul>
</li>
<li>
<?=
Html
::
a
(
'<i class="fa fa-cogs"></i>'
,
[
'/site/settings'
])
?>
<?=
Html
::
a
(
'<i class="fa fa-cogs"></i>'
,
[
'/site/settings'
])
?>
</li>
</ul>
</div>
...
...
@@ -111,10 +115,12 @@ $bundle = BackendAsset::register($this);
<!-- Sidebar user panel -->
<div
class=
"user-panel"
>
<div
class=
"pull-left image"
>
<img
src=
"
<?=
Yii
::
$app
->
user
->
identity
->
userProfile
->
getAvatar
(
$this
->
assetManager
->
getAssetUrl
(
$bundle
,
'img/anonymous.jpg'
))
?>
"
class=
"img-circle"
/>
<img
src=
"
<?=
Yii
::
$app
->
user
->
identity
->
userProfile
->
getAvatar
(
$this
->
assetManager
->
getAssetUrl
(
$bundle
,
'img/anonymous.jpg'
))
?>
"
class=
"img-circle"
/>
</div>
<div
class=
"pull-left info"
>
<p>
<?=
Yii
::
t
(
'backend'
,
'Hello, {username}'
,
[
'username'
=>
Yii
::
$app
->
user
->
identity
->
getPublicIdentity
()])
?>
</p>
<p>
<?=
Yii
::
t
(
'backend'
,
'Hello, {username}'
,
[
'username'
=>
Yii
::
$app
->
user
->
identity
->
getPublicIdentity
()])
?>
</p>
<a
href=
"
<?=
Url
::
to
([
'/sign-in/profile'
])
?>
"
>
<i
class=
"fa fa-circle text-success"
></i>
<?=
Yii
::
$app
->
formatter
->
asDatetime
(
time
())
?>
...
...
@@ -123,83 +129,100 @@ $bundle = BackendAsset::register($this);
</div>
<!-- sidebar menu: : style can be found in sidebar.less -->
<?=
Menu
::
widget
([
'options'
=>
[
'class'
=>
'sidebar-menu'
],
'options'
=>
[
'class'
=>
'sidebar-menu'
],
'linkTemplate'
=>
'<a href="{url}">{icon}<span>{label}</span>{right-icon}{badge}</a>'
,
'submenuTemplate'
=>
"
\n
<ul class=
\"
treeview-menu
\"
>
\n
{
items
}
\n
</ul>
\n
"
,
'activateParents'
=>
true
,
'items'
=>
[
'submenuTemplate'
=>
"
\n
<ul class=
\"
treeview-menu
\"
>
\n
{
items
}
\n
</ul>
\n
"
,
'activateParents'
=>
true
,
'items'
=>
[
[
'label'
=>
Yii
::
t
(
'backend'
,
'Main'
),
'label'
=>
Yii
::
t
(
'backend'
,
'Main'
),
'options'
=>
[
'class'
=>
'header'
]
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'Timeline'
),
'icon'
=>
'<i class="fa fa-bar-chart-o"></i>'
,
'url'
=>
[
'/timeline-event/index'
],
'badge'
=>
TimelineEvent
::
find
()
->
today
()
->
count
(),
'badgeBgClass'
=>
'label-success'
,
'label'
=>
Yii
::
t
(
'backend'
,
'Timeline'
),
'icon'
=>
'<i class="fa fa-bar-chart-o"></i>'
,
'url'
=>
[
'/timeline-event/index'
],
'badge'
=>
TimelineEvent
::
find
()
->
today
()
->
count
(),
'badgeBgClass'
=>
'label-success'
,
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'Content'
),
'label'
=>
Yii
::
t
(
'backend'
,
'Content'
),
'url'
=>
'#'
,
'icon'
=>
'<i class="fa fa-edit"></i>'
,
'options'
=>
[
'class'
=>
'treeview'
],
'items'
=>
[
[
'label'
=>
Yii
::
t
(
'backend'
,
'Static pages'
),
'url'
=>
[
'/page/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'Articles'
),
'url'
=>
[
'/article/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'Article Categories'
),
'url'
=>
[
'/article-category/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'Text Widgets'
),
'url'
=>
[
'/widget-text/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'Menu Widgets'
),
'url'
=>
[
'/widget-menu/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'Carousel Widgets'
),
'url'
=>
[
'/widget-carousel/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
'icon'
=>
'<i class="fa fa-edit"></i>'
,
'options'
=>
[
'class'
=>
'treeview'
],
'items'
=>
[
[
'label'
=>
Yii
::
t
(
'backend'
,
'Static pages'
),
'url'
=>
[
'/page/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'Articles'
),
'url'
=>
[
'/article/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'Article Categories'
),
'url'
=>
[
'/article-category/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'Text Widgets'
),
'url'
=>
[
'/widget-text/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'Menu Widgets'
),
'url'
=>
[
'/widget-menu/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'Carousel Widgets'
),
'url'
=>
[
'/widget-carousel/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
]
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'System'
),
'label'
=>
Yii
::
t
(
'backend'
,
'System'
),
'options'
=>
[
'class'
=>
'header'
]
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'Users'
),
'icon'
=>
'<i class="fa fa-users"></i>'
,
'url'
=>
[
'/user/index'
],
'visible'
=>
Yii
::
$app
->
user
->
can
(
'administrator'
)
'label'
=>
Yii
::
t
(
'backend'
,
'Users'
),
'icon'
=>
'<i class="fa fa-users"></i>'
,
'url'
=>
[
'/user/index'
],
'visible'
=>
Yii
::
$app
->
user
->
can
(
'administrator'
)
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'Category'
),
'icon'
=>
'<i class="fa fa-sitemap"></i>'
,
'url'
=>
[
'/theme/category/index'
],
'visible'
=>
Yii
::
$app
->
user
->
can
(
'administrator'
)
'label'
=>
Yii
::
t
(
'backend'
,
'Category'
),
'icon'
=>
'<i class="fa fa-sitemap"></i>'
,
'url'
=>
[
'/theme/category/index'
],
'visible'
=>
Yii
::
$app
->
user
->
can
(
'administrator'
)
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'Other'
),
'label'
=>
Yii
::
t
(
'backend'
,
'Location'
),
'icon'
=>
'<i class="fa fa-map"></i>'
,
'url'
=>
'#'
,
'icon'
=>
'<i class="fa fa-cogs"></i>'
,
'options'
=>
[
'class'
=>
'treeview'
],
'items'
=>
[
'visible'
=>
Yii
::
$app
->
user
->
can
(
'administrator'
),
'options'
=>
[
'class'
=>
'treeview'
],
'items'
=>
[
[
'label'
=>
Yii
::
t
(
'backend'
,
'State'
),
'url'
=>
[
'/location/state'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'District'
),
'url'
=>
[
'/location/district'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
]
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'Business'
),
'icon'
=>
'<i class="fa fa-sitemap"></i>'
,
'url'
=>
[
'/business/business'
],
'visible'
=>
Yii
::
$app
->
user
->
can
(
'administrator'
)
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'Other'
),
'url'
=>
'#'
,
'icon'
=>
'<i class="fa fa-cogs"></i>'
,
'options'
=>
[
'class'
=>
'treeview'
],
'items'
=>
[
[
'label'
=>
Yii
::
t
(
'backend'
,
'i18n'
),
'label'
=>
Yii
::
t
(
'backend'
,
'i18n'
),
'url'
=>
'#'
,
'icon'
=>
'<i class="fa fa-flag"></i>'
,
'options'
=>
[
'class'
=>
'treeview'
],
'items'
=>
[
[
'label'
=>
Yii
::
t
(
'backend'
,
'i18n Source Message'
),
'url'
=>
[
'/i18n/i18n-source-message/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'i18n Message'
),
'url'
=>
[
'/i18n/i18n-message/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
'icon'
=>
'<i class="fa fa-flag"></i>'
,
'options'
=>
[
'class'
=>
'treeview'
],
'items'
=>
[
[
'label'
=>
Yii
::
t
(
'backend'
,
'i18n Source Message'
),
'url'
=>
[
'/i18n/i18n-source-message/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'i18n Message'
),
'url'
=>
[
'/i18n/i18n-message/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
]
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'Key-Value Storage'
),
'url'
=>
[
'/key-storage/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'File Storage'
),
'url'
=>
[
'/file-storage/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'Cache'
),
'url'
=>
[
'/cache/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'File Manager'
),
'url'
=>
[
'/file-manager/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'Key-Value Storage'
),
'url'
=>
[
'/key-storage/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'File Storage'
),
'url'
=>
[
'/file-storage/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'Cache'
),
'url'
=>
[
'/cache/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'File Manager'
),
'url'
=>
[
'/file-manager/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'System Information'
),
'url'
=>
[
'/system-information/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
'label'
=>
Yii
::
t
(
'backend'
,
'System Information'
),
'url'
=>
[
'/system-information/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'Logs'
),
'url'
=>
[
'/log/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
,
'badge'
=>
\backend\models\SystemLog
::
find
()
->
count
(),
'badgeBgClass'
=>
'label-danger'
,
'label'
=>
Yii
::
t
(
'backend'
,
'Logs'
),
'url'
=>
[
'/log/index'
],
'icon'
=>
'<i class="fa fa-angle-double-right"></i>'
,
'badge'
=>
\backend\models\SystemLog
::
find
()
->
count
(),
'badgeBgClass'
=>
'label-danger'
,
],
]
]
...
...
@@ -220,19 +243,15 @@ $bundle = BackendAsset::register($this);
<?php
endif
;
?>
</h1>
<?=
Breadcrumbs
::
widget
([
'tag'
=>
'ol'
,
'links'
=>
isset
(
$this
->
params
[
'breadcrumbs'
])
?
$this
->
params
[
'breadcrumbs'
]
:
[],
])
?>
<?=
Breadcrumbs
::
widget
([
'tag'
=>
'ol'
,
'links'
=>
isset
(
$this
->
params
[
'breadcrumbs'
])
?
$this
->
params
[
'breadcrumbs'
]
:
[],])
?>
</section>
<!-- Main content -->
<section
class=
"content"
>
<?php
if
(
Yii
::
$app
->
session
->
hasFlash
(
'alert'
))
:?>
<?=
\yii\bootstrap\Alert
::
widget
([
'body'
=>
ArrayHelper
::
getValue
(
Yii
::
$app
->
session
->
getFlash
(
'alert'
),
'body'
),
'options'
=>
ArrayHelper
::
getValue
(
Yii
::
$app
->
session
->
getFlash
(
'alert'
),
'options'
),
])
?>
<?php
if
(
Yii
::
$app
->
session
->
hasFlash
(
'alert'
))
:
?>
<?=
\yii\bootstrap\Alert
::
widget
([
'body'
=>
ArrayHelper
::
getValue
(
Yii
::
$app
->
session
->
getFlash
(
'alert'
),
'body'
),
'options'
=>
ArrayHelper
::
getValue
(
Yii
::
$app
->
session
->
getFlash
(
'alert'
),
'options'
),])
?>
<?php
endif
;
?>
<?=
$content
?>
</section>
<!-- /.content -->
...
...
common/models/Business.php
View file @
788e30a1
...
...
@@ -3,6 +3,8 @@
namespace
common\models
;
use
Yii
;
use
yii\behaviors\SluggableBehavior
;
use
yii\behaviors\TimestampBehavior
;
/**
* This is the model class for table "{{%business}}".
...
...
@@ -34,6 +36,9 @@ use Yii;
*/
class
Business
extends
\yii\db\ActiveRecord
{
const
STATUS_ACTIVE
=
1
;
const
STATUS_IN_ACTIVE
=
0
;
/**
* @inheritdoc
*/
...
...
@@ -45,6 +50,23 @@ class Business extends \yii\db\ActiveRecord
/**
* @inheritdoc
*/
public
function
behaviors
()
{
return
[
[
'class'
=>
SluggableBehavior
::
className
(),
'attribute'
=>
'name'
,
'immutable'
=>
true
],
[
'class'
=>
TimestampBehavior
::
className
(),
'createdAtAttribute'
=>
'created_at'
,
'updatedAtAttribute'
=>
'updated_at'
]
];
}
public
function
rules
()
{
return
[
...
...
@@ -116,4 +138,12 @@ class Business extends \yii\db\ActiveRecord
{
return
new
\common\models\query\BusinessQuery
(
get_called_class
());
}
public
static
function
statuses
()
{
return
[
self
::
STATUS_ACTIVE
=>
Yii
::
t
(
'common'
,
'Active'
),
self
::
STATUS_IN_ACTIVE
=>
Yii
::
t
(
'common'
,
'In Active'
),
];
}
}
common/models/District.php
View file @
788e30a1
...
...
@@ -3,6 +3,8 @@
namespace
common\models
;
use
Yii
;
use
yii\behaviors\SluggableBehavior
;
use
yii\behaviors\TimestampBehavior
;
/**
* This is the model class for table "{{%district}}".
...
...
@@ -20,6 +22,9 @@ use Yii;
*/
class
District
extends
\yii\db\ActiveRecord
{
const
STATUS_ACTIVE
=
1
;
const
STATUS_IN_ACTIVE
=
0
;
/**
* @inheritdoc
*/
...
...
@@ -28,6 +33,22 @@ class District extends \yii\db\ActiveRecord
return
'{{%district}}'
;
}
public
function
behaviors
()
{
return
[
[
'class'
=>
SluggableBehavior
::
className
(),
'attribute'
=>
'name'
,
'immutable'
=>
true
],
[
'class'
=>
TimestampBehavior
::
className
(),
'createdAtAttribute'
=>
'created_at'
,
'updatedAtAttribute'
=>
'updated_at'
]
];
}
/**
* @inheritdoc
*/
...
...
@@ -81,4 +102,12 @@ class District extends \yii\db\ActiveRecord
{
return
new
\common\models\query\DistrictQuery
(
get_called_class
());
}
public
static
function
statuses
()
{
return
[
self
::
STATUS_ACTIVE
=>
Yii
::
t
(
'common'
,
'Active'
),
self
::
STATUS_IN_ACTIVE
=>
Yii
::
t
(
'common'
,
'In Active'
),
];
}
}
common/models/State.php
View file @
788e30a1
...
...
@@ -3,6 +3,8 @@
namespace
common\models
;
use
Yii
;
use
yii\behaviors\SluggableBehavior
;
use
yii\behaviors\TimestampBehavior
;
/**
* This is the model class for table "{{%state}}".
...
...
@@ -18,6 +20,9 @@ use Yii;
*/
class
State
extends
\yii\db\ActiveRecord
{
const
STATUS_ACTIVE
=
1
;
const
STATUS_IN_ACTIVE
=
0
;
/**
* @inheritdoc
*/
...
...
@@ -26,6 +31,22 @@ class State extends \yii\db\ActiveRecord
return
'{{%state}}'
;
}
public
function
behaviors
()
{
return
[
[
'class'
=>
SluggableBehavior
::
className
(),
'attribute'
=>
'name'
,
'immutable'
=>
true
],
[
'class'
=>
TimestampBehavior
::
className
(),
'createdAtAttribute'
=>
'created_at'
,
'updatedAtAttribute'
=>
'updated_at'
]
];
}
/**
* @inheritdoc
*/
...
...
@@ -69,4 +90,12 @@ class State extends \yii\db\ActiveRecord
{
return
new
\common\models\query\StateQuery
(
get_called_class
());
}
public
static
function
statuses
()
{
return
[
self
::
STATUS_ACTIVE
=>
Yii
::
t
(
'common'
,
'Active'
),
self
::
STATUS_IN_ACTIVE
=>
Yii
::
t
(
'common'
,
'In Active'
),
];
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment