svg
This commit is contained in:
72
templates/Job/edit.html.twig
Executable file
72
templates/Job/edit.html.twig
Executable file
@@ -0,0 +1,72 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if fgprint is defined and fgprint %}
|
||||
METIER
|
||||
{% elseif mode=="update" %}
|
||||
Modification METIER
|
||||
{% elseif mode=="submit" %}
|
||||
Création METIER
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
<a class="btn btn-secondary" href={{ path('app_job') }}>Annuler</a>
|
||||
|
||||
{% if mode=="update" %}
|
||||
|
||||
<a href="{{ path('app_job_delete',{'id':job.id}) }}"
|
||||
class="btn btn-danger float-right"
|
||||
data-method="delete"
|
||||
data-confirm="Êtes-vous sûr de vouloir supprimer cet entregistrement ?">
|
||||
Supprimer
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
<br><br>
|
||||
|
||||
{% 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">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil-alt fa-fw"></i> Informations
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.type) }}
|
||||
{{ form_row(form.description) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#job_name").focus();
|
||||
});
|
||||
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
|
||||
{% endblock %}
|
77
templates/Job/list.html.twig
Normal file
77
templates/Job/list.html.twig
Normal file
@@ -0,0 +1,77 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
td {
|
||||
padding:5px !important;
|
||||
}
|
||||
|
||||
{% if fgprint is defined and fgprint %}
|
||||
table { font-size:10px;}
|
||||
th,td {
|
||||
border: 1px solid #37474F;
|
||||
}
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tr { page-break-inside: avoid; }
|
||||
{%endif%}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
METIERS
|
||||
</h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_job_submit') }}>Ajouter</a></p>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Métiers
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dataTable_wrapper">
|
||||
<table class="table table-striped table-bordered table-hover small" id="dataTables" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-print no-sort">Action</th>
|
||||
<th>Type</th>
|
||||
<th>Nom</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for job in jobs %}
|
||||
<tr>
|
||||
<td class="no-print">
|
||||
<a href="{{path("app_job_update",{id:job.id})}}"><i class="fa fa-file"></i></a>
|
||||
</td>
|
||||
<td>{{job.type}}</td>
|
||||
<td>{{job.name}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
{% if not fgprint is defined or not fgprint %}
|
||||
$('#dataTables').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 1, "asc" ]]
|
||||
});
|
||||
{%else%}
|
||||
$('#dataTables').removeClass("table table-striped table-bordered table-hover small dataTable no-footer");
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user