prepare extended brief
This commit is contained in:
parent
86d3f8b22c
commit
984c8b7737
11 changed files with 143 additions and 67 deletions
|
|
@ -2,7 +2,7 @@ Alt:
|
|||
|
||||
----
|
||||
|
||||
Favoriteforusers: - user://WWjXgPWk
|
||||
Favoriteforusers:
|
||||
|
||||
----
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ Alt:
|
|||
|
||||
----
|
||||
|
||||
Favoriteforusers: - user://WWjXgPWk
|
||||
Favoriteforusers:
|
||||
|
||||
----
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
Alt:
|
||||
|
||||
----
|
||||
|
||||
Favoriteforusers:
|
||||
|
||||
----
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ Title: Miss Dior Blooming Bouquet
|
|||
|
||||
----
|
||||
|
||||
Currentstep: proposal
|
||||
Currentstep: extendedBrief
|
||||
|
||||
----
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,28 @@ options:
|
|||
sort: false
|
||||
|
||||
tabs:
|
||||
contentTab:
|
||||
fields:
|
||||
stepName:
|
||||
type: hidden
|
||||
content:
|
||||
label: Brief enrichi
|
||||
icon: document
|
||||
columns:
|
||||
- width: 1/1
|
||||
fields:
|
||||
stepName:
|
||||
type: hidden
|
||||
value: test
|
||||
pdf:
|
||||
label: PDF
|
||||
type: files
|
||||
multiple: false
|
||||
uploads: pdf
|
||||
description:
|
||||
type: textarea
|
||||
size: tiny
|
||||
buttons: false
|
||||
maxlength: 700
|
||||
moodboard:
|
||||
label: Images
|
||||
type: files
|
||||
uploads: image
|
||||
layout: cards
|
||||
size: medium
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ class ProjectPage extends Page {
|
|||
$files = [];
|
||||
$uri = null;
|
||||
|
||||
if ($child->stepName() == 'clientBrief') {
|
||||
$this->handleClientBriefStep($child, $files, $uri);
|
||||
if (str_contains($child->stepName()->value(), 'Brief')) {
|
||||
$this->handleBriefStep($child, $files, $uri);
|
||||
}
|
||||
|
||||
if ($child->stepName() == 'proposal') {
|
||||
|
|
@ -40,9 +40,10 @@ class ProjectPage extends Page {
|
|||
];
|
||||
}
|
||||
|
||||
private function handleClientBriefStep($child, &$files, &$uri) {
|
||||
private function handleBriefStep($child, &$files, &$uri) {
|
||||
$uri = $child->uri();
|
||||
|
||||
if ($child->moodboard()->isNotEmpty()) {
|
||||
$uri = $child->uri();
|
||||
foreach ($child->moodboard()->toFiles() as $file) {
|
||||
$files[] = getFileData($file);
|
||||
}
|
||||
|
|
|
|||
19
public/site/templates/extended-brief.json.php
Normal file
19
public/site/templates/extended-brief.json.php
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
$moodboard = [];
|
||||
|
||||
foreach ($page->moodboard()->toFiles() as $image) {
|
||||
$moodboard[] = getFileData($image);
|
||||
}
|
||||
|
||||
$specificData = [
|
||||
"tags" => $page->parent()->parent()->clientBriefImageTags()->split(),
|
||||
"moodboard" => $moodboard
|
||||
];
|
||||
|
||||
$pageData = array_merge($genericData, $specificData);
|
||||
|
||||
echo json_encode([
|
||||
"page" => $pageData,
|
||||
"user" => $userData
|
||||
]);
|
||||
1
public/site/templates/extended-brief.php
Normal file
1
public/site/templates/extended-brief.php
Normal file
|
|
@ -0,0 +1 @@
|
|||
<?php snippet('generic-template') ?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue