Skip to content

Commit 5980f4b

Browse files
committed
minor #560 Add more fancy icons for buttons and links (bocharsky-bw)
This PR was merged into the master branch. Discussion ---------- Add more fancy icons for buttons and links ### Before: <img width="133" alt="screen shot 2017-05-09 at 23 31 06" src="https://cloud.githubusercontent.com/assets/3317635/25871341/d7473678-350f-11e7-85d8-345a221551c9.png"> <img width="860" alt="screen shot 2017-05-09 at 23 30 53" src="https://cloud.githubusercontent.com/assets/3317635/25871340/d747329a-350f-11e7-92d1-6c0e4c79d10d.png"> <img width="466" alt="screen shot 2017-05-09 at 23 30 10" src="https://cloud.githubusercontent.com/assets/3317635/25871336/d74685ca-350f-11e7-8914-431e5c427d72.png"> <img width="280" alt="screen shot 2017-05-09 at 23 30 26" src="https://cloud.githubusercontent.com/assets/3317635/25871335/d74614e6-350f-11e7-89e1-6484683b9fe9.png"> <img width="439" alt="screen shot 2017-05-09 at 23 30 39" src="https://cloud.githubusercontent.com/assets/3317635/25871338/d746a9e2-350f-11e7-9cec-688b5cc21b36.png"> ### After: <img width="155" alt="screen shot 2017-05-09 at 23 25 07" src="https://cloud.githubusercontent.com/assets/3317635/25871342/d7698d36-350f-11e7-9986-59112b426590.png"> <img width="858" alt="screen shot 2017-05-09 at 23 24 53" src="https://cloud.githubusercontent.com/assets/3317635/25871344/d76917b6-350f-11e7-91a0-0ddcea274fab.png"> <img width="466" alt="screen shot 2017-05-09 at 23 28 53" src="https://cloud.githubusercontent.com/assets/3317635/25871339/d746ca58-350f-11e7-9d16-2b4fbbc6cb51.png"> <img width="320" alt="screen shot 2017-05-09 at 23 25 23" src="https://cloud.githubusercontent.com/assets/3317635/25871343/d76a007c-350f-11e7-854f-76825031621b.png"> <img width="483" alt="screen shot 2017-05-09 at 23 25 17" src="https://cloud.githubusercontent.com/assets/3317635/25871345/d76a2f34-350f-11e7-8e73-8b2a00f228d6.png"> Commits ------- 8856716 Add more fancy icons for buttons and links
2 parents 23cf284 + 8856716 commit 5980f4b

File tree

6 files changed

+20
-11
lines changed

6 files changed

+20
-11
lines changed

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

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@
1414
{{ form_start(form, {attr: attr|default({})}) }}
1515
{{ form_widget(form) }}
1616

17-
<input type="submit" value="{{ button_label|default('label.create_post'|trans) }}"
18-
class="{{ button_css|default("btn btn-primary") }}" />
17+
<button type="submit" class="{{ button_css|default("btn btn-primary") }}">
18+
<i class="fa fa-save" aria-hidden="true"></i> {{ button_label|default('label.create_post'|trans) }}
19+
</button>
1920

2021
{% if include_back_to_home_link|default(false) %}
2122
<a href="{{ path('admin_post_index') }}" class="btn btn-link">
22-
{{ 'action.back_to_list'|trans }}
23+
<i class="fa fa-list-alt" aria-hidden="true"></i> {{ 'action.back_to_list'|trans }}
2324
</a>
2425
{% endif %}
2526
{{ form_end(form) }}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<td class="text-right">
2525
<div class="item-actions">
2626
<a href="{{ path('admin_post_show', {id: post.id}) }}" class="btn btn-sm btn-default">
27-
{{ 'action.show'|trans }}
27+
<i class="fa fa-eye" aria-hidden="true"></i> {{ 'action.show'|trans }}
2828
</a>
2929

3030
<a href="{{ path('admin_post_edit', {id: post.id}) }}" class="btn btn-sm btn-primary">

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
{{ form_row(form.publishedAt) }}
1313
{{ form_row(form.tags) }}
1414

15-
<input type="submit" value="{{ 'label.create_post'|trans }}" class="btn btn-primary" />
15+
<button type="submit" class="btn btn-primary">
16+
<i class="fa fa-save" aria-hidden="true"></i> {{ 'label.create_post'|trans }}
17+
</button>
1618
{{ form_widget(form.saveAndCreateNew, {label: 'label.save_and_create_new', attr: {class: 'btn btn-primary'}}) }}
1719
<a href="{{ path('admin_post_index') }}" class="btn btn-link">
18-
{{ 'action.back_to_list'|trans }}
20+
<i class="fa fa-list-alt" aria-hidden="true"></i> {{ 'action.back_to_list'|trans }}
1921
</a>
2022
{{ form_end(form) }}
2123
{% endblock %}

app/Resources/views/blog/_comment_form.html.twig

+6-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
#}
1515

1616
<fieldset>
17-
<legend>{{ 'title.add_comment'|trans }}</legend>
17+
<legend>
18+
<i class="fa fa-comment" aria-hidden="true"></i> {{ 'title.add_comment'|trans }}
19+
</legend>
1820

1921
{# Render any global form error (e.g. when a constraint on a public getter method failed) #}
2022
{{ form_errors(form) }}
@@ -29,7 +31,9 @@
2931
</div>
3032

3133
<div class="form-group">
32-
<button class="btn btn-primary pull-right" type="submit">{{ 'action.publish_comment'|trans }}</button>
34+
<button class="btn btn-primary pull-right" type="submit">
35+
<i class="fa fa-paper-plane" aria-hidden="true"></i> {{ 'action.publish_comment'|trans }}
36+
</button>
3337
</div>
3438
</fieldset>
3539
{{ form_end(form) }}

app/Resources/views/blog/_delete_post_confirmation.html.twig

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
</div>
99
<div class="modal-footer">
1010
<button type="button" class="btn btn-default" id="btnNo" data-dismiss="modal">
11-
{{ 'label.cancel'|trans }}
11+
<i class="fa fa-ban" aria-hidden="true"></i> {{ 'label.cancel'|trans }}
1212
</button>
1313
<button type="button" class="btn btn-danger" id="btnYes" data-dismiss="modal">
14-
{{ 'label.delete_post'|trans }}
14+
<i class="fa fa-trash" aria-hidden="true"></i> {{ 'label.delete_post'|trans }}
1515
</button>
1616
</div>
1717
</div>

app/Resources/views/blog/post_show.html.twig

+3-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@
3333
{% endif %}
3434
</div>
3535

36-
<h3>{{ 'post.num_comments'|transchoice(post.comments|length) }}</h3>
36+
<h3>
37+
<i class="fa fa-comments" aria-hidden="true"></i> {{ 'post.num_comments'|transchoice(post.comments|length) }}
38+
</h3>
3739

3840
{% for comment in post.comments %}
3941
<div class="row post-comment">

0 commit comments

Comments
 (0)