Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-Core
Commits
9eae39aa
Commit
9eae39aa
authored
2 years ago
by
Julian
Browse files
Options
Downloads
Patches
Plain Diff
Account menu in navbar
parent
11d8d850
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!1046
Draft: Resolve "[3.0] Meta-issue for GraphQL back-end and Vue.js frontend"
,
!1045
Introduce Vuetify and GraphQL
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/core/templates/core/vue_base.html
+42
-58
42 additions, 58 deletions
aleksis/core/templates/core/vue_base.html
with
42 additions
and
58 deletions
aleksis/core/templates/core/vue_base.html
+
42
−
58
View file @
9eae39aa
...
...
@@ -115,12 +115,48 @@
<v-spacer></v-spacer>
{% if user.is_authenticated %}
<v-btn
icon
href=
"{% url "
notifications
"
%}"
>
<v-icon>
mdi-bell-outline
</v-icon>
</v-btn>
<v-avatar>
{% include "core/partials/vue_avatar_content.html" with person_or_user=request.user.person %}
</v-avatar>
<v-tooltip
bottom
>
<template
v-slot:activator=
"{ on, attrs }"
>
<v-btn
icon
href=
"{% url "
notifications
"
%}"
v-bind=
"attrs"
v-on=
"on"
color=
"white"
>
{% if request.user.person.unread_notifications_count > 0 %}
<v-icon>
mdi-bell-badge-outline
</v-icon>
{% else %}
<v-icon>
mdi-bell-outline
</v-icon>
{% endif %}
</v-btn>
</template>
<span>
{% trans "Notifications" %}
</span>
</v-tooltip>
<v-menu
offset-y
>
<template
v-slot:activator=
"{ on, attrs }"
>
<v-avatar
v-bind=
"attrs"
v-on=
"on"
>
{% include "core/partials/vue_avatar_content.html" with person_or_user=request.user.person %}
</v-avatar>
</template>
{% get_menu "NAVBAR_ACCOUNT_MENU" as account_menu %}
<v-list
id=
"account-dropdown"
class=
"dropdown-content"
>
{% for item in account_menu %}
{% if item.divider %}
<v-divider></v-divider>
{% endif %}
<v-list-item
href=
"{{ item.url }}"
>
<v-list-item-icon>
{% if item.vuetify_icon %}
<v-icon>
{{ item.vuetify_icon }}
</v-icon>
{% elif item.icon_class %}
<i
class=
"{{ item.icon_class }}"
></i>
{% elif item.icon %}
<i
class=
"material-icons"
>
{{ item.icon }}
</i>
{% elif item.svg_icon %}
<i
class=
"material-icons iconify"
data-icon=
"{{ item.svg_icon }}"
></i>
{% endif %}
</v-list-item-icon>
<v-list-item-title>
{{ item.name }}
</v-list-item-title>
</a>
</v-list-item>
{% endfor %}
</v-list>
</v-menu>
{% else %}
<v-btn
icon
href=
"{% url "
notifications
"
%}"
>
<v-icon>
mdi-bell-outline
</v-icon>
...
...
@@ -181,58 +217,6 @@
</v-footer>
</v-app>
</main>
{#
<header>
#}
{#
<!-- Nav bar (logged in as, logout) -->
#}
{#
<nav
class=
"nav-extended"
>
#}
{#
<div
class=
"nav-wrapper"
>
#}
{# {% if user.is_authenticated %}#}
{#
<ul
class=
"account-nav"
>
#}
{# {% trans "Notifications" as notifications_text %}#}
{#
<li>
#}
{#
<a
href=
"{% url "
notifications
"
%}"
data-position=
"bottom"
#
}
{
#
class=
"tooltipped {% if request.user.person.unread_notifications_count > 0 %}new-notification{% endif %}"
#
}
{
#
data-tooltip=
"{{ notifications_text }}"
aria-label=
"{{ notifications_text }}"
>
#}
{#
<i
class=
"material-icons iconify"
data-icon=
"mdi:bell-outline"
></i>
#}
{#
</a>
#}
{#
</li>
#}
{#
<li>
#}
{#
<a
href=
"#!"
class=
"navbar-dropdown-trigger"
data-target=
"account-dropdown"
>
#}
{# {{ request.user.person.identicon }}#}
{# {% include "core/partials/avatar_content.html" with person_or_user=request.user.person %}#}
{#
</a>
#}
{#
</li>
#}
{#
</ul>
#}
{# {% else %}#}
{#
<span
class=
"nav-spacer"
></span>
#}
{# {% endif %}#}
{#
</div>
#}
{#
<div
class=
"nav-content"
>
#}
{# {% block nav_content %}{% endblock %}#}
{#
</div>
#}
{#
</nav>
#}
{##}
{# {% get_menu "NAVBAR_ACCOUNT_MENU" as account_menu %}#}
{#
<ul
id=
"account-dropdown"
class=
"dropdown-content"
>
#}
{# {% for item in account_menu %}#}
{# {% if item.divider %}#}
{#
<li
class=
"divider"
></li>
#}
{# {% endif %}#}
{#
<li>
#}
{#
<a
href=
"{{ item.url }}"
>
#}
{# {% if item.icon %}#}
{#
<i
class=
"material-icons"
>
{{ item.icon }}
</i>
#}
{# {% elif item.svg_icon %}#}
{#
<i
class=
"material-icons iconify"
data-icon=
"{{ item.svg_icon }}"
></i>
#}
{# {% endif %}#}
{# {{ item.name }}#}
{#
</a>
#}
{#
</li>
#}
{# {% endfor %}#}
{#
</ul>
#}
{##}
{#
<!-- Main nav (sidenav) -->
#}
{##}
{#
</header>
#}
{% include_js "luxon" %}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment