mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-24 08:33:49 +00:00
@@ -1,4 +0,0 @@
|
||||
services:
|
||||
# chill_event.example:
|
||||
# class: Chill\EventBundle\Example
|
||||
# arguments: [@service_id, "plain_value", %parameter%]
|
8
Resources/config/services/authorization.yml
Normal file
8
Resources/config/services/authorization.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
services:
|
||||
chill_event.event_voter:
|
||||
class: Chill\EventBundle\Security\Authorization\EventVoter
|
||||
arguments:
|
||||
- "@chill.main.security.authorization.helper"
|
||||
tags:
|
||||
- { name: chill.role }
|
||||
- { name: security.voter }
|
6
Resources/config/services/repositories.yml
Normal file
6
Resources/config/services/repositories.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
services:
|
||||
chill_group.repository.event:
|
||||
class: Doctrine\ORM\EntityRepository
|
||||
factory: ['@doctrine.orm.entity_manager', getRepository]
|
||||
arguments:
|
||||
- 'Chill\EventBundle\Entity\Event'
|
11
Resources/config/services/search.yml
Normal file
11
Resources/config/services/search.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
services:
|
||||
chill_event.search_events:
|
||||
class: Chill\EventBundle\Search\EventSearch
|
||||
arguments:
|
||||
- "@security.token_storage"
|
||||
- "@chill_group.repository.event"
|
||||
- "@chill.main.security.authorization.helper"
|
||||
- "@templating"
|
||||
tags:
|
||||
- { name: chill.search, alias: 'event_regular' }
|
||||
|
11
Resources/translations/messages.fr.yml
Normal file
11
Resources/translations/messages.fr.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
#events
|
||||
Name: Nom
|
||||
Date: Date
|
||||
Event type : Type d'événement
|
||||
See: Voir
|
||||
|
||||
|
||||
|
||||
#search
|
||||
Event search: Recherche d'événements
|
||||
'%total% events match the search %pattern%' : '{0} Aucun événement ne correspond aux termes de recherche "%pattern%" | {1} Un événement a été trouvé par la recherche "%pattern%" | ]1,Inf] %total% événements correspondent aux termes de recherche "%pattern%".'
|
43
Resources/views/Event/list.html.twig
Normal file
43
Resources/views/Event/list.html.twig
Normal file
@@ -0,0 +1,43 @@
|
||||
<h2>{{ 'Event search'|trans }}</h2>
|
||||
|
||||
<p>{% transchoice total with { '%pattern%' : pattern } %}%total% events match the search %pattern%{% endtranschoice %}</p>
|
||||
|
||||
|
||||
{% if events|length > 0 %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="chill-red">{{ 'Name'|trans }}</th>
|
||||
<th class="chill-green">{{ 'Date'|trans }}</th>
|
||||
<th class="chill-orange">{{ 'Event type'|trans }}</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for event in events %}
|
||||
<tr>
|
||||
<td>{{ event.label }}</td>
|
||||
<td>{{ event.date|localizeddate('long', 'none') }}</td>
|
||||
<td>{{ event.type.label|localize_translatable_string }}</td>
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
{% if is_granted('CHILL_EVENT_SEE_DETAILS', event) %}
|
||||
<a href="#" class="sc-button btn-action">
|
||||
{{ 'See'|trans }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if is_granted('CHILL_EVENT_UPDATE', event) %}
|
||||
<a href="#" class="sc-button btn-edit">
|
||||
{{ 'Edit'|trans }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% endif %}
|
Reference in New Issue
Block a user