{% extends "widgy/history.html" %} {% load i18n %} {% load url from future %} {% load widgy_tags %} {% block commit_info %} {# Better solution? I'm all ears #} {% with author=commit.author %} {% with created_at=commit.created_at|date:"SHORT_DATETIME_FORMAT" %} {% with approved_by=commit.reviewedversioncommit.approved_by %} {% with approved_at=commit.reviewedversioncommit.approved_at|date:"SHORT_DATETIME_FORMAT" %} {% with is_approved=commit.reviewedversioncommit.is_approved %} {% with is_published=commit.is_published %} {% with publish_at=commit.publish_at|date:"SHORT_DATETIME_FORMAT" %} {% if is_approved and not is_published %} {% blocktrans %} {{ created_at }} by {{ author }}, approved by {{ approved_by }}. (Scheduled to be published at {{ publish_at }}.)* {% endblocktrans %} {% elif is_approved and commit.publish_at > commit.created_at and is_published %} {% blocktrans %} {{ created_at }} by {{ author }}, approved by {{ approved_by }}. (Was published at {{ publish_at }}.) {% endblocktrans %} {% elif is_approved %} {% blocktrans %} {{ created_at }} by {{ author }}, approved by {{ approved_by }}. {% endblocktrans %} {% else %} {% blocktrans %} {{ created_at }} by {{ author }}. (Not approved yet.)* {% endblocktrans %} {% endif %} {% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %} {% endblock %} {% block commit_actions %} {{ block.super }} {% has_change_permission site commit.reviewedversioncommit as can_change %} {% if can_change and commit.is_interesting_to_approve_or_unapprove %} {% if not commit.reviewedversioncommit.is_approved %} {% else %} {# unapprove_view avoid generating a UndoApprovalsForm for each commit #} {% endif %} {% csrf_token %} {% endif %} {% endblock %}