Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request symfony2admingenerator#514 from cedriclombardot/sh…
…ow-sidebar Enable to add a sidebar in show view
- Loading branch information
Showing
4 changed files
with
74 additions
and
2 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
20 changes: 20 additions & 0 deletions
20
Resources/templates/CommonAdmin/ShowTemplate/sidebar.php.twig
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,20 @@ | ||
{% block show_sidebar %} | ||
{{ echo_block("show_sidebar") }} | ||
{% for name, widget in sidebar %} | ||
{% if widget.credentials is defined %} | ||
{{ echo_if_granted(widget.credentials, builder.ModelClass) }} | ||
{% endif %} | ||
<div class="row-fluid"> | ||
<h2>{{ echo_trans(name,{}, i18n_catalog is defined ? i18n_catalog : "Admin" ) }}</h2> | ||
{% if widget.partial %} | ||
{{ echo_include(widget.partial) }} | ||
{% elseif widget.render %} | ||
{{ echo_render(widget.render is iterable ? widget.render.controller : widget.render, widget.render is iterable ? widget.render.params : {}) }} | ||
{% endif %} | ||
</div> | ||
{% if widget.credentials is defined %} | ||
{{ echo_endif () }} | ||
{% endif %} | ||
{% endfor %} | ||
{{ echo_endblock() }} | ||
{% endblock %} |
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