Skip to content

Commit

Permalink
Merge branch 'afup:master' into feat-1247-expenses-command
Browse files Browse the repository at this point in the history
  • Loading branch information
stakovicz authored Nov 23, 2023
2 parents af0994a + c51de10 commit db0a7b9
Show file tree
Hide file tree
Showing 148 changed files with 2,501 additions and 1,246 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:

unit:
name: "Unit tests"
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04

strategy:
fail-fast: false
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:

lint:
name: "Linter"
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:

functional:
name: "Functional tests"
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,11 @@ test:


test-functional: data config htdocs/uploads
CURRENT_UID=$(CURRENT_UID) docker-compose stop dbtest apachephptest mailcatcher
CURRENT_UID=$(CURRENT_UID) docker-compose up -d dbtest apachephptest mailcatcher
CURRENT_UID=$(CURRENT_UID) docker-compose stop dbtest apachephptest planetetest mailcatcher
CURRENT_UID=$(CURRENT_UID) docker-compose up -d dbtest apachephptest planetetest mailcatcher
CURRENT_UID=$(CURRENT_UID) docker-compose run --no-deps --rm cliphp ./bin/behat
CURRENT_UID=$(CURRENT_UID) docker-compose stop dbtest apachephptest mailcatcher
CURRENT_UID=$(CURRENT_UID) docker-compose run --no-deps --rm cliphp ./bin/behat -c behat-planete.yml
CURRENT_UID=$(CURRENT_UID) docker-compose stop dbtest apachephptest planetetest mailcatcher

data:
mkdir data
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,16 @@ Lancement des tests unitaires :
```
- Une alternative est d'utiliser la commande `make test` qui effectuer la même action.

Lancement des tests unitaires :
Lancement des tests fonctionnels :
- Se connecter dans le conteneur php `docker/bin/bash`
- Lancer les tests :
- Lancer les tests pour le site web :
```
./bin/behat
```
- Lancer les tests pour le site Planete PHP :
```
./bin/behat -c behat-planete.yml
```
- Une alternative est d'utiliser la commande `make test-functional`, attention cette commande arrête les containeurs de tests à la fin de l'exécution de la suite de test. Si par la suite vous souhaitez lancer un test, il faut bien penser à les allumer de nouveau.

Dans chacun des cas, il est possible de spécifier un test dans la ligne de commande. Exemple: `./bin/behat tests/behat/features/Admin/AdminFeuilles.feature`
Expand All @@ -84,7 +88,7 @@ Il est possible de tester les paiements Paybox en environnement de développemen
Pour cela, les identifiant, site et rang [de test](https://www.paybox.com/espace-integrateur-documentation/comptes-de-tests/) sont déjà configurés dans le fichier parameters.yml par défaut.

Ensuite pour le paiement il faut utiliser ces informations [de carte](https://www.paybox.com/espace-integrateur-documentation/cartes-de-tests/) (celle _"Carte participant au programme 3-D Secure (enrôlée)"_) :
* Numéro de carte : `1111 2222 3333 4444`
* Numéro de carte : `1111222233334444`
* Validité : `12/25`
* CVV : `123`

Expand Down
2 changes: 1 addition & 1 deletion app/Resources/translations/messages.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Language: Language
'Recevoir le dossier': 'Get it'
'Page précédente': 'Previous page'
'Page suivante': 'Next page'
Billetterie: Ticketting
Billetterie: Ticketing
'Vous êtes connecté avec un compte AFUP d''entreprise. Pour acheter des places au tarif AFUP, celles-ci doivent être enregistrées pour les membres de votre adhésion.': 'You are connected with an enterprise membership account. You can only buy tickets for the accounts of your memberships.'
'Vous êtes connecté avec un compte AFUP personnel. Vous pouvez acheter une place au tarif membre pour vous seul.': 'You are connected with a personnal account. You can buy one member ticket for yourself.'
'Attention votre cotisation ne sera plus valable le jour de l''évènement. Vous pouvez commander des billets au tarif AFUP mais vous devrez renouveler votre cotisation pour pouvoir accéder à l''évènement.': 'Please take care of your membership. It won''t be valid at the date of the event. You can order members tickets but you will have to pay your membership fee before the event.'
Expand Down
1 change: 1 addition & 0 deletions app/Resources/translations/validators.fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
'You must be connected with a valid membership to order this ticket.': "Vous devez être connecté et avoir une adhésion en cours de validité pour commander ce billet"
'Please, upload a photo.': "Veuillez ajouter une photo de profil."
'You can only order one ticket "{{ ticket_pretty_name }}".': Vous ne pouvez commander qu'un seul billet "{{ ticket_pretty_name }}"
'You can only order one early bird ticket "{{ ticket_pretty_name }}".': Vous ne pouvez commander qu'un seul billet early bird "{{ ticket_pretty_name }}"
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
"lien": path('member_techletter'),
"is_active": current == "techletter",
},
{
"nom": "Listes de diffusion",
"lien": path('my_groups'),
"is_active": current == "mygroups",
},
{
"nom": "Assemblée générale",
"lien": path('member_general_meeting'),
Expand Down
2 changes: 2 additions & 0 deletions app/Resources/views/admin/planete/feed_list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@
{% if feed.status == 1 %}
{% if testFeeds and feed.id in feedResults|keys %}
{% set color = feedResults[feed.id] ? 'green' : 'red' %}
{% set text = feedResults[feed.id] ? 'validé' : 'erreur' %}
{% endif %}
<i class="flag {{ color|default('blue') }} checkered icon"></i>
{{ text|default('non testé') }}
{% endif %}
</td>
<td style="text-align: right">
Expand Down
1 change: 1 addition & 0 deletions app/Resources/views/admin/speaker/add.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
{{ form_row(form.locality) }}
{{ form_row(form.biography) }}
{{ form_row(form.twitter) }}
{{ form_row(form.mastodon) }}
{{ form_row(form.referent_person) }}
{{ form_row(form.referent_person_email) }}
{{ form_row(form.photoFile) }}
Expand Down
18 changes: 7 additions & 11 deletions app/Resources/views/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,18 @@
<link rel="icon" type="image/png" sizes="64x64" href="{{ asset('/images/favicon.png') }}">
<link rel="apple-touch-icon" sizes="57x57" href="{{ asset('/images/apple-touch-icon.png') }}">
<link rel="alternate" type="application/rss+xml" title="Le flux RSS de l'AFUP" href="{{ path('feed_rss') }}" />
{% if google_analytics_enabled %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', '{{ google_analytics_id }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}

{% block google_analytics %}
{% if google_analytics_enabled %}
{% include 'google_analytics.html.twig' %}
{% endif %}
{% endblock %}
</head>
<body id="body" class="{% block body_css %}{% endblock %}">
<a class="evitement" href="#contenu">Aller au contenu</a>
<div id="afup-global-menu">
<a href="https://afup.org" class="lien-entete lien-entete__active" tabindex="-1">AFUP</a>
<a href="https://event.afup.org" class="lien-entete" tabindex="-1">AFUP Day 2023</a>
<a href="https://event.afup.org" class="lien-entete" tabindex="-1">AFUP Day 2024</a>
<a href="https://barometre.afup.org" class="lien-entete" tabindex="-1">Baromètre</a>
<a href="http://www.planete-php.fr" class="lien-entete" tabindex="-1">Planète PHP</a>
<a href="https://pufa.afup.org" class="lien-entete" tabindex="-1">PUFA</a>
Expand Down
6 changes: 3 additions & 3 deletions app/Resources/views/event/speaker/page.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
{{ form_errors(speakers_contact_form.phone_number) }}
</span>
<span>
{{ form_widget(speakers_contact_form.submit) }}
{{ form_widget(speakers_contact_form.submit, {attr: {title: "Enregistrer le contact"}}) }}
</span>
</div>

Expand Down Expand Up @@ -150,7 +150,7 @@
</div>

<div class="submit-container">
{{ form_widget(speakers_diner_form.submit) }}
{{ form_widget(speakers_diner_form.submit, {attr: {title: "Enregistrer mes préférences pour le restaurant"}}) }}
</div>

{{ form_end(speakers_diner_form) }}
Expand Down Expand Up @@ -196,7 +196,7 @@
</div>

<div class="submit-container">
{{ form_widget(hotel_reservation_form.submit) }}
{{ form_widget(hotel_reservation_form.submit, {attr: {title: "Enregistrer les nuitées"}}) }}
</div>

{{ form_end(hotel_reservation_form) }}
Expand Down
83 changes: 38 additions & 45 deletions app/Resources/views/event/ticket/payment.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
<link rel="stylesheet" href="{{ asset('/css/tickets.css') }}" />
{% endblock %}

{% block google_analytics %}
{% include 'google_analytics.html.twig' %}
{% endblock %}

{% block content %}
<div class="col-md-8">
{% if not invoice.isFree %}
Expand Down Expand Up @@ -45,70 +49,59 @@
<p>
Nous avons bien re&ccedil;u votre inscription et nous vous en remercions !
</p>
Si vous avez la moindre question, n'hésitez pas à contacter <a href="mailto:bonjour@afup.org">bonjour@afup.org</a>.
<p>
Si vous avez la moindre question, n'hésitez pas à contacter <a href="mailto:bonjour@afup.org">bonjour@afup.org</a>.
</p>
<p>Vous allez recevoir dans quelques instants la facture à l'adresse email de facturation.</p>
</div>
{% endif %}
</div>

{% autoescape 'js' %}
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-67701567-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- Google Code for Inscription evenement Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 878368884;
var google_conversion_language = "fr";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "HBjSCKivn2oQ9LDrogM";
var google_conversion_value = {{ invoice.amount }};
var google_conversion_currency = "EUR";
var google_remarketing_only = false;
var google_conversion_id = 878368884;
var google_conversion_language = "fr";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "HBjSCKivn2oQ9LDrogM";
var google_conversion_value = {{ invoice.amount }};
var google_conversion_currency = "EUR";
var google_remarketing_only = false;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/878368884/?value=250.00&amp;currency_code=EUR&amp;label=HBjSCKivn2oQ9LDrogM&amp;guid=ON&amp;script=0"/>
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/878368884/?value={{ invoice.amount }}&amp;currency_code=EUR&amp;label=HBjSCKivn2oQ9LDrogM&amp;guid=ON&amp;script=0"/>
</div>
</noscript>

<script>
_gaq = _gaq || [];
_gaq.push(['_addTrans',
'{{ invoice.reference }}',// transaction ID - required
'{{ event.title }}', // affiliation or store name
'{{ invoice.amount }}', // total - required; Shown as "Revenue" in the
// Transactions report. Does not include Tax and Shipping.
'0', // tax
'0', // shipping
'{{ invoice.city }}', // city
'', // state or province
'{{ invoice.countryId }}' // country
]);
{% for ticket in tickets %}
_gaq.push(['_addItem',
'{{ invoice.reference }}', // transaction ID - necessary to associate item with transaction
'{{ ticket.ticketTypeId }}', // SKU/code - required
'{{ ticket.ticketEventType.ticketType.prettyName }}', // product name
'', // category or variation
'{{ ticket.amount }}', // unit price - required
'1' // quantity - required
]);
{% endfor %}
_gaq.push(['_trackTrans']);
// This purchase event uses a different transaction ID
// from the previous purchase event so Analytics
// doesn't deduplicate the events.
// Learn more: https://support.google.com/analytics/answer/12313109
gtag("event", "purchase", {
transaction_id: "{{ invoice.reference }}",
value: {{ invoice.amount }},
tax: 0,
shipping: 0,
currency: "EUR",
items: [
{% for ticket in tickets %}
{
item_id: "{{ invoice.reference }}",
item_name: "{{ ticket.ticketEventType.ticketType.prettyName }}",
index: {{ loop.index }},
price: {{ ticket.amount }},
quantity: 1
},
{% endfor %}
]
});
</script>
{% endautoescape %}
{% endblock %}
29 changes: 29 additions & 0 deletions app/Resources/views/event/ticket/ticket.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,32 @@
{% endif %}
</div>
{% endblock %}
{% block javascripts %}
{{ parent() }}
{# Debut block standard linkedIn Insights #}
<script type="text/javascript">
_linkedin_partner_id = "5302100";
window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];
window._linkedin_data_partner_ids.push(_linkedin_partner_id);
</script><script type="text/javascript">
(function(l) {
if (!l){window.lintrk = function(a,b){window.lintrk.q.push([a,b])};
window.lintrk.q=[]}
var s = document.getElementsByTagName("script")[0];
var b = document.createElement("script");
b.type = "text/javascript";b.async = true;
b.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js";
s.parentNode.insertBefore(b, s);})(window.lintrk);
</script>
<noscript>
<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=5302100&fmt=gif" />
</noscript>
{# Fin block standard linkedIn Insights #}
{# Debut block conversion linkedIn Insights #}
<script>
document.getElementById("formulaire").addEventListener("submit", function(event) {
window.lintrk('track', { conversion_id: 13844572 });
});
</script>
{# Debut block conversion linkedIn Insights #}
{% endblock %}
9 changes: 9 additions & 0 deletions app/Resources/views/google_analytics.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ google_analytics_id }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{ google_analytics_id }}');
</script>
24 changes: 8 additions & 16 deletions app/Resources/views/site/member/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
</a>
<span class="member-index-item--title">Mes coordonnées</span> : {{ user.label }}
<div class="member-index-item--link">
<a class="button-inverted button__medium" href="{{ href }}">Modifier</a>
<a class="button-inverted button__medium" href="{{ href }}"
title="Modifier les coordonnées">Modifier</a>
</div>
<div class="member-index-item--description">
Modifiez votre adresse de facturation et votre adresse email, changez votre mot de passe
Expand Down Expand Up @@ -104,18 +105,6 @@
</div>
</div>
</div>
<div class="col-md-6 col-sm-12">
<div class="member-index-item">
{% set href = path('my_groups') %}
<a href="{{ href }}">
<i class="fa fa-envelope"></i>
</a>
<span class="member-index-item--title">Listes de diffusion</span>
<div class="member-index-item--link">
<a class="button-inverted button__medium" href="{{ href }}">Gérer mes abonnements</a>
</div>
</div>
</div>
</div>

<div class="container">
Expand Down Expand Up @@ -198,7 +187,8 @@
</a>
<span class="member-index-item--title">Coordonnées</span>
<div class="member-index-item--link">
<a class="button-inverted button__medium" href="{{ href }}">Modifier</a>
<a class="button-inverted button__medium" title="Modifier les coordonnées"
href="{{ href }}">Modifier</a>
</div>
</div>
</div>
Expand All @@ -211,7 +201,8 @@
</a>
<span class="member-index-item--title">Personnes rattachées</span>
<div class="member-index-item--link">
<a class="button-inverted button__medium" href="{{ path('admin_company_members') }}">Modifier</a>
<a class="button-inverted button__medium" title="Modifier les personnes rattachées"
href="{{ path('admin_company_members') }}">Modifier</a>
</div>
</div>
</div>
Expand All @@ -224,7 +215,8 @@
</a>
<span class="member-index-item--title">Profil public</span>
<div class="member-index-item--link">
<a class="button-inverted button__medium" href="{{ href }}">Modifier</a>
<a class="button-inverted button__medium" title="Modifier le profil public"
href="{{ href }}">Modifier</a>
</div>

</div>
Expand Down
Loading

0 comments on commit db0a7b9

Please sign in to comment.