71 lines
2.7 KiB
Twig
71 lines
2.7 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{% block title %}User{% endblock %}
|
|
|
|
{% block body %}
|
|
{% for message in app.flashes('success') %}
|
|
<div class="alert alert-success" role="alert">
|
|
{{ message }}
|
|
</div>
|
|
{% endfor %}
|
|
|
|
<div class="alert alert-info" role="alert">
|
|
Please note: This is not yet functional!
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<h1>Hello {{ user.username }}!</p>
|
|
</div>
|
|
<div class="mb-3">
|
|
<form method="post">
|
|
<h3 class="mb-3 font-weight-normal">Change your user data</h3>
|
|
<div class="mb-3">
|
|
<label for="inputEmail" class="form-label">Email address</label>
|
|
<input name="email" type="email" class="form-control" id="inputEmail" aria-describedby="emailHelp" placeholder="{{ app.user.email }}" readonly>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="inputPassword">Password</label>
|
|
<input type="password" name="password" id="inputPassword" class="form-control" required>
|
|
</div>
|
|
|
|
<input type="hidden" name="_csrf_token"
|
|
value="{{ csrf_token('authenticate') }}"
|
|
>
|
|
|
|
<button class="btn btn-lg btn-primary" type="submit">
|
|
Save
|
|
</button>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<h3 class="mb-3">Delete Account</h3>
|
|
<button class="btn btn-danger">Delete Account</button>
|
|
</div>
|
|
|
|
<hr>
|
|
<h1>Offers</h1>
|
|
{% if offers|length > 0 %}
|
|
<div class="card-deck d-flex justify-content-around justify-content-sm-around justify-content-md-between flex-wrap">
|
|
{% 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">{{ offer.title }}</h5>
|
|
<p class="card-text">{{ offer.description }}</p>
|
|
</div>
|
|
<div class="card-footer offer-footer">
|
|
<p class="username"><i class="fas fa-user mt-3"></i> {{ offer.byUser }}</p>
|
|
<p class="zip"><i class="fas fa-map-marker-alt mt-3"></i> {{ offer.zipCode }}</p>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<div class="alert alert-warning" role="alert">There are currently no active offers.</div>
|
|
{% endif %}
|
|
{% endblock %}
|