Skip to content

Commit

Permalink
Merge pull request #4071 from manuelmeister/feature/new-flexlayout
Browse files Browse the repository at this point in the history
ContentNode: Create new responsive layout
  • Loading branch information
manuelmeister committed Dec 17, 2023
2 parents 02e1acc + 4240876 commit ffc91bf
Show file tree
Hide file tree
Showing 67 changed files with 4,343 additions and 1,793 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
App\Entity\ContentNode\MultiSelect:
multiSelect1:
root: '@columnLayout1'
parent: '@columnLayout1'
slot: '1'
parent: '@responsiveLayout1'
slot: 'aside-top'
position: 0
instanceName: 'multiSelect1'
contentType: '@contentTypeMultiSelect'
Expand All @@ -12,25 +12,25 @@ App\Entity\ContentNode\MultiSelect:
App\Entity\ContentNode\MaterialNode:
materialNode1:
root: '@columnLayout1'
parent: '@columnLayout1'
slot: '1'
parent: '@responsiveLayout1'
slot: 'aside-top'
position: 1
instanceName: 'materialNode1'
contentType: '@contentTypeMaterial'

App\Entity\ContentNode\SingleText:
singleText1:
root: '@columnLayout1'
parent: '@columnLayout1'
slot: '1'
parent: '@responsiveLayout1'
slot: 'aside-top'
position: 2
instanceName: 'singleText1'
contentType: '@contentTypeNotes'
data: { html: <word()> }
safetyConcept1:
root: '@columnLayout1'
parent: '@columnLayout1'
slot: '1'
parent: '@responsiveLayout1'
slot: 'aside-top'
position: 3
instanceName: 'safetyConcept1'
contentType: '@contentTypeSafetyConcept'
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
App\Entity\ContentNode\Storyboard:
storyboard1:
root: '@columnLayout1'
parent: '@columnLayout1'
slot: '2'
parent: '@responsiveLayout1'
slot: 'main'
position: 0
instanceName: 'storyboard1'
contentType: '@contentTypeStoryboard'
Expand Down Expand Up @@ -31,8 +31,8 @@ App\Entity\ContentNode\Storyboard:
App\Entity\ContentNode\ColumnLayout:
columnLayoutChild1:
root: '@columnLayout1'
parent: '@columnLayout1'
slot: '2'
parent: '@responsiveLayout1'
slot: 'main'
position: 1
data: { columns: [{ slot: '1', width: 7 }, { slot: '2', width: 5 }] }
instanceName: 'columnLayoutChild1'
Expand Down
15 changes: 13 additions & 2 deletions api/fixtures/activity1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ App\Entity\ContentNode\ColumnLayout:
parent: null
slot: null
position: 0
data: { columns: [{ slot: '1', width: 6 }, { slot: '2', width: 6 }] }
instanceName: 'columnLayout1'
data: { columns: [{ slot: '1', width: 12 }] }
instanceName: 'columnLayout1Root'
contentType: '@contentTypeColumnLayout'

# Reponsive layout
App\Entity\ContentNode\ResponsiveLayout:
responsiveLayout1:
root: '@columnLayout1'
parent: '@columnLayout1'
slot: '1'
position: 0
data: { items: [{ slot: 'main' }, { slot: 'aside-top' }, { slot: 'aside-bottom' }] }
instanceName: 'responsiveLayout1'
contentType: '@contentTypeResponsiveLayout'
8 changes: 8 additions & 0 deletions api/fixtures/columnLayouts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,11 @@ App\Entity\ContentNode\ColumnLayout:
data: { columns: [{ slot: '1', width: 12 }] }
instanceName: <word()>
contentType: '@contentTypeColumnLayout'
columnLayoutWithResponsiveLayout:
root: '@self'
parent: null
slot: null
position: 0
data: { columns: [{ slot: '1', width: 12 }] }
instanceName: <word()>
contentType: '@contentTypeColumnLayout'
6 changes: 5 additions & 1 deletion api/fixtures/contentTypes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ App\Entity\ContentType:
name: 'ColumnLayout'
active: true
entityClass: 'App\Entity\ContentNode\ColumnLayout'
contentTypeResponsiveLayout:
name: 'ResponsiveLayout'
active: true
entityClass: 'App\Entity\ContentNode\ResponsiveLayout'
contentTypeStoryboard:
name: 'Storyboard'
active: true
Expand All @@ -27,4 +31,4 @@ App\Entity\ContentType:
name: 'LAThematicArea'
active: true
entityClass: 'App\Entity\ContentNode\MultiSelect'
jsonConfig: { items: [ 'outdoorTechnique', 'security', 'natureAndEnvironment', 'pioneeringTechnique', 'campsiteAndSurroundings', 'preventionAndIntegration' ] }
jsonConfig: { items: [ 'outdoorTechnique', 'security', 'natureAndEnvironment', 'pioneeringTechnique', 'campsiteAndSurroundings', 'preventionAndIntegration' ] }
9 changes: 9 additions & 0 deletions api/fixtures/responsiveLayouts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
App\Entity\ContentNode\ResponsiveLayout:
responsiveLayoutCampUnrelated:
root: '@columnLayout1campUnrelated'
parent: '@columnLayout1campUnrelated'
slot: '1'
position: 0
data: { items: [{ slot: 'main' }, {slot: 'aside-top' }, {slot: 'aside-bottom'}] }
instanceName: 'responsiveLayoutCampUnrelated'
contentType: '@contentTypeResponsiveLayout'
8 changes: 0 additions & 8 deletions api/migrations/dev-data/Version202309300329.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ public function getDescription(): string {

public function up(Schema $schema): void {
// START PHP CODE
$this->addSql(createTruncateDatabaseCommand());

$statements = getStatementsForMigrationFile();
foreach ($statements as $statement) {
if (trim($statement)) {
$this->addSql($statement);
}
}
// END PHP CODE
}

Expand Down
23 changes: 23 additions & 0 deletions api/migrations/dev-data/Version202311121726.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

declare(strict_types=1);

namespace DataMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

require_once __DIR__.'/helpers.php';

final class Version202311121726 extends AbstractMigration {
public function getDescription(): string {
return '';
}

public function up(Schema $schema): void {
// START PHP CODE
// END PHP CODE
}

public function down(Schema $schema): void {}
}
23 changes: 23 additions & 0 deletions api/migrations/dev-data/Version202311121824.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

declare(strict_types=1);

namespace DataMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

require_once __DIR__.'/helpers.php';

final class Version202311121824 extends AbstractMigration {
public function getDescription(): string {
return '';
}

public function up(Schema $schema): void {
// START PHP CODE
// END PHP CODE
}

public function down(Schema $schema): void {}
}
23 changes: 23 additions & 0 deletions api/migrations/dev-data/Version202311261457.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

declare(strict_types=1);

namespace DataMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

require_once __DIR__.'/helpers.php';

final class Version202311261457 extends AbstractMigration {
public function getDescription(): string {
return '';
}

public function up(Schema $schema): void {
// START PHP CODE
// END PHP CODE
}

public function down(Schema $schema): void {}
}
31 changes: 31 additions & 0 deletions api/migrations/dev-data/Version202312032018.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

declare(strict_types=1);

namespace DataMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

require_once __DIR__.'/helpers.php';

final class Version202312032018 extends AbstractMigration {
public function getDescription(): string {
return '';
}

public function up(Schema $schema): void {
// START PHP CODE
$this->addSql(createTruncateDatabaseCommand());

$statements = getStatementsForMigrationFile();
foreach ($statements as $statement) {
if (trim($statement)) {
$this->addSql($statement);
}
}
// END PHP CODE
}

public function down(Schema $schema): void {}
}

0 comments on commit ffc91bf

Please sign in to comment.