feat: Add photos to list of adoption notices
This commit is contained in:
@@ -1,12 +1,35 @@
|
||||
{% load custom_tags %}
|
||||
<ul>
|
||||
<ul class="adoption-notices">
|
||||
{% for adoption_notice in adoption_notices %}
|
||||
<li>
|
||||
<li class="card-adoption-notice">
|
||||
<div>
|
||||
<h1><a href="{{ adoption_notice.get_absolute_url }}"> {{ adoption_notice.name }}</a></h1>
|
||||
<p><b>Notfellchen:</b> {{ adoption_notice.animals.all|join_link:", " | safe }}
|
||||
<p><b>Notfellchen:</b> {{ adoption_notice.animals.all|join_link:", " | safe }}
|
||||
</p>
|
||||
<p>{{ adoption_notice.description }}</p>
|
||||
<p>
|
||||
<b>Ort</b>
|
||||
{% if adoption_notice.location %}
|
||||
{{ adoption_notice.location }}
|
||||
{% else %}
|
||||
Keine Ort angegeben
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
{% if adoption_notice.description %}
|
||||
{{ adoption_notice.description }}
|
||||
{% else %}
|
||||
Keine Beschreibung
|
||||
{% endif %}
|
||||
</p>
|
||||
{% if adoption_notice.get_photo %}
|
||||
<div class="adoption-notice-img">
|
||||
<img title="{{ adoption_notice.get_photo.title }}"
|
||||
src="/media/{{ adoption_notice.get_photo.image }}"
|
||||
alt="{{ adoption_notice.get_photo.alt_text }}">
|
||||
</div>
|
||||
{% else %}
|
||||
No photo
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
Reference in New Issue
Block a user