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 41707fa  Link to existing drafts from the add a draft page
41707fa is described below

commit 41707fa039d2bd21ca4580b1775f8f102fa828e3
Author: Sean B. Palmer <[email protected]>
AuthorDate: Thu Apr 10 15:18:05 2025 +0100

    Link to existing drafts from the add a draft page
---
 atr/templates/draft-add.html | 33 +++++++++++++++++++++++++++++----
 1 file changed, 29 insertions(+), 4 deletions(-)

diff --git a/atr/templates/draft-add.html b/atr/templates/draft-add.html
index 9d7b466..b1923a0 100644
--- a/atr/templates/draft-add.html
+++ b/atr/templates/draft-add.html
@@ -77,8 +77,17 @@
                   {% endif %}
                   <p class="card-text">
                     {% if candidate_drafts|length > 0 %}
-                      This project already has {{ candidate_drafts|length }} 
candidate draft{{ "s" if candidate_drafts|length > 1 else "" }},
-                      but to create another one, use the command below.
+                      This project already has {{ candidate_drafts|length }} 
candidate draft{{ "s" if candidate_drafts|length > 1 else "" }}:
+                    </p>
+                    <ul>
+                      {% for draft in candidate_drafts %}
+                        <li>
+                          <a href="{{ as_url(routes.draft.drafts) }}#{{ 
project.name }}-{{ draft.version }}">{{ draft.version }}</a>
+                        </li>
+                      {% endfor %}
+                    </ul>
+                    <p>
+                      But to create another one, use the command below.
                     {% else %}
                       This project does not have a candidate draft.
                       To create one and add files, use the command below.
@@ -107,14 +116,30 @@
                   {% endif %}
                   <p class="card-text">
                     {% if candidate_drafts|length > 0 %}
-                      This project already has {{ candidate_drafts|length }} 
candidate draft{{ "s" if candidate_drafts|length > 1 else "" }},
-                      but to create another one, use the command below.
+                      This project already has {{ candidate_drafts|length }} 
candidate draft{{ "s" if candidate_drafts|length > 1 else "" }}:
+                    </p>
+                    <ul>
+                      {% for draft in candidate_drafts %}
+                        <li>
+                          <a href="{{ as_url(routes.draft.drafts) }}#{{ 
project.name }}-{{ draft.version }}">{{ draft.version }}</a>
+                        </li>
+                      {% endfor %}
+                    </ul>
+                    <p>
+                      But to create another one, use the command below.
                     {% else %}
                       This project does not have a candidate draft.
                       To create one, you must be a member of the PMC.
                     {% endif %}
                   </p>
                 </div>
+                <div class="card-footer bg-light border-1 pt-4 pb-4 
position-relative">
+                  <button class="btn btn-sm btn-outline-secondary atr-copy-btn 
fs-6 position-absolute top-0 end-0 m-2"
+                          data-clipboard-target="#cmd-newdraft-{{ 
project.name|slugify }}">
+                    <i class="bi bi-clipboard"></i> Copy
+                  </button>
+                  <pre class="small mb-0" id="cmd-newdraft-{{ 
project.name|slugify }}">rsync -av -e 'ssh -p 2222' ${YOUR_FILES}/ {{ asf_id 
}}@{{ server_domain }}:/{{ project.name }}/${VERSION}/</pre>
+                </div>
               </div>
             </div>
           {% endif %}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to