Navigation dans les développements par statut (un onglet par statut). Développements ordonnés par date.master
@@ -41,14 +41,15 @@ class DeveloppementController extends Controller { | |||
* Lists all Developpement models. | |||
* @return mixed | |||
*/ | |||
public function actionIndex() { | |||
public function actionIndex($statut = Developpement::STATUT_OPEN) { | |||
$dataProvider = new ActiveDataProvider([ | |||
'query' => Developpement::find()->with(['developpementPriorite', 'developpementPrioriteCurrentEtablissement']), | |||
'query' => Developpement::find()->with(['developpementPriorite', 'developpementPrioriteCurrentEtablissement'])->where(['statut' => $statut])->orderBy('date DESC'), | |||
]); | |||
return $this->render('index', [ | |||
'dataProvider' => $dataProvider, | |||
]); | |||
'dataProvider' => $dataProvider, | |||
'statut' => $statut | |||
]); | |||
} | |||
/** |
@@ -28,6 +28,11 @@ $this->params['breadcrumbs'][] = $this->title; | |||
} | |||
?> | |||
<ul id="tabs-statuts-developpements" class="nav nav-tabs" role="tablist"> | |||
<li role="presentation" class="<?php if($statut == Developpement::STATUT_OPEN): ?>active<?php endif; ?>"><a href="<?= Yii::$app->urlManager->createUrl(['developpement/index','statut' => Developpement::STATUT_OPEN]); ?>" id="" aria-controls="" role="tab">Ouvert</a></li> | |||
<li role="presentation" class="<?php if($statut == Developpement::STATUT_CLOSED): ?>active<?php endif; ?>"><a href="<?= Yii::$app->urlManager->createUrl(['developpement/index','statut' => Developpement::STATUT_CLOSED]); ?>" id="" aria-controls="" role="tab">Fermé</a></li> | |||
</ul> | |||
<?php | |||
$columns = [ |
@@ -1226,18 +1226,37 @@ a:hover, a:focus, a:active { | |||
text-align: center; | |||
} | |||
/* line 1241, ../sass/screen.scss */ | |||
/* line 1240, ../sass/screen.scss */ | |||
.developpement-index ul#tabs-statuts-developpements { | |||
margin-bottom: 30px; | |||
border-bottom: solid 3px #BB8757; | |||
} | |||
/* line 1244, ../sass/screen.scss */ | |||
.developpement-index ul#tabs-statuts-developpements a { | |||
text-transform: uppercase; | |||
} | |||
/* line 1247, ../sass/screen.scss */ | |||
.developpement-index ul#tabs-statuts-developpements .active { | |||
border: 0px none; | |||
background: none; | |||
} | |||
/* line 1250, ../sass/screen.scss */ | |||
.developpement-index ul#tabs-statuts-developpements .active a { | |||
background-color: #BB8757; | |||
color: white; | |||
} | |||
/* line 1258, ../sass/screen.scss */ | |||
.developpement-index #tab-developpements .btn-group-priorite { | |||
width: 100%; | |||
margin-bottom: 5px; | |||
} | |||
/* line 1245, ../sass/screen.scss */ | |||
/* line 1262, ../sass/screen.scss */ | |||
.developpement-index #tab-developpements .btn-group-priorite .btn-priorite { | |||
display: block; | |||
float: none; | |||
width: 100%; | |||
} | |||
/* line 1252, ../sass/screen.scss */ | |||
/* line 1269, ../sass/screen.scss */ | |||
.developpement-index #tab-developpements .label-priorite { | |||
display: block; | |||
width: 100%; |
@@ -1237,6 +1237,23 @@ a { | |||
} | |||
.developpement-index { | |||
ul#tabs-statuts-developpements { | |||
margin-bottom: 30px ; | |||
border-bottom: solid 3px $color1 ; | |||
a { | |||
text-transform: uppercase ; | |||
} | |||
.active { | |||
border: 0px none ; | |||
background: none ; | |||
a { | |||
background-color: $color1 ; | |||
color: white ; | |||
} | |||
} | |||
} | |||
#tab-developpements { | |||
.btn-group-priorite { | |||
width: 100% ; |