Skip to content

Commit 92ffffd

Browse files
authored
Merge pull request #207 from sumocoders/fixes-usermenu
Fixes usermenu
2 parents 92bab53 + c37953b commit 92ffffd

File tree

5 files changed

+6
-14
lines changed

5 files changed

+6
-14
lines changed

docs/development/menu.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,12 @@ You can use them like so:
3131
There is also a helper called `enableChildRoutes`, which takes a prefix string as an argument. Calling this method on a
3232
menu item, will activate it when a route is visited that starts with the prefix you pass.
3333

34-
In short, if you have a menu item with `user_overview` as the route, and you enable child routes with the `user_`
34+
In short, if you have a menu item with `user_admin_overview` as the route, and you enable child routes with the `user_admin_`
3535
prefix, all the following routes will also mark the user menu item as active:
3636

37-
* `user_create`
38-
* `user_update`
39-
* `user_export`
40-
* `user_whatever`
37+
* `user_admin_add`
38+
* `user_admin_edit`
39+
* `user_admin_whatever`
4140

4241
## The example listener
4342

templates/base_error.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{% include '@SumoCodersFrameworkCore/head.html.twig' with {title: block('title') is defined ? block('title') : page_title} %}
33

44
{% block stylesheets %}
5-
{{ encore_entry_link_tags('error') }}
5+
<link rel="stylesheet" href="{{ asset('styles/error.scss') }}">
66
{% endblock %}
77

88
{% endblock %}

templates/empty.html.twig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,5 @@
77
<div class="container">
88
{% block main %}{% endblock %}
99
</div>
10-
{% block javascripts %}
11-
{{ encore_entry_script_tags('app') }}
12-
{% endblock %}
1310
</body>
1411
</html>

templates/user.html.twig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,5 @@
3131
</div>
3232
</div>
3333
</div>
34-
35-
{% block javascripts %}
36-
{{ encore_entry_script_tags('app') }}
37-
{% endblock %}
3834
</body>
3935
</html>

templates/usermenu.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
</li>
2626
<div class="dropdown-divider"></div>
2727
{% if is_granted('IS_IMPERSONATOR') %}
28-
<li><a href="{{ impersonation_exit_path(path('user_overview')) }}" class="dropdown-item" data-turbo-prefetch="false">{{ 'user.actions.switchback'|trans|ucfirst }}</a></li>
28+
<li><a href="{{ impersonation_exit_path(path('user_admin_overview')) }}" class="dropdown-item" data-turbo-prefetch="false">{{ 'user.actions.switchback'|trans|ucfirst }}</a></li>
2929
{% else %}
3030
<li><a href="{{ path('_logout_main') }}" class="dropdown-item" data-turbo-prefetch="false">{{ 'user.actions.logout'|trans|ucfirst }}</a></li>
3131
{% endif %}

0 commit comments

Comments
 (0)