-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1c00d89
commit 6a423d3
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
/** | ||
* @link https://cms.skeeks.com/ | ||
* @copyright Copyright (c) 2010 SkeekS | ||
* @license https://cms.skeeks.com/license/ | ||
* @author Semenov Alexander <semenov@skeeks.com> | ||
*/ | ||
|
||
namespace skeeks\cms\grid; | ||
|
||
use yii\grid\DataColumn; | ||
|
||
/** | ||
* @author Semenov Alexander <semenov@skeeks.com> | ||
*/ | ||
class DateColumn extends DataColumn | ||
{ | ||
public $filter = false; | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
protected function renderDataCellContent($model, $key, $index) | ||
{ | ||
$timestamp = $model->{$this->attribute}; | ||
return \Yii::$app->formatter->asDate($timestamp); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
/** | ||
* @link https://cms.skeeks.com/ | ||
* @copyright Copyright (c) 2010 SkeekS | ||
* @license https://cms.skeeks.com/license/ | ||
* @author Semenov Alexander <semenov@skeeks.com> | ||
*/ | ||
|
||
namespace skeeks\cms\widgets\assets; | ||
|
||
use skeeks\cms\base\AssetBundle; | ||
|
||
/** | ||
* @author Semenov Alexander <semenov@skeeks.com> | ||
*/ | ||
class GridViewAsset extends AssetBundle | ||
{ | ||
public $sourcePath = '@skeeks/cms/widgets/assets/src/grid-view'; | ||
|
||
public $css = [ | ||
'grid.css', | ||
'table.css', | ||
]; | ||
|
||
public $js = []; | ||
|
||
public $depends = [ | ||
'yii\web\YiiAsset', | ||
'skeeks\sx\assets\Custom', | ||
]; | ||
} |