Skip to content

Commit

Permalink
Fix active menus
Browse files Browse the repository at this point in the history
  • Loading branch information
kizniche committed Apr 3, 2024
1 parent efdbea6 commit 5f2d053
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mycodo/mycodo_flask/templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,14 @@
<div class="dropdown-divider"></div>
<a class="dropdown-item disabled" href="#"><i class="fas fa-tachometer-alt"></i> {{_('Dashboards')}}</a>
{% for each_dash in dashboards %}
<a class="dropdown-item" href="/dashboard/{{each_dash.unique_id}}">{{each_dash.name}}</a>
<a class="dropdown-item{% if each_dash.unique_id == dashboard_id %} active{% endif %}" href="/dashboard/{{each_dash.unique_id}}">{{each_dash.name}}</a>
<div class="dropdown-divider"></div>
{% endfor %}
<a class="dropdown-item" href="/dashboard-add">{{_('Add Dashboard')}}</a>
</div>
</li>

<li class="nav-item dropdown{% if active_page in ['data', 'output', 'function', 'method_list'] %} active{% endif %}">
<li class="nav-item dropdown{% if active_page in ['input', 'output', 'function', 'method_list'] %} active{% endif %}">
<a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{_('Setup')}}</a>
<div class="dropdown-menu" aria-labelledby="dropdown01">
<a class="dropdown-item{% if active_page == 'input' %} active{% endif %}" href="{{url_for('routes_input.page_input')}}"><i class="fas fa-database"></i> {{dict_translation['input']['title']}}</a>
Expand Down
2 changes: 1 addition & 1 deletion mycodo/mycodo_flask/templates/pages/input.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "layout.html" %}
{% set active_page = "data" %}
{% set active_page = "input" %}
{% set help_page = ["https://kizniche.github.io/Mycodo/Inputs/", dict_translation['input']['title']] %}

{% block title %} - {{dict_translation['input']['title']}}{% endblock %}
Expand Down

0 comments on commit 5f2d053

Please sign in to comment.