Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/c2is/BigfootCoreBundle
Browse files Browse the repository at this point in the history
  • Loading branch information
gmanen committed Jan 21, 2014
2 parents c84339b + 1e34362 commit d31de61
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Crud/CrudController.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ protected function doIndex()
),
),
'actions' => array(
array(
'edit' => array(
'href' => $this->container->get('router')->generate($this->getRouteNameForAction('edit'), array('id' => '__ID__')),
'icon' => 'pencil',
)
Expand Down
8 changes: 7 additions & 1 deletion Resources/views/base.list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
{% for attr, field in list_fields %}
<th>{{ field | trans }}</th>
{% endfor %}
{% if actions|length > 0 %}
<th>Actions</th>
{% endif %}
</tr>
</thead>
<tbody>
Expand All @@ -31,11 +33,15 @@
<td>{{ attribute(item, attr)|nl2br }}</td>
{% endfor %}
{% block action_buttons %}
{% if actions|length > 0 %}
<td>
<div class="btn-group">
<a class="btn btn-link" href="{{ path(list_edit_route, { 'id': item.id }) }}"><span class="glyphicon glyphicon-pencil"></span></a>
{% for action in actions %}
<a class="btn btn-link" href="{{ action.href|replace({'__ID__': item.id}) }}"><span class="glyphicon glyphicon-{{ action.icon }}"></span></a>
{% endfor %}
</div>
</td>
{% endif %}
{% endblock %}
</tr>
{% endfor %}
Expand Down

0 comments on commit d31de61

Please sign in to comment.