2016-11-02 18:58:51 +00:00
|
|
|
{% if forum.perms.view %}
|
2016-11-12 01:52:51 +00:00
|
|
|
<div class="forum">
|
|
|
|
<div class="forum__icon {% if forum.unread(user.id) %}forum__icon--unread {% endif %}fa fa-3x {% if forum.icon %}{{ forum.icon }}{% else %}{% if forum.type == 2 %}fa-chevron-circle-right{% elseif forum.type == 1 %}fa-folder{% else %}fa-comments{% endif %}{% endif %}"></div>
|
|
|
|
<div class="forum__info">
|
|
|
|
<a class="forum__name" href="{% if forum.type == 2 %}{{ forum.link }}{% else %}{{ route('forums.forum', forum.id) }}{% endif %}">
|
|
|
|
{{ forum.name }}
|
|
|
|
</a>
|
|
|
|
<div class="forum__description">
|
2016-07-29 19:31:36 +00:00
|
|
|
{{ forum.description }}
|
|
|
|
{% if forum.forums|length %}
|
2016-11-12 01:52:51 +00:00
|
|
|
<div class="forum__subforums">
|
2016-07-29 19:31:36 +00:00
|
|
|
Subforums:
|
|
|
|
{% for forum in forum.forums %}
|
2016-11-12 01:52:51 +00:00
|
|
|
<a class="forum__subforum{% if forum.unread(user.id) %} forum__subforum--unread{% endif %}" href="{% if forum.type == 2 %}{{ forum.link }}{% else %}{{ route('forums.forum', forum.id) }}{% endif %}">
|
|
|
|
{{ forum.name }}
|
|
|
|
</a>
|
2016-07-29 19:31:36 +00:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% if forum.type != 2 %}
|
2016-11-12 01:52:51 +00:00
|
|
|
<div class="forum__stats">
|
|
|
|
<div class="forum__stat--big" title="Topics">
|
|
|
|
{{ forum.topicCount }}
|
|
|
|
</div>
|
|
|
|
<div class="forum__stat" title="Posts">
|
|
|
|
{{ forum.postCount }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="forum__recent">
|
2016-07-29 19:31:36 +00:00
|
|
|
{% if forum.lastPost.id %}
|
2016-11-12 01:52:51 +00:00
|
|
|
<div class="forum__preview">
|
|
|
|
<div class="forum__preview-avatar avatar avatar--border" style="background-image: url('{{ route('user.avatar', forum.lastPost.poster.id) }}')"></div>
|
|
|
|
<div class="forum__preview-info">
|
|
|
|
<div class="forum__preview-info-row">
|
|
|
|
<a href="forum__post-link" href="{{ route('forums.post', forum.lastPost.id) }}">
|
|
|
|
{{ forum.lastPost.subject|slice(0, 30)|trim }}{% if forum.lastPost.subject|length > 30 %}...{% endif %}
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div class="forum__preview-info-row">
|
|
|
|
<time class="time-ago" datetime="{{ forum.lastPost.time|date('r') }}">
|
|
|
|
{{ forum.lastPost.time|date(config('general.date_format')) }}
|
|
|
|
</time>
|
|
|
|
by
|
|
|
|
<a href="{{ route('user.profile', forum.lastPost.poster.id) }}" style="color: {{ forum.lastPost.poster.colour }}; text-shadow: 0 0 5px {% if forum.lastPost.poster.colour != 'inherit' %}{{ forum.lastPost.poster.colour }}{% else %}#222{% endif %}">
|
|
|
|
{{ forum.lastPost.poster.username }}
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-07-29 19:31:36 +00:00
|
|
|
{% else %}
|
2016-11-12 01:52:51 +00:00
|
|
|
<i>There are no posts in this forum.</i>
|
2016-07-29 19:31:36 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|