project blueprint - optional steps working
This commit is contained in:
parent
595c275100
commit
8da0fb0e36
30 changed files with 296 additions and 127 deletions
|
|
@ -1,37 +1,67 @@
|
|||
<?php
|
||||
|
||||
return function($page) {
|
||||
if ($page->template() != "project") return;
|
||||
|
||||
$page->createChild([
|
||||
'slug' => 'client-brief',
|
||||
'template' => 'client-brief',
|
||||
'content' => [
|
||||
'title' => 'Brief client'
|
||||
]
|
||||
]);
|
||||
|
||||
$page->createChild([
|
||||
'slug' => 'proposal',
|
||||
'template' => 'proposal',
|
||||
'content' => [
|
||||
'title' => 'Offre commerciale'
|
||||
]
|
||||
]);
|
||||
|
||||
$page->createChild([
|
||||
'slug' => 'extended-brief',
|
||||
'template' => 'extended-brief',
|
||||
'content' => [
|
||||
'title' => 'Brief enrichi'
|
||||
]
|
||||
]);
|
||||
|
||||
$page->createChild([
|
||||
'slug' => 'sample',
|
||||
'template' => 'sample',
|
||||
'content' => [
|
||||
'title' => 'Échantillon virtuel'
|
||||
]
|
||||
]);
|
||||
if ($page->template() == "project") {
|
||||
kirby()->impersonate('kirby');
|
||||
|
||||
$brief = $page->createChild([
|
||||
'slug' => 'client-brief',
|
||||
'template' => 'client-brief',
|
||||
'content' => [
|
||||
'title' => 'Brief client',
|
||||
'stepName' => 'clientBrief',
|
||||
'stepIndex' => 1
|
||||
],
|
||||
])->changeStatus('listed');
|
||||
|
||||
$page->createChild([
|
||||
'slug' => 'proposal',
|
||||
'template' => 'proposal',
|
||||
'content' => [
|
||||
'title' => 'Offre commerciale',
|
||||
'stepName' => 'proposal',
|
||||
'stepIndex' => 2
|
||||
]
|
||||
])->changeStatus('listed');
|
||||
|
||||
$page->createChild([
|
||||
'slug' => 'extended-brief',
|
||||
'template' => 'extended-brief',
|
||||
'content' => [
|
||||
'title' => 'Brief enrichi',
|
||||
'stepName' => 'extended-brief',
|
||||
'stepIndex' => 3
|
||||
]
|
||||
])->changeStatus('listed');
|
||||
|
||||
$page->createChild([
|
||||
'slug' => 'industrial-ideation',
|
||||
'template' => 'industrial-ideation',
|
||||
'content' => [
|
||||
'title' => 'Idéation industrielle',
|
||||
'stepName' => 'industrialIdeation',
|
||||
'stepIndex' => 4
|
||||
]
|
||||
]);
|
||||
|
||||
$page->createChild([
|
||||
'slug' => 'virtual-sample',
|
||||
'template' => 'virtual-sample',
|
||||
'content' => [
|
||||
'title' => 'Échantillon virtuel',
|
||||
'stepName' => 'virtualSample',
|
||||
'stepIndex' => 5
|
||||
]
|
||||
])->changeStatus('listed');
|
||||
|
||||
$page->createChild([
|
||||
'slug' => 'physical-sample',
|
||||
'template' => 'physical-sample',
|
||||
'content' => [
|
||||
'title' => 'Échantillon physique',
|
||||
'stepName' => 'physicalSample',
|
||||
'stepIndex' => 6
|
||||
]
|
||||
]);
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue