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-release.git
The following commit(s) were added to refs/heads/main by this push:
new c164037 Change the framing of the draft downloads page depending on
context
c164037 is described below
commit c164037ed2b20a9118601ffb981466614ad09304
Author: Sean B. Palmer <[email protected]>
AuthorDate: Wed Jun 18 20:30:31 2025 +0100
Change the framing of the draft downloads page depending on context
---
atr/routes/compose.py | 2 ++
atr/templates/check-selected-release-info.html | 11 +++++++++--
atr/templates/download-all.html | 5 +++++
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/atr/routes/compose.py b/atr/routes/compose.py
index 8624e0c..b602553 100644
--- a/atr/routes/compose.py
+++ b/atr/routes/compose.py
@@ -77,6 +77,7 @@ async def check(
resolve_form = await resolve.ResolveForm.create_form()
empty_form = await util.EmptyForm.create_form()
vote_task_warnings = _warnings_from_vote_result(vote_task)
+ has_files = await util.has_files(release)
return await template.render(
"check-selected.html",
@@ -103,6 +104,7 @@ async def check(
archive_url=archive_url,
vote_task_warnings=vote_task_warnings,
empty_form=empty_form,
+ has_files=has_files,
)
diff --git a/atr/templates/check-selected-release-info.html
b/atr/templates/check-selected-release-info.html
index ea2fbb6..2b04290 100644
--- a/atr/templates/check-selected-release-info.html
+++ b/atr/templates/check-selected-release-info.html
@@ -33,9 +33,16 @@
<a href="{{ as_url(routes.upload.selected,
project_name=release.project.name, version_name=release.version) }}"
title="Upload files to this draft"
class="btn btn-primary"><i class="bi bi-upload me-1"></i> Upload
files</a>
+
<a href="{{ as_url(routes.download.all_selected,
project_name=release.project.name, version_name=release.version) }}"
- title="Download files"
- class="btn btn-primary"><i class="bi bi-download me-1"></i>
Download files</a>
+ title="Download {%- if has_files -%}files{%- else -%}links{%- endif
-%}"
+ class="btn btn-primary"><i class="bi bi-download me-1"></i> Download
+ {% if has_files %}
+ files
+ {% else %}
+ links
+ {% endif %}
+ </a>
<a href="{{ as_url(routes.revisions.selected,
project_name=release.project.name, version_name=release.version) }}"
title="View revision history"
class="btn btn-secondary"><i class="bi bi-clock-history me-1"></i>
Revisions</a>
diff --git a/atr/templates/download-all.html b/atr/templates/download-all.html
index 28204d7..0046d9a 100644
--- a/atr/templates/download-all.html
+++ b/atr/templates/download-all.html
@@ -54,6 +54,11 @@
<code>{{ file_count }}</code> files
{% endif %}
with a total size of <code>{{ formatted_size }}</code>.
+ {% if file_count == 0 %}
+ <br />
+ <br />
+ Although there are not yet any files in this release, this page gives
instructions and links that you can use or share to prepare for when files have
been added.
+ {% endif %}
</p>
<h2 id="download-zip">Download ZIP archive</h2>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]