subscribe a person since listByPerson context (issue #19)

This commit is contained in:
2019-05-02 11:35:15 +02:00
parent aa9141be1d
commit ee8f303d25
11 changed files with 478 additions and 11 deletions

View File

@@ -1,6 +1,7 @@
Chill\EventBundle\Entity\Event:
type: entity
table: chill_event_event
repositoryClass: Chill\EventBundle\Repository\EventRepository
id:
id:
type: integer

View File

@@ -39,3 +39,4 @@ chill_event__event_update:
chill_event__list_by_person:
path: /{person_id}/list
defaults: { _controller: "ChillEventBundle:Event:listByPerson" }
methods: [ GET ]

View File

@@ -46,3 +46,13 @@ services:
- "@chill.main.helper.translatable_string"
tags:
- { name: form.type }
Chill\EventBundle\Form\Type\PickSubscriptionType:
arguments:
$eventRepository: "@chill_event.repository.event"
$tokenStorage: "@security.token_storage"
$authorizationHelper: "@chill.main.security.authorization.helper"
$urlGenerator: '@Symfony\Component\Routing\Generator\UrlGeneratorInterface'
$translator: '@Symfony\Component\Translation\TranslatorInterface'
tags:
- { name: form.type }

View File

@@ -1,6 +1,7 @@
services:
chill_event.repository.event:
class: Doctrine\ORM\EntityRepository
class: Chill\EventBundle\Repository\EventRepository
factory: ['@doctrine.orm.entity_manager', getRepository]
arguments:
- 'Chill\EventBundle\Entity\Event'
@@ -15,4 +16,4 @@ services:
class: Doctrine\ORM\EntityRepository
factory: ['@doctrine.orm.entity_manager', getRepository]
arguments:
- 'Chill\EventBundle\Entity\Status'
- 'Chill\EventBundle\Entity\Status'

View File

@@ -66,3 +66,6 @@ past: passé
futur: futur
'subscribed by %user% to event "%event%" (%event_type%)': inscrit par %user% à l'événement "%event%" (%event_type%)
Show the event: Voir l'événement
Subscribe an event: Ajouter un événement
Pick an event: Choisir un événement

View File

@@ -95,6 +95,7 @@
</td>
</tr>
{% endfor %}
</tbody>
</table>
@@ -102,8 +103,12 @@
{{ chill_pagination(paginator) }}
{% endif %}
{#
{{ dump() }}
#}
<div style="margin-bottom: 1.5em; margin-top: 2.5em;">
{{ form_start(form_add_participation_by_event) }}
{{ form_widget(form_add_participation_by_event.event_id, { 'attr' : { 'style' : 'width: 25em; display:inline-block; ' } } ) }}
{{ form_widget(form_add_participation_by_event.submit, { 'attr' : { 'class' : 'sc-button bt-create' } } ) }}
{{ form_rest(form_add_participation_by_event) }}
{{ form_end(form_add_participation_by_event) }}
</div>
{% endblock %}