Skip to content

Commit 6964e23

Browse files
committed
minor #439 Tweaked the admin blog post show page (javiereguiluz)
This PR was squashed before being merged into the master branch (closes #439). Discussion ---------- Tweaked the admin blog post show page And the last PR about tweaking admin pages. This time, the blog post show page (the "author" is gone because you can only see your own blog posts in the backend): | Before | After | --- | --- | ![before-show](https://cloud.githubusercontent.com/assets/73419/22025941/99a1f29c-dccf-11e6-942a-085f8271fc85.png) | ![after-show](https://cloud.githubusercontent.com/assets/73419/22025960/a3fba3dc-dccf-11e6-96eb-5bddef967452.png) Commits ------- 86d8314 Tweaked the admin blog post show page
2 parents 4b0cda3 + 86d8314 commit 6964e23

File tree

2 files changed

+13
-23
lines changed

2 files changed

+13
-23
lines changed

app/Resources/views/admin/blog/show.html.twig

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,16 @@
44

55
{% block main %}
66
<h1>{{ post.title }}</h1>
7+
<p class="post-metadata">
8+
<i class="fa fa-calendar"></i> {{ post.publishedAt|localizeddate('long', 'medium', null, 'UTC') }}
9+
<i class="fa fa-user"></i> {{ post.author.email }}
10+
</p>
711

8-
<table class="table">
9-
<tbody>
10-
<tr>
11-
<th scope="row">{{ 'label.summary'|trans }}</th>
12-
<td>{{ post.summary|md2html }}</td>
13-
</tr>
14-
<tr>
15-
<th scope="row">{{ 'label.content'|trans }}</th>
16-
<td>{{ post.content|md2html }}</td>
17-
</tr>
18-
<tr>
19-
<th scope="row">{{ 'label.author'|trans }}</th>
20-
<td><p>{{ post.author.email }}</p></td>
21-
</tr>
22-
<tr>
23-
<th scope="row">{{ 'label.published_at'|trans }}</th>
24-
{# it's not mandatory to set the timezone in localizeddate(). This is done to
25-
avoid errors when the 'intl' PHP extension is not available and the application
26-
is forced to use the limited "intl polyfill", which only supports UTC and GMT #}
27-
<td><p>{{ post.publishedAt|localizeddate('long', 'medium', null, 'UTC') }}</p></td>
28-
</tr>
29-
</tbody>
30-
</table>
12+
<div class="well">
13+
<p class="m-b-0"><strong>{{ 'label.summary'|trans }}</strong>: {{ post.summary }}</p>
14+
</div>
15+
16+
{{ post.content|md2html }}
3117
{% endblock %}
3218

3319
{% block sidebar %}

web/css/main.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ i {
3232
vertical-align: middle;
3333
}
3434

35+
/* Utilities
36+
------------------------------------------------------------------------- */
37+
.m-b-0 { margin-bottom: 0 }
38+
3539
/* Page elements
3640
------------------------------------------------------------------------- */
3741
body {

0 commit comments

Comments
 (0)