Files
kimai2/app/Resources/views/admin/blog/show.html.twig
Kevin Papst 579b962c85 first draft
2016-10-20 22:10:41 +02:00

49 lines
1.7 KiB
Twig

{% 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 %}