mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-05 15:29:50 +00:00
add view admin page + some styling
This commit is contained in:
parent
e876b75d41
commit
e0fc87ef58
@ -563,7 +563,8 @@ class ChillMainExtension extends Extension implements
|
||||
'template' => '@ChillMain/NewsItem/new.html.twig',
|
||||
],
|
||||
'view' => [
|
||||
'role' => '',
|
||||
'role' => 'ROLE_ADMIN',
|
||||
'template' => '@ChillMain/NewsItem/view_admin.html.twig'
|
||||
],
|
||||
'edit' => [
|
||||
'role' => 'ROLE_ADMIN',
|
||||
|
@ -0,0 +1,30 @@
|
||||
<div class="item-bloc">
|
||||
<div class="item-row">
|
||||
<h3>
|
||||
{{ entity.title }}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="item-row">
|
||||
<p>
|
||||
{% if entity.startDate %}
|
||||
<span>{{ entity.startDate|format_date('long') }}</span>
|
||||
{% endif %}
|
||||
{% if entity.endDate %}
|
||||
<span> - {{ entity.endDate|format_date('long') }}</span>
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
<div class="item-row separator">
|
||||
<div>
|
||||
{{ entity.content|u.truncate(350, '… [' ~ ('news.read_more'|trans) ~ '](' ~ chill_path_add_return_path('chill_main_single_news_item', { 'id': entity.id } ) ~ ')', false)|chill_markdown_to_html }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-row">
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_main_single_news_item', { 'id': entity.id } ) }}" class="btn btn-show btn-mini"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -0,0 +1,13 @@
|
||||
<div class="flex-table">
|
||||
<div class="item-bloc">
|
||||
<p class="date-label">
|
||||
<span>{{ entity.startDate|format_date('long') }}</span>
|
||||
{% if entity.endDate is not null %}
|
||||
<span> - {{ entity.endDate|format_date('long') }}</span>
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
<div class="item-bloc">
|
||||
{{ entity.content|chill_markdown_to_html }}
|
||||
</div>
|
||||
</div>
|
@ -19,6 +19,9 @@
|
||||
{% endif %}
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_crud_news_item_view', { 'id': entity.id }) }}" class="btn btn-show" title="{{ 'show'|trans }}"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('chill_crud_news_item_edit', { 'id': entity.id }) }}" class="btn btn-edit" title="{{ 'edit'|trans }}"></a>
|
||||
</li>
|
||||
|
@ -22,25 +22,28 @@
|
||||
|
||||
<div class="item-bloc">
|
||||
<div class="item-row">
|
||||
<h3>
|
||||
{{ entity.title }}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="item-row">
|
||||
<p>
|
||||
{% if entity.startDate %}
|
||||
<span>{{ entity.startDate|format_date('long') }}</span>
|
||||
{% endif %}
|
||||
{% if entity.endDate %}
|
||||
<span> - {{ entity.endDate|format_date('long') }}</span>
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
<div class="item-row separator">
|
||||
<div>
|
||||
{{ entity.content|u.truncate(350, '… [' ~ ('news.read_more'|trans) ~ '](' ~ chill_path_add_return_path('chill_main_single_news_item', { 'id': entity.id } ) ~ ')', false)|chill_markdown_to_html }}
|
||||
<div class="wrap-list">
|
||||
<div class="wl-row">
|
||||
<div class="wl-col">
|
||||
<h2>{{ entity.title }}</h2>
|
||||
</div>
|
||||
<div class="wl-col">
|
||||
<p>
|
||||
{% if entity.startDate %}
|
||||
<span>{{ entity.startDate|format_date('long') }}</span>
|
||||
{% endif %}
|
||||
{% if entity.endDate %}
|
||||
<span> - {{ entity.endDate|format_date('long') }}</span>
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item-row separator">
|
||||
{{ entity.content|u.truncate(350, '… [' ~ ('news.read_more'|trans) ~ '](' ~ chill_path_add_return_path('chill_main_single_news_item', { 'id': entity.id } ) ~ ')', false)|chill_markdown_to_html }}
|
||||
</div>
|
||||
<div class="item-row">
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
|
@ -3,22 +3,17 @@
|
||||
{% block title 'news.show_details'|trans %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-md-10">
|
||||
<h1>{{ entity.title }}</h1>
|
||||
<div class="col-md-10 col-xxl">
|
||||
<div class="news-item-show">
|
||||
<h1>{{ entity.title }}</h1>
|
||||
|
||||
<div>
|
||||
<span>{{ entity.startDate|format_date('long') }}</span>
|
||||
{% if entity.endDate is not null %}
|
||||
<span> - {{ entity.endDate|format_date('long') }}</span>
|
||||
{% endif %}
|
||||
{% include '@ChillMain/NewsItem/_show.html.twig' with { 'entity': entity } %}
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class="cancel">
|
||||
<a href="{{ chill_return_path_or('chill_main_news_items_history') }}" class="btn btn-cancel">{{ 'Back to the list'|trans|chill_return_path_label }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
{{ entity.content|chill_markdown_to_html }}
|
||||
</div>
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class="cancel">
|
||||
<a href="{{ chill_return_path_or('chill_main_news_items_history') }}" class="btn btn-cancel">{{ 'Back to the list'|trans|chill_return_path_label }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -0,0 +1,29 @@
|
||||
{% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
{% include('@ChillMain/CRUD/_view_title.html.twig') %}
|
||||
{% endblock %}
|
||||
|
||||
{% block admin_content %}
|
||||
|
||||
<div class="col-md-10 col-xxl">
|
||||
<div class="news-item-show">
|
||||
<h1>{{ entity.title }}</h1>
|
||||
|
||||
{% include '@ChillMain/NewsItem/_show.html.twig' with { 'entity': entity } %}
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class="cancel">
|
||||
<a href="{{ chill_return_path_or('chill_crud_news_item_index') }}" class="btn btn-cancel">{{ 'Back to the list'|trans|chill_return_path_label }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('chill_crud_news_item_edit', { 'id': entity.id }) }}" class="btn btn-edit" title="{{ 'edit'|trans }}"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('chill_crud_news_item_delete', { 'id': entity.id }) }}" class="btn btn-delete" title="{{ 'delete'|trans }}"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
Loading…
x
Reference in New Issue
Block a user