1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- {% extends "cranefly/layout.html" %}
- {% import "cranefly/macros.html" as macros with context %}
- {% block title %}{{ macros.page_title(title=(_("Post #%(post)s Changelog") % {'post': post.pk}),parent=thread.name) }}{% endblock %}
- {% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
- <li><a href="{{ url('private_threads') }}">{% trans %}Private Threads{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
- <li><a href="{{ url('private_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('private_thread_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 container %}
- <div class="page-header header-primary">
- <div class="container">
- {{ messages_list(messages) }}
- <ul class="breadcrumb">
- {{ self.breadcrumb() }}</li>
- </ul>
- <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('private_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>
- <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('private_thread_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>
- {% endblock %}
- {% macro pager() %}
- {% if prev or prev %}
- <div class="pagination pull-left">
- <ul>
- {% if prev %}<li><a href="{{ url('private_thread_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('private_thread_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 %}
|