pflaenz.li-Symfony/templates/app/offer.html.twig

43 lines
1.6 KiB
Twig
Raw Normal View History

2021-05-01 15:33:45 +02:00
{% extends 'base.html.twig' %}
{% block body %}
2021-05-09 11:20:45 +02:00
{% if offer.byUser == user %}
<div class="alert alert-info" role="alert">This is your offer!</div>
{% endif %}
2021-05-01 15:33:45 +02:00
<h1 class="mb-3">{{ offer.title }}</h1>
2021-05-13 23:41:52 +02:00
<div class="show-offer-container d-flex flex-wrap">
<div class="show-img-container">
2021-05-04 14:28:18 +02:00
<img class="mb-3 img-fluid rounded" alt="Generic placeholder image" src="{{ asset('uploads/photos/' ~ offer.photofilename) }}">
</div>
2021-05-13 23:41:52 +02:00
<div class="show-offer-info">
2021-05-04 14:28:18 +02:00
<h3>Description</h3>
<p>{{ offer.description }}</p>
<h3>From</h3>
2021-05-09 11:20:45 +02:00
<p>{% if offer.byUser == user %}Me{% else %}{{ offer.byUser }}{% endif %} in {{ offer.zipCode }}</p>
2021-05-04 14:28:18 +02:00
</div>
</div>
2021-05-09 11:20:45 +02:00
{% if offer.byUser == user %}
2021-05-12 15:02:11 +02:00
<a href="{{ path('edit_offer', {'id': offer.id}) }}" class="btn btn-info"><i class="fas fa-pen"></i></a>
2021-05-09 11:20:45 +02:00
<a href="#" class="btn btn-danger"><i class="fas fa-trash-alt"></i></a>
{% else %}
<h3>Wishes</h3>
<p>{{ offer.byUser }} would like some of the following in return:</p>
<div class="mb-3">
{% if wishes == [] %}
<div class="alert alert-warning" role="alert">
There are currently no wishes!
</div>
{% else %}
<ul class="list-group">
{% for wish in wishes %}
<li class="list-group-item"> {{ wish.title }}</li>
{% endfor %}
</ul>
{% endif %}
2021-05-04 12:33:58 +02:00
</div>
2021-05-09 11:20:45 +02:00
<button class="btn btn-primary">Offer trade</button>
2021-05-04 14:28:18 +02:00
{% endif %}
2021-05-01 15:33:45 +02:00
{% endblock %}