diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php index 8b61ae4f1..aa025bdfe 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php @@ -563,7 +563,8 @@ class ChillMainExtension extends Extension implements 'template' => '@ChillMain/NewsItem/new.html.twig', ], 'view' => [ - 'role' => '', + 'role' => 'ROLE_ADMIN', + 'template' => '@ChillMain/NewsItem/view_admin.html.twig' ], 'edit' => [ 'role' => 'ROLE_ADMIN', diff --git a/src/Bundle/ChillMainBundle/Resources/views/NewsItem/_list.html.twig b/src/Bundle/ChillMainBundle/Resources/views/NewsItem/_list.html.twig new file mode 100644 index 000000000..11ca95995 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/views/NewsItem/_list.html.twig @@ -0,0 +1,30 @@ +
+ {% if entity.startDate %} + {{ entity.startDate|format_date('long') }} + {% endif %} + {% if entity.endDate %} + - {{ entity.endDate|format_date('long') }} + {% endif %} +
++ {{ entity.startDate|format_date('long') }} + {% if entity.endDate is not null %} + - {{ entity.endDate|format_date('long') }} + {% endif %} +
+- {% if entity.startDate %} - {{ entity.startDate|format_date('long') }} - {% endif %} - {% if entity.endDate %} - - {{ entity.endDate|format_date('long') }} - {% endif %} -
-+ {% if entity.startDate %} + {{ entity.startDate|format_date('long') }} + {% endif %} + {% if entity.endDate %} + - {{ entity.endDate|format_date('long') }} + {% endif %} +
+