fix cache and add template pdf to brief file
This commit is contained in:
parent
3a9c213d86
commit
8a9fb35034
3 changed files with 3 additions and 4 deletions
|
|
@ -27,8 +27,7 @@ tabs:
|
||||||
pdf:
|
pdf:
|
||||||
label: PDF
|
label: PDF
|
||||||
type: files
|
type: files
|
||||||
template: pdf
|
uploads: pdf
|
||||||
upload: pdf
|
|
||||||
multiple: false
|
multiple: false
|
||||||
description:
|
description:
|
||||||
type: textarea
|
type: textarea
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,6 @@
|
||||||
return function($newPage, $oldPage) {
|
return function($newPage, $oldPage) {
|
||||||
$project = $newPage->template() == 'project' ? $newPage : $newPage->parents()->findBy('template', 'project');
|
$project = $newPage->template() == 'project' ? $newPage : $newPage->parents()->findBy('template', 'project');
|
||||||
if ($project) {
|
if ($project) {
|
||||||
$steps = $newPage->rebuildStepsCache();
|
$steps = $project->rebuildStepsCache();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -16,7 +16,7 @@ class ProjectPage extends NotificationsPage {
|
||||||
return $stepsData;
|
return $stepsData;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function rebuildStepsCache() {
|
public function rebuildStepsCache() {
|
||||||
// Create steps
|
// Create steps
|
||||||
$steps = [];
|
$steps = [];
|
||||||
foreach ($this->children() as $child) {
|
foreach ($this->children() as $child) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue