svg
This commit is contained in:
68
templates/group/edit.html.twig
Normal file
68
templates/group/edit.html.twig
Normal file
@@ -0,0 +1,68 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %} = {{title}}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>{{title}}</h1>
|
||||
|
||||
{{ form_start(form) }}
|
||||
{{ form_widget(form.submit) }}
|
||||
<a href="{{ path(routecancel) }}" class="btn btn-secondary me-5">Annuler</a>
|
||||
{% if mode=="update" and is_granted('DELETE', group) %}
|
||||
<a href="{{ path(routedelete,{id:group.id}) }}" class="btn btn-danger float-end" onclick="return confirm('Confirmez-vous la suppression de cet enregistrement ?')">Supprimer</a>
|
||||
{% endif %}
|
||||
|
||||
{% include('include/error.html.twig') %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 mx-auto">
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Information</div>
|
||||
<div class="card-body">
|
||||
{{ form_row(form.title) }}
|
||||
{{ form_row(form.dueDate) }}
|
||||
{{ form_row(form.users) }}
|
||||
{{ form_row(form.summary) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if mode=="update" %}
|
||||
{{ render(path("bninefiles_files",{domain:'group',id:group.id, editable:1})) }}
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Timeline</div>
|
||||
<div class="card-body">
|
||||
{% include('group/timeline.html.twig') %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if mode=="update" %}
|
||||
<div class="col-md-8 mx-auto">
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Pad du Groupe</div>
|
||||
<div class="card-body">
|
||||
{{ form_widget(form.description) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#group_title").focus();
|
||||
|
||||
$('#dataTables').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 1, "asc" ]]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
44
templates/group/list.html.twig
Normal file
44
templates/group/list.html.twig
Normal file
@@ -0,0 +1,44 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %} = {{title}}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>{{title}}</h1>
|
||||
<a href="{{ path(routesubmit) }}" class="btn btn-success">Ajouter</a>
|
||||
|
||||
<div class="dataTable_wrapper">
|
||||
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="100px" class="no-sort">Action</th>
|
||||
<th>Title</th>
|
||||
<th width="200px">Modifié le</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for project in projects %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ path(routeupdate,{id:project.id}) }}" class="me-2"><i class="fas fa-file fa-2x"></i></a>
|
||||
</td>
|
||||
<td>{{project.title}}</td>
|
||||
<td>{{project.timelines.first ? project.timelines.first.createdAt|date('d/m/Y H:i') : '' }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#dataTables').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 2, "asc" ]]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
57
templates/group/timeline.html.twig
Normal file
57
templates/group/timeline.html.twig
Normal file
@@ -0,0 +1,57 @@
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
|
||||
|
||||
<div class="timeline">
|
||||
{% for event in group.timelines %}
|
||||
<div class="timeline-item">
|
||||
<div class="timeline-marker"></div>
|
||||
<div class="timeline-content">
|
||||
<p class="text-muted small mb-1">
|
||||
{{ event.createdAt|date('d/m/Y H:i') }} par <strong>{{ event.user.username }}</strong><br>
|
||||
{% for field, change in event.description %}
|
||||
<strong>{{ field }}</strong>
|
||||
{% if field=="status" %}
|
||||
<span class="text-danger">{{ change.old ?? '' }}</span>
|
||||
→
|
||||
<span class="text-success">{{ change.new ?? '' }}</span>
|
||||
{% endif %}
|
||||
|
||||
{% if not change.old is defined and change[0] is defined %}
|
||||
<span>{{ change[0] }}</span>
|
||||
{% endif %}
|
||||
<br>
|
||||
{% endfor %}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.timeline {
|
||||
border-left: 3px solid #dee2e6;
|
||||
padding-left: 2rem;
|
||||
position: relative;
|
||||
font-size: 14px;
|
||||
}
|
||||
.timeline-item {
|
||||
position: relative;
|
||||
margin-bottom: 10px;
|
||||
margin-left: -23px;
|
||||
}
|
||||
.timeline-content {
|
||||
line-height:14px;
|
||||
}
|
||||
.timeline-marker {
|
||||
position: absolute;
|
||||
left: -1.1rem;
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
border-radius: 50%;
|
||||
background: #0d6efd;
|
||||
border: 2px solid #fff;
|
||||
box-shadow: 0 0 0 3px #0d6efd44;
|
||||
}
|
||||
.timeline-content {
|
||||
padding-left: 1rem;
|
||||
}
|
||||
</style>
|
73
templates/group/view.html.twig
Normal file
73
templates/group/view.html.twig
Normal file
@@ -0,0 +1,73 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %} = {{title}}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1 style="display:flex;">
|
||||
<div style="flex-grow:1">{{title}}</div>
|
||||
<div class="">{{group.status}}</div>
|
||||
</h1>
|
||||
|
||||
<div class="mb-3">
|
||||
{% if is_granted('UPDATE', group) %}
|
||||
<a href="{{ path(routeupdate,{id:group.id}) }}" class="btn btn-success me-1">Modifier</a>
|
||||
{% endif %}
|
||||
|
||||
<a href="{{ path(routecancel) }}" class="btn btn-secondary me-5">Retour</a>
|
||||
|
||||
{% if is_granted('MOVETOINACTIF', group) and group.status=="Actif"%}
|
||||
<a href="{{ path(routemove,{id:group.id, status:"INACTIF"}) }}" class="btn btn-primary me-1" onclick="return confirm('Statut = Inactif ?')">
|
||||
<i class="fas fa-angle-double-right"></i> Statut = Inactif
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('DELETE', group) %}
|
||||
<a href="{{ path(routedelete,{id:group.id}) }}" class="btn btn-danger float-end" onclick="return confirm('Confirmez-vous la suppression de cet enregistrement ?')">
|
||||
Supprimer
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if is_granted('MOVETOACTIF', group) and group.status=="Inactif" %}
|
||||
<a href="{{ path(routemove,{id:group.id, status:"ACTIF"}) }}" class="btn btn-warning me-1 float-end" onclick="return confirm('Statut = Actif ?')">
|
||||
<i class="fas fa-angle-double-left"></i> Statut = Actif
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 mx-auto">
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Information</div>
|
||||
<div class="card-body">
|
||||
<b>Titre</b> = {{ group.title }}<br>
|
||||
<b>A Voter pour le</b> = {{ group.dueDate ? group.dueDate|date("d/m/Y"):"" }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Résumé</div>
|
||||
<div class="card-body">
|
||||
{{ group.summary|nl2br }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ render(path("bninefiles_files",{domain:'group',id:group.id, editable:0})) }}
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Timeline</div>
|
||||
<div class="card-body">
|
||||
{% include('group/timeline.html.twig') %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-8 mx-auto">
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Pad du Group</div>
|
||||
<div class="card-body">
|
||||
{{ group.description ? group.description|markdown_to_html : "" }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user