Profile page makeover, initial stuff.

This commit is contained in:
Víðir Valberg Guðmundsson 2019-03-26 10:22:27 +01:00
parent 9ce09ffc3b
commit 8025303b57
3 changed files with 70 additions and 43 deletions

View file

@ -4,20 +4,74 @@
{% load bootstrap3 %} {% load bootstrap3 %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="btn-group btn-group-justified hidden-xs"> <div class="col-md-2">
{% include 'profile_base_buttons.html' %} <ul class="nav nav-pills nav-stacked">
</div> <li {% if view.active_menu == "profile" %}class="active"{% endif %}>
<div class="btn-group-vertical visible-xs"> <a href="{% url 'profiles:detail' %}">
{% include 'profile_base_buttons.html' %} Profile
</div> </a>
</div> </li>
<br> <li {% if view.active_menu == "profile" %}class="active"{% endif %}>
<a href="{% url 'account_change_password' %}">
Password
</a>
</li>
<p><i><b>You are logged in as {{ request.user.email }}</b></i></p> <li {% if view.active_menu == "profile" %}class="active"{% endif %}>
<a href="{% url 'two-factor-setup' %}">
Two-Factor settings
</a>
</li>
<li {% if view.active_menu == "profile" %}class="active"{% endif %}>
<a href="{% url 'account_email' %}">
Manage emails
</a>
</li>
{% if user.orders.exists %}
<li {% if view.active_menu == "profile" %}class="active"{% endif %}>
<a href="{% url 'shop:order_list' %}">
Orders
</a>
</li>
<li {% if view.active_menu == "profile" %}class="active"{% endif %}>
<a href="{% url 'tickets:shopticket_list' %}">
Tickets
</a>
</li>
{% if user.creditnotes.exists %}
<li {% if view.active_menu == "profile" %}class="active"{% endif %}>
<a href="{% url 'shop:creditnote_list' %}">
Credit Notes
</a>
</li>
{% endif %}
{% endif %}
<li {% if view.active_menu == "profile" %}class="active"{% endif %}>
<a href="{% url 'tokens:tokenfind_list' %}">
Secret Tokens
</a>
</li>
<p><b>You are logged in as {{ request.user.email }}</b></p>
<hr /> <hr />
</ul>
</div>
<div class="col-md-10">
{% block profile_content %}{% endblock %} {% block profile_content %}{% endblock %}
</div>
</div>
{% endblock %} {% endblock %}

View file

@ -1,32 +0,0 @@
<a href="{% url 'profiles:detail' %}" class="btn btn-black">
Profile
</a>
<a href="{% url 'account_change_password' %}" class="btn btn-black">
Password
</a>
<a href="{% url 'two-factor-setup' %}" class="btn btn-black">
Two-Factor settings
</a>
<a href="{% url 'account_email' %}" class="btn btn-black">
Manage emails
</a>
{% if user.orders.exists %}
<a href="{% url 'shop:order_list' %}" class="btn btn-black">
Orders
</a>
<a href="{% url 'tickets:shopticket_list' %}" class="btn btn-black">
Tickets
</a>
{% if user.creditnotes.exists %}
<a href="{% url 'shop:creditnote_list' %}" class="btn btn-black">
Credit Notes
</a>
{% endif %}
{% endif %}
<a href="{% url 'tokens:tokenfind_list' %}" class="btn btn-black">
Secret Tokens
</a>
<a href="{% url 'account_logout' %}" class="btn btn-black">
Logout
</a>

View file

@ -82,6 +82,11 @@
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
{% if user.is_authenticated %} {% if user.is_authenticated %}
<li><a href="{% url 'profiles:detail' %}">Account</a></li> <li><a href="{% url 'profiles:detail' %}">Account</a></li>
<li>
<a href="{% url 'account_logout' %}">
Logout
</a>
</li>
{% else %} {% else %}
<li><a href="{% url 'account_login' %}">Login</a></li> <li><a href="{% url 'account_login' %}">Login</a></li>
{% endif %} {% endif %}