|
@@ -16,41 +16,41 @@
|
|
{% trans %}Posts{% endtrans %}
|
|
{% trans %}Posts{% endtrans %}
|
|
</div>
|
|
</div>
|
|
<div class="panel-body topic-body">
|
|
<div class="panel-body topic-body">
|
|
- {% for post in result['post'].all() %}
|
|
|
|
|
|
+ {% for post in result['post'] %}
|
|
<div id="{{ post.id }}" class="row post-row clearfix">
|
|
<div id="{{ post.id }}" class="row post-row clearfix">
|
|
|
|
|
|
<div class="author col-md-2 col-sm-3 col-xs-12">
|
|
<div class="author col-md-2 col-sm-3 col-xs-12">
|
|
<!-- Registered User -->
|
|
<!-- Registered User -->
|
|
{% if post.user_id %}
|
|
{% if post.user_id %}
|
|
- <div class="author-name"><h4><a href="{{ user.url }}">{{ user.username }}</a></h4></div>
|
|
|
|
|
|
+ <div class="author-name"><h4><a href="{{ post.user.url }}">{{ post.user.username }}</a></h4></div>
|
|
|
|
|
|
<!-- check if user is online or not -->
|
|
<!-- check if user is online or not -->
|
|
- {% if user|is_online %}
|
|
|
|
|
|
+ {% if post.user|is_online %}
|
|
<div class="author-online" data-toggle="tooltip" data-placement="top" title="online"></div>
|
|
<div class="author-online" data-toggle="tooltip" data-placement="top" title="online"></div>
|
|
{% else %}
|
|
{% else %}
|
|
<div class="author-offline" data-toggle="tooltip" data-placement="top" title="offline"></div>
|
|
<div class="author-offline" data-toggle="tooltip" data-placement="top" title="offline"></div>
|
|
{% endif %}
|
|
{% endif %}
|
|
- <div class="author-title"><h5>{{ user.primary_group.name }}</h5></div>
|
|
|
|
|
|
+ <div class="author-title"><h5>{{ post.user.primary_group.name }}</h5></div>
|
|
|
|
|
|
- {% if user.avatar %}
|
|
|
|
- <div class="author-avatar"><img src="{{ user.avatar }}" alt="avatar"></div>
|
|
|
|
|
|
+ {% if post.user.avatar %}
|
|
|
|
+ <div class="author-avatar"><img src="{{ post.user.avatar }}" alt="avatar"></div>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
|
|
- <div class="author-registered">{% trans %}Joined{% endtrans %}: {{ user.date_joined|format_date('%b %d %Y') }}</div>
|
|
|
|
- <div class="author-posts">{% trans %}Posts{% endtrans %}: {{ user.post_count }}</div>
|
|
|
|
|
|
+ <div class="author-registered">{% trans %}Joined{% endtrans %}: {{ post.user.date_joined|format_date('%b %d %Y') }}</div>
|
|
|
|
+ <div class="author-posts">{% trans %}Posts{% endtrans %}: {{ post.user.post_count }}</div>
|
|
<div class="author-pm">
|
|
<div class="author-pm">
|
|
{% if current_user.is_authenticated and post.user_id %}
|
|
{% if current_user.is_authenticated and post.user_id %}
|
|
- <a href="{{ url_for('message.new_conversation') }}?to_user={{ user.username }}">{% trans %}Message{% endtrans %}</a>
|
|
|
|
|
|
+ <a href="{{ url_for('message.new_conversation') }}?to_user={{ post.user.username }}">{% trans %}Message{% endtrans %}</a>
|
|
{% endif %}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- {% if user.website %}
|
|
|
|
- <div class="author-website"><a href="{{ user.website }}" rel="nofollow">{% trans %}Website{% endtrans %}</a></div>
|
|
|
|
|
|
+ {% if post.user.website %}
|
|
|
|
+ <div class="author-website"><a href="{{ post.user.website }}" rel="nofollow">{% trans %}Website{% endtrans %}</a></div>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
|
|
{% else %}
|
|
{% else %}
|
|
<!-- user deleted or guest -->
|
|
<!-- user deleted or guest -->
|
|
- <div class="author-name"><h4><a href="{{ user.url }}">{{ post.username }}</a></h4></div>
|
|
|
|
|
|
+ <div class="author-name"><h4><a href="{{ post.user.url }}">{{ post.username }}</a></h4></div>
|
|
<div class="author-title"><h5>{% trans %}Guest{% endtrans %}</h5></div>
|
|
<div class="author-title"><h5>{% trans %}Guest{% endtrans %}</h5></div>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
|
|
@@ -61,7 +61,7 @@
|
|
<div class="post-meta clearfix">
|
|
<div class="post-meta clearfix">
|
|
<div class="pull-left">
|
|
<div class="pull-left">
|
|
<!-- Creation date / Date modified -->
|
|
<!-- Creation date / Date modified -->
|
|
- <a href="{{ generate_post_url(post.topic, post, posts.page) }}">
|
|
|
|
|
|
+ <a href="{{ post.url }}">
|
|
{{ post.date_created|format_date('%d %B %Y - %H:%M') }}
|
|
{{ post.date_created|format_date('%d %B %Y - %H:%M') }}
|
|
</a>
|
|
</a>
|
|
{% if post.user_id and post.date_modified %}
|
|
{% if post.user_id and post.date_modified %}
|
|
@@ -74,22 +74,23 @@
|
|
|
|
|
|
<!-- Post number -->
|
|
<!-- Post number -->
|
|
<div class="pull-right">
|
|
<div class="pull-right">
|
|
- <strong>#{{ generate_post_id(posts, loop.index, flaskbb_config["POSTS_PER_PAGE"]) }}</strong>
|
|
|
|
|
|
+ <strong>#{{ post.id }}</strong>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="post-content post_body clearfix" id="pid{{ post.id }}">
|
|
<div class="post-content post_body clearfix" id="pid{{ post.id }}">
|
|
{{ post.content|markup|safe }}
|
|
{{ post.content|markup|safe }}
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- {% else %}
|
|
|
|
- <!-- cheating a bit here with page-row :P -->
|
|
|
|
- <div class="row page-row clearfix">
|
|
|
|
- <div class="col-md-12 col-sm-12 col-xs-12">{% trans %}No posts found matching your search criteria.{% endtrans %}</div>
|
|
|
|
|
|
+ {% else %}
|
|
|
|
+ <!-- cheating a bit here with page-row :P -->
|
|
|
|
+ <div class="row page-row clearfix">
|
|
|
|
+ <div class="col-md-12 col-sm-12 col-xs-12">{% trans %}No posts found matching your search criteria.{% endtrans %}</div>
|
|
|
|
+ </div>
|
|
|
|
+ {% endfor %}
|
|
</div>
|
|
</div>
|
|
- {% endfor %}
|
|
|
|
|
|
+ </div>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
|
|
{% if result['user'] %}
|
|
{% if result['user'] %}
|