Skip to content

Commit bd6a4a6

Browse files
committed
Fixed backend design for the listing actions
1 parent de3198c commit bd6a4a6

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

app/Resources/assets/scss/main.scss

+3-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,9 @@ body#comment_form_error {
235235
// Page: 'admin_post_index'
236236
// --------------------------------------------------
237237
body#admin_post_index {
238-
tbody td {
238+
.item-actions {
239+
white-space: nowrap;
240+
239241
a.btn + a.btn {
240242
margin-left: 4px;
241243
}

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

+10-8
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,17 @@
2121
<td>{{ post.authorEmail }}</td>
2222
<td>{% if post.publishedAt %}{{ post.publishedAt|date('Y-m-d H:i') }}{% endif %}</td>
2323
<td>
24-
<a href="{{ path('admin_post_show', { id: post.id }) }}" class="btn btn-sm btn-default">
25-
{{ 'action.show'|trans }}
26-
</a>
27-
28-
{% if post.isAuthor(app.user) %}
29-
<a href="{{ path('admin_post_edit', { id: post.id }) }}" class="btn btn-sm btn-primary">
30-
<i class="fa fa-edit"></i> {{ 'action.edit'|trans }}
24+
<div class="item-actions">
25+
<a href="{{ path('admin_post_show', { id: post.id }) }}" class="btn btn-sm btn-default">
26+
{{ 'action.show'|trans }}
3127
</a>
32-
{% endif %}
28+
29+
{% if post.isAuthor(app.user) %}
30+
<a href="{{ path('admin_post_edit', { id: post.id }) }}" class="btn btn-sm btn-primary">
31+
<i class="fa fa-edit"></i> {{ 'action.edit'|trans }}
32+
</a>
33+
{% endif %}
34+
</div>
3335
</td>
3436
</tr>
3537
{% endfor %}

web/css/app.css

+4-2
Original file line numberDiff line numberDiff line change
@@ -7093,5 +7093,7 @@ body#blog_post_show .post-comment {
70937093
body#comment_form_error h1.text-danger {
70947094
margin-bottom: 1em; }
70957095

7096-
body#admin_post_index tbody td a.btn + a.btn {
7097-
margin-left: 4px; }
7096+
body#admin_post_index .item-actions {
7097+
white-space: nowrap; }
7098+
body#admin_post_index .item-actions a.btn + a.btn {
7099+
margin-left: 4px; }

0 commit comments

Comments
 (0)