2025-07-28 17:10:56 +02:00
{% extends 'base.html.twig' %}
{% block title %} = {{ title }} {% endblock %}
{% block body %}
<h1> {{ title }} </h1>
{{ form_start ( form ) }}
{{ form_widget ( form .submit ) }}
2025-08-05 22:37:43 +02:00
<a href=" {{ path ( routecancel ) }} " class="btn btn-secondary me-5">Annuler</a>
{% if mode == "update" and is_granted ( 'DELETE' , project ) %}
<a href=" {{ path ( routedelete , { id : project .id } ) }} " class="btn btn-danger float-end" onclick="return confirm('Confirmez-vous la suppression de cet enregistrement ?')">Supprimer</a>
{% endif %}
2025-07-28 17:10:56 +02:00
{% include ( 'include/error.html.twig' ) %}
<div class="row">
2025-08-03 22:42:14 +02:00
<div class="col-md-4 mx-auto">
2025-07-28 17:10:56 +02:00
<div class="card mt-3">
<div class="card-header">Information</div>
<div class="card-body">
{{ form_row ( form .title ) }}
2025-08-03 22:42:14 +02:00
{{ form_row ( form .nature ) }}
{{ form_row ( form .users ) }}
{{ form_row ( form .summary ) }}
2025-07-28 17:10:56 +02:00
</div>
</div>
2025-08-03 22:42:14 +02:00
2025-08-04 21:10:10 +02:00
{% if mode == "update" %}
{{ render ( path ( "bninefiles_files" , { domain :'project' , id : project .id , editable : 1 } ) ) }}
2025-08-03 22:42:14 +02:00
2025-08-04 21:10:10 +02:00
<div class="card mt-3">
<div class="card-header">Timeline</div>
<div class="card-body">
{% include ( 'project/timeline.html.twig' ) %}
</div>
2025-08-03 22:42:14 +02:00
</div>
2025-08-04 21:10:10 +02:00
{% endif %}
2025-07-28 17:10:56 +02:00
</div>
2025-08-04 21:10:10 +02:00
{% if mode == "update" %}
2025-08-03 22:42:14 +02:00
<div class="col-md-8 mx-auto">
2025-08-05 22:37:43 +02:00
<div class="card mt-3">
<div class="card-header">Options de Vote</div>
<div class="card-body">
<a href=" {{ path ( routesubmitoption , { idproject : project .id } ) }} " class="btn btn-success btn-sm mb-3">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>
</tr>
</thead>
<tbody>
{% for option in project .options %}
<tr>
<td>
<a href=" {{ path ( routeupdateoption , { idproject : project .id , id : option .id } ) }} " class="me-2"><i class="fas fa-file fa-2x"></i></a>
</td>
<td> {{ option .title }} </td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
2025-07-28 17:10:56 +02:00
<div class="card mt-3">
2025-08-03 22:42:14 +02:00
<div class="card-header">Description du Projet</div>
2025-07-28 17:10:56 +02:00
<div class="card-body">
2025-08-03 22:42:14 +02:00
{{ form_widget ( form .description ) }}
2025-07-28 17:10:56 +02:00
</div>
</div>
</div>
2025-08-04 21:10:10 +02:00
{% endif %}
2025-07-28 17:10:56 +02:00
</div>
{{ form_end ( form ) }}
{% endblock %}
{% block localscript %}
<script>
$(document).ready(function() {
$("#project_title").focus();
});
</script>
{% endblock %}