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
669c3894
Commit
669c3894
authored
Mar 22, 2017
by
Curlyfingers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added submenu feature for bootstrap3 template
Added CSS file for submenu support by bootstrap3
parent
f2635f3b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
10 deletions
+41
-10
submenu.css
flask_admin/static/admin/css/bootstrap3/submenu.css
+18
-0
base.html
flask_admin/templates/bootstrap3/admin/base.html
+1
-0
layout.html
flask_admin/templates/bootstrap3/admin/layout.html
+22
-10
No files found.
flask_admin/static/admin/css/bootstrap3/submenu.css
0 → 100644
View file @
669c3894
.nav
li
.dropdown
ul
.dropdown-menu
li
:hover
ul
{
display
:
block
;
position
:
absolute
;
left
:
100%
;
-webkit-border-radius
:
3px
;
-moz-border-radius
:
3px
;
border-radius
:
3px
;
}
.nav
li
.dropdown
ul
.dropdown-menu
ul
{
display
:
none
;
float
:
right
;
position
:
relative
;
top
:
auto
;
margin-top
:
-30px
;
}
.nav
li
.dropdown
a
.dropdown-toggle
.glyphicon
{
margin
:
0
4px
;
}
flask_admin/templates/bootstrap3/admin/base.html
View file @
669c3894
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<link
href=
"{{ admin_static.url(filename='bootstrap/bootstrap3/css/bootstrap.min.css', v='3.3.5') }}"
rel=
"stylesheet"
>
<link
href=
"{{ admin_static.url(filename='bootstrap/bootstrap3/css/bootstrap.min.css', v='3.3.5') }}"
rel=
"stylesheet"
>
<link
href=
"{{ admin_static.url(filename='bootstrap/bootstrap3/css/bootstrap-theme.min.css', v='3.3.5') }}"
rel=
"stylesheet"
>
<link
href=
"{{ admin_static.url(filename='bootstrap/bootstrap3/css/bootstrap-theme.min.css', v='3.3.5') }}"
rel=
"stylesheet"
>
<link
href=
"{{ admin_static.url(filename='admin/css/bootstrap3/admin.css', v='1.1.1') }}"
rel=
"stylesheet"
>
<link
href=
"{{ admin_static.url(filename='admin/css/bootstrap3/admin.css', v='1.1.1') }}"
rel=
"stylesheet"
>
<link
href=
"{{ admin_static.url(filename='admin/css/bootstrap3/submenu.css') }}"
rel=
"stylesheet"
>
<style>
<style>
body
{
body
{
padding-top
:
4px
;
padding-top
:
4px
;
...
...
flask_admin/templates/bootstrap3/admin/layout.html
View file @
669c3894
...
@@ -20,25 +20,37 @@
...
@@ -20,25 +20,37 @@
{%- if item.is_category() -%}
{%- if item.is_category() -%}
{% set children = item.get_children() %}
{% set children = item.get_children() %}
{%- if children %}
{%- if children %}
{% set class_name = item.get_class_name() %}
{% set class_name = item.get_class_name()
or ''
%}
{%- if item.is_active(admin_view) %}
{%- if item.is_active(admin_view) %}
<li
class=
"active dropdown"
>
<li
class=
"active dropdown
{% if class_name %} {{class_name}}{% endif %}
"
>
{% else -%}
{% else -%}
<li
class=
"dropdown"
>
<li
class=
"dropdown
{% if class_name %} {{class_name}}{% endif %}
"
>
{%- endif %}
{%- endif %}
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
href=
"javascript:void(0)"
>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
href=
"javascript:void(0)"
>
{% if item.class_name %}
<span
class=
"{{ item.class_name }}"
></span>
{% endif %}{{ item.name }}
<b
class=
"caret"
></b>
{% if item.class_name %}
<span
class=
"{{ item.class_name }}"
></span>
{% endif %}
{{ menu_icon(item) }}{{ item.name }}
{%- if 'dropdown-submenu' in class_name -%}
<i
class=
"glyphicon glyphicon-chevron-right small"
></i>
{%- else -%}
<i
class=
"glyphicon glyphicon-chevron-down small"
></i>
{%- endif -%}
</a>
</a>
<ul
class=
"dropdown-menu"
>
<ul
class=
"dropdown-menu"
>
{%- for child in children -%}
{%- for child in children -%}
{% set class_name = child.get_class_name() %}
{%- if child.is_category() -%}
{%- if child.is_active(admin_view) %}
{{ menu(menu_root=[child]) }}
<li
class=
"active{% if class_name %} {{class_name}}{% endif %}"
>
{% else %}
{% else %}
<li
{%
if
class_name
%}
class=
"{{class_name}}"
{%
endif
%}
>
{% set class_name = child.get_class_name() %}
{%- if 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 %}
{%- endif %}
<a
href=
"{{ child.get_url() }}"
{%
if
child
.
target
%}
target=
"{{ child.target }}"
{%
endif
%}
>
{{ menu_icon(child) }}{{ child.name }}
</a>
</li>
{%- endfor %}
{%- endfor %}
</ul>
</ul>
</li>
</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