123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185 |
- {% load i18n misago_avatars %}
- <div id="post-{{ post.pk }}" class="media post thread-post{% if post.poster_id and post.poster.rank.css_class %} rank-{{ post.poster.rank.css_class }}{% endif %}" data-id="{{ post.pk }}" data-edit-url="{{ post.get_edit_url }}" data-quote-url="{{ post.get_quote_url }}">
- {% if post.poster %}
- <a class="user-avatar pull-left" href="{% url USER_PROFILE_URL user_slug=post.poster.slug user_id=post.poster.id %}">
- <img class="media-object" src="{{ post.poster|avatar:100 }}" alt="{% trans "Poster avatar" %}">
- </a>
- {% else %}
- <span class="user-avatar pull-left">
- <img class="media-object" src="{% blankavatar 100 %}" alt="{% trans "Poster avatar" %}">
- </span>
- {% endif %}
- <div class="media-body">
- <div class="panel panel-default">
- <div class="panel-heading">
- {% if post.poster %}
- {% include "misago/user_state.html" with user=post.poster state=post.poster.online_state %}
- <a class="user-name" href="{% url USER_PROFILE_URL user_slug=post.poster.slug user_id=post.poster.id %}">
- {{ post.poster }}</a>
- {% if post.poster.short_title %}
- <span class="label user-rank">{{ post.poster.short_title }}</span>
- {% endif %}
- {% else %}
- <span class="fa fa-power-off fa-fw user-offline tooltip-top" title="{% blocktrans with user=post.poster_name %}{{ user }}'s forum account has been deleted.{% endblocktrans %}"></span>
- <span class="user-name">
- {{ post.poster_name }}
- </span>
- {% endif %}
- <span class="separator">–</span>
- <a href="{{ post.get_absolute_url }}" class="post-date tooltip-top dynamic time-ago" title="{{ post.posted_on }}" data-timestamp="{{ post.posted_on|date:"c" }}">
- {{ post.posted_on|date }}
- </a>
- {% if post.is_protected %}
- <span class="fa fa-lock tooltip-top" title="{% trans "This post is protected from being changed by its author." %}"></span>
- {% endif %}
- {% if not post.is_read %}
- <span class="label label-success">
- <span class="fa fa-plus-circle"></span>
- {% trans "New" %}
- </span>
- {% endif %}
- {% if posts_actions %}
- <a href="#" class="post-check">
- <span class="fa fa-check"></span>
- <input type="checkbox" form="posts-actions" name="item" value="{{ post.pk }}"{% if post.pk in selected_posts %}checked="checked"{% endif %}>
- </a>
- {% endif %}
- <a href="{{ post.get_absolute_url }}" class="pull-right post-date tooltip-top" title="{% trans "Link to this post" %}">
- #{{ page.start_index|add:forloop.counter0 }}
- </a>
- </div>
- {% if post.is_moderated %}
- <div class="alert alert-info">
- <span class="fa fa-question-circle fa-fw fa-lg"></span>
- {% if post.id == thread.first_post_id %}
- {% trans "This thread won't be visible to other users until its approved by moderator." %}
- {% else %}
- {% trans "This post won't be visible to other users until its approved by moderator." %}
- {% endif %}
- </div>
- {% endif %}
- {% if post.is_reported %}
- <div class="alert alert-danger">
- <span class="fa fa-exclamation-triangle fa-fw fa-lg"></span>
- {% trans "This post was reported to moderators." %}
- </div>
- {% endif %}
- {% if post.is_hidden and post.acl.can_see_hidden %}
- <div class="alert alert-default">
- {% include "misago/thread/hidden_message.html" %}
- </div>
- {% endif %}
- {% if not post.is_hidden or post.acl.can_see_hidden %}
- {% if post.is_valid %}
- <div class="panel-body">
- <article class="post-body misago-markup">
- {{ post.parsed|safe }}
- <article>
- </div>
- {% else %}
- <div class="alert alert-danger">
- <span class="fa fa-exclamation-triangle fa-fw fa-lg"></span>
- {% trans "Post can't be displayed due to invalid message checksum." %}
- </div>
- {% endif %}
- <div class="panel-footer">
- {% if thread.acl.can_reply %}
- <button type="button" class="btn btn-reply btn-primary btn-flat pull-right">
- <span class="fa fa-reply">
- {% trans "Reply" %}
- </button>
- {% endif %}
- {% if post.acl.can_edit %}
- <button type="button" class="btn btn-edit btn-default btn-flat pull-right">
- <span class="fa fa-pencil">
- {% trans "Edit" %}
- </button>
- {% endif %}
- {% if post.acl.can_unhide %}
- <form action="{% url 'misago:unhide_post' post_id=post.id %}" method="post">
- {% csrf_token %}
- <button type="submit" class="btn btn-default btn-flat pull-right">
- <span class="fa fa-eye">
- {% trans "Reveal" %}
- </button>
- </form>
- {% endif %}
- {% if post.acl.can_hide %}
- <form action="{% url 'misago:hide_post' post_id=post.id %}" method="post">
- {% csrf_token %}
- <button type="submit" class="btn btn-warning btn-flat pull-right">
- <span class="fa fa-eye-slash">
- {% trans "Hide" %}
- </button>
- </form>
- {% endif %}
- {% if post.acl.can_delete %}
- <form action="{% url 'misago:delete_post' post_id=post.id %}" method="post" data-prompt="{% trans "Are you sure you want to delete this post?" %}">
- {% csrf_token %}
- <button type="submit" class="btn btn-danger btn-flat pull-right">
- <span class="fa fa-times">
- {% trans "Delete" %}
- </button>
- </form>
- {% endif %}
- <form action="" method="post">
- {% csrf_token %}
- <button type="submit" class="btn btn-warning btn-flat pull-right">
- <span class="fa fa-exclamation-triangle">
- {% trans "Report" %}
- </button>
- </form>
- {% if post.acl.can_approve %}
- <form action="{% url 'misago:approve_post' post_id=post.id %}" method="post">
- {% csrf_token %}
- <button type="submit" class="btn btn-success btn-flat pull-right">
- <span class="fa fa-check">
- {% trans "Approve" %}
- </button>
- </form>
- {% endif %}
- <form action="" method="post">
- {% csrf_token %}
- <button type="submit" class="btn btn-success btn-flat pull-left">
- <span class="fa fa-heart">
- {% trans "Like" %}
- </button>
- </form>
- </div>
- {% else %}
- <div class="panel-body">
- <p class="hidden-message lead text-muted">
- {% include "misago/thread/hidden_message.html" %}
- </p>
- </div>
- {% endif %}
- </div>
- {% if post.events %}
- {% include "misago/thread/events.html" %}
- {% endif %}
- </div>
- </div>
|