disply all offerings on homepage
This commit is contained in:
parent
8ab7341dc6
commit
0cc7902f7f
6 changed files with 107 additions and 13 deletions
|
@ -1,9 +1,18 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}User{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="mb-3">
|
||||
<h1>Hello {{ user.username }}!</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% if offerings|length > 0 %}
|
||||
{% for offering in offerings %}
|
||||
{% if offering.photoFilename %}
|
||||
<img src="{{ asset('uploads/photos/' ~ offering.photofilename) }}" />
|
||||
{% endif %}
|
||||
|
||||
<h4>{{ offering.title }}</h4>
|
||||
<small>
|
||||
{{ offering.createdAt|format_datetime('medium', 'short') }}
|
||||
</small>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<p>There are currently no active listings</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
9
templates/app/user.html.twig
Normal file
9
templates/app/user.html.twig
Normal file
|
@ -0,0 +1,9 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}User{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="mb-3">
|
||||
<h1>Hello {{ user.username }}!</p>
|
||||
</div>
|
||||
{% endblock %}
|
Reference in a new issue