Hooked up library app

This commit is contained in:
Tris
2021-03-11 09:33:51 +11:00
parent 526ae4f59b
commit 35555c3321
13 changed files with 103 additions and 9 deletions
+2 -2
View File
@@ -16,7 +16,7 @@
<nav class="navigation">
<div>
<a class="brand" href="/"><i class="fas fa-random smhide"></i> Polyphonic</a>
<span class="mdhide">Virtual Ensemble Manager</span>
<span class="mdhide">Ensemble Manager</span>
</div>
<ul class="nav-buttons">
{% if request.ensemble_id %}
@@ -25,7 +25,7 @@
Projects</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'register' %}"><i class="fas fa-users" title="Ensembles"></i> <span class="smhide">My
<a class="nav-link" href="{% url 'register' %}"><i class="fas fa-users" title="Ensembles"></i> <span class="mdhide">My
Ensembles</span></a>
</li>
{% endif %}
@@ -3,7 +3,7 @@
{% block page %}
<div>
<h3>{{ title }}</h3>
<form class="vertical" method="POST">
<form class="vertical" method="POST" enctype="multipart/form-data">
{% csrf_token %}
{{ form }}
<div class="form-actions">
@@ -7,7 +7,11 @@
{% for project in ensemble.active_projects %}
<a class="" href="{% url 'project_detail' pk=project.id %}">
<h3>{{ project.name }}</h3>
<p><small>Due in {{ project.deadline|timeuntil }}, {{ project.submissions.count }} submissions.</small></p>
<p><small>
{% if project.deadline %}In {{ project.deadline|timeuntil }}<br/>{% endif %}
{% if project.works.count %}{{ project.works.count }} works<br/>{% endif %}
{% if project.submissions.count %}{{ project.submissions.count }} submissions<br/>{% endif %}
</small></p>
</a>
{% endfor %}
</div>
@@ -8,6 +8,9 @@
URL: <a href="{{ ensemble_url }}">{{ ensemble_url }}</a><br/>
Passphrase: {{ ensemble.passphrase }}
</p>
<ul>
<li><a href="{% url 'work_list' %}">Library</a></li>
</ul>
<p>
Sorry, not much you can do here yet.
<ul>
@@ -13,6 +13,7 @@
{% block page %}
No content
{% endblock %}
{% if project %}
<div class="project-links">
<div class="pills" role="tablist">
<a role="tab" href="{% url 'project_detail' pk=project.id %}">Project info</a>
@@ -26,6 +27,8 @@ No content
<a role="tab" href="{% url 'submission_list' project=project.id %}">Submissions</a>
{% endif %}
<a role="tab" href="{% url 'submission_create' project=project.id %}">Send a file</a>
{% include "library/project_menu.html" %}
</div>
</div>
{% endif %}
{% endblock %}
@@ -4,7 +4,9 @@
{% block page %}
<div class="narrow">
<h3 class="text-center">Due in {{ project.deadline|timeuntil }}!</h3>
{% if project.deadline %}
<h3 class="text-center">In {{ project.deadline|timeuntil }}</h3>
{% endif %}
<p>{{ project.description|markdown }}</p>
{% if project.owner %}
<p>Project email: <a href="mailto:{{ project.owner }}">{{ project.owner }}</a></p>