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
4a4baa4c
Commit
4a4baa4c
authored
Sep 03, 2016
by
Junaid Rahman pv
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/development' into development
parents
863fd735
d44eaf8b
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
19 deletions
+62
-19
_form.php
backend/modules/theme/views/category/_form.php
+0
-3
_form.php
backend/modules/theme/views/theme/_form.php
+36
-14
index.php
backend/modules/theme/views/theme/index.php
+10
-2
common.php
backend/views/layouts/common.php
+6
-0
Theme.php
common/models/Theme.php
+10
-0
No files found.
backend/modules/theme/views/category/_form.php
View file @
4a4baa4c
...
...
@@ -65,9 +65,6 @@ use trntv\filekit\widget\Upload;
</div>
</div>
</div>
<?php
ActiveForm
::
end
();
?>
</div>
backend/modules/theme/views/theme/_form.php
View file @
4a4baa4c
...
...
@@ -11,29 +11,51 @@ use yii\bootstrap\ActiveForm;
<div
class=
"theme-form"
>
<?php
$form
=
ActiveForm
::
begin
();
?>
<?=
$form
->
errorSummary
(
$model
);
?>
<div
id=
"myTabContent"
class=
"tab-content"
>
<div
class=
"tab-pane fade in active"
id=
"info"
>
<div
class=
"page-header"
>
<h3>
<?=
Yii
::
t
(
'backend'
,
'Info'
)
?>
</h3>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'category_id'
)
->
textInput
()
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'code'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'slug'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'name'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'description'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'status'
)
->
textInput
()
?>
<?=
$form
->
field
(
$model
,
'created_at'
)
->
textInput
()
?>
<?=
$form
->
field
(
$model
,
'updated_at'
)
->
textInput
()
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'status'
)
->
dropDownList
(
$model
::
statuses
(),
[
'prompt'
=>
''
])
?>
</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
class=
"tab-pane fade in"
id=
"files"
>
<div
class=
"page-header"
>
<h3>
Files
</h3>
</div>
</div>
<?php
ActiveForm
::
end
();
?>
</div>
</div>
backend/modules/theme/views/theme/index.php
View file @
4a4baa4c
...
...
@@ -2,6 +2,8 @@
use
yii\helpers\Html
;
use
yii\grid\GridView
;
use
common\grid\EnumColumn
;
use
common\models\Theme
;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\theme\models\search\ThemeSearch */
...
...
@@ -26,12 +28,18 @@ $this->params['breadcrumbs'][] = $this->title;
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
'id'
,
'category_id'
,
//
'id',
//
'category_id',
'code'
,
'slug'
,
'name'
,
// 'description',
[
'class'
=>
EnumColumn
::
className
(),
'attribute'
=>
'status'
,
'enum'
=>
Theme
::
statuses
(),
'filter'
=>
Theme
::
statuses
()
],
// 'status',
// 'created_at',
// 'updated_at',
...
...
backend/views/layouts/common.php
View file @
4a4baa4c
...
...
@@ -202,6 +202,12 @@ $bundle = BackendAsset::register($this);
'visible'
=>
Yii
::
$app
->
user
->
can
(
'administrator'
)
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'Theme'
),
'icon'
=>
'<i class="fa fa-sitemap"></i>'
,
'url'
=>
[
'/theme/theme/index'
],
'visible'
=>
Yii
::
$app
->
user
->
can
(
'administrator'
)
],
[
'label'
=>
Yii
::
t
(
'backend'
,
'Location'
),
'icon'
=>
'<i class="fa fa-map"></i>'
,
'url'
=>
'#'
,
...
...
common/models/Theme.php
View file @
4a4baa4c
...
...
@@ -22,6 +22,8 @@ use Yii;
*/
class
Theme
extends
\yii\db\ActiveRecord
{
const
STATUS_ACTIVE
=
1
;
const
STATUS_IN_ACTIVE
=
2
;
/**
* @inheritdoc
*/
...
...
@@ -86,4 +88,12 @@ class Theme extends \yii\db\ActiveRecord
{
return
new
\common\models\query\ThemeQuery
(
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