ninegate
Some checks failed
Cadoles/nineskeletor/pipeline/head There was a failure building this commit
Some checks failed
Cadoles/nineskeletor/pipeline/head There was a failure building this commit
This commit is contained in:
67
templates/Pagewidgetslide/edit.html.twig
Executable file
67
templates/Pagewidgetslide/edit.html.twig
Executable file
@ -0,0 +1,67 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if mode=="update" %}
|
||||
Modification Carrousel
|
||||
{% elseif mode=="submit" %}
|
||||
Création Carrousel
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
<a class="btn btn-secondary" href="{{ path('app_'~access~'_pagewidgetslide_list',{'idwidget':pagewidget.id,'usage':usage}) }}">Annuler</a>
|
||||
|
||||
{% if mode=="update" %}
|
||||
<a href={{ path('app_'~access~'_pagewidgetslide_delete',{'idwidget':pagewidget.id,'id':entity.id,'usage':usage}) }}
|
||||
class="btn btn-danger float-end"
|
||||
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="row clearfix">
|
||||
<div class="col-md-8">
|
||||
{{ form_row(form.title) }}
|
||||
{{ form_row(form.subtitle) }}
|
||||
|
||||
<div style="width:100%; margin:10px auto; text-align:center;">
|
||||
<img id="pagewidgetslide_image_img" src="{{ path("app_minio_image",{file:entity.image}) }}" style="padding:10px; width:100%;height:auto;margin:auto;display:block;margin-bottom:5px;background-color: var(--colorbgbodydark)">
|
||||
<a class="btn btn-info btn-modal" style="width:110px" data-modalid="mymodallarge" data-modaltitle="Carrousel" data-modalurl="{{ path('app_'~access~'_pagewidgetslide_upload', {"type": "slide", 'idwidget':pagewidget.id, 'usage':usage, "reportinput": "#pagewidgetslide_image" }) }}" title='Ajouter un Icône'>Modifier</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
{{ form_row(form.roworder) }}
|
||||
{{ form_row(form.url) }}
|
||||
<em>le mot clé #login# sera remplacé par le login de l'utilisateur</em><br><br>
|
||||
{{ form_row(form.target) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
18
templates/Pagewidgetslide/list.html.twig
Normal file
18
templates/Pagewidgetslide/list.html.twig
Normal file
@ -0,0 +1,18 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">Gestion des Carrousels</h1>
|
||||
|
||||
<p>
|
||||
<a class="btn btn-success" href={{ path('app_'~access~'_pagewidgetslide_submit',{idwidget:pagewidget.id,usage:usage}) }}>Ajouter</a>
|
||||
<a class="btn btn-secondary" href="{{ path('app_'~access~'_page_'~usage~'_view',{id:pagewidget.page.id}) }}">Retour</a>
|
||||
</p>
|
||||
|
||||
|
||||
{% for pagewidgetslide in pagewidgetslides %}
|
||||
<a href="{{ path('app_'~access~'_pagewidgetslide_update', {idwidget:pagewidget.id,id:pagewidgetslide.id,usage:usage}) }}">
|
||||
<img id="icon_label_img" src="{{ path("app_minio_image",{file:pagewidgetslide.image}) }}" style="padding:5px; width:300px;height:auto;margin:auto;display:block;margin-bottom:5px;background-color: var(--colorbgbodydark)">
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
43
templates/Pagewidgetslide/upload.html.twig
Executable file
43
templates/Pagewidgetslide/upload.html.twig
Executable file
@ -0,0 +1,43 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block encoretags %}
|
||||
{{ encore_entry_link_tags('dropzone') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<a class="btn btn-secondary" onClick="closeModal();">Annuler</a>
|
||||
|
||||
<form
|
||||
action="{{ oneup_uploader_endpoint('slide') }}"
|
||||
class="dropzone"
|
||||
id="mydropzone"
|
||||
data-acceptedMimeTypes="image/*"
|
||||
data-maxFiles=1
|
||||
data-folder={{ pagewidget.id }}
|
||||
style="margin-top:10px">
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
{% block localscript %}
|
||||
{{ encore_entry_script_tags('dropzone') }}
|
||||
|
||||
<script>
|
||||
function dropzoneinit( elmt ) {
|
||||
elmt.on("sending", function(file, xhr, formData) {
|
||||
formData.append("folder", "{{ pagewidget.id }}");
|
||||
});
|
||||
}
|
||||
|
||||
function dropzonesuccess( file, response ) {
|
||||
parent.$("#pagewidgetslide_image").val("slide/{{pagewidget.id}}/"+response["file"]);
|
||||
parent.$("#pagewidgetslide_image_img").attr("src","{{ path("app_minio_image",{file:"slide/"~pagewidget.id~"/"}) }}"+response["file"]);
|
||||
closeModal();
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
window.parent.$("#mymodallarge").modal('hide');
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user