Update RUG Template

This commit is contained in:
Joshua Rubingh 2020-05-18 11:01:29 +02:00
parent 16f3afcba8
commit 54004003e4
2 changed files with 33 additions and 3 deletions

View File

@ -1,15 +1,20 @@
{% load i18n %}
<li class="rug-nav--secondary__item">
<a class="rug-nav--secondary__link js--togglable-switch" data-toggle-class="rug-nav--secondary__link--selected" data-toggle-group="submenu" data-toggle-id="menu-2427370b-9435-44d9-bca7-b93ec9d03cc0-33.31" data-toggle-mode="togglable">{% trans "Menu" %}</a>
<a class="rug-nav--secondary__link js--togglable-switch" data-toggle-class="rug-nav--secondary__link--selected" data-toggle-group="submenu" data-toggle-id="menu-2427370b-9435-44d9-bca7-b93ec9d03cc0-33.31" data-toggle-mode="togglable">{% trans "Het 1,5 meter ziekenhuis" %}</a>
<ul class="rug-nav--secondary__sub rug-nav--secondary__sub--hidden js--togglable-item" data-toggle-class="rug-block" data-toggle-group="submenu" data-toggle-id="menu-2427370b-9435-44d9-bca7-b93ec9d03cc0-33.31">
{% if not user.is_authenticated %}
<li class="rug-nav--secondary__sub__item" data-menu-id="b512aa55-f0cb-4588-9054-302caa5fa951-33.34">
<a class="rug-nav--secondary__sub__link" href="{% url 'schedule:list' %}"><span class="rug-nav--secondary__sub__link-text">{% trans "Schedules" %}</span></a>
<a class="rug-nav--secondary__sub__link" href="{% url 'login' %}"><span class="rug-nav--secondary__sub__link-text">{% trans "Login" %}</span></a>
</li>
{% endif %}
{% if user.is_authenticated %}
<li class="rug-nav--secondary__sub__item" data-menu-id="b512aa55-f0cb-4588-9054-302caa5fa951-33.34">
<a class="rug-nav--secondary__sub__link" href="{% url 'schedule:list' %}"><span class="rug-nav--secondary__sub__link-text">{% trans "Schedule overview" %}</span></a>
</li>
<li class="rug-nav--secondary__sub__item" data-menu-id="b512aa55-f0cb-4588-9054-302caa5fa951-33.35">
<a class="rug-nav--secondary__sub__link" href="{% url 'schedule:new' %}"><span class="rug-nav--secondary__sub__link-text">{% trans "New schedule" %}</span></a>
</li>
{% if user.is_authenticated %}
<li class="rug-nav--secondary__sub__item" data-menu-id="b512aa55-f0cb-4588-9054-302caa5fa951-33.36">
<a class="rug-nav--secondary__sub__link" href="{% url 'logout' %}"><span class="rug-nav--secondary__sub__link-text">{% trans "Logout" %}</span></a>
</li>

View File

@ -0,0 +1,25 @@
{% extends 'base.html' %} <!-- Add this for inheritance -->
{% load i18n %}
{% block title %}{% trans "Login" %}{% endblock %}
{% block pagetitle %}{% trans "Login" %}{% endblock %}
{% block content %}
<p>
<strong>{% trans "Login" %}</strong>
<br />
{% blocktrans %}You can login here to create your schedules. If you do not have a login, please go to the <a href="https://www.rug.nl/cope/projecten/het-anderhalve-meter-ziekenhuis/aanmelden">Signup page</a> {% endblocktrans %}
</p>
<form method="post" action="{% url 'login' %}">
{% csrf_token %}
<input type="hidden" name="next" value="{{ next }}">
<table>
{{ form.as_table }}
<tr>
<td colspan="2"><input type="submit" value="{% trans "Login" %}"></td>
</tr>
</table>
</form>
<br />
{# Assumes you setup the password_reset view in your URLconf #}
<p><a href="{% url 'password_reset' %}">{% trans "Lost password?" %}</a></p>
{% endblock %}