mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-10 09:33:44 +01:00
95 lines
3.0 KiB
HTML
95 lines
3.0 KiB
HTML
{% extends "packages/package_base.html" %}
|
|
|
|
{% block title %}
|
|
{{ _("Edit release") }} - {{ package.title }}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<h1>{{ self.title() }}</h1>
|
|
|
|
{% from "macros/forms.html" import render_field, render_submit_field, render_checkbox_field %}
|
|
<form method="POST" action="">
|
|
{{ form.hidden_tag() }}
|
|
|
|
{% if package.checkPerm(current_user, "MAKE_RELEASE") %}
|
|
{{ render_field(form.title) }}
|
|
{% else %}
|
|
{{ _("Title") }}: {{ release.title }}
|
|
{% endif %}
|
|
|
|
{% if package.checkPerm(current_user, "CHANGE_RELEASE_URL") %}
|
|
{{ render_field(form.url) }}
|
|
{% else %}
|
|
{{ _("URL") }}: <a href="{{ release.url }}">{{ release.url }}</a><br />
|
|
{% endif %}
|
|
|
|
{% if release.commit_hash %}
|
|
{{ _("Commit Hash") }}: {{ release.commit_hash }}<br />
|
|
{% endif %}
|
|
|
|
{% if release.task_id %}
|
|
{{ _("Importing...") }}
|
|
<a href="{{ url_for('tasks.check', id=release.task_id, r=release.getEditURL()) }}">{{ _("view task") }}</a><br />
|
|
{% if package.checkPerm(current_user, "CHANGE_RELEASE_URL") %}
|
|
{{ render_field(form.task_id) }}
|
|
{% endif %}
|
|
|
|
<br />
|
|
{% else %}
|
|
{% if release.checkPerm(current_user, "APPROVE_RELEASE") %}
|
|
{{ render_checkbox_field(form.approved, class_="my-3") }}
|
|
{% else %}
|
|
{{ _("Approved") }}: {{ release.approved }}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
<h3 class="mt-5">{{ _("Supported Minetest versions") }}</h3>
|
|
|
|
<div class="row">
|
|
{{ render_field(form.min_rel, class_="col-sm-6") }}
|
|
{{ render_field(form.max_rel, class_="col-sm-6") }}
|
|
</div>
|
|
|
|
<p id="minmax_warning" style="color:#f00; display: none;">
|
|
{{ _("Maximum must be greater than or equal to the minimum!") }}
|
|
</p>
|
|
|
|
<p>
|
|
{{ _("Set the minimum and maximum Minetest versions supported.
|
|
This release will be hidden to clients outside of that range. ") }}
|
|
<br />
|
|
{{ _("Leave both as None if in doubt.") }}
|
|
|
|
{{ _("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.") }}
|
|
</p>
|
|
|
|
<p class="mt-5">
|
|
{{ render_submit_field(form.submit) }}
|
|
</p>
|
|
</form>
|
|
|
|
<h2 class="mt-5">{{ _("Delete Release") }}</h2>
|
|
|
|
{% if release.checkPerm(current_user, "DELETE_RELEASE") %}
|
|
<form method="POST" action="{{ release.getDeleteURL() }}" class="alert alert-secondary mb-5">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
|
<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>
|
|
</form>
|
|
{% else %}
|
|
<div class="alert alert-secondary mb-5">
|
|
{{ _("You cannot delete the latest release; please create a newer one first.") }}
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block scriptextra %}
|
|
<script src="/static/release_minmax.js?v=1"></script>
|
|
{% endblock %}
|