Skip to content

Commit

Permalink
add files controller
Browse files Browse the repository at this point in the history
  • Loading branch information
ZAYEC77 committed Oct 19, 2016
1 parent d03b679 commit cb0e70a
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ public static function getAdminMenu()
'icon' => 'clone',
'url' => '/cms/admin/block',
],
[
'label' => Yii::t('cms', 'Files'),
'icon' => 'files-o',
'url' => '/cms/admin/files',
],
]
];
}
Expand Down
1 change: 0 additions & 1 deletion src/controllers/admin/BlockController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use nullref\core\interfaces\IAdminController;
use Yii;
use yii\caching\TagDependency;
use yii\data\ActiveDataProvider;
use yii\filters\VerbFilter;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
Expand Down
20 changes: 20 additions & 0 deletions src/controllers/admin/FilesController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
/**
* @author Dmytro Karpovych
* @copyright 2016 NRE
*/


namespace nullref\cms\controllers\admin;

use nullref\core\interfaces\IAdminController;
use yii\web\Controller;


class FilesController extends Controller implements IAdminController
{
public function actionIndex()
{
return $this->render('index');
}
}
28 changes: 28 additions & 0 deletions src/views/admin/files/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/**
* @var $this \yii\web\View
*/
use mihaildev\elfinder\ElFinder;
use yii\helpers\Html;

$this->title = Yii::t('cms', 'Files');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="files-index">

<div class="row">
<div class="col-lg-12">
<h1 class="page-header">
<?= Html::encode($this->title) ?>
</h1>
</div>
</div>

<?= ElFinder::widget([
'controller' => 'elfinder-backend',
'frameOptions' => [
'style' => 'min-height: 500px; width:100%',
]
]) ?>

</div>

0 comments on commit cb0e70a

Please sign in to comment.