Skip to content

Commit

Permalink
Rangement des controllers et amélioration de l'extension Twig
Browse files Browse the repository at this point in the history
  • Loading branch information
stakovicz committed Jan 26, 2025
1 parent 764cb73 commit fa012aa
Show file tree
Hide file tree
Showing 62 changed files with 156 additions and 186 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ behat:
./bin/behat

### Tests fonctionnels
test-functional: data config htdocs/uploads tmp
test-functional: data htdocs/uploads tmp
CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) stop dbtest apachephptest mailcatcher
CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) up -d dbtest apachephptest mailcatcher
CURRENT_UID=$(CURRENT_UID) $(DOCKER_COMPOSE_BIN) run --no-deps --rm cliphp ./bin/behat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{% block submenu %}
{{ render(controller(
'AppBundle\\Controller\\SecondaryMenuController::displayAction',
'AppBundle\\Controller\\Website\\SecondaryMenuController::displayAction',
{ 'feuille_id': constant('Afup\\Site\\Corporate\\Feuille::ID_FEUILLE_ASSOCIATION') }
)) }}
{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion app/Resources/views/site/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
</div>
<div class="col-md-6 tablet-hidden">
<label class="pre-footer-newsletter-title" for="subscriber_email">Inscription à la newsletter</label>
{{ render(controller('AppBundle:Newsletter:subscribeForm')) }}
{{ render(controller('AppBundle:Website\\Newsletter:subscribeForm')) }}
<span class="pre-footer-newsletter-caption">Tous les trois mois, des nouvelles de L'AFUP</span>
</div>
<div class="col-md-1 pre-footer-icon">
Expand Down
2 changes: 1 addition & 1 deletion app/Resources/views/site/become_member.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

{% block content %}
{{ render(controller(
'AppBundle\\Controller\\SecondaryMenuController::displayAction',
'AppBundle\\Controller\\Website\\SecondaryMenuController::displayAction',
{ 'feuille_id': constant('Afup\\Site\\Corporate\\Feuille::ID_FEUILLE_ASSOCIATION') }
)) }}
<div class="mw1400p center" id="container">
Expand Down
2 changes: 1 addition & 1 deletion app/Resources/views/site/cms_page/display.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

{% block content %}
{{ render(controller(
'AppBundle\\Controller\\SecondaryMenuController::displayAction',
'AppBundle\\Controller\\Website\\SecondaryMenuController::displayAction',
{ 'feuille_id': rubrique.feuille_associee }
)) }}
<div class="mw1400p center" id="container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{% block submenu %}
{{ render(controller(
'AppBundle\\Controller\\SecondaryMenuController::displayAction',
'AppBundle\\Controller\\Website\\SecondaryMenuController::displayAction',
{ 'feuille_id': constant('Afup\\Site\\Corporate\\Feuille::ID_FEUILLE_ASSOCIATION') }
)) }}
{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion app/Resources/views/site/meetups/list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

{% block content %}
{{ render(controller(
'AppBundle\\Controller\\SecondaryMenuController::displayAction',
'AppBundle\\Controller\\Website\\SecondaryMenuController::displayAction',
{ 'feuille_id': constant('Afup\\Site\\Corporate\\Feuille::ID_FEUILLE_ANTENNES') }
)) }}

Expand Down
2 changes: 1 addition & 1 deletion app/Resources/views/site/news/list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{% endif %}

{{ render(controller(
'AppBundle\\Controller\\PagerController::displayAction',
'AppBundle\\Controller\\Website\\PagerController::displayAction',
{
'total_items': total_items,
'current_page': current_page,
Expand Down
2 changes: 1 addition & 1 deletion app/Resources/views/site/offices.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@

{% block content %}
{{ render(controller(
'AppBundle\\Controller\\SecondaryMenuController::displayAction',
'AppBundle\\Controller\\Website\\SecondaryMenuController::displayAction',
{ 'feuille_id': constant('Afup\\Site\\Corporate\\Feuille::ID_FEUILLE_ANTENNES') }
)) }}
<div class="mw1400p center" id="container">
Expand Down
2 changes: 1 addition & 1 deletion app/Resources/views/site/techletter/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

{% block content %}
{{ render(controller(
'AppBundle\\Controller\\SecondaryMenuController::displayAction',
'AppBundle\\Controller\\Website\\SecondaryMenuController::displayAction',
{ 'feuille_id': constant('Afup\\Site\\Corporate\\Feuille::ID_FEUILLE_NOS_ACTIONS') }
)) }}

Expand Down
2 changes: 1 addition & 1 deletion app/config/routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ company_public_profile_list:

feed_rss:
path: /rss.xml
defaults: { _controller: AppBundle\Controller\RssFeedController }
defaults: { _controller: AppBundle\Controller\Website\RssFeedController }

presta_sitemap:
resource: "@PrestaSitemapBundle/Resources/config/routing.yml"
Expand Down
2 changes: 1 addition & 1 deletion app/config/routing/admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ admin_home:

admin_vote:
path: /vote/
defaults: {_controller: AppBundle:Vote:admin}
defaults: {_controller: AppBundle:Admin\Vote:admin}

admin_relances:
path: /association/relances/{page}
Expand Down
2 changes: 1 addition & 1 deletion app/config/routing/cms_page.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
cms_page_display:
path: /{code}
defaults: {_controller: AppBundle:CmsPage:display}
defaults: { _controller: AppBundle:Website\CmsPage:display }
70 changes: 35 additions & 35 deletions app/config/routing/event.yml
Original file line number Diff line number Diff line change
@@ -1,149 +1,149 @@
event_index:
path: /
defaults: {_controller: AppBundle:Event:index}
defaults: { _controller: AppBundle:Event\Event:index }
options:
sitemap: true

event_index_speaker_infos:
path: /speaker-infos
defaults: {_controller: AppBundle:Event:speakerInfosIndex}
defaults: { _controller: AppBundle:Event\Event:speakerInfosIndex }

event:
path: /{eventSlug}
defaults: {_controller: AppBundle:Event:event}
defaults: { _controller: AppBundle:Event\Event:event }

vote_index:
path: /{eventSlug}/vote
defaults: {_controller: AppBundle:Vote:index, all: false, page: 1}
defaults: { _controller: AppBundle:Admin\Vote:index, all: false, page: 1 }

vote_index_paginated:
path: /{eventSlug}/vote/{page}
defaults: {_controller: AppBundle:Vote:index, all: false}
defaults: { _controller: AppBundle:Admin\Vote:index, all: false }
requirements:
page: '\d+'

vote_all:
path: /{eventSlug}/vote-all
defaults: {_controller: AppBundle:Vote:index, all: true, page: 1}
defaults: { _controller: AppBundle:Admin\Vote:index, all: true, page: 1 }

speaker-suggestion:
path: /{eventSlug}/speaker-suggestion
defaults: {_controller: AppBundle:SpeakerSuggestion:index }
defaults: { _controller: AppBundle:Event\SpeakerSuggestion:index }

vote_all_paginated:
path: /{eventSlug}/vote-all/{page}
defaults: {_controller: AppBundle:Vote:index, all: true}
defaults: { _controller: AppBundle:Admin\Vote:index, all: true }
requirements:
page: '\d+'

vote_new:
path: /{eventSlug}/vote/new/{talkId}
defaults: {_controller: AppBundle:Vote:new}
methods: [POST]
defaults: { _controller: AppBundle:Event\Vote:new }
methods: [ POST ]
requirements:
talkId: '\d+'

cfp:
path: /{eventSlug}/cfp
defaults: {_controller: AppBundle\Controller\Event\CFP\IndexAction}
defaults: { _controller: AppBundle\Controller\Event\CFP\IndexAction }

cfp_speaker:
path: /{eventSlug}/cfp/speaker
defaults: {_controller: AppBundle\Controller\Event\CFP\SpeakerAction}
defaults: { _controller: AppBundle\Controller\Event\CFP\SpeakerAction }

cfp_propose:
path: /{eventSlug}/cfp/propose
defaults: {_controller: AppBundle\Controller\Event\CFP\ProposeAction}
defaults: { _controller: AppBundle\Controller\Event\CFP\ProposeAction }

cfp_edit:
path: /{eventSlug}/cfp/{talkId}
defaults: {_controller: AppBundle\Controller\Event\CFP\EditAction}
defaults: { _controller: AppBundle\Controller\Event\CFP\EditAction }
requirements:
talkId: '\d+'

cfp_invite:
path: /{eventSlug}/cfp/invite/{talkId}-{token}
defaults: {_controller: AppBundle\Controller\Event\CFP\InviteAction}
defaults: { _controller: AppBundle\Controller\Event\CFP\InviteAction }
requirements:
talkId: '\d+'
token: '.+'

sponsor_ticket_home:
path: /{eventSlug}/tickets/sponsor
defaults: {_controller: AppBundle:Ticket:sponsorTicket}
defaults: { _controller: AppBundle:Event\Ticket:sponsorTicket }

sponsor_ticket_form:
path: /{eventSlug}/tickets/sponsor-form
defaults: {_controller: AppBundle:Ticket:sponsorTicketForm}
defaults: { _controller: AppBundle:Event\Ticket:sponsorTicketForm }

ticket:
path: /{eventSlug}/tickets
defaults: {_controller: AppBundle:Ticket:ticket}
defaults: { _controller: AppBundle:Event\Ticket:ticket }

ticket_payment:
path: /{eventSlug}/tickets/payment
defaults: {_controller: AppBundle:Ticket:payment}
defaults: { _controller: AppBundle:Event\Ticket:payment }

ticket_paybox_callback:
path: /{eventSlug}/tickets/paybox-callback
defaults: {_controller: AppBundle:Ticket:payboxCallback}
defaults: { _controller: AppBundle:Event\Ticket:payboxCallback }

ticket_paybox_redirect:
path: /{eventSlug}/tickets/paybox-redirect
defaults: {_controller: AppBundle:Ticket:payboxRedirect}
defaults: { _controller: AppBundle:Event\Ticket:payboxRedirect }

sponsor_leads:
path: /{eventSlug}/sponsor/become-sponsor
defaults: {_controller: AppBundle:Lead:becomeSponsor}
defaults: { _controller: AppBundle:Event\Lead:becomeSponsor }

sponsor_leads_post:
path: /{eventSlug}/sponsor/thank-you
defaults: {_controller: AppBundle:Lead:postLead}
defaults: { _controller: AppBundle:Event\Lead:postLead }

sponsor_scan:
path: /{eventSlug}/sponsor/scan
defaults: {_controller: AppBundle:SponsorScan:index}
defaults: { _controller: AppBundle:Event\SponsorScan:index }

sponsor_scan_export:
path: /{eventSlug}/sponsor/scan/export
defaults: {_controller: AppBundle:SponsorScan:export}
defaults: { _controller: AppBundle:Event\SponsorScan:export }

sponsor_scan_new:
path: /{eventSlug}/sponsor/scan/new
defaults: {_controller: AppBundle:SponsorScan:new}
defaults: { _controller: AppBundle:Event\SponsorScan:new }

sponsor_scan_flash:
path: /{eventSlug}/sponsor/scan/flash/{code}
defaults: {_controller: AppBundle:SponsorScan:flash}
defaults: { _controller: AppBundle:Event\SponsorScan:flash }

sponsor_scan_delete:
path: /{eventSlug}/sponsor/scan/delete/{scanId}
defaults: {_controller: AppBundle:SponsorScan:delete}
defaults: { _controller: AppBundle:Event\SponsorScan:delete }

speaker-infos:
path: /{eventSlug}/speaker-infos
defaults: {_controller: AppBundle\Controller\Event\SpeakerPageAction }
defaults: { _controller: AppBundle\Controller\Event\SpeakerPageAction }

speaker-infos-files:
path: /{eventSlug}/speaker-infos/files/{speakerId}/{filename}
defaults: {_controller: AppBundle\Controller\Event\SpeakerFilesAction }
defaults: { _controller: AppBundle\Controller\Event\SpeakerFilesAction }

planning_ics:
path: /{eventSlug}/planning.ics
defaults: {_controller: AppBundle:Event:planningIcs}
defaults: { _controller: AppBundle:Event\Event:planningIcs }

event_calendar_latest:
path: /latest/calendar
defaults: {_controller: AppBundle:Event:calendarLatest}
defaults: { _controller: AppBundle:Event\Event:calendarLatest }

event_calendar:
path: /{eventSlug}/calendar
defaults: {_controller: AppBundle:Event:calendar}
defaults: { _controller: AppBundle:Event\Event:calendar }

planning_json:
path: /{eventSlug}/planning.json
defaults: {_controller: AppBundle:Event:planningJson}
defaults: { _controller: AppBundle:Event\Event:planningJson }

openfeedback_json:
path: /{eventSlug}/openfeedback.json
defaults: {_controller: AppBundle:Event:openfeedbackJson}
defaults: { _controller: AppBundle:Event\Event:openfeedbackJson }
6 changes: 3 additions & 3 deletions app/config/routing/global.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
home:
path: /home
defaults: {_controller: AppBundle:Home:display}
defaults: { _controller: AppBundle:Website\Home:display }
options:
sitemap: true

become_sponsor_latest:
path: /become-sponsor
defaults: {_controller: AppBundle:Lead:becomeSponsorLatest}
defaults: { _controller: AppBundle:Event\Lead:becomeSponsorLatest }

sitemap:
path: /plan-du-site
defaults: { _controller: AppBundle:HtmlSitemap:display }
defaults: { _controller: AppBundle:Website\HtmlSitemap:display }
options:
sitemap: true
2 changes: 1 addition & 1 deletion app/config/routing/meetups.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
meetups_list:
path: /
defaults: {_controller: AppBundle:Meetups:list}
defaults: { _controller: AppBundle:Website\Meetups:list }
options:
sitemap: true
30 changes: 15 additions & 15 deletions app/config/routing/member.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
member_index:
path: /
defaults: {_controller: AppBundle:Member:index}
defaults: { _controller: AppBundle:Website\Member:index }

member_contact:
path: /contact
defaults: {_controller: AppBundle:MemberShip:contactDetails}
defaults: { _controller: AppBundle:Website\MemberShip:contactDetails }

member_membership_fee:
path: /membership-fee
defaults: {_controller: AppBundle:MemberShip:membershipFee}
defaults: { _controller: AppBundle:Website\MemberShip:membershipFee }

member_membership_fee_download:
path: /membership-fee/download
defaults: {_controller: AppBundle:MemberShip:membershipFeeDownload}
defaults: { _controller: AppBundle:Website\MemberShip:membershipFeeDownload }

member_membership_fee_send_mail:
path: /membership-fee/send-mail
defaults: {_controller: AppBundle:MemberShip:membershipFeeSendMail}
defaults: { _controller: AppBundle:Website\MemberShip:membershipFeeSendMail }

member_general_meeting:
path: /general-meeting
defaults: {_controller: AppBundle:MemberShip:generalMeeting}
defaults: { _controller: AppBundle:Website\MemberShip:generalMeeting }

member_general_meeting_vote:
path: /general-meeting/vote
defaults: {_controller: AppBundle:MemberShip:generalMeetingVote}
defaults: { _controller: AppBundle:Website\MemberShip:generalMeetingVote }

member_general_meeting_reports_download:
path: /general-meeting-report-download/{filename}
defaults: {_controller: AppBundle:MemberShip:generalMettingDownloadReport}
defaults: { _controller: AppBundle:Website\MemberShip:generalMettingDownloadReport }

member_techletter:
path: /techletter
defaults: {_controller: AppBundle:MemberShip:techletter}
defaults: { _controller: AppBundle:Website\MemberShip:techletter }

member_techletter_unsubscribe:
path: /techletter-unsubscribe
defaults: {_controller: AppBundle:MemberShip:techletterUnsubscribe}
defaults: { _controller: AppBundle:Website\MemberShip:techletterUnsubscribe }

member_techletter_subscribe:
path: /techletter-subscribe
defaults: {_controller: AppBundle:MemberShip:techletterSubscribe}
methods: ["POST"]
defaults: { _controller: AppBundle:Website\MemberShip:techletterSubscribe }
methods: [ "POST" ]

admin_company:
path: /company
defaults: {_controller: AppBundle\Controller\Admin\Membership\CompanyAction}
defaults: { _controller: AppBundle\Controller\Admin\Membership\CompanyAction }

admin_company_members:
path: /company/members/{id}
defaults: {_controller: AppBundle\Controller\Admin\Membership\MembersAction, id: ~}
defaults: { _controller: AppBundle\Controller\Admin\Membership\MembersAction, id: ~ }

admin_company_public_profile:
path: /company/public_profile
defaults: {_controller: AppBundle:Website\Member\CompanyPublicProfile:index }
defaults: { _controller: AppBundle:Website\Member\CompanyPublicProfile:index }
Loading

0 comments on commit fa012aa

Please sign in to comment.