diff options
| author | rubenwardy <rw@rubenwardy.com> | 2018-05-17 20:36:46 +0100 |
|---|---|---|
| committer | rubenwardy <rw@rubenwardy.com> | 2018-05-17 20:36:46 +0100 |
| commit | 3004dbeb4e2977e13de3e82574a1a4c56cad6246 (patch) | |
| tree | 098a743d55b785ce5f9e181101954677ce0fc31b /app/templates/base.html | |
| parent | 69425df6c3177666c5ee2811470696c6be1535e5 (diff) | |
| download | cheatdb-3004dbeb4e2977e13de3e82574a1a4c56cad6246.tar.xz | |
Add dropdown menu for user stuff
Diffstat (limited to 'app/templates/base.html')
| -rw-r--r-- | app/templates/base.html | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/app/templates/base.html b/app/templates/base.html index 0211b97..9589cc0 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -41,8 +41,24 @@ <ul class="nav navbar-nav navbar-right"> {% if current_user.is_authenticated %} <li><a href="{{ url_for('notifications_page') }}">({{ current_user.notifications | length }})</a></li> - <li><a href="{{ url_for('user_profile_page', username=current_user.username) }}">{{ current_user.display_name }}</a></li> - <li><a href="{{ url_for('user.logout') }}">Sign out</a></li> + <li class="dropdown"> + <a href="{{ url_for('user_profile_page', username=current_user.username) }}" + class="dropdown-toggle" + data-toggle="dropdown" + role="button" + aria-expanded="false">{{ current_user.display_name }} + <span class="caret"></span></a> + + <ul class="dropdown-menu" role="menu"> + <li> + <a href="{{ url_for('user_profile_page', username=current_user.username) }}">Profile</a> + </li> + {% if current_user.rank == current_user.rank.ADMIN %} + <li><a href="{{ url_for('admin_page') }}">Admin</a></li> + {% endif %} + <li><a href="{{ url_for('user.logout') }}">Sign out</a></li> + </ul> + </li> {% else %} <li><a href="{{ url_for('user.login') }}">Sign in</a></li> {% endif %} |
