backend: add colors to event_type index.php; fix timetable dates

This commit is contained in:
2021-10-07 07:59:05 +02:00
parent d26581e338
commit 89b3ab4ce5
5 changed files with 28 additions and 15 deletions

View File

@@ -30,8 +30,15 @@ $this->params['breadcrumbs'][] = $this->title;
'attribute' => 'theme',
'label' => 'Színtéma',
'value' => function ($model, $key, $index, $column){
return isset($model['theme']) ? "Színtéma " . ($model['theme']+1) : "";
$result = "";
if ( isset( $model['theme'] )){
$box = "<span style='margin-right: 0.3rem; height: 1rem; width: 1rem; display: inline-block;' class='event-theme-active-".$model['theme']."'></span>";
$name = "Színtéma " . ($model['theme']+1);
$result = $box . $name;
}
return $result;
},
'format' => 'raw'
],
['class' => 'yii\grid\ActionColumn',
'template' => '{view} {update}'