forked from ezsystems/ezpublish-kernel
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EZP-23513: templates: update RichText's templates for new params format
- Loading branch information
Showing
8 changed files
with
62 additions
and
34 deletions.
There are no files selected for viewing
31 changes: 19 additions & 12 deletions
31
eZ/Bundle/EzPublishCoreBundle/Resources/views/FieldType/RichText/embed/content.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
<div class="{% if align is defined %}align-{{ align }}{% endif %}{% if class is defined %} {{ class }}{% endif %}"> | ||
{{ | ||
render( | ||
controller( | ||
"ez_content:embedContent", | ||
{ | ||
"contentId": id, | ||
"viewType": view, | ||
"params": params | ||
} | ||
{% set params = { "objectParameters": {} } %} | ||
{% if embedParams.config is defined %} | ||
{% set params = params|merge( { "objectParameters": embedParams.config } ) %} | ||
{% endif %} | ||
{% if embedParams.link is defined %} | ||
{% set params = params|merge( { "linkParameters": embedParams.link } ) %} | ||
{% endif %} | ||
<div class="{% if embedParams.align is defined %}align-{{ embedParams.align }}{% endif %}{% if embedParams.class is defined %} {{ embedParams.class }}{% endif %}"> | ||
{{ | ||
render( | ||
controller( | ||
"ez_content:embedContent", | ||
{ | ||
"contentId": embedParams.id, | ||
"viewType": embedParams.viewType, | ||
"params": params | ||
} | ||
) | ||
) | ||
) | ||
}} | ||
}} | ||
</div> |
4 changes: 2 additions & 2 deletions
4
...dle/EzPublishCoreBundle/Resources/views/FieldType/RichText/embed/content_denied.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<div class="{% if align is defined %}align-{{ align }}{% endif %}{% if class is defined %} {{ class }}{% endif %}"> | ||
Content #{{ id }}: You do not have permission to view this Content | ||
<div class="{% if embedParams.align is defined %}align-{{ embedParams.align }}{% endif %}{% if embedParams.class is defined %} {{ embedParams.class }}{% endif %}"> | ||
Content #{{ embedParams.id }}: You do not have permission to view this Content | ||
</div> |
11 changes: 9 additions & 2 deletions
11
...dle/EzPublishCoreBundle/Resources/views/FieldType/RichText/embed/content_inline.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ublishCoreBundle/Resources/views/FieldType/RichText/embed/content_inline_denied.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[[ Content #{{ id }}: You do not have permission to view this Content ]] | ||
[[ Content #{{ embedParams.id }}: You do not have permission to view this Content ]] |
31 changes: 19 additions & 12 deletions
31
eZ/Bundle/EzPublishCoreBundle/Resources/views/FieldType/RichText/embed/location.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
<div class="{% if align is defined %}align-{{ align }}{% endif %}{% if class is defined %} {{ class }}{% endif %}"> | ||
{{ | ||
render( | ||
controller( | ||
"ez_content:viewLocation", | ||
{ | ||
"locationId": id, | ||
"viewType": view, | ||
"params": params | ||
} | ||
{% set params = { "objectParameters": {} } %} | ||
{% if embedParams.config is defined %} | ||
{% set params = params|merge( { "objectParameters": embedParams.config } ) %} | ||
{% endif %} | ||
{% if embedParams.link is defined %} | ||
{% set params = params|merge( { "linkParameters": embedParams.link } ) %} | ||
{% endif %} | ||
<div class="{% if embedParams.align is defined %}align-{{ embedParams.align }}{% endif %}{% if embedParams.class is defined %} {{ embedParams.class }}{% endif %}"> | ||
{{ | ||
render( | ||
controller( | ||
"ez_content:viewLocation", | ||
{ | ||
"locationId": embedParams.id, | ||
"viewType": embedParams.viewType, | ||
"params": params | ||
} | ||
) | ||
) | ||
) | ||
}} | ||
}} | ||
</div> |
4 changes: 2 additions & 2 deletions
4
...le/EzPublishCoreBundle/Resources/views/FieldType/RichText/embed/location_denied.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<div class="{% if align is defined %}align-{{ align }}{% endif %}{% if class is defined %} {{ class }}{% endif %}"> | ||
Location #{{ id }}: You do not have permission to view this Location | ||
<div class="{% if embedParams.align is defined %}align-{{ embedParams.align }}{% endif %}{% if embedParams.class is defined %} {{ embedParams.class }}{% endif %}"> | ||
Location #{{ embedParams.id }}: You do not have permission to view this Location | ||
</div> |
11 changes: 9 additions & 2 deletions
11
...le/EzPublishCoreBundle/Resources/views/FieldType/RichText/embed/location_inline.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...blishCoreBundle/Resources/views/FieldType/RichText/embed/location_inline_denied.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[[ Location #{{ id }}: You do not have permission to view this Location ]] | ||
[[ Location #{{ embedParams.id }}: You do not have permission to view this Location ]] |