Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Commit

Permalink
Hide navbar children when appropriate
Browse files Browse the repository at this point in the history
Due to how Flask-Copilot used to handle navbar entry children, it was
not easy to hide invisible children. Update Flask-Copilot and render the
navbar properly.
  • Loading branch information
jonafato committed Jun 10, 2016
1 parent 815318a commit f0e88ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pygotham/frontend/templates/layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
<section class="top-bar-section">
<ul class="right">
{% for entry in navbar %}
<li class="{{ entry.name }} {% if entry.children %}has-dropdown{% endif %}">
<li class="{{ entry.name }} {% if entry.visible_children|list %}has-dropdown{% endif %}">
<a href="{{ entry.url() }}">{{ entry.name }}</a>
{% if entry.children %}
{% if entry.visible_children|list %}
<ul class="dropdown">
{% for child in entry.children %}
{% for child in entry.visible_children %}
<li><a href="{{ child.url() }}">{{ child.name }}</a></li>
{% endfor %}
</ul>
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ contextlib2==0.5.1 # via raven
decorator==4.0.6 # via validators
docutils==0.12
Flask-Admin==1.4.0
flask-copilot==0.1.0
flask-copilot==0.2.0
Flask-Login==0.2.11 # via flask-security
Flask-Mail==0.9.1 # via flask-security
Flask-Migrate==1.7.0
Expand Down

0 comments on commit f0e88ed

Please sign in to comment.