add a link into section menu

Currently, the main link in section menu redirect
to a search which display the last events

ref #10
This commit is contained in:
Julien Fastré 2016-03-24 15:19:23 +01:00
parent 372cae7008
commit 8db8c8925c
5 changed files with 34 additions and 2 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

@ -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>