Skip to content

Commit

Permalink
Merge branch 'master' into tests_migration_clever_cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
agallou committed Sep 21, 2024
2 parents ca93de9 + c691196 commit 1df914a
Show file tree
Hide file tree
Showing 61 changed files with 356 additions and 912 deletions.
7 changes: 7 additions & 0 deletions app/Resources/views/admin/event/bankwires.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@

{% if pendingBankwires|length > 0 %}
<form method="post" style="width:auto;">
<div class="ui message info">
<p>
Au clic sur le bouton "Virement reçu", la facture sera indiquée comme payée,
le contact de facturation recevra par mail la facture, et toutes les personnes
inscrites recevront par mail leur confirmation d'inscription.
</p>
</div>
<table class="ui table striped compact celled">
<thead>
<tr>
Expand Down
96 changes: 48 additions & 48 deletions app/Resources/views/blog/planning.html.twig
Original file line number Diff line number Diff line change
@@ -1,69 +1,70 @@
{% if not planningDisplayable %}
Le planning est en cours d'élaboration, il sera dévoilé sous peu.
{% else %}
<script type="application/ld+json">
{{ jsonld|json_encode|raw }}
</script>
<script type="application/ld+json">
{{ jsonld|json_encode|raw }}
</script>

<div class="bloc_jour">
{% for date, planningForADay in planning %}
<table class="planning_agenda">
<caption>Jour {{ loop.index }} : {{ date }}</caption>
<thead>
<tr>
<th class="horaire" colspan="2">&nbsp;</th>
{% for room in rooms %}
<th class="activite">{{ room.name }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
<div class="bloc_jour">
{% for date, planningForADay in planning %}
<table class="planning_agenda">
<caption>Jour {{ loop.index }} : {{ date }}</caption>
<thead>
<tr>
<th class="horaire" colspan="2">&nbsp;</th>
{% for room in rooms %}
<th class="activite">{{ room.name }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{#
Le tableau hasConf contiens pour chaque salle le nombre d'itérations à ignorer pour les td vides
Ce tableau est indexé selon les *noms* des salles car si on l'index par id, le merge va réindexer
les valeurs. Le merge étant le seul moyen de modifier l'entrée d'un tableau dans twig, ce tableau
serait alors inutile
#}
Le tableau hasConf contiens pour chaque salle le nombre d'itérations à ignorer pour les td vides
Ce tableau est indexé selon les *noms* des salles car si on l'index par id, le merge va réindexer
les valeurs. Le merge étant le seul moyen de modifier l'entrée d'un tableau dans twig, ce tableau
serait alors inutile
#}
{% set hasConf = {} %}
{% for hour in hourMin..hourMax %}
{% set hour = "%02d"|format(hour) %}
{% set numberOfRows = 60/precision %}
{% for row in 1..numberOfRows %}
{% set minutes = "%02d"|format(precision*loop.index0) %}
{% for _ in 1..numberOfRows %}
{% set minutes = "%02d"|format(precision*(loop.index-1)) %}
{# On crée une ligne pour chaque espace de 5 minutes mais on affiche les heures que les 1/4h #}
<tr>
{% if loop.index0 * precision % 60 == 0 %}
{% if loop.index == 1 %}
<td class="col_heure" rowspan="{{ 60 / precision }}" nowrap="nowrap">
{# @TODO Meilleur affichage heures et minutes #}
{{ hour }}h
</td>
{% endif %}
<td class="col_heure">{{ "%02d"|format(precision*loop.index0) }}</td>
<td class="col_heure">{{ minutes }}</td>

{% if planningForADay[date ~ " " ~ hour ~ ":" ~ minutes] is defined %}
{% set slot = planningForADay[date ~ " " ~ hour ~ ":" ~ minutes] %}
{% for room in rooms %}
{% if slot[room.id] is defined %}
{% set row = slot[room.id] %}
{% set numberOfRowForThisSlot = row.length / precision %}
{% set rows = slot[room.id] %}
{% set numberOfRowForThisSlot = rows|first.length / precision %}

{% set hasConf = hasConf|merge({(room.name|trim):numberOfRowForThisSlot}) %}
{# Boucle pour afficher chaque événement dans la salle #}
<td rowspan="{{ numberOfRowForThisSlot }}" width="21%" class="conf {{ cycle(['conf_odd', 'conf_even'], loop.index0) }}">
<p>
<a href="{{ row.program_page_prefix }}#{{ row.talk.id }}" name="ag_sess_{{ row.talk.id }}">
{{ row.talk.title }}
<div class="conferencier">
{% for speaker in row[".aggregation"].speaker %}
{% if loop.index > 1 %} / {% endif %}
{{ speaker.label }}
{% if speaker.company %}
- {{ speaker.company }}
{% endif %}
{% for row in rows %}
<p>
<a href="{{ row.program_page_prefix }}#{{ row.talk.id }}" name="ag_sess_{{ row.talk.id }}">
{{ row.talk.title }}
<div class="conferencier">
{% for speaker in row[".aggregation"].speaker %}
{% if loop.index > 1 %} / {% endif %}
{{ speaker.label }}
{% if speaker.company %}
- {{ speaker.company }}
{% endif %}
{% endfor %}
</div>
</a>
</p>
{% endfor %}
</div>
</a>
</p>

</td>
{% else %}
{% if hasConf[room.name] is defined and hasConf[room.name] > 0 %}
Expand All @@ -87,12 +88,11 @@
</tr>
{% endfor %}
{% endfor %}

</tbody>
</table>
<br class="page_break">
{% endfor %}
</div>
</tbody>
</table>
<br class="page_break">
{% endfor %}
</div>

{% for event in events %}
<a class="planning-link" href="{{ app.request.getSchemeAndHttpHost() }}/event/{{ event.path }}/calendar">Créer mon planning personnalisé{% if events|length > 1 %} ({{ event.title }}){% endif %}</a>
Expand Down
44 changes: 44 additions & 0 deletions app/Resources/views/site/sitemap.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{% extends ':site:base.html.twig' %}

{% block title %}Plan du site de l'AFUP{% endblock %}

{% macro list(items) %}
<ul>
{% for item in items %}
<li><a href="{{ item.url }}">{{ item.name }}</a></li>
{% endfor %}
</ul>
{% endmacro %}

{% block content %}
<div class="mw1400p center" id="container">
<div class="line" id="main">
<h1>Plan du site</h1>
<div class="row">
<div class="col-md-6">
{{ _self.list(pages) }}

<h2><a href="{{ path('become_member') }}">Adhérer à l'AFUP</a></h2>
<ul>
<li><a href="{{ path('legacy_inscription') }}">Adhérer en tant que particulier</a></li>
<li><a href="{{ path('company_membership') }}">Adhérer en tant qu'entreprise</a></li>
<li><a href="{{ path('admin_login') }}">Se connecter</a></li>
</ul>

<h2><a href="{{ path('talks_list') }}">Historique des conférences</a></h2>
{{ _self.list(talks) }}
</div>
<div class="col-md-6">
<h2>Association</h2>
{{ _self.list(association) }}

<h2><a href="{{ path('company_public_profile_list') }}">Entreprises adhérentes</a></h2>
{{ _self.list(members) }}

<h2><a href="{{ path('news_list') }}">Actualités</a></h2>
{{ _self.list(news) }}
</div>
</div>
</div>
</div>
{% endblock %}
6 changes: 6 additions & 0 deletions app/config/routing/global.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ home:
become_sponsor_latest:
path: /become-sponsor
defaults: {_controller: AppBundle:Lead:becomeSponsorLatest}

sitemap:
path: /plan-du-site
defaults: { _controller: AppBundle:HtmlSitemap:display }
options:
sitemap: true
5 changes: 4 additions & 1 deletion app/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ services:
AppBundle\Controller\LeadController:
autowire: true

AppBundle\Controller\HtmlSitemapController:
autowire: true

AppBundle\Controller\SpeakerSuggestionController:
autowire: true

Expand Down Expand Up @@ -637,7 +640,7 @@ services:
tags:
- {name: form.type}

AppBundle\Subscriber\TalksSitemapSubscriber:
AppBundle\Subscriber\TalksAndNewsSitemapSubscriber:
arguments:
- "@router"
- "@ting"
Expand Down
11 changes: 11 additions & 0 deletions db/migrations/20240718093800_suppression_accreditation_presse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

use Phinx\Migration\AbstractMigration;

class SuppressionAccreditationPresse extends AbstractMigration
{
public function change()
{
$this->execute('DROP TABLE IF EXISTS afup_accreditation_presse');
}
}
11 changes: 11 additions & 0 deletions db/migrations/20240720122300_suppression_blacklist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

use Phinx\Migration\AbstractMigration;

class SuppressionBlacklist extends AbstractMigration
{
public function change()
{
$this->execute('DROP TABLE IF EXISTS afup_blacklist');
}
}
12 changes: 12 additions & 0 deletions db/migrations/20240918112441_cotisation_type.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

use Phinx\Migration\AbstractMigration;

class CotisationType extends AbstractMigration
{
public function change()
{
// avant on était en float(5,2) unsigned
$this->execute("ALTER TABLE afup_cotisations MODIFY montant float(6,2) unsigned NOT NULL DEFAULT '0.00'");
}
}
7 changes: 0 additions & 7 deletions db/seeds/Compta.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ public function run()
'idcompte' => 1,
'numero' => '',
'obs_regl' => '',
'idoperation' => 0,
'idmode_regl' => 0,
'date_regl' => '0000-00-00',
],
[
'id' => '2',
Expand All @@ -55,10 +52,6 @@ public function run()
'idclef' => 2,
'numero' => '',
'obs_regl' => '',
'idoperation' => 0,

'idmode_regl' => 0,
'date_regl' => '0000-00-00',
],
[
'id' => '3',
Expand Down
2 changes: 1 addition & 1 deletion db/seeds/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function run()
'date_fin_saisie_nuites_hotel' => $event - $oneDayInSeconds * 7,
'place_name' => 'Paris',
'place_address' => 'Marriott Rive Gauche',
'date_annonce_planning' => date('U', $event),
'date_annonce_planning' => date('Y-m-d H:i:s', $now - $oneMonthInSeconds),
'transport_information_enabled' => 1,
'has_prices_defined_with_vat' => 1,
],
Expand Down
2 changes: 1 addition & 1 deletion db/seeds/Feuilles.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ private function prepareFeuilles(array $items, $parentId, &$baseId = null)
$preparedFeuiles[$currentId] = [
'id' => ($currentId = ++$baseId),
'nom' => $item['nom'],
'lien' => $lien,
'lien' => $item['lien'] ?? null,
'id_parent' => $parentId,
'etat' => 1,
];
Expand Down
4 changes: 0 additions & 4 deletions db/seeds/Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ public function run()
'code_postal' => '93501-1100',
'ville' => 'Mojave, CA',
'roles' => '',
'adresse' => '',
],
[
'id' => self::ID_USER_PERSONNE_LIE_PERSONNE_MORALE_FIXED_COTISATIONS,
Expand All @@ -116,7 +115,6 @@ public function run()
'roles' => '["ROLE_COMPANY_MANAGER"]',
'id_personne_morale' => self::ID_PERSONNE_MORALE_HELIOS_AEROSPACE,
'niveau_modules' => '00000',
'roles' => '',
'adresse' => '',
],
[
Expand All @@ -130,7 +128,6 @@ public function run()
'roles' => '["ROLE_COMPANY_MANAGER"]',
'id_personne_morale' => self::ID_PERSONNE_MORALE_MY_CORP,
'niveau_modules' => '00000',
'roles' => '',
'adresse' => '',
],
[
Expand All @@ -145,7 +142,6 @@ public function run()
'id_personne_morale' => self::ID_PERSONNE_MORALE_MY_CORP,
'niveau_modules' => '00000',
'etat' => 1,
'roles' => '',
'adresse' => '',
],
[
Expand Down
3 changes: 3 additions & 0 deletions htdocs/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ RewriteRule ^ - [END]
RewriteRule ^m/ /event/latest/calendar [R=301,L]
RewriteRule ^calendrier/?(index.php)? /event/latest/calendar [R=301,L]
RewriteRule ^forumphp/? https://event.afup.org [R=301,L]
RewriteRule ^ask/barometre/? https://barometre.afup.org [R=301,L]
RewriteRule ^ask/forum/? https://event.afup.org [R=301,L]
RewriteRule ^ask/? / [R=301,L]

## This url are handled by symfony
RewriteRule (event|connect|_|association|talks|meetups|blog|admin|p|home|news|techno_watch|member|rss.xml)/? /app.php [END]
56 changes: 0 additions & 56 deletions htdocs/ask/barometre/2013.html

This file was deleted.

Loading

0 comments on commit 1df914a

Please sign in to comment.