2018-03-21 17:41:34 +01:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block title %}
|
2019-01-28 23:28:47 +01:00
|
|
|
Edit release | {{ package.title }}
|
2018-03-21 17:41:34 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2020-01-19 01:02:33 +01:00
|
|
|
<h2>{{ _("Edit Release") }}</h2>
|
2018-12-22 23:29:30 +01:00
|
|
|
{% from "macros/forms.html" import render_field, render_submit_field, render_checkbox_field %}
|
2018-03-21 17:41:34 +01:00
|
|
|
<form method="POST" action="">
|
|
|
|
{{ form.hidden_tag() }}
|
|
|
|
|
|
|
|
{% if package.checkPerm(current_user, "MAKE_RELEASE") %}
|
|
|
|
{{ render_field(form.title) }}
|
2018-03-21 20:36:53 +01:00
|
|
|
{% else %}
|
|
|
|
Title: {{ release.title }}
|
2018-03-21 17:41:34 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if package.checkPerm(current_user, "CHANGE_RELEASE_URL") %}
|
|
|
|
{{ render_field(form.url) }}
|
2018-03-21 20:36:53 +01:00
|
|
|
{% else %}
|
|
|
|
Url: <a href="{{ release.url }}">{{ release.url }}</a><br />
|
2018-03-21 17:41:34 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2018-07-28 15:48:03 +02:00
|
|
|
{% if release.commit_hash %}
|
|
|
|
Commit Hash: {{ release.commit_hash }}<br />
|
|
|
|
{% endif %}
|
|
|
|
|
2018-05-23 20:17:44 +02:00
|
|
|
{% if release.task_id %}
|
2019-11-16 00:51:42 +01:00
|
|
|
Importing... <a href="{{ url_for('tasks.check', id=release.task_id, r=release.getEditURL()) }}">view task</a><br />
|
2018-05-23 20:17:44 +02:00
|
|
|
{% if package.checkPerm(current_user, "CHANGE_RELEASE_URL") %}
|
|
|
|
{{ render_field(form.task_id) }}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<br />
|
2018-03-21 20:36:53 +01:00
|
|
|
{% else %}
|
2021-03-07 16:00:36 +01:00
|
|
|
{% if release.checkPerm(current_user, "APPROVE_RELEASE") %}
|
2018-12-22 23:29:30 +01:00
|
|
|
{{ render_checkbox_field(form.approved, class_="my-3") }}
|
2018-05-23 20:30:11 +02:00
|
|
|
{% else %}
|
|
|
|
Approved: {{ release.approved }}
|
|
|
|
{% endif %}
|
2018-03-21 17:41:34 +01:00
|
|
|
{% endif %}
|
2019-01-28 23:28:47 +01:00
|
|
|
|
2020-12-04 02:43:20 +01:00
|
|
|
<h3 class="mt-5">Supported Minetest versions</h3>
|
|
|
|
|
2019-01-28 21:48:07 +01:00
|
|
|
<div class="row">
|
|
|
|
{{ render_field(form.min_rel, class_="col-sm-6") }}
|
|
|
|
{{ render_field(form.max_rel, class_="col-sm-6") }}
|
|
|
|
</div>
|
2018-03-21 17:41:34 +01:00
|
|
|
|
2019-01-28 23:28:47 +01:00
|
|
|
<p id="minmax_warning" style="color:#f00; display: none;">
|
|
|
|
Maximum must be greater than or equal to the minimum!
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
2020-12-04 02:43:20 +01:00
|
|
|
Set the minimum and maximum Minetest versions supported.
|
|
|
|
This release will be hidden to clients outside of that range.<br />
|
2019-01-29 01:18:49 +01:00
|
|
|
Leave both as None if in doubt.
|
2020-12-04 02:43:20 +01:00
|
|
|
You can <a href="/help/package_config/">set this automatically</a> in the .conf of your package.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
You cannot select the oldest version for min or the newest version
|
|
|
|
for max as this does not make sense - you can't predict the future.
|
2019-01-28 23:28:47 +01:00
|
|
|
</p>
|
|
|
|
|
2020-12-04 02:43:20 +01:00
|
|
|
<p class="mt-5">
|
|
|
|
{{ render_submit_field(form.submit) }}
|
|
|
|
</p>
|
2018-03-21 17:41:34 +01:00
|
|
|
</form>
|
2020-01-19 01:02:33 +01:00
|
|
|
|
|
|
|
<h2 class="mt-5">{{ _("Delete Release") }}</h2>
|
|
|
|
|
|
|
|
{% if release.checkPerm(current_user, "DELETE_RELEASE") %}
|
2020-01-19 21:16:03 +01:00
|
|
|
<form method="POST" action="{{ release.getDeleteURL() }}" class="alert alert-secondary mb-5">
|
2020-01-19 01:02:33 +01:00
|
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
2020-01-19 21:16:03 +01:00
|
|
|
<input class="btn btn-sm btn-danger float-right" type="submit" value="{{ _('Delete') }}">
|
|
|
|
<b>{{ _("This is permanent.") }}</b>
|
|
|
|
{{ _("Any associated uploads will not be deleted immediately, but the release will no longer be listed.") }}
|
|
|
|
<div style="clear:both;"></div>
|
2020-01-19 01:02:33 +01:00
|
|
|
</form>
|
|
|
|
{% else %}
|
|
|
|
<div class="alert alert-secondary mb-5">
|
|
|
|
{{ _("You cannot delete the latest release; please create a newer one first.") }}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2018-03-21 17:41:34 +01:00
|
|
|
{% endblock %}
|
2019-01-28 23:28:47 +01:00
|
|
|
|
|
|
|
{% block scriptextra %}
|
|
|
|
<script src="/static/release_minmax.js?v=1"></script>
|
|
|
|
{% endblock %}
|