From 7b9e7b826300c2d449eac55360146fb192d0cb8c Mon Sep 17 00:00:00 2001 From: nono Date: Thu, 6 Jan 2022 16:06:13 +0100 Subject: [PATCH 01/39] =?UTF-8?q?D=C3=A9but=20de=20mise=20=C3=A0=20jour=20?= =?UTF-8?q?du=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 51 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f911807..80505bd 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,51 @@ +# Site de Don de La Quadrature Du Net + +Ce site web, écrit en PHP avec le framework Fat-Free-Framework permet de gérer les donnations et les contreparties pour La Quadrature Du Net. ( English below ) + +## Conception + +## Installation + +Vous aurez besoin de ; + +- Un serveur Linux ( Debian de préférence ), avec... + - PHP 7.4+ + - Mysql/MariaDB + +### En production + +#### Serveur web + +#### Connection à la banque + +#### Gestion + +### En test + +Afin de faciliter les test, nous avons inclus un fichier Vagrant, qui permet de lancer une machine virtuelle pré-configurée avec toutes les dépendances nécessaire pour tester le site de don, à l'exception du mode de banque pour le moment, mais rien n'empêche que vous le mettiez en place. + +Afin de lancer la machine de développement, vous pouvez ; + +- Installer Vagrant si ce n'est pas déjà fait, +- Lancer `vagrant up`. Ça prendra un peu de temps la première fois. +- Vous avez maintenant une machine virtuelle accessible via ssh avec `vagrant ssh`, et vous pouvez voir le site de don sur `localhost:8383`. +- Vous pouvez faire vos modifications directement dans le dossier du dépôt, car il est lié sur la machine virtuelle, sous le chemin `/vagrant`. + +## Développement + +## Contributions + +Les contributions sont bienvenues ! Pour commencer, vous pouvez regarder les tickets ouvert sur le dépôt. Certaines sont marqués comme étant "besoin d'aide", et ne demandent que vous pour être résoluts ! + +Afin de faciliter le développement collaboratif, vous pouvez commencer par commenter le ticket qui vous intéresse, et expliquer ce que vous comptez faire. + +Sinon, vous pouvez aussi ouvrir un ticket pour proposer des améliorations, des suggestions, ou autre. + +Vous pouvez ensuite ouvrir une merge request, et une fois relue, elle sera mise en place ! À ce stade, merci beaucoup :) + +---- + + # LQDN soutien This is a php application based on Fat-Free-Framework and a MySQL database that handles donations and presents offered to donors to La Quadrature du Net @@ -45,9 +93,9 @@ and for developers you may also need : This software uses: * **PHP7.3** -* **phinx** to inject database schema and initial data / accounts into MySQL see https://phinx.org/ +* **phinx** to inject database schema and initial data / accounts into MySQL see https://phinx.org/ * **php-cs-fixer** to check php code for errors and fix coding standard issues, see https://github.com/FriendsOfPHP/PHP-CS-Fixer -* **doctrine/dbal** as ORM see https://github.com/doctrine/dbal +* **doctrine/dbal** as ORM see https://github.com/doctrine/dbal * **f3 framework** as main view / controller framework. see https://fatfreeframework.com/ Look at `app/` folder for most Controllers, and `app/routes.ini` for the application routes (the URLs) @@ -56,7 +104,7 @@ Look at `app/` folder for most Controllers, and `app/routes.ini` for the applica * `app/env` must contains the proper values : database connection, bank visa payment codes, and ENV=production at the bottom. * point your Nginx or Apache with PHP5.6 to the `www/` folder, and either allow Rewrite Rules (a2enmod rewrite) or point every URL not being a file to index.php (see below for an nginx sample) -* use AND FORCE https usage, it's 2018, people ;) +* use AND FORCE https usage, it's 2018, people ;) Nginx configuration sample: @@ -71,5 +119,3 @@ location / { try_files $uri /index.php$is_args$args; } ``` - - -- GitLab From c3842df6212a429432afe3db62cc4fce795828ec Mon Sep 17 00:00:00 2001 From: nono Date: Thu, 6 Jan 2022 16:16:29 +0100 Subject: [PATCH 02/39] Ajout d'un dossier doc/ avec deux fichiers pour acceuilir de la documentation --- doc/ARCHITECTURE.md | 0 doc/DOCUMENTATION.md | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 doc/ARCHITECTURE.md create mode 100644 doc/DOCUMENTATION.md diff --git a/doc/ARCHITECTURE.md b/doc/ARCHITECTURE.md new file mode 100644 index 0000000..e69de29 diff --git a/doc/DOCUMENTATION.md b/doc/DOCUMENTATION.md new file mode 100644 index 0000000..e69de29 -- GitLab From 9e3d9649e10f4363870fe35dcb3fdf295fcc1756 Mon Sep 17 00:00:00 2001 From: thomas <9033-thomas@users.noreply.git.laquadrature.net> Date: Tue, 11 Jan 2022 00:47:05 +0100 Subject: [PATCH 03/39] Remove any mention of the pi-plomas from the frontend --- app/view/backend/contrepartie.html | 23 +------ app/view/backend/contreparties.html | 25 ++------ app/view/backend/contreparties_tableau.html | 5 -- app/view/backend/dons.html | 4 -- app/view/backend/fusion_user.html | 18 ++---- app/view/backend/user.html | 55 ++++------------ app/view/campaign/donation.html | 16 +---- app/view/campaign/home.html | 4 -- app/view/user/contreparties.html | 13 +--- app/view/user/dons.html | 9 +-- app/view/user/infos.html | 25 +------- app/view/user/perso.html | 57 +---------------- locales/en_US/LC_MESSAGES/messages.po | 69 +++------------------ locales/fr_FR/LC_MESSAGES/messages.po | 58 +---------------- ref/v1/index.html | 52 ++-------------- www/static/js/admin.js | 6 -- www/static/js/campaign.js | 24 ------- www/static/js/perso.js | 20 ------ 18 files changed, 50 insertions(+), 433 deletions(-) diff --git a/app/view/backend/contrepartie.html b/app/view/backend/contrepartie.html index eed4b98..21e2660 100644 --- a/app/view/backend/contrepartie.html +++ b/app/view/backend/contrepartie.html @@ -14,7 +14,6 @@ @@ -28,14 +27,6 @@ - - - -
@@ -96,22 +87,12 @@ document.forms['f'].nom.focus(); function select_span() { - if (document.forms['f'].quoi.value=='piplome') { - $('#quoi_pdf').show(); - $('#quoi_taille').hide(); - } else { - $('#quoi_pdf').hide(); - $('#quoi_taille').show(); - } + $('#quoi_taille').show(); select_taille(); } function select_taille() { - if (document.forms['f'].quoi.value=='piplome') { - document.forms['f'].taille.value = document.forms['f'].url.value; - } else { - document.forms['f'].taille.value = document.forms['f'].size.value; - } + document.forms['f'].taille.value = document.forms['f'].size.value; } window.onload = function() { diff --git a/app/view/backend/contreparties.html b/app/view/backend/contreparties.html index 84ace0e..aa35860 100644 --- a/app/view/backend/contreparties.html +++ b/app/view/backend/contreparties.html @@ -8,14 +8,11 @@ -{{ @pibag }} / {{ @piplome }} / {{ @pishirt }} / {{ @hoodie }} / {{ @status }} +{{ @pibag }} / {{ @pishirt }} / {{ @hoodie }} / {{ @status }} - @@ -46,7 +43,7 @@ Email Date Quoi - Taille/Piplome + Taille Adresse Statut Commentaire @@ -61,20 +58,12 @@ {{ @row.datec }} {{ @row.quoi }} - + - {{ @row.pdf_url }} - ({{ @row.pdf_nom }}) +   - - -   - - - {{ @atailles[@row.taille] }} - - + {{ @atailles[@row.taille] }} @@ -105,10 +94,6 @@ - Annulé - - - - PDF - diff --git a/app/view/backend/contreparties_tableau.html b/app/view/backend/contreparties_tableau.html index a86a681..afc530c 100644 --- a/app/view/backend/contreparties_tableau.html +++ b/app/view/backend/contreparties_tableau.html @@ -18,11 +18,6 @@ Fait - - Piplômes - {{ @piplome_s1 }} - {{ @piplome_s2 }} - Pishirts {{ @pishirt_s1 }} diff --git a/app/view/backend/dons.html b/app/view/backend/dons.html index 9d4dd9b..d859222 100644 --- a/app/view/backend/dons.html +++ b/app/view/backend/dons.html @@ -58,7 +58,6 @@ Email Don Adresse - PDF Statut Actions @@ -76,7 +75,6 @@ {{ @row.codepostal }} {{ @row.ville }}
{{ @row.pays }} - {{ @row.pdf }} {{ @DONS_STATUTS[@row.status] }} Editer @@ -87,8 +85,6 @@ Invalider - - - Regénérer le PDF diff --git a/app/view/backend/fusion_user.html b/app/view/backend/fusion_user.html index 68c239d..4ec48eb 100644 --- a/app/view/backend/fusion_user.html +++ b/app/view/backend/fusion_user.html @@ -22,7 +22,7 @@ Id du parent Date Quoi - Taille/Piplome + Taille Statut Commentaire @@ -35,20 +35,12 @@ {{ @row.datec }} {{ @row.quoi }} - + - {{ @row.pdf_url }} - ({{ @row.pdf_nom }}) +   - - -   - - - {{ @atailles[@row.taille] }} - - + {{ @atailles[@row.taille] }} @@ -71,7 +63,6 @@ Date Don Adresse - PDF Statut @@ -80,7 +71,6 @@ {{ @row.id }} {{ @row.datec }} {{ @row.somme }} - {{ @row.pdf }} {{ @row.status }} diff --git a/app/view/backend/user.html b/app/view/backend/user.html index 1790828..d34069f 100644 --- a/app/view/backend/user.html +++ b/app/view/backend/user.html @@ -110,7 +110,7 @@ Id du parent Date Quoi - Taille/Piplome + Taille Adresse Statut Actions @@ -123,22 +123,14 @@ {{ @row.datec }} {{ @row.quoi }} - - - {{ @row.pdf_url }} - ({{ @row.pdf_nom }}) - - - - -   - - - {{ @TAILLES[@row.taille] }} - - - - + + +   + + + {{ @TAILLES[@row.taille] }} + + @@ -169,10 +161,6 @@ - Annulé - - - - PDF - @@ -194,7 +182,6 @@ ID Date Don - PDF Statut Actions @@ -204,16 +191,6 @@ {{ @row.id }} {{ @row.datec }} {{ @row.somme }} - - - - PDF - - - PDF - - - {{ @DONS_STATUTS[@row.status] }} Editer @@ -243,22 +220,12 @@ document.forms['f'].nom.focus(); function select_span() { - if (document.forms['f'].quoi.value=='piplome') { - $('#quoi_pdf').show(); - $('#quoi_taille').hide(); - } else { - $('#quoi_pdf').hide(); - $('#quoi_taille').show(); - } + $('#quoi_taille').show(); select_taille(); } function select_taille() { - if (document.forms['f'].quoi.value=='piplome') { - document.forms['f'].taille.value = document.forms['f'].url.value; - } else { - document.forms['f'].taille.value = document.forms['f'].size.value; - } + document.forms['f'].taille.value = document.forms['f'].size.value; } window.onload = function() { diff --git a/app/view/campaign/donation.html b/app/view/campaign/donation.html index 9f709bb..3d5b6e7 100644 --- a/app/view/campaign/donation.html +++ b/app/view/campaign/donation.html @@ -27,14 +27,6 @@

{{ _("En remerciement de votre don, vous obtiendrez :") }}

-
- -

{{ _("En 0 mois de dons.") }}

-
-
- -

{{ _("En 0 mois de dons.") }}

-

{{ _("En 0 mois de dons.") }}

@@ -48,11 +40,9 @@

{{ _("En 0 mois de dons.") }}


- - -

{{ _("Votre pi-plôme en tirage original et un pi-bag très pratique") }}

- - +

{{ _("Un pi-bag très pratique") }}

+ +
diff --git a/app/view/campaign/home.html b/app/view/campaign/home.html index d12ae19..d471d99 100644 --- a/app/view/campaign/home.html +++ b/app/view/campaign/home.html @@ -125,10 +125,6 @@

{{ _("En remerciement de
votre don, vous recevrez :") }}

-
- -
{{ _("Un πplome
(cumul de 42€)") }}
-
{{ _("Un pibag
(cumul de 64€)") }}
diff --git a/app/view/user/contreparties.html b/app/view/user/contreparties.html index 5e3a6f0..b20bd56 100644 --- a/app/view/user/contreparties.html +++ b/app/view/user/contreparties.html @@ -12,19 +12,12 @@ {{ @contrepartie.quoi }} - + - ({{ @contrepartie.taille }}) +   - - -   - - - ({{ @atailles[@contrepartie.taille] }}) - - + ({{ @atailles[@contrepartie.taille] }}) diff --git a/app/view/user/dons.html b/app/view/user/dons.html index 51088ec..d208174 100644 --- a/app/view/user/dons.html +++ b/app/view/user/dons.html @@ -28,7 +28,6 @@ {{ _("Date") }} {{ _("Type") }} {{ _("Montant") }} - {{ _("Pi-plôme") }} {{ _("Action") }} @@ -43,13 +42,7 @@ {{ @don.somme }} - - - {{ _("Voir le pi-plôme") }} - - -   - +   {{ _("Imprimer un reçu pour ce don") }} diff --git a/app/view/user/infos.html b/app/view/user/infos.html index d5db158..21241f0 100644 --- a/app/view/user/infos.html +++ b/app/view/user/infos.html @@ -88,39 +88,29 @@
- -