forked from tviho/SonataAdminBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ability to add custom dashboard actions
- Loading branch information
1 parent
88e9451
commit b712dd9
Showing
6 changed files
with
153 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<a class="btn btn-link btn-flat" href="{{ action.url }}"> | ||
<i class="fa fa-{{ action.icon }}"></i> | ||
{{ action.label|trans({}, action.translation_domain|default('SonataAdminBundle')) }} | ||
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{% if admin.subClasses is empty %} | ||
<a class="btn btn-link btn-flat" href="{{ action.url }}"> | ||
<i class="fa fa-{{ action.icon }}"></i> | ||
{{ action.label|trans({}, action.translation_domain|default('SonataAdminBundle')) }} | ||
</a> | ||
{% else %} | ||
<a class="btn btn-link btn-flat dropdown-toggle" data-toggle="dropdown" href="#"> | ||
<i class="fa fa-{{ action.icon }}"></i> | ||
{{ action.label|trans({}, action.translation_domain|default('SonataAdminBundle')) }} | ||
<span class="caret"></span> | ||
</a> | ||
<ul class="dropdown-menu"> | ||
{% for subclass in admin.subclasses|keys %} | ||
<li> | ||
<a href="{{ admin.generateUrl('create', {'subclass': subclass}) }}">{{ subclass|trans({}, action.translation_domain|default('SonataAdminBundle')) }}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters