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 i18n %}
{% load crispy_forms_tags %}
{% load plz %}
{% block title %}
{% trans 'Offers' %}
{% endblock %}
@ -32,32 +31,30 @@
{% if offers %}
<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 %}
{% with plz=offer|get_plz %}
<div class="col">
<div class="card h-100 p-0">
<a href="{% url 'offer_detail' offer.id %}">
{% if offer.image %}
<img class="card-img-top offer-img" src="{{ offer.image.url }}" />
{% else %}
<img class="card-img-top offer-img" src="{% static 'placeholder.jpg' %}" />
{% endif %}
<div class="card-body">
<h5 class="h5">
{{ offer.title }}<span class="ms-2 badge pfl-{{ offer.category|lower }}">{{ offer.get_category_display }}</span>
</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 class="col">
<div class="card h-100 p-0">
<a href="{% url 'offer_detail' offer.id %}">
{% if offer.image %}
<img class="card-img-top offer-img" src="{{ offer.image.url }}" />
{% else %}
<img class="card-img-top offer-img" src="{% static 'placeholder.jpg' %}" />
{% endif %}
<div class="card-body">
<h5 class="h5">
{{ offer.title }}<span class="ms-2 badge pfl-{{ offer.category|lower }}">{{ offer.get_category_display }}</span>
</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> {{ offer.zipcode }}
</p>
</div>
</div>
{% endwith %}
</div>
{% endfor %}
</div>
{% else %}

View file

@ -32,7 +32,7 @@
{% endif %}
<div class="card-body">
<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>
</div>
</a>
@ -41,7 +41,7 @@
<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.plz }} {{ offer.zipcode.name }}
<i class="fas fa-map-marker-alt mt-3"></i> {{ offer.zipcode }}
</p>
</div>
</div>