panel projects - redesign and only show managed project
This commit is contained in:
parent
5c9f450539
commit
ec53fae7a0
7 changed files with 104 additions and 29 deletions
|
|
@ -1,5 +1,11 @@
|
|||
title: Projet
|
||||
icon: page
|
||||
status:
|
||||
draft:
|
||||
label: Brouillon
|
||||
text: Accessible uniquement aux éditeurs connectés ou via un lien secret
|
||||
listed: En cours
|
||||
unlisted: Archivé
|
||||
|
||||
tabs:
|
||||
steps:
|
||||
|
|
|
|||
|
|
@ -5,6 +5,13 @@ tabs:
|
|||
label: Contenu
|
||||
columns:
|
||||
- width: 1/1
|
||||
sections:
|
||||
listed:
|
||||
extends: sections/projects
|
||||
headline: En cours
|
||||
status: listed
|
||||
sortBy: modified desc
|
||||
- width: 1/2
|
||||
sections:
|
||||
drafts:
|
||||
extends: sections/projects
|
||||
|
|
@ -12,35 +19,21 @@ tabs:
|
|||
status: draft
|
||||
- width: 1/2
|
||||
sections:
|
||||
yourProjects:
|
||||
label: Vos projets
|
||||
type: pages
|
||||
query: user.projects
|
||||
create: false
|
||||
search: true
|
||||
help: Projets pour lesquels vous êtes nommé chef de projet.
|
||||
image:
|
||||
query: page.client.toPage.logo.toFile
|
||||
listed:
|
||||
extends: sections/projects
|
||||
headline: En cours
|
||||
layout: list
|
||||
info: "étape : {{ page.getStepLabel }}"
|
||||
status: listed
|
||||
- width: 1/2
|
||||
sections:
|
||||
modifiedProjects:
|
||||
extends: sections/projects
|
||||
create: false
|
||||
headline: Projets récement modifiés
|
||||
sortBy: modified desc
|
||||
layout: list
|
||||
image:
|
||||
query: page.client.toPage.logo.toFil
|
||||
unlisted:
|
||||
extends: sections/projects
|
||||
headline: Archivés
|
||||
status: unlisted
|
||||
- width: 1/1
|
||||
sections:
|
||||
yourProjects:
|
||||
label: Tous vos projets
|
||||
type: pages
|
||||
query: user.projects
|
||||
sortBy: modified desc
|
||||
create: false
|
||||
search: true
|
||||
image:
|
||||
query: page.client.toPage.logo.toFile
|
||||
|
||||
settings:
|
||||
label: Réglages
|
||||
|
|
|
|||
|
|
@ -8,6 +8,10 @@ columns:
|
|||
client: true
|
||||
currentStep:
|
||||
label: Étape
|
||||
value: "{{ page.getStepLabel }}"
|
||||
managers:
|
||||
label: Chefs de projet
|
||||
value: "{{ page.printManagers }}"
|
||||
empty: Pas encore de projet
|
||||
image: false
|
||||
search: true
|
||||
|
|
|
|||
|
|
@ -13,6 +13,10 @@ class ProjectPage extends Page {
|
|||
return $steps;
|
||||
}
|
||||
|
||||
public function getCurrentStep() {
|
||||
return $this->getStepsLabel()[$this->currentStep()];
|
||||
}
|
||||
|
||||
private function createStep($child) {
|
||||
$files = [];
|
||||
$uri = null;
|
||||
|
|
@ -69,4 +73,8 @@ class ProjectPage extends Page {
|
|||
|
||||
return $stepsLabel[$this->currentStep()->value()];
|
||||
}
|
||||
|
||||
public function printManagers() {
|
||||
return A::implode($this->managers()->toUsers()->pluck('name'), ', ');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue