2021-05-04 04:15:26 +02:00
|
|
|
{% extends "packages/package_base.html" %}
|
2018-05-25 19:28:24 +02:00
|
|
|
|
|
|
|
{% block title %}
|
2021-05-04 04:15:26 +02:00
|
|
|
Remove {{ package.title }}
|
2018-05-25 19:28:24 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2021-05-04 04:15:26 +02:00
|
|
|
<form method="POST" action="">
|
2022-01-08 00:27:00 +01:00
|
|
|
<h2 class="mt-0">{{ _("Remove %(title)s", title=package.title) }}</h2>
|
2020-09-16 19:05:37 +02:00
|
|
|
<p>
|
2022-01-08 00:27:00 +01:00
|
|
|
{{ _("In order to avoid data loss, you cannot permanently delete packages.
|
2020-09-16 19:05:37 +02:00
|
|
|
You can remove them from ContentDB, which will cause them to not be
|
|
|
|
visible to any users and they may be permanently deleted in the future.
|
2022-01-08 00:27:00 +01:00
|
|
|
The Admin can restore removed packages, if needed.") }}
|
2020-09-16 19:05:37 +02:00
|
|
|
</p>
|
2018-05-25 19:28:24 +02:00
|
|
|
|
2020-09-16 19:05:37 +02:00
|
|
|
{% if package.approved %}
|
|
|
|
<p>
|
2022-01-08 00:27:00 +01:00
|
|
|
{{ _("Unapproving a package will put it back into Draft, where
|
|
|
|
it can be submitted for approval again.") }}
|
2020-09-16 19:05:37 +02:00
|
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
|
2023-12-03 14:47:52 +01:00
|
|
|
{% if hard_deps %}
|
|
|
|
{% set hard_deps_links -%}
|
|
|
|
{%- for dep in hard_deps -%}
|
|
|
|
{%- if not loop.first and loop.length > 2 %}, {% endif -%}
|
2023-12-03 14:48:57 +01:00
|
|
|
{%- if loop.last and loop.length > 1 %} {{ _("and") }} {% endif -%}
|
2023-12-03 14:47:52 +01:00
|
|
|
<a href="{{ dep.get_url('packages.view') }}">{{ dep.title }}</a>
|
|
|
|
{%- endfor -%}
|
|
|
|
{%- endset %}
|
|
|
|
<p class="text-danger">
|
|
|
|
<i class="fas fa-exclamation-triangle me-2"></i>
|
|
|
|
{{ _("Removing this package will break the following mods: %(names)s", names=hard_deps_links) }}
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
|
2020-09-16 19:05:37 +02:00
|
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
|
|
|
|
2023-08-22 20:58:43 +02:00
|
|
|
<div class="form-group mb-3">
|
|
|
|
<label for="reason" class="form-label">{{ _("Reason") }}</label>
|
|
|
|
<span class="ms-1 text-danger">
|
2023-08-21 00:33:39 +02:00
|
|
|
<small>
|
|
|
|
<i class="fas fa-asterisk"></i>
|
|
|
|
</small>
|
|
|
|
</span>
|
2023-08-22 20:58:43 +02:00
|
|
|
<span class="ms-3 text-muted">
|
2023-08-21 00:33:39 +02:00
|
|
|
{{ _("Required") }}
|
|
|
|
</span>
|
2022-01-09 22:12:29 +01:00
|
|
|
<input id="reason" class="form-control" type="text" name="reason" required minlength="5">
|
2022-01-09 22:14:59 +01:00
|
|
|
<small class="form-text text-muted">
|
|
|
|
{{ _("Reason for unapproval / deletion, this is shown in the audit log") }}
|
|
|
|
</small>
|
2022-01-09 22:12:29 +01:00
|
|
|
</div>
|
|
|
|
|
2023-08-22 20:58:43 +02:00
|
|
|
<a class="btn btn-secondary float-end" href="{{ package.get_url('packages.view') }}">{{ _("Cancel") }}</a>
|
2020-09-16 19:05:37 +02:00
|
|
|
|
2023-08-22 20:58:43 +02:00
|
|
|
<input type="submit" name="delete" value="{{ _('Remove') }}" class="btn btn-danger me-2" />
|
2020-09-16 19:05:37 +02:00
|
|
|
|
|
|
|
{% if package.approved %}
|
2023-10-15 23:16:05 +02:00
|
|
|
<input type="submit" name="unapprove" value="{{ _('Unpublish') }}" class="btn btn-warning" />
|
2020-09-16 19:05:37 +02:00
|
|
|
{% endif %}
|
2021-05-04 04:15:26 +02:00
|
|
|
</form>
|
2018-05-25 19:28:24 +02:00
|
|
|
{% endblock %}
|