ai_upgrade_assistant-0.2.0-alpha2/templates/ai-upgrade-assistant-forum-overview.html.twig

templates/ai-upgrade-assistant-forum-overview.html.twig
{#
/**
 * @file
 * Default theme implementation for the forum overview page.
 *
 * Available variables:
 * - topics: Array of forum topics.
 * - filters: Array of active filters.
 *
 * @ingroup themeable
 */
#}
<div class="ai-upgrade-assistant-forum">
  {% if topics %}
    <div class="forum-topics">
      {% for topic in topics %}
        <div class="forum-topic">
          <h3 class="topic-title">
            <a href="{{ path('ai_upgrade_assistant.forum.topic', {'topic_id': topic.id}) }}">{{ topic.title }}</a>
          </h3>
          <div class="topic-meta">
            <span class="topic-author">{{ 'By'|t }} {{ topic.author }}</span>
            <span class="topic-date">{{ topic.created|date('Y-m-d H:i') }}</span>
            {% if topic.tags %}
              <div class="topic-tags">
                {% for tag in topic.tags|json_decode %}
                  <span class="tag">{{ tag }}</span>
                {% endfor %}
              </div>
            {% endif %}
          </div>
          <div class="topic-preview">
            {{ topic.content|striptags|length > 200 ? topic.content|striptags|slice(0, 200) ~ '...' : topic.content|striptags }}
          </div>
          <div class="topic-stats">
            <span class="replies">{{ topic.reply_count }} {{ 'replies'|t }}</span>
            <span class="views">{{ topic.view_count }} {{ 'views'|t }}</span>
          </div>
        </div>
      {% endfor %}
    </div>
  {% else %}
    <div class="forum-empty">
      <p>{{ 'No topics found.'|t }}</p>
      {% if is_granted('create ai_upgrade_assistant forum topics') %}
        <p>
          <a href="{{ path('ai_upgrade_assistant.forum.create') }}" class="button">{{ 'Create the first topic'|t }}</a>
        </p>
      {% endif %}
    </div>
  {% endif %}
</div>

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc