This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/main by this push:
new 0d29566 Restore the template for viewing files at any phase
0d29566 is described below
commit 0d295669cb616f39f9fe16f2fa62a38f3d9587d8
Author: Sean B. Palmer <[email protected]>
AuthorDate: Fri Nov 14 20:31:57 2025 +0000
Restore the template for viewing files at any phase
---
atr/templates/phase-view.html | 136 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 136 insertions(+)
diff --git a/atr/templates/phase-view.html b/atr/templates/phase-view.html
new file mode 100644
index 0000000..946a676
--- /dev/null
+++ b/atr/templates/phase-view.html
@@ -0,0 +1,136 @@
+{% extends "layouts/base.html" %}
+
+{% block title %}
+ Files in {{ release.short_display_name }} ~ ATR
+{% endblock title %}
+
+{% block description %}
+ View the files in the {{ release.short_display_name }} release.
+{% endblock description %}
+
+{% block content %}
+ <p class="d-flex justify-content-between align-items-center">
+ {# TODO: Use mappings.py #}
+ {% if phase_key == "draft" %}
+ <a href="{{ as_url(get.compose.selected,
project_name=release.project.name, version_name=release.version) }}"
+ class="atr-back-link">← Back to Compose {{ release.short_display_name
}}</a>
+ <span>
+ <strong class="atr-phase-one atr-phase-symbol">①</strong>
+ <span class="atr-phase-one atr-phase-label">COMPOSE</span>
+ <span class="atr-phase-arrow">→</span>
+ <span class="atr-phase-symbol-other">②</span>
+ <span class="atr-phase-arrow">→</span>
+ <span class="atr-phase-symbol-other">③</span>
+ </span>
+ {% elif phase_key == "candidate" %}
+ <a href="{{ as_url(get.vote.selected, project_name=release.project.name,
version_name=release.version) }}"
+ class="atr-back-link">← Back to Vote for {{
release.short_display_name }}</a>
+ <span>
+ <span class="atr-phase-symbol-other">①</span>
+ <span class="atr-phase-arrow">→</span>
+ <strong class="atr-phase-two atr-phase-symbol">②</strong>
+ <span class="atr-phase-two atr-phase-label">VOTE</span>
+ <span class="atr-phase-arrow">→</span>
+ <span class="atr-phase-symbol-other">③</span>
+ </span>
+ {% elif phase_key == "preview" %}
+ <a href="{{ as_url(get.finish.selected,
project_name=release.project.name, version_name=release.version) }}"
+ class="atr-back-link">← Back to Finish {{ release.short_display_name
}}</a>
+ <span>
+ <span class="atr-phase-symbol-other">①</span>
+ <span class="atr-phase-arrow">→</span>
+ <span class="atr-phase-symbol-other">②</span>
+ <span class="atr-phase-arrow">→</span>
+ <strong class="atr-phase-three atr-phase-symbol">③</strong>
+ <span class="atr-phase-three atr-phase-label">FINISH</span>
+ </span>
+ {% else %}
+ <a href="{{ as_url(get.release.releases) }}" class="atr-back-link">←
Back to Releases</a>
+ {% endif %}
+ </p>
+
+ <h1>
+ Files in <strong>{{ release.project.short_display_name }}</strong> <em>{{
release.version }}</em>
+ </h1>
+
+ <div class="card mb-4">
+ <div class="card-header d-flex justify-content-between align-items-center">
+ <h5 class="mb-0">Release information</h5>
+ </div>
+ <div class="card-body">
+ <div class="row">
+ <div class="col-md-6">
+ <p>
+ <strong>Project:</strong> {{ release.project.display_name }}
+ </p>
+ <p>
+ <strong>Label:</strong> {{ release.name }}
+ </p>
+ </div>
+ <div class="col-md-6">
+ <p>
+ <strong>Created:</strong> {{ release.created.strftime("%Y-%m-%d
%H:%M:%S") }}
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="card mb-4">
+ <div class="card-header d-flex justify-content-between align-items-center">
+ <h5 class="mb-0">Files</h5>
+ </div>
+ <div class="card-body">
+ {% if file_stats|length > 0 %}
+ <div class="table-responsive">
+ <table class="table table-striped table-hover">
+ <thead>
+ <tr>
+ <th>Permissions</th>
+ <th>File path</th>
+ <th>Size</th>
+ <th>Modified</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for stat in file_stats %}
+ <tr>
+ <td>{{ format_permissions(stat.permissions) }}</td>
+ <td>
+ {% if stat.is_file %}
+ {% if phase_key == "draft" %}
+ {% set file_url = as_url(get.file.selected_path,
project_name=release.project.name, version_name=release.version,
file_path=stat.path) %}
+ {% elif phase_key == "candidate" %}
+ {% set file_url = as_url(get.candidate.view_path,
project_name=release.project.name, version_name=release.version,
file_path=stat.path) %}
+ {% elif phase_key == "preview" %}
+ {% set file_url = as_url(get.preview.view_path,
project_name=release.project.name, version_name=release.version,
file_path=stat.path) %}
+ {% elif phase_key == "release" %}
+ {% set file_url = as_url(get.release.view_path,
project_name=release.project.name, version_name=release.version,
file_path=stat.path) %}
+ {% else %}
+ {# TODO: Should probably disable the link here #}
+ {% set file_url = "#" %}
+ {% endif %}
+ <a href="{{ file_url }}">{{ stat.path }}</a>
+ {% else %}
+ <strong>{{ stat.path }}/</strong>
+ {% endif %}
+ </td>
+ <td>
+ {% if stat.is_file %}
+ {{ format_file_size(stat.size) }}
+ {% else %}
+ -
+ {% endif %}
+ </td>
+ <td>{{ format_datetime(stat.modified) }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ </div>
+ {% else %}
+ <div class="alert alert-info">This {{ phase }} does not have any
files.</div>
+ {% endif %}
+ </div>
+ </div>
+{% endblock content %}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]