This commit is contained in:
62
templates/Document/edit.html.twig
Executable file
62
templates/Document/edit.html.twig
Executable file
@ -0,0 +1,62 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if mode=="update" %}
|
||||
Modification Catégorie de Document = {{document.label}}
|
||||
{% elseif mode=="submit" %}
|
||||
Création Catégorie de Document
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
<a class="btn btn-secondary" href={{ path('app_admin_document') }}>Annuler</a>
|
||||
{% if mode=="update" %}
|
||||
<a class="btn btn-danger float-end" href={{ path('app_admin_document_delete',{id:document.id}) }} data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?">Supprimer</a>
|
||||
{% endif %}
|
||||
|
||||
{% 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 mt-4">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil-alt fa-fw"></i> Informations
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.label) }}
|
||||
</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:"Document",entityid:document.id})) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
$('document').ready(function(){
|
||||
$("#document_label").focus();
|
||||
});
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
66
templates/Document/list.html.twig
Executable file
66
templates/Document/list.html.twig
Executable file
@ -0,0 +1,66 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block localstyle %}
|
||||
<style>
|
||||
.item-action .btn-modal {
|
||||
color: inherit;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">Gestion des Documents </h1>
|
||||
|
||||
|
||||
<a class="btn btn-success" href="{{ path('app_'~access~'_document_submit') }}">Ajouter</a>
|
||||
{% if auditUse and (access=="admin" or access=="audit") %}
|
||||
<a class="btn btn-secondary float-end" href="{{ path('app_'~access~'_audit_render',{entityname:'Document'}) }}"><i class="fas fa-eye fa-fw"></i> Audit</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
<div class="card mt-4">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Catégories de Document
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="item-list">
|
||||
{% for documentcategory in documentcategorys %}
|
||||
{{ render(path("app_"~access~"_document_render",{idcategory:documentcategory.id})) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% for document in documents %}
|
||||
<div class="item item-list" style="background-color: var(--colorbgbodydark);">
|
||||
<div class="item-container">
|
||||
<div class="item-content">
|
||||
<div class="item-link">
|
||||
<img height="35" src="/medias/file/blank.png">
|
||||
|
||||
<div class="item-title">
|
||||
<h3>{{ document.label }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-action">
|
||||
<a style="display: none;" class="btn-modal" href="{{path('app_'~access~'_document_update',{id:document.id})}}">
|
||||
<i class="fas fa-file"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
29
templates/Document/render.html.twig
Normal file
29
templates/Document/render.html.twig
Normal file
@ -0,0 +1,29 @@
|
||||
<div class="item item-list" style="background-color: var(--colorbgbodydark);">
|
||||
<div class="item-container">
|
||||
<div class="item-content">
|
||||
<div class="item-link">
|
||||
<img height="35" src="/medias/file/dir.png">
|
||||
|
||||
<div class="item-title">
|
||||
<h3>{{ documentcategory.label }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item-childs" style="width:100%">
|
||||
{% if not documentcategory.childs is empty %}
|
||||
{% for documentcategory in documentcategory.childs %}
|
||||
{% if loop.first %}<div style="height:5px"> </div>{%endif%}
|
||||
{{ render(path("app_"~access~"_document_render",{idcategory:documentcategory.id,access:access})) }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if not documentcategory.documents is empty %}
|
||||
{% for document in documentcategory.documents %}
|
||||
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user