{% load i18n %} {% with prefix=viewer_prefix|default:'log-viewer' %} {% with wrapper_class=viewer_wrapper_class|default:'log-viewer-module' %} {% translate "Copy to clipboard" as default_copy_label %} {% translate "Log copied to your clipboard." as default_copy_success %} {% translate "Copy failed. Use your browser copy command instead." as default_copy_error %} {% translate "Lines to display" as default_limit_label %} {% translate "Download log" as default_download_label %} {% translate "No log entries recorded yet." as default_empty_message %}
{% if viewer_heading or log_filename or log_download_url %}
{% if viewer_heading %}

{{ viewer_heading }}

{% endif %} {% if log_filename %} {{ log_filename }} {% endif %} {% if log_download_url %} {{ download_label|default:default_download_label }} {% endif %}
{% endif %}
{% if not hide_limit_slider %}
{% for option in log_limit_options %}{% endfor %}
{% endif %} {% if show_copy|default:True %} {% endif %}
{% if not hide_limit_slider %}{{ log_limit_options|json_script:prefix|add:'-limit-data' }}{% endif %}
{% with provided_content=log_content|default_if_none:'' %} {% if provided_content %}
{{ provided_content }}
{% else %} {% with log_lines=log|default:log_lines %} {% if log_lines %}
{{ log_lines|join:'\n' }}
{% else %}
{{ default_empty_message }}
{% endif %} {% endwith %} {% endif %} {% endwith %}
{% endwith %} {% endwith %}