backports murph-skeleton
This commit is contained in:
parent
68cf917168
commit
825a31f671
|
@ -86,6 +86,7 @@ class <?= $class_name; ?> extends CrudController
|
||||||
->setPageRoute('new', 'admin_<?= $route; ?>_new')
|
->setPageRoute('new', 'admin_<?= $route; ?>_new')
|
||||||
->setPageRoute('edit', 'admin_<?= $route; ?>_edit')
|
->setPageRoute('edit', 'admin_<?= $route; ?>_edit')
|
||||||
->setPageRoute('show', 'admin_<?= $route; ?>_show')
|
->setPageRoute('show', 'admin_<?= $route; ?>_show')
|
||||||
|
->setPageRoute('sort', 'admin_<?= $route; ?>_sort')
|
||||||
->setPageRoute('delete', 'admin_<?= $route; ?>_delete')
|
->setPageRoute('delete', 'admin_<?= $route; ?>_delete')
|
||||||
->setPageRoute('filter', 'admin_<?= $route; ?>_filter')
|
->setPageRoute('filter', 'admin_<?= $route; ?>_filter')
|
||||||
|
|
||||||
|
@ -95,6 +96,9 @@ class <?= $class_name; ?> extends CrudController
|
||||||
|
|
||||||
// ->setMaxPerPage('index', 20)
|
// ->setMaxPerPage('index', 20)
|
||||||
|
|
||||||
|
// ->setIsSortableCollection('index', false)
|
||||||
|
// ->setSortableCollectionProperty('sortOrder')
|
||||||
|
|
||||||
// ->setAction('index', 'new', true)
|
// ->setAction('index', 'new', true)
|
||||||
// ->setAction('index', 'show', true)
|
// ->setAction('index', 'show', true)
|
||||||
// ->setAction('index', 'edit', true)
|
// ->setAction('index', 'edit', true)
|
||||||
|
@ -105,7 +109,7 @@ class <?= $class_name; ?> extends CrudController
|
||||||
// ->setAction('edit', 'delete', true)
|
// ->setAction('edit', 'delete', true)
|
||||||
|
|
||||||
// ->setField('index', 'Label', Field\TextField::class, [
|
// ->setField('index', 'Label', Field\TextField::class, [
|
||||||
// 'property' => 'label',
|
// 'property' => 'label',
|
||||||
// ])
|
// ])
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
|
@ -157,4 +157,4 @@
|
||||||
"Tasks": "Tâches"
|
"Tasks": "Tâches"
|
||||||
"Results": "Résultats"
|
"Results": "Résultats"
|
||||||
"Clean all cache": "Nettoyer tout le cache"
|
"Clean all cache": "Nettoyer tout le cache"
|
||||||
"You can sort items by drag & drop": "Vous pouvez trier les élements via un glisser/déposer"
|
"You can sort items with drag & drop": "Vous pouvez trier les élements via un glisser/déposer"
|
||||||
|
|
|
@ -1,45 +1,47 @@
|
||||||
{% extends '@Core/admin/layout.html.twig' %}
|
{% extends '@Core/admin/layout.html.twig' %}
|
||||||
|
|
||||||
{% block title %}{{ configuration.pageTitle('edit')|trans|build_string(entity) }} - {{ parent() }}{% endblock %}
|
{% set context = context ?? 'edit' %}
|
||||||
|
|
||||||
|
{% block title %}{{ configuration.pageTitle(context)|trans|build_string(entity) }} - {{ parent() }}{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
{% block header %}
|
{% block header %}
|
||||||
<div class="bg-light pl-5 pr-4 pt-5 pb-5">
|
<div class="bg-light pl-5 pr-4 pt-5 pb-5">
|
||||||
<div class="crud-header">
|
<div class="crud-header">
|
||||||
{% block header_title %}
|
{% block header_title %}
|
||||||
<h1 class="crud-header-title">{{ configuration.pageTitle('edit')|trans|build_string(entity) }}</h1>
|
<h1 class="crud-header-title">{{ configuration.pageTitle(context)|trans|build_string(entity) }}</h1>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block header_actions %}
|
{% block header_actions %}
|
||||||
<div class="crud-header-actions">
|
<div class="crud-header-actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
{% if configuration.action('edit', 'back', true) %}
|
{% if configuration.action(context, 'back', true) %}
|
||||||
<a href="{{ path(configuration.pageRoute('index')) }}" class="btn btn-light">
|
<a href="{{ path(configuration.pageRoute('index')) }}" class="btn btn-light">
|
||||||
<span class="fa fa-list pr-1"></span>
|
<span class="fa fa-list pr-1"></span>
|
||||||
{{ configuration.actionTitle('edit', 'back', 'Back to the list')|trans }}
|
{{ configuration.actionTitle(context, 'back', 'Back to the list')|trans }}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if configuration.action('edit', 'show', true) %}
|
{% if configuration.action(context, 'show', true) %}
|
||||||
<a href="{{ path(configuration.pageRoute('show'), {entity: entity.id}) }}" class="btn btn-secondary">
|
<a href="{{ path(configuration.pageRoute('show'), {entity: entity.id}) }}" class="btn btn-secondary">
|
||||||
<span class="fa fa-eye pr-1"></span>
|
<span class="fa fa-eye pr-1"></span>
|
||||||
{{ configuration.actionTitle('edit', 'show', 'Show')|trans|build_string(entity) }}
|
{{ configuration.actionTitle(context, 'show', 'Show')|trans|build_string(entity) }}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<button type="submit" form="form-main" class="btn btn-primary">
|
<button type="submit" form="form-main" class="btn btn-primary">
|
||||||
<span class="fa fa-save pr-1"></span>
|
<span class="fa fa-save pr-1"></span>
|
||||||
{{ configuration.actionTitle('edit', 'save', 'Save')|trans|build_string(entity) }}
|
{{ configuration.actionTitle(context, 'save', 'Save')|trans|build_string(entity) }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{% if header_actions_dropdown_menu is not defined %}
|
{% if header_actions_dropdown_menu is not defined %}
|
||||||
{% set header_actions_dropdown_menu = '' %}
|
{% set header_actions_dropdown_menu = '' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if configuration.action('edit', 'delete', true) %}
|
{% if configuration.action(context, 'delete', true) %}
|
||||||
{% set item %}
|
{% set item %}
|
||||||
<button type="submit" form="form-delete" class="dropdown-item">
|
<button type="submit" form="form-delete" class="dropdown-item">
|
||||||
{{ configuration.actionTitle('edit', 'delete', 'Delete')|trans|build_string(entity) }}
|
{{ configuration.actionTitle(context, 'delete', 'Delete')|trans|build_string(entity) }}
|
||||||
</button>
|
</button>
|
||||||
{% endset %}
|
{% endset %}
|
||||||
|
|
||||||
|
@ -82,7 +84,7 @@
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% if configuration.action('edit', 'delete', true) %}
|
{% if configuration.action(context, 'delete', true) %}
|
||||||
<form method="post" action="{{ path(configuration.pageRoute('delete'), {entity: entity.id}) }}" id="form-delete" data-form-confirm>
|
<form method="post" action="{{ path(configuration.pageRoute('delete'), {entity: entity.id}) }}" id="form-delete" data-form-confirm>
|
||||||
<input type="hidden" name="_method" value="DELETE">
|
<input type="hidden" name="_method" value="DELETE">
|
||||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ entity.id) }}">
|
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ entity.id) }}">
|
||||||
|
|
|
@ -1,22 +1,36 @@
|
||||||
{% extends '@Core/admin/layout.html.twig' %}
|
{% extends '@Core/admin/layout.html.twig' %}
|
||||||
|
|
||||||
{% block title %}{{ configuration.pageTitle('index')|trans }} - {{ parent() }}{% endblock %}
|
{% set context = context ?? 'index' %}
|
||||||
|
|
||||||
|
{% block title %}{{ configuration.pageTitle(context)|trans }} - {{ parent() }}{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
{% block header %}
|
{% block header %}
|
||||||
<div class="bg-light pl-5 pr-4 pt-5 {% if pager.paginationData.pageCount < 2 %}{% if filters.show %}pb-3{% else %}pb-5{% endif %}{% endif %}">
|
{%- set pb -%}
|
||||||
|
{% if pager.paginationData.pageCount < 2 %}
|
||||||
|
{% if filters.show %}
|
||||||
|
pb-3
|
||||||
|
{% else %}
|
||||||
|
pb-5
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
pb-3
|
||||||
|
{% endif %}
|
||||||
|
{%- endset -%}
|
||||||
|
|
||||||
|
<div class="bg-light pl-5 pr-4 pt-5 {{ pb }}">
|
||||||
<div class="crud-header">
|
<div class="crud-header">
|
||||||
{% block header_title %}
|
{% block header_title %}
|
||||||
<h1 class="crud-header-title">{{ configuration.pageTitle('index')|trans }}</h1>
|
<h1 class="crud-header-title">{{ configuration.pageTitle(context)|trans }}</h1>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block header_actions %}
|
{% block header_actions %}
|
||||||
<div class="crud-header-actions">
|
<div class="crud-header-actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
{% if configuration.action('index', 'new', true) %}
|
{% if configuration.action(context, 'new', true) %}
|
||||||
<a href="{{ path(configuration.pageRoute('new')) }}" class="btn btn-primary">
|
<a href="{{ path(configuration.pageRoute('new')) }}" class="btn btn-primary">
|
||||||
<span class="fa fa-plus pr-1"></span>
|
<span class="fa fa-plus pr-1"></span>
|
||||||
{{ configuration.actionTitle('index', 'new', 'New')|trans }}
|
{{ configuration.actionTitle(context, 'new', 'New')|trans }}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -62,56 +76,58 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block list %}
|
{% block list %}
|
||||||
{% set isSortable = configuration.isSortableCollection('index') %}
|
{% set isSortable = configuration.isSortableCollection(context) %}
|
||||||
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
{% block list_header %}
|
{% block list_header %}
|
||||||
<thead class="thead-light">
|
<thead class="thead-light">
|
||||||
<tr>
|
<tr>
|
||||||
{% for label, config in configuration.fields('index') %}
|
{% for label, config in configuration.fields(context) %}
|
||||||
{% set attr = config.options.attr is defined ? config.options.attr : [] %}
|
{% block list_header_item %}
|
||||||
{% set isSortable = config.options.sort ?? false %}
|
{% set attr = config.options.attr is defined ? config.options.attr : [] %}
|
||||||
|
{% set isSortable = config.options.sort ?? false %}
|
||||||
|
|
||||||
<th {% for key, value in attr %}{{ key }}="{{ value }}"{% endfor %}>
|
<th {% for key, value in attr %}{{ key }}="{{ value }}"{% endfor %}>
|
||||||
{% if isSortable %}
|
{% if isSortable %}
|
||||||
{% if sort %}
|
{% if sort %}
|
||||||
{% if sort.label == label %}
|
{% if sort.label == label %}
|
||||||
{% if sort.direction == 'asc' %}
|
{% if sort.direction == 'asc' %}
|
||||||
{% set newDirection = 'desc' %}
|
{% set newDirection = 'desc' %}
|
||||||
{% set icon = 'fa fa-sort-amount-down-alt' %}
|
{% set icon = 'fa fa-sort-amount-down-alt' %}
|
||||||
|
{% else %}
|
||||||
|
{% set newDirection = 'asc' %}
|
||||||
|
{% set icon = 'fa fa-sort-amount-up-alt' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% set url = path(configuration.getPageRoute(context), {
|
||||||
|
_sort: config.options.sort[0],
|
||||||
|
_sort_direction: newDirection,
|
||||||
|
}) %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set newDirection = 'asc' %}
|
{% set url = path(configuration.getPageRoute(context), {
|
||||||
{% set icon = 'fa fa-sort-amount-up-alt' %}
|
_sort: config.options.sort[0],
|
||||||
|
_sort_direction: 'asc',
|
||||||
|
}) %}
|
||||||
|
|
||||||
|
{% set icon = null %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% set url = path(configuration.getPageRoute('index'), {
|
<a href="{{ url }}">
|
||||||
_sort: config.options.sort[0],
|
{% if icon is defined %}
|
||||||
_sort_direction: newDirection,
|
<span class="{{ icon }}"></span>
|
||||||
}) %}
|
{% endif %}
|
||||||
|
|
||||||
|
{{ label|trans }}
|
||||||
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set url = path(configuration.getPageRoute('index'), {
|
|
||||||
_sort: config.options.sort[0],
|
|
||||||
_sort_direction: 'asc',
|
|
||||||
}) %}
|
|
||||||
|
|
||||||
{% set icon = null %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<a href="{{ url }}">
|
|
||||||
{% if icon is defined %}
|
|
||||||
<span class="{{ icon }}"></span>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{{ label|trans }}
|
{{ label|trans }}
|
||||||
</a>
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ label|trans }}
|
{{ label|trans }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
</th>
|
||||||
{{ label|trans }}
|
{% endblock %}
|
||||||
{% endif %}
|
|
||||||
</th>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<th class="col-2 miw-100 text-right">
|
<th class="col-2 miw-100 text-right">
|
||||||
{{ 'Actions'|trans }}
|
{{ 'Actions'|trans }}
|
||||||
|
@ -128,7 +144,7 @@
|
||||||
{
|
{
|
||||||
_token: csrf_token('sort'),
|
_token: csrf_token('sort'),
|
||||||
page: pager.currentPageNumber,
|
page: pager.currentPageNumber,
|
||||||
context: 'index',
|
context: context,
|
||||||
}
|
}
|
||||||
) ~ '"' %}
|
) ~ '"' %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -146,15 +162,15 @@
|
||||||
|
|
||||||
{% block list_item %}
|
{% block list_item %}
|
||||||
{%- set dbClick %}
|
{%- set dbClick %}
|
||||||
{% if configuration.action('index', 'show', true) %}
|
{% if configuration.action(context, 'show', true) %}
|
||||||
{{ path(configuration.pageRoute('show'), {entity: item.id}) }}
|
{{ path(configuration.pageRoute('show'), {entity: item.id}) }}
|
||||||
{% elseif configuration.action('index', 'edit', true) %}
|
{% elseif configuration.action(context, 'edit', true) %}
|
||||||
{{ path(configuration.pageRoute('edit'), {entity: item.id}) }}
|
{{ path(configuration.pageRoute('edit'), {entity: item.id}) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endset -%}
|
{% endset -%}
|
||||||
|
|
||||||
<tr {{ dataSortableItem|raw }} data-dblclick="{{ dbClick }}" class="{{ loop.index is odd ? 'is-odd' : 'is-even' }}">
|
<tr {{ dataSortableItem|raw }} data-dblclick="{{ dbClick }}" class="{{ loop.index is odd ? 'is-odd' : 'is-even' }}">
|
||||||
{% for config in configuration.fields('index') %}
|
{% for config in configuration.fields(context) %}
|
||||||
{% set attr = config.options.attr is defined ? config.options.attr : [] %}
|
{% set attr = config.options.attr is defined ? config.options.attr : [] %}
|
||||||
{% set action = config.options.action is defined ? config.options.action : null %}
|
{% set action = config.options.action is defined ? config.options.action : null %}
|
||||||
|
|
||||||
|
@ -176,19 +192,19 @@
|
||||||
<td class="col-2 miw-200 text-right">
|
<td class="col-2 miw-200 text-right">
|
||||||
{% block list_item_actions_before %}{% endblock %}
|
{% block list_item_actions_before %}{% endblock %}
|
||||||
|
|
||||||
{% if configuration.action('index', 'show', true) %}
|
{% if configuration.action(context, 'show', true) %}
|
||||||
<a href="{{ path(configuration.pageRoute('show'), {entity: item.id}) }}" class="btn btn-sm btn-secondary mr-1">
|
<a href="{{ path(configuration.pageRoute('show'), {entity: item.id}) }}" class="btn btn-sm btn-secondary mr-1">
|
||||||
<span class="fa fa-eye"></span>
|
<span class="fa fa-eye"></span>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if configuration.action('index', 'edit', true) %}
|
{% if configuration.action(context, 'edit', true) %}
|
||||||
<a href="{{ path(configuration.pageRoute('edit'), {entity: item.id}) }}" class="btn btn-sm btn-primary mr-1">
|
<a href="{{ path(configuration.pageRoute('edit'), {entity: item.id}) }}" class="btn btn-sm btn-primary mr-1">
|
||||||
<span class="fa fa-edit"></span>
|
<span class="fa fa-edit"></span>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if configuration.action('index', 'delete', true) %}
|
{% if configuration.action(context, 'delete', true) %}
|
||||||
<button type="submit" form="form-delete-{{ item.id }}" class="btn btn-sm btn-danger">
|
<button type="submit" form="form-delete-{{ item.id }}" class="btn btn-sm btn-danger">
|
||||||
<span class="fa fa-trash"></span>
|
<span class="fa fa-trash"></span>
|
||||||
</button>
|
</button>
|
||||||
|
@ -206,15 +222,15 @@
|
||||||
|
|
||||||
{% if loop.last and isSortable %}
|
{% if loop.last and isSortable %}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="col-12 text-black-50 border-0" colspan="{{ configuration.fields('index')|length + 1 }}">
|
<td class="col-12 text-black-50 border-0" colspan="{{ configuration.fields(context)|length + 1 }}">
|
||||||
<span class="fa fa-hand-pointer"></span>
|
<span class="fa fa-hand-pointer"></span>
|
||||||
{{ 'You can sort items by drag & drop'|trans }}
|
{{ 'You can sort items with drag & drop'|trans }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="col-12 text-center p-4 text-black-50" colspan="{{ configuration.fields('index')|length + 1 }}">
|
<td class="col-12 text-center p-4 text-black-50" colspan="{{ configuration.fields(context)|length + 1 }}">
|
||||||
<div class="display-1">
|
<div class="display-1">
|
||||||
<span class="fa fa-search"></span>
|
<span class="fa fa-search"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,28 +1,30 @@
|
||||||
{% extends '@Core/admin/layout.html.twig' %}
|
{% extends '@Core/admin/layout.html.twig' %}
|
||||||
|
|
||||||
{% block title %}{{ configuration.pageTitle('new')|trans|build_string(entity) }} - {{ parent() }}{% endblock %}
|
{% set context = context ?? 'new' %}
|
||||||
|
|
||||||
|
{% block title %}{{ configuration.pageTitle(context)|trans|build_string(entity) }} - {{ parent() }}{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
{% block header %}
|
{% block header %}
|
||||||
<div class="bg-light pl-5 pr-4 pt-5 pb-5">
|
<div class="bg-light pl-5 pr-4 pt-5 pb-5">
|
||||||
<div class="crud-header">
|
<div class="crud-header">
|
||||||
{% block header_title %}
|
{% block header_title %}
|
||||||
<h1 class="crud-header-title">{{ configuration.pageTitle('new')|trans|build_string(entity) }}</h1>
|
<h1 class="crud-header-title">{{ configuration.pageTitle(context)|trans|build_string(entity) }}</h1>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block header_actions %}
|
{% block header_actions %}
|
||||||
<div class="crud-header-actions">
|
<div class="crud-header-actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
{% if configuration.action('new', 'back', true) %}
|
{% if configuration.action(context, 'back', true) %}
|
||||||
<a href="{{ path(configuration.pageRoute('index')) }}" class="btn btn-light">
|
<a href="{{ path(configuration.pageRoute('index')) }}" class="btn btn-light">
|
||||||
<span class="fa fa-list pr-1"></span>
|
<span class="fa fa-list pr-1"></span>
|
||||||
{{ configuration.actionTitle('new', 'back', 'Back to the list')|trans }}
|
{{ configuration.actionTitle(context, 'back', 'Back to the list')|trans }}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<button type="submit" form="form-main" class="btn btn-primary">
|
<button type="submit" form="form-main" class="btn btn-primary">
|
||||||
<span class="fa fa-save pr-1"></span>
|
<span class="fa fa-save pr-1"></span>
|
||||||
{{ configuration.actionTitle('new', 'save', 'Save')|trans|build_string(entity) }}
|
{{ configuration.actionTitle(context, 'save', 'Save')|trans|build_string(entity) }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{% if header_actions_dropdown_menu is not defined %}
|
{% if header_actions_dropdown_menu is not defined %}
|
||||||
|
|
|
@ -1,30 +1,32 @@
|
||||||
{% extends '@Core/admin/layout.html.twig' %}
|
{% extends '@Core/admin/layout.html.twig' %}
|
||||||
|
|
||||||
{% block title %}{{ configuration.pageTitle('show')|trans|build_string(entity) }} - {{ parent() }}{% endblock %}
|
{% set context = context ?? 'show' %}
|
||||||
|
|
||||||
|
{% block title %}{{ configuration.pageTitle(context)|trans|build_string(entity) }} - {{ parent() }}{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
{% block header %}
|
{% block header %}
|
||||||
<div class="bg-light pl-5 pr-4 pt-5 pb-5">
|
<div class="bg-light pl-5 pr-4 pt-5 pb-5">
|
||||||
<div class="crud-header">
|
<div class="crud-header">
|
||||||
{% block header_title %}
|
{% block header_title %}
|
||||||
<h1 class="crud-header-title">{{ configuration.pageTitle('show')|trans|build_string(entity) }}</h1>
|
<h1 class="crud-header-title">{{ configuration.pageTitle(context)|trans|build_string(entity) }}</h1>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block header_actions %}
|
{% block header_actions %}
|
||||||
<div class="crud-header-actions">
|
<div class="crud-header-actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
{% if configuration.action('show', 'back', true) %}
|
{% if configuration.action(context, 'back', true) %}
|
||||||
<a href="{{ path(configuration.pageRoute('index')) }}" class="btn btn-light">
|
<a href="{{ path(configuration.pageRoute('index')) }}" class="btn btn-light">
|
||||||
<span class="fa fa-list pr-1"></span>
|
<span class="fa fa-list pr-1"></span>
|
||||||
{{ configuration.actionTitle('show', 'back', 'Back to the list')|trans }}
|
{{ configuration.actionTitle(context, 'back', 'Back to the list')|trans }}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if configuration.action('show', 'edit', true) %}
|
{% if configuration.action(context, 'edit', true) %}
|
||||||
<a href="{{ path(configuration.pageRoute('edit'), {entity: entity.id}) }}" class="btn btn-primary">
|
<a href="{{ path(configuration.pageRoute('edit'), {entity: entity.id}) }}" class="btn btn-primary">
|
||||||
<span class="fa fa-edit pr-1"></span>
|
<span class="fa fa-edit pr-1"></span>
|
||||||
|
|
||||||
{{ configuration.actionTitle('show', 'edit', 'Edit')|trans|build_string(entity) }}
|
{{ configuration.actionTitle(context, 'edit', 'Edit')|trans|build_string(entity) }}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue