Add reimport of package meta from latest release

Fixes #127
This commit is contained in:
rubenwardy
2020-07-12 02:22:35 +01:00
parent 868ced76a8
commit 284683e7e5
6 changed files with 123 additions and 4 deletions

View File

@@ -28,6 +28,17 @@
{{ _("Have you read the Package Inclusion Policy and Guidance yet?") }}
</div>
{% if package and package.checkPerm(current_user, "REIMPORT_META") and package.releases.first() %}
<form class="alert alert-secondary mb-5" method="post" action="{{ package.getUpdateFromReleaseURL() }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<input class="btn btn-sm btn-warning float-right" type="submit" value="{{ _('Import') }}" />
<b>{{ _("Reimport meta from latest release.") }}</b>
{{ _("This will override 'provides', 'dependencies', and 'optional_dependencies'.") }}
<div style="clear:both;"></div>
</form>
{% endif %}
<noscript>
<div class="alert alert-warning">
{{ _("Javascript is needed to improve the user interface, and is needed for features