enable and fix errors for event bundle + adding knp-time-bundle

This commit is contained in:
Tchama 2020-08-04 11:33:56 +02:00
parent 8944d21652
commit f94fb0efc1
5 changed files with 13 additions and 8 deletions

View File

@ -17,8 +17,8 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('chill_event');
$treeBuilder = new TreeBuilder('chill_event');
$rootNode = $treeBuilder->getRootNode('chill_event');
// Here you should define the parameters that are allowed to
// configure your bundle. See the documentation linked above for

View File

@ -92,7 +92,6 @@ EventType: Types d'événements
EventType creation: Nouveau type d'événement
EventType edit: Modifier le type d'événement
Status list: Liste des statuts
Status: Statuts
Status creation: Nouveau statut
Status edit: Modifier un statut
Role list: Liste des rôles

View File

@ -85,7 +85,10 @@
<td>{{ person_macro.render(participation.person) }}</td>
<td>{{ participation.role.name|localize_translatable_string }}</td>
<td>{{ participation.status.name|localize_translatable_string }}</td>
<td>{{ participation.lastUpdate|time_diff }} <i class="fa fa-info-circle" title="{{ participation.lastUpdate|format_date("long", "medium")|escape('html_attr') }}"></i></td>
<td>{{ participation.lastUpdate|ago }} {# sf4 check: filter 'time_diff' is abandoned,
alternative: knplabs/knp-time-bundle provide filter 'ago' #}
<i class="fa fa-info-circle" title="{{ participation.lastUpdate|format_date("long", "medium")|escape('html_attr') }}"></i>
</td>
<td>
<ul class="record_actions">
{% if is_granted('CHILL_EVENT_PARTICIPATION_UPDATE', participation) %}

View File

@ -38,7 +38,10 @@
<td>{{ person_macro.render(participation.vars.value.person) }}</td>
<td>{{ form_widget(participation.role) }}</td>
<td>{{ form_widget(participation.status) }}</td>
<td>{{ participation.vars.value.lastUpdate|time_diff }} <i class="fa fa-info-circle" title="{{ participation.vars.value.lastUpdate|format_date("long", "medium")|escape('html_attr') }}"></i></td>
<td>{{ participation.vars.value.lastUpdate|ago }} {# sf4 check: filter 'time_diff' is abandoned,
alternative: knplabs/knp-time-bundle provide filter 'ago' #}
<i class="fa fa-info-circle" title="{{ participation.vars.value.lastUpdate|format_date("long", "medium")|escape('html_attr') }}"></i>
</td>
</tr>
{% endfor %}
</tbody>

View File

@ -25,7 +25,7 @@ use Chill\MainBundle\Entity\Scope;
use Chill\MainBundle\Timeline\TimelineProviderInterface;
use Doctrine\ORM\EntityManager;
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Role\Role;
use Doctrine\ORM\Mapping\ClassMetadata;
use Chill\PersonBundle\Entity\Person;
@ -59,12 +59,12 @@ class TimelineEventProvider implements TimelineProviderInterface
*
* @param EntityManager $em
* @param AuthorizationHelper $helper
* @param TokenStorage $storage
* @param TokenStorageInterface $storage
*/
public function __construct(
EntityManager $em,
AuthorizationHelper $helper,
TokenStorage $storage
TokenStorageInterface $storage
) {
$this->em = $em;
$this->helper = $helper;