This commit is contained in:
62
templates/Childheader/edit.html.twig
Normal file
62
templates/Childheader/edit.html.twig
Normal file
@ -0,0 +1,62 @@
|
||||
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if mode=="submit" %}
|
||||
Création tag
|
||||
{% else %}
|
||||
Modification tag
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
<a class="btn btn-secondary" href={{ path('app_child_update',{catparent:catparent,idparent:idparent,idchild:idchild}) }}>Annuler</a>
|
||||
|
||||
{% if mode=="update" %}
|
||||
<a href={{ path('app_childheader_delete',{catparent:catparent,idparent:idparent,idchild:idchild,id:childheader.id}) }}
|
||||
class="btn btn-danger float-right"
|
||||
data-method="delete" data-csrf="_token:{{ 'csrf' }}"
|
||||
data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?">
|
||||
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="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil-alt fa-fw"></i> Informations
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.credit) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
64
templates/Childheader/image.html.twig
Normal file
64
templates/Childheader/image.html.twig
Normal file
@ -0,0 +1,64 @@
|
||||
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{% set url="/"~appAlias~"/uploads/childheader/"~childheader.child.id~"/"~childheader.filename|replace({"thumb_":""}) %}
|
||||
<img id="image" class="d-block m-auto" src="{{url}}" style="max-width:100%; max-height:700px;">
|
||||
<div id="navigation" style="float:left;position:absolute;top:0px;width:100%" class="d-flex align-items-stretch">
|
||||
{%if imageprev %}
|
||||
<a id="linkprev" href="{{ path("app_childheader_view",{id:imageprev.id}) }}" class="align-middle d-flex align-items-center justify-content-center" style="width:50%">
|
||||
{% endif %}
|
||||
<div class="text-left align-items-center justify-content-center" style="width:100%">
|
||||
{%if imageprev %}
|
||||
<div><i class="btn-link fas fa-arrow-left fa-2x"></i> </div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{%if imageprev %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{%if imagenext %}
|
||||
<a id="linknext" href="{{ path("app_childheader_view",{id:imagenext.id}) }}" class="align-middle d-flex align-items-center justify-content-center" style="width:50%">
|
||||
{% endif %}
|
||||
<div class="text-right align-items-center justify-content-center" style="width:100%">
|
||||
{%if imagenext %}
|
||||
<div><i class="btn-link fas fa-arrow-right fa-2x"></i> </div>
|
||||
{%endif%}
|
||||
</div>
|
||||
{%if imagenext %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('body').imagesLoaded(function() {
|
||||
width=$('#mycontent').width();
|
||||
$('#navigation').width(width);
|
||||
|
||||
height=$('#image').height();
|
||||
$('#navigation').height(height);
|
||||
$('body').focus();
|
||||
});
|
||||
|
||||
$(document).keydown(function(event) {
|
||||
var key = (event.keyCode ? event.keyCode : event.which);
|
||||
|
||||
if(key == 37) { // left
|
||||
var href = $('#linkprev').attr('href');
|
||||
if(href!=null) window.location.href = href;
|
||||
}
|
||||
else if(key == 39) {
|
||||
var href = $('#linknext').attr('href');
|
||||
if(href!=null) window.location.href = href;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user