Remove unfinished changes
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Jannis Portmann 2023-09-18 11:39:27 +02:00
parent 1e9f1a2761
commit 25d089cbdc
2 changed files with 23 additions and 26 deletions

View file

@ -2,7 +2,6 @@
{% load static %} {% load static %}
{% load i18n %} {% load i18n %}
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% load plz %}
{% block title %} {% block title %}
{% trans 'Offers' %} {% trans 'Offers' %}
{% endblock %} {% endblock %}
@ -32,32 +31,30 @@
{% if offers %} {% if offers %}
<div class="row row-cols-1 row-cols-md-2 row-cols-xl-3 mt-3 mb-3 row-gap-5"> <div class="row row-cols-1 row-cols-md-2 row-cols-xl-3 mt-3 mb-3 row-gap-5">
{% for offer in offers %} {% for offer in offers %}
{% with plz=offer|get_plz %} <div class="col">
<div class="col"> <div class="card h-100 p-0">
<div class="card h-100 p-0"> <a href="{% url 'offer_detail' offer.id %}">
<a href="{% url 'offer_detail' offer.id %}"> {% if offer.image %}
{% if offer.image %} <img class="card-img-top offer-img" src="{{ offer.image.url }}" />
<img class="card-img-top offer-img" src="{{ offer.image.url }}" /> {% else %}
{% else %} <img class="card-img-top offer-img" src="{% static 'placeholder.jpg' %}" />
<img class="card-img-top offer-img" src="{% static 'placeholder.jpg' %}" /> {% endif %}
{% endif %} <div class="card-body">
<div class="card-body"> <h5 class="h5">
<h5 class="h5"> {{ offer.title }}<span class="ms-2 badge pfl-{{ offer.category|lower }}">{{ offer.get_category_display }}</span>
{{ offer.title }}<span class="ms-2 badge pfl-{{ offer.category|lower }}">{{ offer.get_category_display }}</span> </h5>
</h5>
</div>
</a>
<div class="card-footer d-flex justify-content-between mt-auto">
<a href="{% url 'user_detail' offer.user.id %}">
<i class="fas fa-user mt-3"></i> {{ offer.user.username }}
</a>
<p class="zip">
<i class="fas fa-map-marker-alt mt-3"></i> {{ plz.plz }} {{ plz.name }}
</p>
</div> </div>
</a>
<div class="card-footer d-flex justify-content-between mt-auto">
<a href="{% url 'user_detail' offer.user.id %}">
<i class="fas fa-user mt-3"></i> {{ offer.user.username }}
</a>
<p class="zip">
<i class="fas fa-map-marker-alt mt-3"></i> {{ offer.zipcode }}
</p>
</div> </div>
</div> </div>
{% endwith %} </div>
{% endfor %} {% endfor %}
</div> </div>
{% else %} {% else %}

View file

@ -32,7 +32,7 @@
{% endif %} {% endif %}
<div class="card-body"> <div class="card-body">
<h5 class="h5"> <h5 class="h5">
{{ offer.title }}<span class="ms-2 badge pfl-{{ offer.category|lower }}">{{ offer.get_category_display }}</span> <i class="fas fa-map-marker-alt mt-3"></i> {{ offer.zipcode }}
</h5> </h5>
</div> </div>
</a> </a>
@ -41,7 +41,7 @@
<i class="fas fa-user mt-3"></i> {{ offer.user.username }} <i class="fas fa-user mt-3"></i> {{ offer.user.username }}
</a> </a>
<p class="zip"> <p class="zip">
<i class="fas fa-map-marker-alt mt-3"></i> {{ offer.zipcode.plz }} {{ offer.zipcode.name }} <i class="fas fa-map-marker-alt mt-3"></i> {{ offer.zipcode }}
</p> </p>
</div> </div>
</div> </div>