UI: Implement web-assets v2 component nav-pills #93592

Merged
Márton Lente merged 3 commits from ui/web-assets-component-nav-pills into main 2024-09-27 11:24:25 +02:00
2 changed files with 25 additions and 20 deletions
Showing only changes of commit 8758973e05 - Show all commits

View File

@ -1,4 +1,7 @@
<a class="nav-pills-item {% if url_match == request.path %}active{% endif %}" href="{% url url %}">
{% if icon %}<i class="{{ icon }}"></i>{% endif %}
{% if icon %}
<i class="{{ icon }}"></i>
{% endif %}
{{ title }}
</a>

View File

@ -42,31 +42,33 @@
<div class="row">
{% block sidebar %}
<div class="col-md-3">
<nav class="box p-2 mb-3">
<div class="nav-drawer-body">
<div class="nav nav-pills flex-column" role="tablist" aria-orientation="vertical">
{% include "bid_main/components/sidebar_nav_item.html" with url="bid_main:index" title="Home" url_match="/" icon="i-home" %}
{% include "bid_main/components/sidebar_nav_item.html" with url="bid_main:profile" title="Profile" url_match="/settings/profile" icon="i-user" %}
<div class="nav-pills-divider"></div>
<div class="col-md-3">
<div aria-orientation="vertical" class="flex-column mb-3 nav nav-pills" role="tablist">
{% include "bid_main/components/sidebar_nav_item.html" with url="bid_main:index" title="Home" url_match="/" icon="i-home" %}
{% include "bid_main/components/sidebar_nav_item.html" with url="bid_main:active_sessions" title="Sessions" url_match="/active-sessions" icon="i-activity" %}
{% include "bid_main/components/sidebar_nav_item.html" with url="bid_main:auth_tokens" title="Authenticated Apps" url_match="/applications" icon="i-link" %}
{% if user.bid_main_oauth2application.count %}
{% include "bid_main/components/sidebar_nav_item.html" with url="bid_main:profile" title="Profile" url_match="/settings/profile" icon="i-user" %}
<div class="nav-pills-divider"></div>
{% include "bid_main/components/sidebar_nav_item.html" with url="bid_main:active_sessions" title="Sessions" url_match="/active-sessions" icon="i-activity" %}
{% include "bid_main/components/sidebar_nav_item.html" with url="bid_main:auth_tokens" title="Authenticated Apps" url_match="/applications" icon="i-link" %}
{% if user.bid_main_oauth2application.count %}
{% include "bid_main/components/sidebar_nav_item.html" with url="bid_main:developer_applications" title="Developer Apps" url_match="/developer/applications" icon="i-code" %}
{% endif %}
{% endif %}
<div class="nav-pills-divider"></div>
<div class="nav-pills-divider"></div>
{% if show_mfa %}
{% if show_mfa %}
{% include "bid_main/components/sidebar_nav_item.html" with url="bid_main:mfa" title="Multi-factor Authentication" url_match="/settings/profile" icon="i-shield" %}
{% endif %}
{% include "bid_main/components/sidebar_nav_item.html" with url="bid_main:password_change" title="Password" url_match="/change" icon="i-shield" %}
{% include "bid_main/components/sidebar_nav_item.html" with url="bid_main:delete_user" title="Delete Account" url_match="/delete-my-account" icon="i-trash" %}
</div>
{% endif %}
{% include "bid_main/components/sidebar_nav_item.html" with url="bid_main:password_change" title="Password" url_match="/change" icon="i-asterisk" %}
{% include "bid_main/components/sidebar_nav_item.html" with url="bid_main:delete_user" title="Delete Account" url_match="/delete-my-account" icon="i-trash" %}
</div>
</nav>
</div>
</div>
{% endblock %}
<div class="{% block column_class %}col-md-9{% endblock %} mx-auto">