v0 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:
78
templates/Icon/edit.html.twig
Executable file
78
templates/Icon/edit.html.twig
Executable file
@ -0,0 +1,78 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
{% if not inframe %}
|
||||
<h1 class="page-header">
|
||||
{% if mode=="update" %}
|
||||
Modification Icône
|
||||
{% elseif mode=="submit" %}
|
||||
Création Icône
|
||||
{% endif %}
|
||||
</h1>
|
||||
{%endif%}
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
<a class="btn btn-secondary" href={{ path('app_'~access~'_icon',{'inframe':inframe}) }}>Annuler</a>
|
||||
|
||||
{% if mode=="update" and not issystem %}
|
||||
<a href={{ path('app_'~access~'_icon_delete',{'id':icon.id,'inframe':inframe}) }}
|
||||
class="btn btn-danger float-end"
|
||||
data-method="delete" data-csrf="_token:{{ 'csrf' }}"
|
||||
data-confirm="Êtes-vous sûr de vouloir supprimer cet icône ?">
|
||||
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 fa-fw"></i> Informations
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div style="width:110px; margin:10px auto;">
|
||||
<img id="icon_label_img" src="{{ path("app_minio_image",{file:icon.label}) }}" style="padding:10px; width:110px;height:auto;margin:auto;display:block;margin-bottom:5px;background-color: var(--colorbgbodydark)">
|
||||
{{ form_widget(form.label) }}
|
||||
{% if mode=="submit" or not issystem %}
|
||||
<a class="btn btn-info btn-modal" style="width:110px" data-modalid="mymodallarge" data-modaltitle="Icône" data-modalurl="{{ path('app_'~access~'_icon_upload', {"type": "icon", "reportinput": "#icon_label" }) }}" title='Ajouter un Icône'>Modifier</a>
|
||||
{%endif%}
|
||||
</div>
|
||||
|
||||
{% if mode=="submit" or not issystem %}
|
||||
<div style="width:200px; margin: 10px auto;text-align:center;">
|
||||
Privilégiez des images carrées de minimum 90px par 90px et avec un fond transparent
|
||||
</div>
|
||||
{%endif%}
|
||||
|
||||
{{ form_row(form.tags) }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% if auditUse and mode=="update" and (access=="admin" or access=="modo" or access=="audit") %}
|
||||
<div class="float-end" style="width:700px;max-width:100%">
|
||||
{{ render(path("app_"~access~"_audit_renderid",{entityname:"Icon",entityid:icon.id})) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
25
templates/Icon/list.html.twig
Normal file
25
templates/Icon/list.html.twig
Normal file
@ -0,0 +1,25 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
{% if not inframe %}
|
||||
<h1 class="page-header">Gestion des Icônes</h1>
|
||||
{% endif %}
|
||||
{% if auditUse and (access=="admin" or access=="audit") %}
|
||||
<a class="btn btn-secondary float-end" href="{{ path("app_"~access~"_audit_render",{entityname:"Icon"}) }}"><i class="fas fa-eye fa-fw"></i> Audit</a>
|
||||
{% endif %}
|
||||
|
||||
<p>
|
||||
<a class="btn btn-success" href={{ path('app_'~access~'_icon_submit',{'inframe': inframe}) }}>Ajouter</a>
|
||||
{% if inframe %}
|
||||
<a class="btn btn-secondary" href={{ path('app_'~access~'_icon_select') }}>Fermer</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
<div class="flex wrap">
|
||||
{% for icon in icons %}
|
||||
<a href="{{ path('app_'~access~'_icon_update', {id : icon.id, 'inframe': inframe}) }}"><img class="icon" height="90" src="{{ path('app_minio_image',{file:icon.label}) }}"" style="padding:10px; margin-bottom:2px; background-color: var(--colorbgbodydark"></a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
70
templates/Icon/select.html.twig
Normal file
70
templates/Icon/select.html.twig
Normal file
@ -0,0 +1,70 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="margin-bottom:15px">
|
||||
<a onclick="window.parent.$('#mymodal').modal('hide');" class="btn btn-secondary">Fermer</a>
|
||||
<a href="{{ path('app_'~access~'_icon',{'inframe':true}) }}" class="btn btn-secondary">Gérer les Icônes</a>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<label class="control-label" for="group_label">Recherche</label>
|
||||
<input type="text" id="icon_search" name="icon_search" class="form-control form-control" style="margin-bottom:15px">
|
||||
|
||||
{% if iconsuser is not empty %}
|
||||
<h3>Mes Icônes</h3>
|
||||
{% for icon in iconsuser %}
|
||||
{% set tag = "" %}
|
||||
{% if icon.tags %}
|
||||
{% set tag = icon.tags %}
|
||||
{% endif %}
|
||||
{% if icon.label starts with 'icon/icon_' %}
|
||||
{% set tag = tag ~ icon.label|replace({'icon/icon_':'', '.png':''}) %}
|
||||
{% endif %}
|
||||
|
||||
<img onClick="window.parent.selIcon({{ icon.id }},'{{ path('app_minio_image',{file:icon.label}) }}')" data="{{tag}}" id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="{{ path('app_minio_image',{file:icon.label}) }}" style="cursor:pointer; padding:2px; margin-bottom:2px; background-color: var(--colorbgbodydark">
|
||||
{% endfor %}
|
||||
|
||||
<h3 class="mt-3">Icônes Communs</h3>
|
||||
{% endif %}
|
||||
{% for icon in icons %}
|
||||
{% set tag = "" %}
|
||||
{% if icon.tags %}
|
||||
{% set tag = icon.tags %}
|
||||
{% endif %}
|
||||
{% if icon.label starts with 'icon/icon_' %}
|
||||
{% set tag = tag ~ icon.label|replace({'icon/icon_':'', '.png':''}) %}
|
||||
{% endif %}
|
||||
<img onClick="window.parent.selIcon({{ icon.id }},'{{ path('app_minio_image',{file:icon.label}) }}')" data="{{tag}}" id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="{{ path('app_minio_image',{file:icon.label}) }}" style="cursor:pointer; padding:2px; margin-bottom:2px; background-color: var(--colorbgbodydark">
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
$('document').ready(function(){
|
||||
$( "#icon_search" ).focus();
|
||||
});
|
||||
|
||||
$( "#icon_search" ).on("keyup", function() {
|
||||
if($( "#icon_search" ).val()=="")
|
||||
$(".grid-item-img").show();
|
||||
else {
|
||||
tags=$( "#icon_search" ).val().toLowerCase().split(' ');
|
||||
|
||||
$(".grid-item-img").hide();
|
||||
tags.forEach(function(tag){
|
||||
$(".grid-item-img").each(function(index) {
|
||||
icontags=$( this ).attr("data");
|
||||
if (typeof icontags !== 'undefined') {
|
||||
if(icontags.includes(tag)) $(this).show();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
37
templates/Icon/upload.html.twig
Executable file
37
templates/Icon/upload.html.twig
Executable file
@ -0,0 +1,37 @@
|
||||
{% 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('icon') }}"
|
||||
class="dropzone"
|
||||
id="mydropzone"
|
||||
data-acceptedMimeTypes="image/*"
|
||||
data-maxFiles=1
|
||||
|
||||
style="margin-top:10px">
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
{% block localscript %}
|
||||
{{ encore_entry_script_tags('dropzone') }}
|
||||
|
||||
<script>
|
||||
function dropzonesuccess( file, response ) {
|
||||
parent.$("#icon_label").val("icon/"+response["file"]);
|
||||
parent.$("#icon_label_img").attr("src","{{ path("app_minio_image",{file:"icon/"}) }}"+response["file"]);
|
||||
closeModal();
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
window.parent.$("#mymodallarge").modal('hide');
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user