split controllers
This commit is contained in:
parent
35254a0bb4
commit
d69842ba07
5 changed files with 151 additions and 64 deletions
20
templates/offer/index.html.twig
Normal file
20
templates/offer/index.html.twig
Normal file
|
@ -0,0 +1,20 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Hello OfferController!{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<style>
|
||||
.example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; }
|
||||
.example-wrapper code { background: #F5F5F5; padding: 2px 6px; }
|
||||
</style>
|
||||
|
||||
<div class="example-wrapper">
|
||||
<h1>Hello {{ controller_name }}! ✅</h1>
|
||||
|
||||
This friendly message is coming from:
|
||||
<ul>
|
||||
<li>Your controller at <code><a href="{{ '/home/thisfro/repos/plant-exchange/src/Controller/OfferController.php'|file_link(0) }}">src/Controller/OfferController.php</a></code></li>
|
||||
<li>Your template at <code><a href="{{ '/home/thisfro/repos/plant-exchange/templates/offer/index.html.twig'|file_link(0) }}">templates/offer/index.html.twig</a></code></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
42
templates/user/index.html.twig
Normal file
42
templates/user/index.html.twig
Normal file
|
@ -0,0 +1,42 @@
|
|||
{% 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="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 }}" required>
|
||||
</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>
|
||||
{% endblock %}
|
Reference in a new issue