Skip to content

Commit 8856716

Browse files
committed
Add more fancy icons for buttons and links
1 parent d90e0c1 commit 8856716

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)