diff --git a/Repository/ForumRepository.php b/Repository/ForumRepository.php index 314ad9e..fa0e805 100644 --- a/Repository/ForumRepository.php +++ b/Repository/ForumRepository.php @@ -79,11 +79,10 @@ public function findCategories(Forum $forum, $getQuery = false) { $dql = " SELECT c.id as id, - count(m) as count_messages, + count(s) as count_subjects, c.name as name FROM Claroline\ForumBundle\Entity\Category c LEFT JOIN c.subjects s - LEFT JOIN s.messages m JOIN c.forum forum WHERE forum.id = :forumId GROUP BY c diff --git a/Resources/translations/forum.en.yml b/Resources/translations/forum.en.yml index 88dec2b..9db4855 100644 --- a/Resources/translations/forum.en.yml +++ b/Resources/translations/forum.en.yml @@ -39,6 +39,7 @@ started_by: Initiated by stick: Stick stuck: Stuck subject: Topic +subjects: Topics subjets_per_page: Subjects per page subscribe_mail_list: Subscribe to notifications unstick: Unstick diff --git a/Resources/translations/forum.es.yml b/Resources/translations/forum.es.yml index d4692ba..ff104f0 100644 --- a/Resources/translations/forum.es.yml +++ b/Resources/translations/forum.es.yml @@ -38,6 +38,7 @@ started_by: 'Iniciado por' stick: Anclar stuck: Anclado subject: Tema +subjects: Temas subjets_per_page: 'Temas por pagina' subscribe_mail_list: 'Suscríbase a las notificaciones' unstick: Desanclar diff --git a/Resources/translations/forum.fr.yml b/Resources/translations/forum.fr.yml index 0d2049f..e244b1c 100644 --- a/Resources/translations/forum.fr.yml +++ b/Resources/translations/forum.fr.yml @@ -39,6 +39,7 @@ started_by: Initié par stick: Épingler stuck: Épinglé subject: Sujet +subjects: Sujets subjets_per_page: Sujets par page subscribe_mail_list: Recevoir les notifications unstick: Désépingler diff --git a/Resources/views/Forum/messages.html.twig b/Resources/views/Forum/messages.html.twig index d0f4707..6f95b80 100644 --- a/Resources/views/Forum/messages.html.twig +++ b/Resources/views/Forum/messages.html.twig @@ -149,7 +149,7 @@ {% if not subject.isClosed() %} {# something may be wrong here because _token doesn't always exists #} - {{ form_widget(form._token) }} + {% if form._token is defined %} {{ form_widget(form._token) }} {% endif %} {% endif %} {% endif %} diff --git a/Resources/views/Forum/subjects.html.twig b/Resources/views/Forum/subjects.html.twig index 71e672b..12ec3a7 100644 --- a/Resources/views/Forum/subjects.html.twig +++ b/Resources/views/Forum/subjects.html.twig @@ -128,7 +128,7 @@ {{ subject['subject_created']|intl_date_format() }}