mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
* Added account_url filter to jinja2 environment. This produces a path to the user's account url (/account/{username}). * Updated archdev-navbar to link to new edit route. + Added migrate_cookies(request, response) to aurweb.util, a function that simply migrates the request cookies to response and returns it. + Added account_edit tests to test_accounts_routes.py. Signed-off-by: Kevin Morris <kevr@0cost.org>
34 lines
1.1 KiB
HTML
34 lines
1.1 KiB
HTML
<div id="archdev-navbar">
|
|
<ul>
|
|
{% if request.user.is_authenticated() %}
|
|
<li><a href="/">{% trans %}Dashboard{% endtrans %}</a></li>
|
|
{% else %}
|
|
<li><a href="/">AUR {% trans %}Home{% endtrans %}</a></li>
|
|
{% endif %}
|
|
<li><a href="/packages/">{% trans %}Packages{% endtrans %}</a></li>
|
|
{% if request.user.is_authenticated() %}
|
|
<li>
|
|
<a href="/account/{{ request.user.Username }}/edit">
|
|
{% trans %} My Account{% endtrans %}
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="/logout/?next={{ next }}">
|
|
{% trans %}Logout{% endtrans %}
|
|
</a>
|
|
</li>
|
|
{% else %}
|
|
<li>
|
|
<a href="/register">
|
|
{% trans %}Register{% endtrans %}
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="/login/?next={{ next }}">
|
|
{% trans %}Login{% endtrans %}
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
</li>
|
|
</ul>
|
|
</div>
|