Fixed some issues on the templates for locations with multiple owners
parent
4c70ddf22f
commit
095e00cb72
|
@ -5,5 +5,5 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include "GeoffreyApp/location_table.html" with loc_list=base_list %}
|
||||
{% include "GeoffreyApp/location_table.html" with loc_list=base_list show_owner=True %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -4,7 +4,19 @@
|
|||
{{ loc.name }}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<p>Owner: {{ loc.owner }}</p>
|
||||
{% if loc.owner.all|length %}
|
||||
<p>
|
||||
{% if loc.owner.all|length > 1 %}
|
||||
Owners:
|
||||
{% else %}
|
||||
Owner:
|
||||
{% endif %}
|
||||
|
||||
{{ loc.owner.all.first }}{% for owner in loc.owner.all|slice:"1:" %}, {{ owner }}
|
||||
{% endfor %}
|
||||
</p>
|
||||
|
||||
{% endif %}
|
||||
<p>Location: {{ loc.location }}</p>
|
||||
<hr class="my-4">
|
||||
{% block info %}{% endblock %}
|
||||
|
|
|
@ -15,7 +15,12 @@
|
|||
<td>{% include "GeoffreyApp/location_link.html" with loc=loc %}</td>
|
||||
<td>{{ loc.location }}</td>
|
||||
{% if show_owner %}
|
||||
<td>{% include "GeoffreyApp/player_link.html" with player=loc.owner %}</td>
|
||||
<td>
|
||||
{% include "GeoffreyApp/player_link.html" with player=loc.owner.first %}
|
||||
{% for owner in loc.owner.all|slice:"1:3" %},
|
||||
{% include "GeoffreyApp/player_link.html" with player=owner %}
|
||||
{% endfor %}
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in New Issue