From 933a23c9c7eee3bfe13d8af4a3d109deced7b7fc Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 25 Jan 2020 01:29:55 +0000 Subject: [PATCH] Promote webhooks in release creation page --- app/templates/packages/release_new.html | 18 ++++++++++++++++++ app/templates/packages/view.html | 9 --------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/app/templates/packages/release_new.html b/app/templates/packages/release_new.html index 9392ff6..9a95530 100644 --- a/app/templates/packages/release_new.html +++ b/app/templates/packages/release_new.html @@ -5,6 +5,24 @@ {% endblock %} {% block content %} +

+ {{ _("Learn more") }} + {% if package.author == current_user and package.checkPerm(current_user, "APPROVE_RELEASE") and package.getIsOnGitHub() %} + {{ _("Setup webhook") }} + + + {{ _("Set up a webhook on GitHub to create releases automatically.") }} + {% elif package.repo %} + + + {{ _("You can create releases automatically when you push commits or tags to your repository.") }} + {% else %} + + + {{ _("Using git will allow you to create releases automatically when you push code or tags.") }} + {% endif %} +

+ {% from "macros/forms.html" import render_field, render_submit_field, render_radio_field %}
{{ form.hidden_tag() }} diff --git a/app/templates/packages/view.html b/app/templates/packages/view.html index 9dce0d4..77b84da 100644 --- a/app/templates/packages/view.html +++ b/app/templates/packages/view.html @@ -364,15 +364,6 @@ - {% if package.author == current_user and package.checkPerm(current_user, "APPROVE_RELEASE") and package.getIsOnGitHub() %} -

- - Set up a webhook - - to create releases automatically. -

- {% endif %} -
{% if package.approved and package.checkPerm(current_user, "CREATE_THREAD") %}