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 f8aced8 Link to the file viewer from the draft promotion page
f8aced8 is described below
commit f8aced81029de4b5a30b241e4649943122ae4ff2
Author: Sean B. Palmer <[email protected]>
AuthorDate: Fri Apr 4 20:00:19 2025 +0100
Link to the file viewer from the draft promotion page
---
atr/routes/draft.py | 5 +++++
atr/templates/draft-promote.html | 8 ++++++++
2 files changed, 13 insertions(+)
diff --git a/atr/routes/draft.py b/atr/routes/draft.py
index b70df80..680d21d 100644
--- a/atr/routes/draft.py
+++ b/atr/routes/draft.py
@@ -422,9 +422,14 @@ async def promote(session: routes.CommitterSession) -> str
| response.Response:
logging.exception("Error promoting candidate draft:")
return await session.redirect(promote, error=f"Error promoting
candidate draft: {e!s}")
+ candidate_draft_files = {}
+ for candidate_draft in user_candidate_drafts:
+ candidate_draft_files[candidate_draft.name] = await
_number_of_release_files(candidate_draft)
+
return await quart.render_template(
"draft-promote.html",
candidate_drafts=user_candidate_drafts,
+ candidate_draft_files=candidate_draft_files,
promote_form=promote_form,
delete_form=delete_form,
)
diff --git a/atr/templates/draft-promote.html b/atr/templates/draft-promote.html
index 904d604..eada731 100644
--- a/atr/templates/draft-promote.html
+++ b/atr/templates/draft-promote.html
@@ -53,6 +53,14 @@
<span class="atr-candidate-meta-item">Phase: {{
candidate_draft.phase.value.upper() }}</span>
<span class="atr-candidate-meta-item">Created: {{
candidate_draft.created.strftime("%Y-%m-%d %H:%M:%S UTC") }}</span>
</div>
+ <div class="mt-3 d-flex flex-wrap gap-3 text-secondary fs-6">
+ <span class="atr-candidate-meta-item">
+ <a href="{{ as_url(routes.draft.viewer,
project_name=candidate_draft.project.name,
version_name=candidate_draft.version) }}"
+ class="btn btn-outline-primary btn-sm">
+ View {{ candidate_draft_files[candidate_draft.name] }} files
+ </a>
+ </span>
+ </div>
</div>
</div>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]