Got admin user login working
This commit is contained in:
@@ -29,12 +29,9 @@
|
||||
Ensembles</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if request.is_admin %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href=""><i class="fas fa-question"></i> <span class="">About</span></a>
|
||||
</li>
|
||||
{% if request.user.is_authenticated %}
|
||||
<li class="nav-item">
|
||||
<a href="/admin"><i class="fas fa-key"></i></a>
|
||||
<a href="{% url 'manage' %}"><i class="fas fa-user-lock"></i></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="narrow">
|
||||
<h3>Manage {{ ensemble.name }}</h3>
|
||||
<p>
|
||||
Joining code for participants:<br/>
|
||||
<a href="{{ ensemble_url }}">{{ ensemble_url }}</a>
|
||||
</p>
|
||||
<p>
|
||||
Sorry, not much you can do here yet.
|
||||
<ul>
|
||||
<li>Should be able to create new projects.</li>
|
||||
</ul>
|
||||
|
||||
<br/>
|
||||
Logged in as {{ request.user }} [<a href="{% url 'logout' %}">Logout</a>]
|
||||
</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -11,7 +11,7 @@
|
||||
<tr>
|
||||
<td>{{ submission.date|timesince }} ago</td>
|
||||
<td>{{ submission.name }} ({{ submission.instrument }})</td>
|
||||
{% if request.user.is_authenticated %}
|
||||
{% if request.is_admin %}
|
||||
<td>
|
||||
<a href="{% url 'submission_detail' project=project.pk pk=submission.pk %}"><i class="fas fa-info-circle"></i></a>
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% if not request.user.is_authenticated %}
|
||||
<a href="{% url 'login' %}" style="float: right"><i class="fa fa-key"></i></a>
|
||||
{% endif %}
|
||||
<div style="display: flex">
|
||||
{% if current %}
|
||||
<div>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<i class="fas fa-download"></i> Download
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if request.user.is_authenticated %}
|
||||
{% if request.is_admin %}
|
||||
<a href="{% url 'resource_upload' project=project.pk pk=resource.pk %}">
|
||||
<i class="fas fa-upload"></i> Upload
|
||||
</a>
|
||||
@@ -28,7 +28,7 @@
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if request.user.is_authenticated %}
|
||||
{% if request.is_admin %}
|
||||
<div class="admin-actions">
|
||||
<a href="{% url 'resource_create' project=project.pk %}"><i class="fas fa-plus-circle"></i> Add new</a>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<form method="POST" class="vertical">
|
||||
{% csrf_token %}
|
||||
{{ form }}
|
||||
<div class="form-actions">
|
||||
<button type="submit">Login</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user