change offering to offer in frontend
This commit is contained in:
parent
845c3880f4
commit
c3e56756cb
8 changed files with 55 additions and 55 deletions
|
@ -9,27 +9,27 @@
|
|||
{% endfor %}
|
||||
|
||||
<h1>Offers</h1>
|
||||
{% if offerings|length > 0 %}
|
||||
{% if offers|length > 0 %}
|
||||
<div class="card-deck d-flex justify-content-around justify-content-sm-around justify-content-md-between flex-wrap">
|
||||
{% for offering in offerings %}
|
||||
<a href="./offer/{{ offering.id }}" class="mb-5">
|
||||
<div class="card offering h-100">
|
||||
{% if offering.photoFilename %}
|
||||
<img class="card-img-top" src="{{ asset('uploads/photos/' ~ offering.photofilename) }}" />
|
||||
{% for offer in offers %}
|
||||
<a href="./offer/{{ offer.id }}" class="mb-5">
|
||||
<div class="card offer h-100">
|
||||
{% if offer.photoFilename %}
|
||||
<img class="card-img-top" src="{{ asset('uploads/photos/' ~ offer.photofilename) }}" />
|
||||
{% endif %}
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{{ offering.title }}</h5>
|
||||
<p class="card-text">{{ offering.description }}</p>
|
||||
<h5 class="card-title">{{ offer.title }}</h5>
|
||||
<p class="card-text">{{ offer.description }}</p>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<p class="username">{{ offering.byUser }}</p>
|
||||
<p class="zip">{{ offering.zipCode }}</p>
|
||||
<p class="username">{{ offer.byUser }}</p>
|
||||
<p class="zip">{{ offer.zipCode }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-warning" role="alert">There are currently no active listings.</div>
|
||||
<div class="alert alert-warning" role="alert">There are currently no active offers.</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
|
@ -1,19 +0,0 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{% for message in app.flashes('error') %}
|
||||
<div class="alert alert-error" role="alert">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<h1 class="mb-3">Add new offering</h1>
|
||||
{{ form_start(offering_form) }}
|
||||
{{ form_row(offering_form.title) }}
|
||||
{{ form_row(offering_form.zipCode) }}
|
||||
{{ form_row(offering_form.description) }}
|
||||
{{ form_row(offering_form.photo, {
|
||||
label: 'Choose file'
|
||||
}) }}
|
||||
{{ form_end(offering_form) }}
|
||||
{% endblock %}
|
19
templates/app/new_offer.html.twig
Normal file
19
templates/app/new_offer.html.twig
Normal file
|
@ -0,0 +1,19 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{% for message in app.flashes('error') %}
|
||||
<div class="alert alert-error" role="alert">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<h1 class="mb-3">Add new offer</h1>
|
||||
{{ form_start(offer_form) }}
|
||||
{{ form_row(offer_form.title) }}
|
||||
{{ form_row(offer_form.zipCode) }}
|
||||
{{ form_row(offer_form.description) }}
|
||||
{{ form_row(offer_form.photo, {
|
||||
label: 'Choose file'
|
||||
}) }}
|
||||
{{ form_end(offer_form) }}
|
||||
{% endblock %}
|
Reference in a new issue