Skip to content

Commit 59a686e

Browse files
committed
bug #43 Fixed backend design for the listing actions (javiereguiluz)
This PR was merged into the master branch. Discussion ---------- Fixed backend design for the listing actions I was playing with the Russian translation kindly provided by @bocharsky-bw and I noticed the following issue: ![before](https://cloud.githubusercontent.com/assets/73419/7233447/8180a7a2-e781-11e4-939f-b8321c14245d.png) After this PR, the actions should always be correctly displayed: ![after](https://cloud.githubusercontent.com/assets/73419/7233456/8a47b934-e781-11e4-8a42-29a4b172da43.png) Commits ------- bd6a4a6 Fixed backend design for the listing actions
2 parents de3198c + bd6a4a6 commit 59a686e

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)