2024-09-17 14:02:17 +02:00
|
|
|
{% extends 'base.html.twig' %}
|
|
|
|
|
|
|
|
{% block body %}
|
|
|
|
{{ form_start(form) }}
|
|
|
|
<h1 class="page-header">
|
|
|
|
{% if mode=="update" %}
|
|
|
|
Modification ILLUSTRATION
|
|
|
|
{% elseif mode=="submit" %}
|
|
|
|
Création ILLUSTRATION
|
|
|
|
{% endif %}
|
|
|
|
</h1>
|
|
|
|
|
|
|
|
{{ form_widget(form.submit) }}
|
2024-10-30 17:58:39 +01:00
|
|
|
{% if by=="admin" %}
|
|
|
|
<a class="btn btn-secondary" href={{ path('app_admin_illustration',{'by':by,'userid':-1}) }}>Annuler</a>
|
|
|
|
{% elseif by=="update" %}
|
|
|
|
<a class="btn btn-secondary" href={{ path('app_user_update',{id:userid}) }}>Annuler</a>
|
|
|
|
{% elseif by=="profil" %}
|
|
|
|
<a class="btn btn-secondary" href={{ path('app_user_profil') }}>Annuler</a>
|
|
|
|
{% elseif by=="illustration" %}
|
|
|
|
<a class="btn btn-secondary" href={{ path('app_illustration_view',{'by':"user","idcat":illustration.category.id,"id":illustration.id}) }}>Annuler</a>
|
2024-09-17 14:02:17 +02:00
|
|
|
{% else %}
|
2024-10-30 17:58:39 +01:00
|
|
|
<a class="btn btn-secondary" href={{ path('app_home_user',{'userpseudo':app.user.pseudo}) }}>Annuler</a>
|
2024-09-17 14:02:17 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if mode=="update" %}
|
|
|
|
<a href="{{ path('app_illustration_delete',{'id':illustration.id, 'by':by}) }}"
|
|
|
|
class="btn btn-danger float-right"
|
|
|
|
data-method="delete"
|
|
|
|
data-confirm="Êtes-vous sûr de vouloir supprimer cet entregistrement ?">
|
|
|
|
Supprimer
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<br><br>
|
|
|
|
|
|
|
|
{% if app.session.flashbag.has('error') %}
|
|
|
|
<div class='alert alert-danger' style='margin: 5px 0px'>
|
|
|
|
<strong>Erreur</strong><br>
|
|
|
|
{% for flashMessage in app.session.flashbag.get('error') %}
|
|
|
|
{{ flashMessage }}<br>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if app.session.flashbag.has('notice') %}
|
|
|
|
<div class='alert alert-info' style='margin: 5px 0px'>
|
|
|
|
<strong>Information</strong><br>
|
|
|
|
{% for flashMessage in app.session.flashbag.get('notice') %}
|
|
|
|
{{ flashMessage }}<br>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-6">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-header">
|
|
|
|
<i class="fa fa-pencil-alt fa-fw"></i> Informations
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card-body">
|
|
|
|
{{ form_row(form.name) }}
|
|
|
|
{{ form_row(form.category) }}
|
2024-11-16 09:32:15 +01:00
|
|
|
{{ form_row(form.submittime) }}
|
2024-09-17 14:02:17 +02:00
|
|
|
{{ form_row(form.description) }}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-header">
|
|
|
|
<i class="fa fa-pencil-alt fa-fw"></i> Illustration
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card-body">
|
|
|
|
{{ form_widget(form.illustration) }}
|
|
|
|
{{ form_widget(form.width) }}
|
|
|
|
{{ form_widget(form.height) }}
|
|
|
|
<a class="btn btn-info" style="width:100%; margin-bottom:10px" onClick="ModalLoad('extraLargeModal','Illustration','{{ path('app_illustration_upload') }}');" title='Ajouter une banière'>Télécharger une Illustration</a>
|
|
|
|
<img id="illustration_illustration_img" src="/{{ appAlias }}/uploads/illustration/{{illustration.illustration}}" style="width:100%;margin:auto;display:block;">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{ form_end(form) }}
|
|
|
|
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block localjavascript %}
|
|
|
|
$(document).ready(function() {
|
|
|
|
$("#illustration_order").focus();
|
|
|
|
});
|
|
|
|
{% endblock %}
|