Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
flask-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
flask-admin
Commits
07ade4c2
Commit
07ade4c2
authored
Feb 16, 2016
by
Brian Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make nested sub-categories show up in the layout template
parent
b84302ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
layout.html
flask_admin/templates/bootstrap2/admin/layout.html
+17
-8
No files found.
flask_admin/templates/bootstrap2/admin/layout.html
View file @
07ade4c2
...
...
@@ -22,23 +22,32 @@
{%- if children %}
{% set class_name = item.get_class_name() %}
{%- if item.is_active(admin_view) %}
<li
class=
"active dropdown"
>
<li
class=
"active dropdown
{% if class_name %} {{class_name}}{% endif %}
"
>
{% else -%}
<li
class=
"dropdown"
>
<li
class=
"dropdown
{% if class_name %} {{class_name}}{% endif %}
"
>
{%- endif %}
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
href=
"javascript:void(0)"
>
{% if item.class_name %}
<i
class=
"{{ item.class_name }}"
></i>
{% endif %}{{ item.name }}
<b
class=
"caret"
></b>
{{ menu_icon(item) }}{{ item.name }}
{%- if 'dropdown-submenu' not in class_name -%}
<b
class=
"caret"
></b>
{%- endif -%}
</a>
<ul
class=
"dropdown-menu"
>
{%- for child in children -%}
{% set class_name = child.get_class_name() %}
{%- if child.is_active(admin_view) %}
<li
class=
"active{% if class_name %} {{class_name}}{% endif %}"
>
{%- if child.is_category() -%}
{{ menu(menu_root=[child]) }}
{% else %}
<li
{%
if
class_name
%}
class=
"{{class_name}}"
{%
endif
%}
>
{% set class_name = child.get_class_name() %}
{%- if child.is_active(admin_view) %}
{{ child.is_active(admin_view) }}
<li
class=
"active{% if class_name %} {{class_name}}{% endif %}"
>
{% else %}
<li
{%
if
class_name
%}
class=
"{{class_name}}"
{%
endif
%}
>
{%- endif %}
<a
href=
"{{ child.get_url() }}"
{%
if
child
.
target
%}
target=
"{{ child.target }}"
{%
endif
%}
>
{{ menu_icon(child) }}{{ child.name }}
</a>
</li>
{%- endif %}
<a
href=
"{{ child.get_url() }}"
{%
if
child
.
target
%}
target=
"{{ child.target }}"
{%
endif
%}
>
{{ menu_icon(child) }}{{ child.name }}
</a>
</li>
{%- endfor %}
</ul>
</li>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment