This commit is contained in:
Marc Ducobu 2016-03-24 15:24:14 +01:00
commit 6776e785b2
7 changed files with 61 additions and 23 deletions

View File

@ -34,6 +34,14 @@ class EventController extends Controller
'entities' => $entities,
));
}
public function mostRecentIndexAction()
{
return $this->redirectToRoute('chill_main_search', array(
'q' => '@event'
));
}
/**
* Creates a new Event entity.
*

View File

@ -231,6 +231,7 @@ class Participation implements HasCenterInterface, HasScopeInterface
->atPath('status')
->addViolation();
}
var_dump('ok');
}
}

View File

@ -1,6 +1,16 @@
event:
path: /
defaults: { _controller: "ChillEventBundle:Event:index" }
chill_event_list_most_recent:
path: most_recent
defaults: { _controller: "ChillEventBundle:Event:mostRecentIndex" }
options:
menus:
section:
order: 90
label: Events
icons: [calendar]
event_show:
path: /{event_id}/show

View File

@ -1,3 +1,15 @@
Chill\EventBundle\Entity\Participation:
properties:
event:
- NotNull: ~
status:
- NotNull: ~
person:
- NotNull: ~
constraints:
- Callback: [isConsistent]
Chill\EventBundle\Entity\Event:
properties:
label:
@ -12,13 +24,3 @@ Chill\EventBundle\Entity\Event:
- NotNull: ~
center:
- NotNull: ~
Chill\EventBundle\Event\Participation:
properties:
event:
- NotNull: ~
status:
- NotNull: ~
person:
- NotNull: ~
constraints:
- Callback: [isConsistent]

View File

@ -4,14 +4,18 @@ Date: Date
Event type : Type d'événement
See: Voir
Event: Événement
Events: Événements
'Event : %label%': Événement "%label%"
Participation: Participation
Status: Statut
Last update: Dernière mise à jour
'%count% participations to this event': '{0} Aucun participant à l''événement | {1} Un participant à l''événement | ]1,Inf] %count% participants à l''événement'
#CRUD
#CRUD event
Details of an event: Détails d'un événement
New event: Nouvel événement
#crud participation
Edit all the participations: Modifier toutes les participations
Add a participation: Ajouter un participant
Participation creation: Ajouter une participation
@ -20,6 +24,7 @@ Associated event: Événement associé
Back to the event: Retour à l'événement
The participation was created: La participation a été créée
The participation was updated: La participation a été mise à jour
Participation Edit: Modifier une participation
#search
Event search: Recherche d'événements

View File

@ -40,4 +40,12 @@
</tbody>
</table>
{% endif %}
{% endif %}
<ul class="record_actions">
<li>
<a href="{{ path('event_new') }}" class="sc-button btn-create" >
{{ 'New event'|trans }}
</a>
</li>
</ul>

View File

@ -75,18 +75,22 @@
</tbody>
</table>
<ul class="record_actions">
<li><a href="#" class="sc-button btn-edit">{{ 'Edit all the participations'|trans }}</a></li>
<li><div style="padding-left: 3em;">
{{ form_start(form_add_participation_by_person) }}
{{ form_widget(form_add_participation_by_person.person_id, { 'attr' : { 'style' : 'width: 20em; display:inline-block; ' } } ) }}
{{ form_widget(form_add_participation_by_person.submit, { 'attr' : { 'class' : 'sc-button btn-create' } } ) }}
{{ form_rest(form_add_participation_by_person) }}
{{ form_end(form_add_participation_by_person) }}
</div>
</li>
</ul>
{% endif %}
<ul class="record_actions">
{% if count > 0 %}
<li><a href="#" class="sc-button btn-edit">{{ 'Edit all the participations'|trans }}</a></li>
{% endif %}
<li><div style="margin-left: 3em;">
{{ form_start(form_add_participation_by_person) }}
{{ form_widget(form_add_participation_by_person.person_id, { 'attr' : { 'style' : 'width: 20em; display:inline-block; ' } } ) }}
{{ form_widget(form_add_participation_by_person.submit, { 'attr' : { 'class' : 'sc-button btn-create' } } ) }}
{{ form_rest(form_add_participation_by_person) }}
{{ form_end(form_add_participation_by_person) }}
</div>
</li>
</ul>
{% endblock %}