{% macro renderPager(categoryId, pager, max) %} {{ pagerfanta( pager, 'twitter_bootstrap_translated', { 'proximity' : 1, 'routeName': 'claro_forum_subjects', 'routeParams': {'category': categoryId, 'max': max} } ) }} {% endmacro %} {% macro renderOptions(options, selectedOption) %} {% for option in options %} {% endfor %} {% endmacro %} {% from _self import renderPager %} {% from _self import renderOptions %} {% set layout = "ClarolineCoreBundle:Workspace:layout.html.twig" %} {% if isDesktop() %} {% set layout = "ClarolineCoreBundle:Desktop:layout.html.twig" %} {% endif %} {% extends layout %} {% block title %}{{ _resource.getResourceNode().getName() ~ ' - ' ~ parent() | striptags | raw }}{% endblock %} {% block resourceBreadcrumb %}
{{ 'subject'|trans({}, 'forum') }} | {{ 'responses'|trans({}, 'forum') }} | {{ 'last_message'|trans({}, 'forum') }} | {% if isModerator %}{% endif %} | ||
---|---|---|---|---|---|
{% if isModerator %} {% if subject['isSticked'] == true %} {{ 'unstick' | trans({}, 'forum') }} {% else %} {{ 'stick' | trans({}, 'forum') }} {% endif %} {% if subject['is_closed'] == true %} {{ 'open' | trans({}, 'platform') }} {% else %} {{ 'close' | trans({}, 'platform') }} {% endif %} {% else %} {% if subject['isSticked'] == true %} {{ 'stuck' | trans({}, 'forum') }} {% endif %} {% endif %} |
{{ subject['title'] }}
{% if isModerator or (app.user.id is defined and app.user.id == subject['subject_creator_id']) %}
{{ 'edit' | trans({}, 'platform') }}
{% endif %}
{{ 'started_by' | trans({}, 'forum') }} {{ subject['subject_author'] }}, {{ subject['subject_created']|intl_date_format() }} |
{{ subject['count_messages'] }} |
{% if lastMessages[subject['id']] is defined and lastMessages[subject['id']] is not empty %}
{{ lastMessages[subject['id']].getAuthor() }}
{{ lastMessages[subject['id']].getModificationDate()|intl_date_format() }} {% endif %} |
{% if isModerator %}
{% if _resource.categories|length > 1 %} {% endif %} | {{ 'delete' | trans({}, 'platform') }} | {% endif %}