first draft
This commit is contained in:
48
app/Resources/views/admin/blog/show.html.twig
Normal file
48
app/Resources/views/admin/blog/show.html.twig
Normal file
@@ -0,0 +1,48 @@
|
||||
{% extends 'admin/layout.html.twig' %}
|
||||
|
||||
{% block body_id 'admin_post_show' %}
|
||||
|
||||
{% block main %}
|
||||
<h1>{{ post.title }}</h1>
|
||||
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ 'label.summary'|trans }}</th>
|
||||
<td>{{ post.summary|md2html }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ 'label.content'|trans }}</th>
|
||||
<td>{{ post.content|md2html }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ 'label.author'|trans }}</th>
|
||||
<td><p>{{ post.authorEmail }}</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ 'label.published_at'|trans }}</th>
|
||||
{# it's not mandatory to set the timezone in localizeddate(). This is done to
|
||||
avoid errors when the 'intl' PHP extension is not available and the application
|
||||
is forced to use the limited "intl polyfill", which only supports UTC and GMT #}
|
||||
<td><p>{{ post.publishedAt|localizeddate('long', 'medium', null, 'UTC') }}</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
<div class="section">
|
||||
<a href="{{ path('admin_post_edit', { id: post.id }) }}" class="btn btn-lg btn-block btn-success">
|
||||
<i class="fa fa-edit"></i> {{ 'action.edit_contents'|trans }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
{{ include('admin/blog/_form.html.twig', {
|
||||
form: delete_form,
|
||||
button_label: 'action.delete_post'|trans,
|
||||
button_css: 'btn btn-lg btn-block btn-danger',
|
||||
show_confirmation: true,
|
||||
}, with_context = false) }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user