first commit
This commit is contained in:
137
templates/backend_admin/societe/add_update.html.twig
Normal file
137
templates/backend_admin/societe/add_update.html.twig
Normal file
@@ -0,0 +1,137 @@
|
||||
{% extends 'base_backend_admin.html.twig' %}
|
||||
|
||||
{% block title %} Société {% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% set titlePage = 'Ajouter' %}
|
||||
{% if app.request.attributes.get('_route') == 'backend_societe_update' %}
|
||||
{% set titlePage = 'Modifier' %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
<!-- Page Heading -->
|
||||
<div class="d-sm-flex align-items-center justify-content-between mb-4">
|
||||
<h1 class="h3 mb-0 text-gray-800">Sociétés</h1>
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item">Société</li>
|
||||
<li class="breadcrumb-item">{{ titlePage }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Begin Page Content -->
|
||||
<div class="container-fluid">
|
||||
|
||||
{% include 'backend_admin/basic/notice.html.twig' %}
|
||||
|
||||
<!-- DataTales Example -->
|
||||
<div class="card shadow mb-4">
|
||||
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">{{ titlePage }} une nouvelle société</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
{{ form_start(form) }}
|
||||
<div class="row g-3">
|
||||
|
||||
{{ form_errors(form) }}
|
||||
{{ form_row(form._token) }}
|
||||
|
||||
<div class="col-6 my-3">
|
||||
{{ form_label(form.nom, 'Nom Société', {'attr': {'class': 'form-label'}}) }}
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="fa-solid fa-building"></i></span>
|
||||
{{ form_widget(form.nom, {'attr': {'class': 'form-control'}}) }}
|
||||
<div class="invalid-feedback">
|
||||
{{ form_errors(form.nom) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
{{ form_label(form.immatriculation, 'Immatriculation', {'attr': {'class': 'form-label'}}) }}
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="fa-solid fa-cash-register"></i></span>
|
||||
{{ form_widget(form.immatriculation, {'attr': {'class': 'form-control'}}) }}
|
||||
<div class="invalid-feedback">
|
||||
{{ form_errors(form.immatriculation) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 my-3">
|
||||
{{ form_label(form.email, 'Email', {'attr': {'class': 'form-label'}}) }}
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="fa-solid fa-at"></i></span>
|
||||
{{ form_widget(form.email, {'attr': {'class': 'form-control'}}) }}
|
||||
<div class="invalid-feedback">
|
||||
Your username is required.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-12 my-3">
|
||||
{{ form_label(form.telephone, 'Téléphone', {'attr': {'class': 'form-label'}}) }}
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="fa-solid fa-phone-volume"></i></span>
|
||||
{{ form_widget(form.telephone, {'attr': {'class': 'form-control'}}) }}
|
||||
<div class="invalid-feedback">
|
||||
{{ form_errors(form.telephone) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 my-3">
|
||||
{{ form_label(form.fax, 'Fax', {'attr': {'class': 'form-label'}}) }}
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="fa-solid fa-fax"></i></span>
|
||||
{{ form_widget(form.fax, {'attr': {'class': 'form-control'}}) }}
|
||||
<div class="invalid-feedback">
|
||||
{{ form_errors(form.fax) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-12 my-3">
|
||||
{{ form_label(form.adresse, 'Adresse', {'attr': {'class': 'form-label'}}) }}
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="fa-solid fa-location-dot"></i></span>
|
||||
{{ form_widget(form.adresse, {'attr': {'class': 'form-control'}}) }}
|
||||
<div class="invalid-feedback">
|
||||
{{ form_errors(form.adresse) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 my-3">
|
||||
{{ form_label(form.photo, 'Logo', {'attr': {'class': 'form-label'}}) }}
|
||||
{{ form_widget(form.photo, {'attr': {'class': 'form-control'}}) }}
|
||||
<div class="invalid-feedback">{{ form_errors(form.photo) }}</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 my-3">
|
||||
{{ form_label(form.description, 'Déscription', {'attr': {'class': 'form-label'}}) }}
|
||||
{{ form_widget(form.description, {'attr': {'class': 'form-control'}}) }}
|
||||
<div class="invalid-feedback">{{ form_errors(form.description) }}</div>
|
||||
</div>
|
||||
|
||||
<hr class="my-4">
|
||||
{{ form_widget(form.save, {'label': "Enregister", 'attr': {'class': 'w-90 btn btn-primary btn-lg'}}) }}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
{{ form_end(form) }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
88
templates/backend_admin/societe/index.html.twig
Normal file
88
templates/backend_admin/societe/index.html.twig
Normal file
@@ -0,0 +1,88 @@
|
||||
{% extends 'base_backend_admin.html.twig' %}
|
||||
|
||||
{% block title %} Sociéte {% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<!-- Page Heading -->
|
||||
<div class="d-sm-flex align-items-center justify-content-between mb-4">
|
||||
<h1 class="h3 mb-0 text-gray-800">Sociétés</h1>
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item">Société</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Begin Page Content -->
|
||||
<div class="container-fluid">
|
||||
|
||||
{% include 'backend_admin/basic/notice.html.twig' %}
|
||||
|
||||
<a href="{{ path('backend_admin_societe_add') }}" class="btn btn-info btn-icon-split mb-4">
|
||||
<span class="icon text-white"><i class="fa-regular fa-square-plus"></i></span>
|
||||
<span class="text text-white">Ajouter une nouvelle Société</span>
|
||||
</a>
|
||||
|
||||
<!-- DataTales Example -->
|
||||
<div class="card shadow mb-4">
|
||||
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Liste des sociétés</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="dataTablesSociete" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Nom</th>
|
||||
<th>Adresse</th>
|
||||
<th>Email</th>
|
||||
<th>Téléphone</th>
|
||||
<th>Partenaires</th>
|
||||
<th>Modifier</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Nom</th>
|
||||
<th>Adresse</th>
|
||||
<th>Email</th>
|
||||
<th>Téléphone</th>
|
||||
<th>Partenaires</th>
|
||||
<th>Modifier</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
{% for societe in societes %}
|
||||
<tr>
|
||||
<td>{{ societe.id }}</td>
|
||||
<td>{{ societe.nom }}</td>
|
||||
<td>{{ societe.adresse }}</td>
|
||||
<td>{{ societe.email }}</td>
|
||||
<td>{{ societe.telephone }}</td>
|
||||
<td align="center">{{ societe.getPartenaires()|length }}</td>
|
||||
<td align="center">
|
||||
<a href="{{ path('backend_admin_societe_update',{id:societe.id}) }}" title="modifier" class="btn btn-info btn-action"><i class="fa fa-edit"></i></a>
|
||||
{% if societe.isActive() %}
|
||||
<a href="{{ path('backend_admin_societe_activated', {id:societe.id, 'active':0}) }}" title="déactiver cette sociéte" class="btn btn-danger"><i class="fa-solid fa-circle-xmark"></i></a>
|
||||
{% else %}
|
||||
<a href="{{ path('backend_admin_societe_activated', {id:societe.id, 'active':1}) }}" title="activer cette sociéte" class="btn btn-success"><i class="fa-solid fa-circle-check"></i></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
{{ encore_entry_script_tags('app_backend_other') }}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user