{% extends 'layout_repo.html' %} {% from 'include/modal_dialog.html' import modal_dialog, button_confirm, modal_confirm %} {% set active_page='repo' %} {% set active_repo_page='history' %} {% block title %} {% trans %}History{% endtrans %} {% endblock title %} {% block content %}
{{ button_confirm(label=_('Delete History'), target="#delete-repo-modal", disabled=not is_maintainer, redirect=url_for('browse', repo), url=url_for('delete', repo, path)) }}

{% set restore_dates = path_obj.change_dates[: -limit - 1 : -1] %} {% for restore_date in restore_dates %}
- {{ restore_date | lastupdated }}
  {% if path_obj.isdir %}
  {% trans %}Download{% endtrans %}
  {% else %} {{ path_obj.get_file_size(restore_date) | filesize }} {% trans %}Download{% endtrans %} {% endif %}
{% endfor %} {% if limit == restore_dates|count %}
- {% trans %}Show more...{% endtrans %}
{% endif %}

{{ modal_confirm( id="delete-repo-modal", title=_('Confirmation required'), message=_("You are about to permanently delete this file or folder history. Deleted history CANNOT be restored! Are you ABSOLUTELY sure?"), submit=_('Delete'), confirm_value=repo.display_name if path_obj.isroot else path_obj.display_name) }} {% endblock %}