svg
Some checks failed
Cadoles/nineskeletor/pipeline/head There was a failure building this commit

This commit is contained in:
2024-07-27 09:15:34 +02:00
parent 671b37197e
commit 6a5e14a25e
16 changed files with 460 additions and 19 deletions

View 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 %}

View 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 %}

View 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">&nbsp;</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>

View File

@@ -101,6 +101,11 @@
'icon': 'fa fa-file fa-fw',
'name' : 'DOCUMENTS',
'items' : [
{
icon: 'fa fa-cogs',
route: 'app_admin_document',
name: 'Documents',
},
{
icon: 'fa fa-cogs',
route: 'app_admin_documentcategory',
@@ -134,7 +139,7 @@
{% for section in sidebar %}
{% set sectionactive=false %}
{% for item in section.items %}
{% if item.route in app.request.get('_route') %}
{% if item.route==app.request.get('_route') or (item.route~"_") in app.request.get('_route') %}
{% set sectionactive=true %}
{% endif %}
{% endfor %}
@@ -161,7 +166,7 @@
{% if item.route=="app_admin_group" and not appGroupuse %} {% set toshow=false %} {% endif %}
{%if toshow %}
<a class="nav-link nav-link-item {% if item.route in app.request.get('_route') %}active{%endif%}" href="{{path(item.route)}}" title="{{item.name}}">
<a class="nav-link nav-link-item {% if item.route==app.request.get('_route') or (item.route~'_') in app.request.get('_route') %}active{%endif%}" href="{{path(item.route)}}" title="{{item.name}}">
<i class="{{item.icon}} fa-fw"></i>
<span>{{item.name}}</span>
</a>