Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions templates/Element/Form/title.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{% if object.id %}
<h1 untitled-label="{{ __('Untitled') }}">
<b v-html="{{ object.attributes.title|json_encode }}"></b>
{% for obj in included %}
{% if obj.type == 'streams' %}
<a class="button button-outlined mx-1" href="{{ obj.meta.url }}" target="_blank">
<app-icon icon="carbon:launch"></app-icon>
<span class="ml-05">{{ __('Open File') }}</span>
</a>
{% endif %}
{% endfor %}
</h1>
{% else %}
<h1 class="has-text-gray-600">{{ __('New object in') }} {{ Layout.tr(object.type) }}</h1>
{% endif %}
17 changes: 4 additions & 13 deletions templates/Pages/Modules/view.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,11 @@
<modules-view inline-template ref="moduleView" :object="{{ object|json_encode }}">
<div class="modules-view">
<header>
{% if object.id %}
<h1 untitled-label="{{ __('Untitled') }}">
<b v-html="{{ object.attributes.title|json_encode }}"></b>
{% for obj in included %}
{% if obj.type == 'streams' %}
<a class="button button-outlined mx-1" href="{{ obj.meta.url }}" target="_blank">
<app-icon icon="carbon:launch"></app-icon>
<span class="ml-05">{{ __('Open File') }}</span>
</a>
{% endif %}
{% endfor %}
</h1>
{% set customElement = Element.custom('title', 'group') %}
{% if not customElement %}
{{ element('Form/title', {'object': object, 'included': included}) }}
{% else %}
<h1 class="has-text-gray-600">{{ __('New object in') }} {{ Layout.tr(object.type) }}</h1>
{{ element(customElement, {'object': object, 'included': included}) }}
{% endif %}
</header>

Expand Down