Got library sort of working

This commit is contained in:
Tris
2021-09-04 10:29:22 +10:00
parent 7aedc6bd07
commit 598ee5ad7e
37 changed files with 994 additions and 209 deletions
@@ -2,7 +2,7 @@
{% block page %}
<div>
<h3>{{ title }}</h3>
<h3>{% firstof title view.title %}</h3>
<form class="vertical" method="POST" enctype="multipart/form-data">
{% csrf_token %}
{{ form }}
@@ -1,22 +1,12 @@
{% extends "interface/project_base.html" %}
{% extends "base.html" %}
{% block page %}
<div style="flex-grow: 1">
<h1>Projects for {{ ensemble.name }}</h1>
<div class="list-group narrow">
{% for project in ensemble.active_projects %}
<a class="" href="{% url 'project_detail' project=project.id %}">
<h3>{{ project.name }}</h3>
<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>
{% block content %}
<h2>{{ ensemble.name }}</h2>
<p>{{ ensemble.details }}</p>
<h4>Administrators</h4>
<ul>
{% for admin in ensemble.admins.all %}
<li><a href="mailto:{{ admin.email }}">{% firstof admin.get_full_name admin.get_username %}</a></li>
{% endfor %}
</div>
<div style="float: right; margin-top: 10px; color: #999;">
<small>{{ ensemble.ensemble_code }}</small>
</div>
</div>
{% endblock %}
</ul>
{% endblock %}
@@ -0,0 +1,22 @@
{% extends "interface/project_base.html" %}
{% block page %}
<div style="flex-grow: 1">
<h1>Projects for {{ ensemble.name }}</h1>
<div class="list-group narrow">
{% for project in ensemble.active_projects %}
<a class="" href="{% url 'project_detail' project=project.id %}">
<h3>{{ project.name }}</h3>
<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>
<div style="float: right; margin-top: 10px; color: #999;">
<small>{{ ensemble.ensemble_code }}</small>
</div>
</div>
{% endblock %}
@@ -7,9 +7,9 @@
{% if project.event_date %}
<h3 class="text-center">
{% if project.has_happened %}
{{ project.event_date|timesince }}
{{ project.event_date|timesince }} ago.
{% else %}
{{ project.event_date|}}
In {{ project.event_date|timeuntil }}.
{% endif %}
</h3>
{% endif %}