optional steps blueprints - change statuses label
This commit is contained in:
parent
8da0fb0e36
commit
83cf6beea7
36 changed files with 129 additions and 95 deletions
Binary file not shown.
|
Before Width: | Height: | Size: 36 KiB |
|
|
@ -1,5 +0,0 @@
|
|||
Uuid: aWouZREvKfW9VWMt
|
||||
|
||||
----
|
||||
|
||||
Template: image
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 29 KiB |
|
|
@ -1,5 +0,0 @@
|
|||
Uuid: T3MXkEhh9mmAGkUH
|
||||
|
||||
----
|
||||
|
||||
Template: image
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 58 KiB |
|
|
@ -1,5 +0,0 @@
|
|||
Uuid: e57fucmyhXX9jJv4
|
||||
|
||||
----
|
||||
|
||||
Template: image
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 53 KiB |
|
|
@ -1,5 +0,0 @@
|
|||
Uuid: aGCNfbFS7FcFJls1
|
||||
|
||||
----
|
||||
|
||||
Template: image
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 92 KiB |
|
|
@ -1,5 +0,0 @@
|
|||
Uuid: qqhD8ABZ7BkkJxd5
|
||||
|
||||
----
|
||||
|
||||
Template: image
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
Title: Brief client
|
||||
|
||||
----
|
||||
|
||||
Client: - page://G418qZ4ABsoWFx4i
|
||||
|
||||
----
|
||||
|
||||
Briefclientpdf:
|
||||
|
||||
----
|
||||
|
||||
Description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas faucibus mollis interdum. Maecenas faucibus mollis interdum. Maecenas sed diam eget risus varius blandit sit amet non magna. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Integer posuere erat a ante venenatis dapibus posuere velit aliquet.
|
||||
|
||||
----
|
||||
|
||||
Briefclientimages:
|
||||
|
||||
- file://aWouZREvKfW9VWMt
|
||||
- file://qqhD8ABZ7BkkJxd5
|
||||
- file://e57fucmyhXX9jJv4
|
||||
- file://aGCNfbFS7FcFJls1
|
||||
- file://T3MXkEhh9mmAGkUH
|
||||
- file://B3TFeDZKd5d8dxKK
|
||||
|
||||
|
||||
----
|
||||
|
||||
Uuid: jz9BryKovuoRUHdZ
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 59 KiB |
|
|
@ -1,5 +0,0 @@
|
|||
Uuid: B3TFeDZKd5d8dxKK
|
||||
|
||||
----
|
||||
|
||||
Template: image
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
Title: Brief client
|
||||
|
||||
----
|
||||
|
||||
Stepname: clientBrief
|
||||
|
||||
----
|
||||
|
||||
Briefclientpdf:
|
||||
|
||||
----
|
||||
|
||||
Description: Sed congue magna magna lorem aliquam diam dolor arcu fusce adipiscing morbi suspendisse sit dolor erat lorem phasellus sollicitudin cursus dolor aliquam maximus accumsan maximus phasellus ipsum cursus nisi cursus erat nec suspendisse morbi interdum suspendisse purus eget gravida ut mi hendrerit sit molestie eros scelerisque accumsan orci dolor amet.
|
||||
|
||||
----
|
||||
|
||||
Briefclientimages:
|
||||
|
||||
----
|
||||
|
||||
Stepindex: 1
|
||||
|
||||
----
|
||||
|
||||
Uuid: glE28vWGearnAmxw
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
Title: Offre commerciale
|
||||
|
||||
----
|
||||
|
||||
Uuid: nEY0Hav7UFaGChPG
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
Title: Offre commerciale
|
||||
|
||||
----
|
||||
|
||||
Stepname: proposal
|
||||
|
||||
----
|
||||
|
||||
Stepindex: 2
|
||||
|
||||
----
|
||||
|
||||
Uuid: AxFACcLRHv65S4DD
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
Title: Brief enrichi
|
||||
|
||||
----
|
||||
|
||||
Uuid: Du1F8OV8YwBaUA3q
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
Title: Brief enrichi
|
||||
|
||||
----
|
||||
|
||||
Stepname: extended-brief
|
||||
|
||||
----
|
||||
|
||||
Stepindex: 3
|
||||
|
||||
----
|
||||
|
||||
Uuid: VJBxmiffVnZ3FYiR
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
Title: Échantillon virtuel
|
||||
|
||||
----
|
||||
|
||||
Uuid: cCwaSHyUwJNNvVD3
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
Title: Échantillon virtuel
|
||||
|
||||
----
|
||||
|
||||
Stepname: virtualSample
|
||||
|
||||
----
|
||||
|
||||
Stepindex: 5
|
||||
|
||||
----
|
||||
|
||||
Uuid: C4w4dXYA5cOYbtHg
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
Title: Idéation industrielle
|
||||
|
||||
----
|
||||
|
||||
Stepname: industrialIdeation
|
||||
|
||||
----
|
||||
|
||||
Stepindex: 4
|
||||
|
||||
----
|
||||
|
||||
Uuid: viylJQYGPO5v85cv
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
Title: Échantillon physique
|
||||
|
||||
----
|
||||
|
||||
Stepname: physicalSample
|
||||
|
||||
----
|
||||
|
||||
Stepindex: 6
|
||||
|
||||
----
|
||||
|
||||
Uuid: kfj7IqqkXANm2czJ
|
||||
|
|
@ -2,11 +2,7 @@ Title: Miss Dior Blooming Bouquet
|
|||
|
||||
----
|
||||
|
||||
Optionalsteps: industrialIdeation, physicalSample
|
||||
|
||||
----
|
||||
|
||||
Currentstep: extendedBrief
|
||||
Currentstep:
|
||||
|
||||
----
|
||||
|
||||
|
|
@ -14,4 +10,4 @@ Client: - page://G418qZ4ABsoWFx4i
|
|||
|
||||
----
|
||||
|
||||
Uuid: 513oEM4JFuWBt2Bw
|
||||
Uuid: jDag30qUf8zyiEwC
|
||||
|
|
@ -10,7 +10,7 @@ Stepindex: 1
|
|||
|
||||
----
|
||||
|
||||
Uuid: 8B7d4RgY8eFqvqOB
|
||||
Uuid: 5NGq8baScF9pCeK9
|
||||
|
||||
----
|
||||
|
||||
|
|
|
|||
|
|
@ -10,4 +10,4 @@ Stepindex: 2
|
|||
|
||||
----
|
||||
|
||||
Uuid: AORTte4et35lhTXL
|
||||
Uuid: b1ZjuC8nDSXOOBf9
|
||||
|
|
@ -10,4 +10,4 @@ Stepindex: 3
|
|||
|
||||
----
|
||||
|
||||
Uuid: oBp6AlnPTY1xpfNU
|
||||
Uuid: cOMCwMHw0SRwCDjD
|
||||
|
|
@ -10,4 +10,4 @@ Stepindex: 5
|
|||
|
||||
----
|
||||
|
||||
Uuid: KvcDJf8bfJXQnxML
|
||||
Uuid: FouVvjVPGInE74Yv
|
||||
|
|
@ -10,4 +10,4 @@ Stepindex: 4
|
|||
|
||||
----
|
||||
|
||||
Uuid: jGfYrEyipW8esCwk
|
||||
Uuid: 2B5pbQQ6BrcDHGnG
|
||||
|
|
@ -10,4 +10,4 @@ Stepindex: 6
|
|||
|
||||
----
|
||||
|
||||
Uuid: IbgnF5QBMM0WsmRK
|
||||
Uuid: XdHzenC81EA7rS4e
|
||||
|
|
@ -6,4 +6,4 @@ Client:
|
|||
|
||||
----
|
||||
|
||||
Uuid: 96WmogVvmpMRmgzj
|
||||
Uuid: Wz0hErzk7ltN2qT8
|
||||
|
|
@ -3,6 +3,12 @@ icon: light-bulb
|
|||
image:
|
||||
back: black
|
||||
color: white
|
||||
status:
|
||||
draft:
|
||||
label: Désactivée
|
||||
unlisted: false
|
||||
listed: true
|
||||
label: Activée
|
||||
|
||||
tabs:
|
||||
contentTab:
|
||||
|
|
|
|||
|
|
@ -3,6 +3,12 @@ icon: image
|
|||
image:
|
||||
back: black
|
||||
color: white
|
||||
status:
|
||||
draft:
|
||||
label: Désactivée
|
||||
unlisted: false
|
||||
listed: true
|
||||
label: Activée
|
||||
|
||||
tabs:
|
||||
contentTab:
|
||||
|
|
|
|||
|
|
@ -1,12 +1,6 @@
|
|||
title: Projets
|
||||
|
||||
sections:
|
||||
fieldsSection:
|
||||
type: fields
|
||||
fields:
|
||||
steps:
|
||||
label: Étapes
|
||||
type: tags
|
||||
drafts:
|
||||
extends: sections/projects
|
||||
headline: Brouillons
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ return [
|
|||
require(__DIR__ . '/routes/toggle-favorite.php'),
|
||||
],
|
||||
'hooks' => [
|
||||
'page.create:after' => require_once(__DIR__ . '/hooks/create-steps.php')
|
||||
'page.create:after' => require_once(__DIR__ . '/hooks/create-steps.php'),
|
||||
'page.delete:before' => require_once(__DIR__ . '/hooks/delete-steps.php'),
|
||||
]
|
||||
];
|
||||
|
|
|
|||
10
public/site/config/hooks/delete-steps.php
Normal file
10
public/site/config/hooks/delete-steps.php
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
return function($page) {
|
||||
if ($page->template() == "project") {
|
||||
kirby()->impersonate('kirby');
|
||||
foreach ($page->children() as $child) {
|
||||
$child->delete();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -6,10 +6,15 @@ class ProjectPage extends Page {
|
|||
$steps = array_map(function($child) {
|
||||
return [
|
||||
'text' => $child['content']['title'],
|
||||
'value' => $child['content']['stepname']
|
||||
'value' => $child['content']['stepname'],
|
||||
'index' => $child['content']['stepindex']
|
||||
];
|
||||
}, $this->children()->toArray());
|
||||
|
||||
usort($steps, function ($a, $b) {
|
||||
return $a['index'] <=> $b['index'];
|
||||
});
|
||||
|
||||
return $steps;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue