svg
This commit is contained in:
@ -4,30 +4,28 @@
|
||||
|
||||
{%block body%}
|
||||
<h2>Projets</h2>
|
||||
<a href="{{ path('app_user_project_submit') }}" class="btn btn-success mb-3">Ajouter</a>
|
||||
|
||||
<div class='d-flex flex-wrap' style='justify-content: left'>
|
||||
{% for project in projects %}
|
||||
{% if is_granted('VIEW', project) %}
|
||||
<div class='card' style='width:300px; margin-right:10px;'>
|
||||
<div class='card-header d-flex justify-content-between align-items-center'>
|
||||
{{project.status}}<br>
|
||||
{{project.title}}
|
||||
|
||||
<div>
|
||||
{% if is_granted('UPDATE', project) %}
|
||||
<a href="{{ path("app_user_project_update",{id:project.id}) }}" class="btn btn-primary btn-sm"><i class="fas fa-pencil"></i></a>
|
||||
{% endif %}
|
||||
<h5>{{project.title}}</h5>
|
||||
|
||||
<div>
|
||||
<a href="{{ path("app_user_project_view",{id:project.id}) }}" class="btn btn-secondary btn-sm"><i class="fas fa-eye"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class='card-body'>
|
||||
{{project.summary|raw}}
|
||||
|
||||
<br>
|
||||
{{project.summary|nl2br}}
|
||||
</div>
|
||||
<div class='card-footer'>
|
||||
<small><em>
|
||||
Propriétaires =
|
||||
<b>Statut</b> = {{ project.status }}<br>
|
||||
<b>Propriétaires</b> =
|
||||
{%for user in project.users%}
|
||||
{{' '~user.username}}
|
||||
{{loop.first ? user.username : ' - '~user.username}}
|
||||
{%endfor%}
|
||||
</em></small>
|
||||
</div>
|
||||
|
58
templates/option/edit.html.twig
Normal file
58
templates/option/edit.html.twig
Normal file
@ -0,0 +1,58 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %} = {{title}}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>{{title}}</h1>
|
||||
|
||||
|
||||
{{ form_start(form) }}
|
||||
{{ form_widget(form.submit) }}
|
||||
<a href="{{ path(routecancel,{id:idproject}) }}" class="btn btn-secondary me-5">Annuler</a>
|
||||
{% if mode=="update" %}
|
||||
<a href="{{ path(routedelete,{idproject:option.project.id,id:option.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) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2"></div>
|
||||
<div class="col-md-4">
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Information</div>
|
||||
<div class="card-body">
|
||||
{{ form_row(form.whyYes) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Information</div>
|
||||
<div class="card-body">
|
||||
{{ form_row(form.whyNot) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#project_title").focus();
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
@ -8,18 +8,10 @@
|
||||
|
||||
{{ form_start(form) }}
|
||||
{{ form_widget(form.submit) }}
|
||||
<a href="{{ path(routecancel) }}" class="btn btn-secondary ms-1">Annuler</a>
|
||||
{%if mode=="update" %}
|
||||
{% if is_granted('MOVEDRAFT', project) %}
|
||||
<a href="{{ path("app_user_project_move",{id:form.vars.value.id, status:"DRAFT"}) }}" class="btn btn-primary" onclick="return confirm('Confirmez-vous le passage au vote ?')">Mettre en Brouillon</a>
|
||||
{% endif %}
|
||||
{% if is_granted('MOVETOVOTE', project) %}
|
||||
<a href="{{ path("app_user_project_move",{id:form.vars.value.id, status:"TOVOTE"}) }}" class="btn btn-primary" onclick="return confirm('Confirmez-vous le passage au vote ?')">Mettre au Vote</a>
|
||||
{% endif %}
|
||||
{% if is_granted('DELETE', project) %}
|
||||
<a href="{{ path(routedelete,{id:form.vars.value.id}) }}" class="btn btn-danger float-end" onclick="return confirm('Confirmez-vous la suppression de cet enregistrement ?')">Supprimer</a>
|
||||
{% endif %}
|
||||
{%endif%}
|
||||
<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 %}
|
||||
|
||||
{% include('include/error.html.twig') %}
|
||||
|
||||
@ -49,6 +41,34 @@
|
||||
|
||||
{% if mode=="update" %}
|
||||
<div class="col-md-8 mx-auto">
|
||||
<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>
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Description du Projet</div>
|
||||
<div class="card-body">
|
||||
|
12
templates/project/status.html.twig
Normal file
12
templates/project/status.html.twig
Normal file
@ -0,0 +1,12 @@
|
||||
{% if is_granted('MOVEDRAFT', project) %}
|
||||
<a href="{{ path(routemove,{id:project.id, status:"DRAFT"}) }}" class="btn btn-primary me-1" onclick="return confirm('Confirmez-vous le passage au vote ?')">Mettre en Brouillon</a>
|
||||
{% endif %}
|
||||
{% if is_granted('MOVETOVOTE', project) %}
|
||||
<a href="{{ path(routemove,{id:project.id, status:"TOVOTE"}) }}" class="btn btn-primary me-1" onclick="return confirm('Confirmez-vous le passage au vote ?')">Mettre au Vote</a>
|
||||
{% endif %}
|
||||
{% if is_granted('MOVEVOTED', project) %}
|
||||
<a href="{{ path(routemove,{id:project.id, status:"VOTED"}) }}" class="btn btn-primary me-1" onclick="return confirm('Confirmez-vous le vote ?')">Voter</a>
|
||||
{% endif %}
|
||||
{% if 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 %}
|
@ -3,29 +3,44 @@
|
||||
{% block title %} = {{title}}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>{{title}}</h1>
|
||||
<h1 style="display:flex;">
|
||||
<div style="flex-grow:1">{{title}}</div>
|
||||
<div class="">{{project.status}}</div>
|
||||
</h1>
|
||||
|
||||
{% if is_granted('UPDATE', project) %}
|
||||
<a href="{{ path(routeupdate,{id:project.id}) }}" class="btn btn-success me-1">Modifier</a>
|
||||
{% endif %}
|
||||
|
||||
<a href="{{ path(routecancel) }}" class="btn btn-secondary ms-1">Annuler</a>
|
||||
<a href="{{ path(routecancel) }}" class="btn btn-secondary me-5">Retour</a>
|
||||
|
||||
{% if is_granted('MOVEDRAFT', project) %}
|
||||
<a href="{{ path("app_user_project_move",{id:project.id, status:"DRAFT"}) }}" class="btn btn-primary" onclick="return confirm('Confirmez-vous le passage au vote ?')">Mettre en Brouillon</a>
|
||||
<a href="{{ path(routemove,{id:project.id, status:"DRAFT"}) }}" class="btn btn-primary me-1" onclick="return confirm('Confirmez-vous le passage au vote ?')">Mettre en Brouillon</a>
|
||||
{% endif %}
|
||||
{% if is_granted('MOVETOVOTE', project) %}
|
||||
<a href="{{ path("app_user_project_move",{id:project.id, status:"TOVOTE"}) }}" class="btn btn-primary" onclick="return confirm('Confirmez-vous le passage au vote ?')">Mettre au Vote</a>
|
||||
<a href="{{ path(routemove,{id:project.id, status:"TOVOTE"}) }}" class="btn btn-primary me-1" onclick="return confirm('Confirmez-vous le passage au vote ?')">Mettre au Vote</a>
|
||||
{% endif %}
|
||||
{% if is_granted('MOVEVOTED', project) %}
|
||||
<a href="{{ path(routemove,{id:project.id, status:"VOTED"}) }}" class="btn btn-primary me-1" onclick="return confirm('Confirmez-vous le vote ?')">Voter</a>
|
||||
{% endif %}
|
||||
{% if 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 %}
|
||||
|
||||
|
||||
<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">
|
||||
{{ project.title }}
|
||||
{{ project.nature }}
|
||||
{{ project.summary }}
|
||||
<b>Titre</b> = {{ project.title }}<br>
|
||||
<b>Nature</b> = {{ project.nature }}<br><br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Résumé</div>
|
||||
<div class="card-body">
|
||||
{{ project.summary|nl2br }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -43,7 +58,7 @@
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Description du Projet</div>
|
||||
<div class="card-body">
|
||||
{{ project.description }}
|
||||
{{ project.description ? project.description|markdown_to_html : "" }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user