Couple of interface tweeks
This commit is contained in:
@@ -61,7 +61,8 @@ class Ensemble(models.Model):
|
||||
ordering = ('slug', )
|
||||
|
||||
def active_projects(self):
|
||||
return self.projects.filter(active=True, event_date__gte=timezone.now())
|
||||
#return self.projects.filter(active=True, event_date__gte=timezone.now())
|
||||
return self.projects.active().current()
|
||||
|
||||
def has_admin(self, user):
|
||||
if not user.is_authenticated:
|
||||
@@ -132,6 +133,8 @@ class Project(models.Model):
|
||||
|
||||
@property
|
||||
def rough_date(self):
|
||||
if not self.event_date:
|
||||
return "No timescale"
|
||||
in_past, s = rough_date(self.event_date)
|
||||
if in_past:
|
||||
return f"{s} ago"
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<script src="{% static 'interface/js/interface.js' %}"></script>
|
||||
<title>{% block title %}Polyphonic{% endblock %}</title>
|
||||
{% block media %}{% endblock %}
|
||||
<style>{% block style %}{% endblock %}</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
<h3 class="title">Projects for {{ensemble.name }}</h3>
|
||||
<p>{{ ensemble.details|markdown }}</p>
|
||||
|
||||
<h4>Administrators</h4>
|
||||
<ul>
|
||||
<p>
|
||||
Administrators:
|
||||
{% for admin in ensemble.admins.all %}
|
||||
<li><a href="mailto:{{ admin.email }}">{% firstof admin.get_full_name admin.get_username %}</a></li>
|
||||
<a href="mailto:{{ admin.email }}">{% firstof admin.get_full_name admin.get_username %}</a>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
{% include 'interface/project_items.html' %}
|
||||
|
||||
|
||||
@@ -19,22 +19,18 @@
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="media">
|
||||
|
||||
<div class="media-left">
|
||||
<figure class="image is-48x48">
|
||||
<img src="https://bulma.io/images/placeholders/96x96.png" alt="Placeholder image">
|
||||
<img src="https://www.gravatar.com/avatar/{{ ensemble.email }}?d=mp" alt="Placeholder image">
|
||||
</figure>
|
||||
</div>
|
||||
<div class="media-content">
|
||||
<div class="media-content" style="min-height: 60px">
|
||||
<a href="{% url 'ensemble_detail' ensemble.slug %}">
|
||||
<p class="title is-4">{{ ensemble.name }}</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% if ensemble.details %}
|
||||
<div class="content">
|
||||
{{ ensemble.details | markdown }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
{% with projects=ensemble.active_projects.count %}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<li><a href="{% url 'ensemble_list' %}">Ensembles</a></li>
|
||||
<li><a href="{% url 'project_list' %}">Projects</a></li>
|
||||
{% if request.user.is_authenticated %}
|
||||
<li><a href="{% url 'work_list' %}">Library</a></li>
|
||||
<!--li><a href="{% url 'work_list' %}">Library</a></li-->
|
||||
<li><a href="{% url 'collection_list' %}">Collections</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
@@ -12,14 +12,17 @@
|
||||
<p class="card-header-icon" style="color: black;">{{ project.rough_date }}</p>
|
||||
</header>
|
||||
</a>
|
||||
<div class="card-content">
|
||||
<div class="content" style="height: 100px; overflow: hidden">
|
||||
<div class="card-content" style="height: 100px; overflow: hidden">
|
||||
<div class="content">
|
||||
{{ project.description | markdown }}
|
||||
{% if not ensemble %}
|
||||
<div class="has-text-centered"><i><small>With {{ project.ensemble }}</small></i></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if not ensemble %}
|
||||
<div class="card-footer">
|
||||
<a class="card-footer-item" href="{% url 'ensemble_detail' project.ensemble.slug %}">{{ project.ensemble }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% empty %}
|
||||
|
||||
Reference in New Issue
Block a user