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 %}"> <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 }} {{ title }}
</a> </a>

View File

@ -42,31 +42,33 @@
<div class="row"> <div class="row">
{% block sidebar %} {% block sidebar %}
<div class="col-md-3"> <div class="col-md-3">
<nav class="box p-2 mb-3"> <div aria-orientation="vertical" class="flex-column mb-3 nav nav-pills" role="tablist">
<div class="nav-drawer-body"> {% include "bid_main/components/sidebar_nav_item.html" with url="bid_main:index" title="Home" url_match="/" icon="i-home" %}
<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>
{% 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:profile" title="Profile" url_match="/settings/profile" icon="i-user" %}
{% 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 %} <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" %} {% 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" %} {% 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 %} {% 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" %} {% include "bid_main/components/sidebar_nav_item.html" with url="bid_main:password_change" title="Password" url_match="/change" icon="i-asterisk" %}
</div>
{% 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> </div>
</nav> </div>
</div>
{% endblock %} {% endblock %}
<div class="{% block column_class %}col-md-9{% endblock %} mx-auto"> <div class="{% block column_class %}col-md-9{% endblock %} mx-auto">