Commit 9e6d82b8 authored by gijs's avatar gijs

Participant name not obligatory. Pariticipant listing on homepage

parent d75df6b5
......@@ -73,7 +73,7 @@ class Participant(models.Model):
slug = models.SlugField(unique=True, max_length=255)
published = models.BooleanField(default=False)
projects = models.ManyToManyField('Project', through='ProjectParticipant')
name_nl = models.CharField(max_length=255)
name_nl = models.CharField(max_length=255, null=True, blank=True)
sort_name_nl = models.CharField(max_length=255, null=True, blank=True)
bio_nl = models.TextField(verbose_name="Biography")
name_en = models.CharField(max_length=255, verbose_name="Name (English)", null=True, blank=True)
......
......@@ -26,7 +26,7 @@
{% for event in entry.events %}
{% if forloop.first %}
<h4 class="title"><a href="{% url 'contour:event' event.pk %}">{{ event.project.title }}</a></h4>
{% for participant in event.project|sorted_participants|slice:":5" %}
{% for participant in event.project|sorted_participants %}
{% if forloop.first %}{% trans "with" %}:&nbsp;{% endif %}
<span class="contributor">{% if participant.published %}<a href="{% url 'contour:contributor' participant.pk %}">{{ participant.name }}</a>{% else %}{{ participant.name }}{% endif %}</span>
{% endfor %}
......
......@@ -38,7 +38,7 @@
<h4 class="title"><a href="{% url 'contour:event' event.pk %}">{{ event.project.title }}</a></h4>
<span class="type">{{ event.event_type }} </span>
<span class="venue">{% trans "at" %}&nbsp;{% if event.venue.published %}<a href="{% url 'contour:venue' event.venue.pk %}">{{ event.venue }}</a>{% else %}{{ event.venue }}{% endif %}</span>
{% for participant in event.project|sorted_participants|slice:":5" %}
{% for participant in event.project|sorted_participants %}
{% if forloop.first %}{% trans "with" %}:&nbsp;{% endif %}<span class="contributor">{% if participant.published %}<a href="{% url 'contour:contributor' participant.pk %}">{{ participant.name }}</a>{% else %}{{ participant.name }}{% endif %}</span>
{% endfor %}
</section>
......@@ -71,7 +71,7 @@
<h4 class="title"><a href="{% url 'contour:event' event.pk %}">{{ event.project.title }}</a></h4>
<span class="type">{{ event.event_type }} </span>
<span class="venue">{% trans "at" %}&nbsp;{% if event.venue.published %}<a href="{% url 'contour:venue' event.venue.pk %}">{{ event.venue }}</a>{% else %}{{ event.venue }}{% endif %}</span>
{% for participant in event.project|sorted_participants|slice:":5" %}
{% for participant in event.project|sorted_participants %}
{% if forloop.first %}{% trans "with" %}:&nbsp;{% endif %}<span class="contributor">{% if participant.published %}<a href="{% url 'contour:contributor' participant.pk %}">{{ participant.name }}</a>{% else %}{{ participant.name }}{% endif %}</span>
{% endfor %}
</section>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment