From a0e50bf1872895ef0b538e2a9cb5116c432f04fb Mon Sep 17 00:00:00 2001 From: bourgoino Date: Fri, 6 Dec 2024 08:06:44 +0100 Subject: [PATCH] la derniere goute de pluie d'eau froide --- src/Entity/Company.php | 2 +- templates/company/edit.html.twig | 52 +++++++++++++++++++-- templates/company/index.html.twig | 77 +++++++++++++++++-------------- templates/company/new.html.twig | 44 ++++++++++++++++-- templates/company/show.html.twig | 76 ++++++++++++++++++------------ templates/degree/index.html.twig | 4 -- 6 files changed, 178 insertions(+), 77 deletions(-) diff --git a/src/Entity/Company.php b/src/Entity/Company.php index 1a3bd2f..ae8ccaa 100644 --- a/src/Entity/Company.php +++ b/src/Entity/Company.php @@ -62,7 +62,7 @@ class Company return $this; } - public function getAddress(): ?stringz + public function getAddress(): ?string { return $this->address; } diff --git a/templates/company/edit.html.twig b/templates/company/edit.html.twig index 2ba5039..926a9d7 100644 --- a/templates/company/edit.html.twig +++ b/templates/company/edit.html.twig @@ -1,13 +1,55 @@ {% extends 'base.html.twig' %} -{% block title %}Edit Company{% endblock %} +{% block title %}Modifier l'entreprise{% endblock %} {% block body %} -

Edit Company

+
+

Modifier l'entreprise

- {{ include('company/_form.html.twig', {'button_label': 'Update'}) }} +
+ {{ form_start(form) }} - back to list +
+ +
+ {{ form_widget(form.name, {'attr': {'class': 'block w-full p-2 border rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-teal-500'}}) }} +
+
- {{ include('company/_delete_form.html.twig') }} +
+ +
+ {{ form_widget(form.address, {'attr': {'class': 'block w-full p-2 border rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-teal-500'}}) }} +
+
+ +
+ +
+ {{ form_widget(form.tel, {'attr': {'class': 'block w-full p-2 border rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-teal-500'}}) }} +
+
+ +
+ +
+ {{ form_widget(form.mail, {'attr': {'class': 'block w-full p-2 border rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-teal-500'}}) }} +
+
+ +
+ +
+ + {{ form_end(form) }} +
+ + +
{% endblock %} diff --git a/templates/company/index.html.twig b/templates/company/index.html.twig index 2c1affd..ae89c2e 100644 --- a/templates/company/index.html.twig +++ b/templates/company/index.html.twig @@ -1,41 +1,50 @@ {% extends 'base.html.twig' %} -{% block title %}Company index{% endblock %} +{% block title %}Liste des Entreprises{% endblock %} {% block body %} -

Company index

+
+

Liste des Entreprises

- - - - - - - - - - - - - {% for company in companies %} - - - - - - - - - {% else %} - - - - {% endfor %} - -
IdNameAddressTelMailactions
{{ company.id }}{{ company.name }}{{ company.address }}{{ company.tel }}{{ company.mail }} - show - edit -
no records found
+
+ + + + + + + + + + {% for company in companies %} + + + + + + {% endfor %} + +
IDNom de l'entrepriseActions
{{ company.id }}{{ company.name }} + + Voir + + + Modifier + +
+ + + +
+
+
- Create new + +
{% endblock %} diff --git a/templates/company/new.html.twig b/templates/company/new.html.twig index e957106..ef0ab63 100644 --- a/templates/company/new.html.twig +++ b/templates/company/new.html.twig @@ -1,11 +1,47 @@ {% extends 'base.html.twig' %} -{% block title %}New Company{% endblock %} +{% block title %}Nouvelle Entreprise{% endblock %} {% block body %} -

Create new Company

+
+

Créer une nouvelle entreprise

- {{ include('company/_form.html.twig') }} +
+ {{ form_start(form) }} - back to list +
+ + {{ form_widget(form.name, {'attr': {'class': 'block w-full p-2 border rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-teal-500'}}) }} +
+ +
+ + {{ form_widget(form.address, {'attr': {'class': 'block w-full p-2 border rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-teal-500'}}) }} +
+ +
+ + {{ form_widget(form.tel, {'attr': {'class': 'block w-full p-2 border rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-teal-500'}}) }} +
+ +
+ + {{ form_widget(form.mail, {'attr': {'class': 'block w-full p-2 border rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-teal-500'}}) }} +
+ +
+ +
+ + {{ form_end(form) }} +
+ + +
{% endblock %} diff --git a/templates/company/show.html.twig b/templates/company/show.html.twig index a46b203..2a1dd04 100644 --- a/templates/company/show.html.twig +++ b/templates/company/show.html.twig @@ -1,38 +1,56 @@ {% extends 'base.html.twig' %} -{% block title %}Company{% endblock %} +{% block title %}Détail de l'entreprise{% endblock %} {% block body %} -

Company

+
+

Détail de l'entreprise

- - - - - - - - - - - - - - - - - - - - - - - -
Id{{ company.id }}
Name{{ company.name }}
Address{{ company.address }}
Tel{{ company.tel }}
Mail{{ company.mail }}
+
+ + + + + + + + + + + + + + + + + + + + + + + +
ID{{ company.id }}
Nom{{ company.name }}
Adresse{{ company.address }}
Téléphone{{ company.tel }}
Email{{ company.mail }}
+
- back to list + - {{ include('company/_delete_form.html.twig') }} +
+
+ + + +
+
+
{% endblock %} diff --git a/templates/degree/index.html.twig b/templates/degree/index.html.twig index 670e9c5..3e4f26f 100644 --- a/templates/degree/index.html.twig +++ b/templates/degree/index.html.twig @@ -6,7 +6,6 @@

Liste des Diplômes

-
@@ -27,12 +26,10 @@ Voir - Modifier - @@ -47,7 +44,6 @@
-