mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
make tabs and submenus working
This commit is contained in:
parent
03091a94d6
commit
ee1f43d9aa
@ -3,6 +3,10 @@
|
||||
chill_person_view:
|
||||
pattern: /view/{id}
|
||||
defaults: { _controller: CLChillPersonBundle:Person:view }
|
||||
options:
|
||||
menu: person
|
||||
order: 50
|
||||
label: menu.person.general_view
|
||||
|
||||
|
||||
chill_person_search:
|
||||
|
@ -25,10 +25,15 @@ This view should receive those arguments:
|
||||
<p class="nationality detail without_nationality">{% trans %}views.Person.view.without_nationality{% endtrans %}</p>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{{ include("::menu.html.twig", {'person': person, 'menu_composer' : menu_composer }) }}
|
||||
|
||||
<section class="tabs vertical">
|
||||
{{ include("CLChillPersonBundle::menu.html.twig",
|
||||
{'person': person, 'menu_composer' : menu_composer, 'route_active': 'chill_person_view' }) }}
|
||||
|
||||
<div class="tab-content active columns height">
|
||||
<p>My tab is active so I'll show up first! Inb4 tab 3!</p>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
@ -1,7 +1,13 @@
|
||||
<div>
|
||||
<ul>
|
||||
<ul class="tab-nav follow-href-path columns four">
|
||||
{% for menu in menu_composer.getRoutesFor('person') %}
|
||||
<li>{{ path(menu, {'id': person.id}) }}</li>
|
||||
<li class="{% spaceless %}
|
||||
{% if menu.route == route_active %}
|
||||
active
|
||||
{% endif %}
|
||||
{% endspaceless %} ">
|
||||
<a href="{{ path(menu.route, {'id': person.id}) }}" >{{ menu.label }}</a>
|
||||
</li>
|
||||
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
Loading…
x
Reference in New Issue
Block a user