Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taskonsite-архив-перенесен
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitry Korolev
taskonsite-архив-перенесен
Commits
069ab022
Commit
069ab022
authored
Feb 16, 2016
by
Shakarim Sapa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Доделана страница с отображением всех шаблнов в базе
parent
a6b98887
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
7 deletions
+39
-7
common/modules/messageTemplate/controllers/TemplateAdminController.php
...s/messageTemplate/controllers/TemplateAdminController.php
+10
-1
common/modules/messageTemplate/views/template-admin/manage.php
...n/modules/messageTemplate/views/template-admin/manage.php
+29
-6
No files found.
common/modules/messageTemplate/controllers/TemplateAdminController.php
View file @
069ab022
...
@@ -9,6 +9,8 @@
...
@@ -9,6 +9,8 @@
namespace
common\modules\messageTemplate\controllers
;
namespace
common\modules\messageTemplate\controllers
;
use
common\components\AdminController
;
use
common\components\AdminController
;
use
common\modules\messageTemplate\models\MessageTemplate
;
use
yii\data\ActiveDataProvider
;
class
TemplateAdminController
extends
AdminController
{
class
TemplateAdminController
extends
AdminController
{
...
@@ -25,8 +27,15 @@ class TemplateAdminController extends AdminController {
...
@@ -25,8 +27,15 @@ class TemplateAdminController extends AdminController {
}
}
public
function
actionManage
(){
public
function
actionManage
(){
$dataProvider
=
new
ActiveDataProvider
([
'query'
=>
MessageTemplate
::
find
()
]);
return
$this
->
render
(
return
$this
->
render
(
'manage'
'manage'
,
[
'dataProvider'
=>
$dataProvider
]
);
);
}
}
}
}
\ No newline at end of file
common/modules/messageTemplate/views/template-admin/manage.php
View file @
069ab022
<?php
<?php
/**
use
yii\helpers\Html
;
* Created by PhpStorm.
use
yii\grid\GridView
;
* User: PHOENIX
* Date: 16.02.16
/* @var $this yii\web\View */
* Time: 20:44
/* @var $dataProvider yii\data\ActiveDataProvider */
*/
?>
\ No newline at end of file
<div
class=
"trigger-trigger-index"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<p>
<?=
Html
::
a
(
'Добавить шаблон'
,
[
'create'
],
[
'class'
=>
'btn btn-success'
])
?>
</p>
<?=
GridView
::
widget
([
'dataProvider'
=>
$dataProvider
,
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
'id'
,
'name'
,
'template:html'
,
'created_at:datetime'
,
[
'class'
=>
'yii\grid\ActionColumn'
,
'template'
=>
'{update}{delete}'
,
],
],
]);
?>
</div>
\ No newline at end of file
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