|
@@ -5,82 +5,95 @@
|
|
|
|
|
|
{% block title %}{{ macros.page_title(title=(_("Post #%(post)s Changelog") % {'post': post.pk}),parent=thread.name) }}{% endblock %}
|
|
|
|
|
|
-{% block breadcrumb %}{{ super() }} <span class="divider">/</span></li>
|
|
|
+{% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
|
|
|
{% for parent in parents %}
|
|
|
-<li><a href="{{ parent.type|url(forum=parent.pk, slug=parent.slug) }}">{{ parent.name }}</a> <span class="divider">/</span></li>
|
|
|
+<li><a href="{{ parent.type|url(forum=parent.pk, slug=parent.slug) }}">{{ parent.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
|
|
|
{% endfor %}
|
|
|
-<li><a href="{% url 'thread' thread=thread.pk, slug=thread.slug %}">{{ thread.name }}</a> <span class="divider">/</span></li>
|
|
|
-<li><a href="{% url 'changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}">{% trans post=post.pk %}Post #{{ post }} Changelog{% endtrans %}</a> <span class="divider">/</span></li>
|
|
|
+<li><a href="{% url 'thread' thread=thread.pk, slug=thread.slug %}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
|
|
|
+<li><a href="{% url 'changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}">{% trans post=post.pk %}Post #{{ post }} Changelog{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
|
|
|
<li class="active">{% trans date=change.date|reltimesince|low %}Edit from {{ date }}{% endtrans %}
|
|
|
{%- endblock %}
|
|
|
|
|
|
-{% block content %}
|
|
|
-<div class="page-header">
|
|
|
- <ul class="breadcrumb">
|
|
|
- {{ self.breadcrumb() }}</li>
|
|
|
- </ul>
|
|
|
- <h1>{% trans post=post.pk %}Post #{{ post }} Changelog{% endtrans %} <small>{{ thread.name }}</small></h1>
|
|
|
- <ul class="unstyled thread-info">
|
|
|
- <li><i class="icon-time"></i> <a href="{% url 'thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}">{{ post.date|reltimesince }}</a></li>
|
|
|
- <li><i class="icon-user"></i> {% if post.user %}<a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
|
|
|
- <li><i class="icon-pencil"></i> {% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</li>
|
|
|
- {% if post.protected %}<li><i class="icon-lock"></i> {% trans %}Protected{% endtrans %}</li>{% endif %}
|
|
|
- </ul>
|
|
|
-</div>
|
|
|
-{% if message %}{{ macros.draw_message(message, 'alert-form') }}{% endif %}
|
|
|
-
|
|
|
-<h2>{% trans date=change.date|reltimesince|low %}Edit from {{ date }}{% endtrans %} <small>#{{ change.pk }}</small></h2>
|
|
|
-<ul class="unstyled thread-info">
|
|
|
- <li><i class="icon-time"></i> <a href="{% url 'thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}">{{ post.date|reltimesince }}</a></li>
|
|
|
- <li><i class="icon-user"></i> {% if change.user_id %}<a href="{% url 'user' user=change.user_id, username=change.user_slug %}">{{ change.user_name }}</a>{% else %}{{ change.user_name }}{% endif %}</li>
|
|
|
- {% if acl.users.can_see_users_trails() %}
|
|
|
- <li><i class="icon-globe"></i> {{ change.ip }}</li>
|
|
|
- <li><i class="icon-qrcode"></i> {{ change.agent }}</li>
|
|
|
- {% endif %}
|
|
|
- {% if change.change != 0 %}<li><i class="icon-{% if change.change > 0 %}plus{% elif change.change < 0 %}minus{% endif %}"></i> {% if change.change > 0 -%}
|
|
|
- {% trans chars=change.change %}Added one character{% pluralize %}Added {{ chars }} characters{% endtrans %}
|
|
|
- {%- elif change.change < 0 -%}
|
|
|
- {% trans chars=change.change|abs %}Removed one character{% pluralize %}Removed {{ chars }} characters{% endtrans %}
|
|
|
- {%- endif %}</li>{% endif %}
|
|
|
-</ul>
|
|
|
-{% if change.reason %}
|
|
|
-<p class="lead">{{ change.reason }}</p>
|
|
|
-{% endif %}
|
|
|
-{% if acl.threads.can_edit_reply(user, forum, thread, post) or prev or next %}
|
|
|
-<div class="list-nav">
|
|
|
- {{ pager() }}
|
|
|
- {% if user.is_authenticated() and acl.threads.can_make_revert(forum, thread) %}
|
|
|
- <form class="form-inline" action="{% url 'changelog_revert' thread=thread.pk, slug=thread.slug, post=post.pk, change=change.pk %}" method="post">
|
|
|
- <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
|
|
|
- <ul class="nav nav-pills pull-right">
|
|
|
- <li class="danger"><button type="submit" class="btn btn-danger">{% trans %}Revert this edit{% endtrans %}</button></li>
|
|
|
+{% block container %}
|
|
|
+<div class="page-header header-primary">
|
|
|
+ <div class="container">
|
|
|
+ {{ messages_list(messages) }}
|
|
|
+ <ul class="breadcrumb">
|
|
|
+ {{ self.breadcrumb() }}</li>
|
|
|
</ul>
|
|
|
- </form>
|
|
|
- {%- endif %}
|
|
|
-</div>
|
|
|
-{% endif %}
|
|
|
-<div class="well diff">
|
|
|
- <table>
|
|
|
- {% for line in diff %}{% if line[0] != "?" %}
|
|
|
- <tr>
|
|
|
- <td class="line"><a href="#{{ l }}">{{ l }}.</a></td>
|
|
|
- <td class="{% if line[0] == '+' %}added{% elif line[0] == '-' %}removed{% else %}stag{% endif %}{% if l is even %} even{% endif %}">{% if line[2:] %}{{ line[2:] }}{% else %} {% endif %}</td>
|
|
|
- </tr>
|
|
|
- {% set l = l + 1 %}
|
|
|
- {% endif %}{% endfor %}
|
|
|
- </table>
|
|
|
+ <h1>{% trans date=change.date|reltimesince|low %}Edit from {{ date }}{% endtrans %} <small>{% trans post=post.pk %}Post #{{ post }} Changelog{% endtrans %}</small></h1>
|
|
|
+ <ul class="unstyled header-stats pull-left">
|
|
|
+ <li><i class="icon-time"></i> <a href="{% url 'thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}">{{ post.date|reltimesince }}</a></li>
|
|
|
+ <li><i class="icon-user"></i> {% if change.user_id %}<a href="{% url 'user' user=change.user_id, username=change.user_slug %}">{{ change.user_name }}</a>{% else %}{{ change.user_name }}{% endif %}</li>
|
|
|
+ {% if acl.users.can_see_users_trails() %}
|
|
|
+ <li><i class="icon-globe"></i> {{ change.ip }}</li>
|
|
|
+ <li><i class="icon-qrcode"></i> {{ change.agent }}</li>
|
|
|
+ {% endif %}
|
|
|
+ {% if change.change != 0 %}<li><i class="icon-{% if change.change > 0 %}plus{% elif change.change < 0 %}minus{% endif %}"></i> {% if change.change > 0 -%}
|
|
|
+ {% trans chars=change.change %}Added one character{% pluralize %}Added {{ chars }} characters{% endtrans %}
|
|
|
+ {%- elif change.change < 0 -%}
|
|
|
+ {% trans chars=change.change|abs %}Removed one character{% pluralize %}Removed {{ chars }} characters{% endtrans %}
|
|
|
+ {%- endif %}</li>{% endif %}
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
-{% if prev or next %}
|
|
|
-<div class="list-nav last">
|
|
|
- {{ pager() }}
|
|
|
+
|
|
|
+<div class="container container-primary">
|
|
|
+ <div class="post-diff">
|
|
|
+ {% if message %}
|
|
|
+ <div class="messages-list">
|
|
|
+ {{ macros.draw_message(message) }}
|
|
|
+ </div>
|
|
|
+ {% endif %}
|
|
|
+
|
|
|
+ {% if change.reason %}
|
|
|
+ <p class="lead">{{ change.reason }}</p>
|
|
|
+ {% endif %}
|
|
|
+
|
|
|
+ {% if acl.threads.can_edit_reply(user, forum, thread, post) or prev or next %}
|
|
|
+ <div class="diff-extra">
|
|
|
+ {{ pager() }}
|
|
|
+ {% if user.is_authenticated() and acl.threads.can_make_revert(forum, thread) %}
|
|
|
+ <form class="form-inline pull-right" action="{% url 'changelog_revert' thread=thread.pk, slug=thread.slug, post=post.pk, change=change.pk %}" method="post">
|
|
|
+ <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
|
|
|
+ <button type="submit" class="btn btn-danger">{% trans %}Revert this edit{% endtrans %}</button></li>
|
|
|
+ </form>
|
|
|
+ {%- endif %}
|
|
|
+ </div>
|
|
|
+ {% endif %}
|
|
|
+
|
|
|
+ <div class="post-diff-details">
|
|
|
+ <table>
|
|
|
+ <tbody>
|
|
|
+ {% for line in diff %}{% if line[0] != "?" %}
|
|
|
+ <tr>
|
|
|
+ <td class="line"><a href="#{{ l }}">{{ l }}.</a></td>
|
|
|
+ <td class="{% if line[0] == '+' %}added{% elif line[0] == '-' %}removed{% else %}stag{% endif %}{% if l is even %} even{% endif %}">{% if line[2:] %}{{ line[2:] }}{% else %} {% endif %}</td>
|
|
|
+ </tr>
|
|
|
+ {% set l = l + 1 %}
|
|
|
+ {% endif %}{% endfor %}
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ {% if prev or next %}
|
|
|
+ <div class="diff-extra">
|
|
|
+ {{ pager() }}
|
|
|
+ </div>
|
|
|
+ {% endif %}
|
|
|
+
|
|
|
+ </div>
|
|
|
</div>
|
|
|
-{% endif %}
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
{% macro pager() %}
|
|
|
- <ul class="pager pull-left">
|
|
|
-{% if prev %}<li><a href="{% url 'changelog_diff' thread=thread.pk, slug=thread.slug, post=post.pk, change=prev.pk %}"><i class="icon-chevron-left"></i> {{ prev.date|reldate }}</a></li>{% endif %}
|
|
|
-{% if next %}<li><a href="{% url 'changelog_diff' thread=thread.pk, slug=thread.slug, post=post.pk, change=next.pk %}">{{ next.date|reldate }} <i class="icon-chevron-right"></i></a></li>{% endif %}
|
|
|
+{% if prev or prev %}
|
|
|
+<div class="pagination pull-left">
|
|
|
+ <ul>
|
|
|
+ {% if prev %}<li><a href="{% url 'changelog_diff' thread=thread.pk, slug=thread.slug, post=post.pk, change=prev.pk %}"><i class="icon-chevron-left"></i> {{ prev.date|reldate }}</a></li>{% endif %}
|
|
|
+ {% if next %}<li><a href="{% url 'changelog_diff' thread=thread.pk, slug=thread.slug, post=post.pk, change=next.pk %}">{{ next.date|reldate }} <i class="icon-chevron-right"></i></a></li>{% endif %}
|
|
|
</ul>
|
|
|
+</div>
|
|
|
+{% endif %}
|
|
|
{% endmacro %}
|