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, 'entities' => $entities,
)); ));
} }
public function mostRecentIndexAction()
{
return $this->redirectToRoute('chill_main_search', array(
'q' => '@event'
));
}
/** /**
* Creates a new Event entity. * Creates a new Event entity.
* *

View File

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

View File

@ -2,6 +2,16 @@ event:
path: / path: /
defaults: { _controller: "ChillEventBundle:Event:index" } 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: event_show:
path: /{event_id}/show path: /{event_id}/show
defaults: { _controller: "ChillEventBundle:Event:show" } defaults: { _controller: "ChillEventBundle:Event: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: Chill\EventBundle\Entity\Event:
properties: properties:
label: label:
@ -12,13 +24,3 @@ Chill\EventBundle\Entity\Event:
- NotNull: ~ - NotNull: ~
center: center:
- NotNull: ~ - 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 Event type : Type d'événement
See: Voir See: Voir
Event: Événement Event: Événement
Events: Événements
'Event : %label%': Événement "%label%" 'Event : %label%': Événement "%label%"
Participation: Participation Participation: Participation
Status: Statut Status: Statut
Last update: Dernière mise à jour 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' '%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 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 Edit all the participations: Modifier toutes les participations
Add a participation: Ajouter un participant Add a participation: Ajouter un participant
Participation creation: Ajouter une participation Participation creation: Ajouter une participation
@ -20,6 +24,7 @@ Associated event: Événement associé
Back to the event: Retour à l'événement Back to the event: Retour à l'événement
The participation was created: La participation a été créée The participation was created: La participation a été créée
The participation was updated: La participation a été mise à jour The participation was updated: La participation a été mise à jour
Participation Edit: Modifier une participation
#search #search
Event search: Recherche d'événements Event search: Recherche d'événements

View File

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