Skip to content

Commit

Permalink
bug #347 Fix whitespaces between actions in list view (ogizanagi)
Browse files Browse the repository at this point in the history
This PR was merged into the master branch.

Discussion
----------

Fix whitespaces between actions in list view

Fixes https://github.com/javiereguiluz/EasyAdminBundle/issues/343#issuecomment-107340910

Commits
-------

3d8cbd0 Fix whitespaces between actions in list view
  • Loading branch information
javiereguiluz committed Jun 1, 2015
2 parents e569acd + 3d8cbd0 commit e6b9fc6
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions Resources/views/default/list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,20 @@
{% set _column_label = 'list.row_actions'|trans(_trans_parameters) %}
<td data-label="{{ _column_label }}" class="actions">
{% block item_actions %}
{% for _action in _list_item_actions %}
{% if 'method' == _action.type %}
{% set _action_href = path('admin', _request_parameters|merge({ action: _action.name, id: _item_id })) %}
{% elseif 'route' == _action.type %}
{% set _action_href = path(_action.name, _request_parameters|merge({ action: _action.name, id: _item_id })) %}
{% endif %}

<a class="{{ _action.css_class|default('') }}" href="{{ _action_href }}">{% spaceless %}
{% if _action.icon %}<i class="fa fa-{{ _action.icon }}"></i>{% endif %}
{{ _action.label|trans({'%entity_name%': _entity_config.name|trans, '%entity_label%': _entity_config.label|trans, '%entity_id%': _item_id}) }}
{% endspaceless %}</a>
{% endfor %}
{% spaceless %}
{% for _action in _list_item_actions %}
{% if 'method' == _action.type %}
{% set _action_href = path('admin', _request_parameters|merge({ action: _action.name, id: _item_id })) %}
{% elseif 'route' == _action.type %}
{% set _action_href = path(_action.name, _request_parameters|merge({ action: _action.name, id: _item_id })) %}
{% endif %}

<a class="{{ _action.css_class|default('') }}" href="{{ _action_href }}">
{% if _action.icon %}<i class="fa fa-{{ _action.icon }}"></i>{% endif %}
{{ _action.label|trans({'%entity_name%': _entity_config.name|trans, '%entity_label%': _entity_config.label|trans, '%entity_id%': _item_id}) }}
</a>
{% endfor %}
{% endspaceless %}
{% endblock item_actions %}
</td>
{% endif %}
Expand Down

0 comments on commit e6b9fc6

Please sign in to comment.