Skip to content

Commit 43f2fa4

Browse files
committed
feature #516 Add "show" button on edit post (yceruto)
This PR was merged into the master branch. Discussion ---------- Add "show" button on edit post I propose to add a new button "show post" to review quickly the edited post, it avoid come back to post list for perform this common action. I think it's more an ergonomic issue rather than a new feature. **Preview:** ![show_btn](https://cloud.githubusercontent.com/assets/2028198/24167690/033a521c-0e4e-11e7-9962-1110c2b8b467.png) Commits ------- c9e52cd Add show button in edit page
2 parents bd874e9 + c9e52cd commit 43f2fa4

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

app/Resources/translations/messages.en.xlf

+4
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@
101101
<source>action.show</source>
102102
<target>Show</target>
103103
</trans-unit>
104+
<trans-unit id="action.show_post">
105+
<source>action.show_post</source>
106+
<target>Show post</target>
107+
</trans-unit>
104108
<trans-unit id="action.show_code">
105109
<source>action.show_code</source>
106110
<target>Show code</target>

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

+6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
{% endblock %}
1414

1515
{% block sidebar %}
16+
<div class="section">
17+
<a href="{{ path('admin_post_show', { id: post.id }) }}" class="btn btn-lg btn-block btn-success">
18+
<i class="fa fa-eye" aria-hidden="true"></i> {{ 'action.show_post'|trans }}
19+
</a>
20+
</div>
21+
1622
<div class="section actions">
1723
{{ include('admin/blog/_delete_form.html.twig', { post: post }, with_context = false) }}
1824
</div>

0 commit comments

Comments
 (0)