Skip to content

Commit

Permalink
Merge pull request #72 from claroline/5.x-stable
Browse files Browse the repository at this point in the history
5.x stable
  • Loading branch information
ngodfraind committed Aug 10, 2015
2 parents 7b302cf + 924977d commit 16c8a4f
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 7 deletions.
3 changes: 1 addition & 2 deletions Repository/ForumRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions Resources/translations/forum.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions Resources/translations/forum.es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions Resources/translations/forum.fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Resources/views/Forum/messages.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
{% if not subject.isClosed() %}
<textarea class="forum-answer claroline-tiny-mce hide"></textarea>
{# 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 %}
</div>
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions Resources/views/Forum/subjects.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
{{ subject['subject_created']|intl_date_format() }}
</td>
<td>
{{ subject['count_messages'] }}
{{ subject['count_messages'] - 1 }}
</td>
<td>
{% if lastMessages[subject['id']] is defined and lastMessages[subject['id']] is not empty %}
Expand All @@ -145,7 +145,7 @@
{{ lastMessages[subject['id']].getAuthor() }}
<br>
{{ lastMessages[subject['id']].getModificationDate()|intl_date_format() }}

{% if isNew %}
</b>
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions Resources/views/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
<thead>
<tr>
<th>{{ 'category'|trans({}, 'forum') }}</th>
<th>{{ 'messages'|trans({}, 'forum') }} </th>
<th>{{ 'subjects'|trans({}, 'forum') }} </th>
<th>{{ 'last_message'|trans({}, 'forum') }}</th>
{% if isModerator %}
<th></th>
Expand All @@ -113,7 +113,7 @@
{% endif %}
<br>
<td>
{{ category['count_messages'] }}
{{ category['count_subjects'] }}
</td>
<td>
{{ category['last_message_author'] }}
Expand Down

0 comments on commit 16c8a4f

Please sign in to comment.