2018-12-21 17:06:52 +01:00
|
|
|
{% set query=package.name %}
|
|
|
|
|
2018-03-19 19:08:41 +01:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block title %}
|
2018-03-20 03:17:33 +01:00
|
|
|
{{ package.title }}
|
2018-03-19 19:08:41 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
2018-12-21 16:58:43 +01:00
|
|
|
{% block container %}
|
2018-03-21 20:03:14 +01:00
|
|
|
{% if not package.approved %}
|
|
|
|
<div class="box box_grey alert alert-warning">
|
|
|
|
<span class="icon_message"></span>
|
2018-05-21 23:26:48 +02:00
|
|
|
{% if package.releases.count() == 0 %}
|
2018-05-23 21:37:17 +02:00
|
|
|
{% if package.checkPerm(current_user, "MAKE_RELEASE") %}
|
|
|
|
You need to create a release before this package can be approved.
|
|
|
|
<p>
|
|
|
|
A release is a single downloadable version of your {{ package.type.value | lower }}.
|
|
|
|
You need to create releases even if you use a rolling release development cycle,
|
|
|
|
as Minetest needs them to check for updates.
|
|
|
|
</p>
|
2018-12-21 15:45:54 +01:00
|
|
|
<a class="btn" href="{{ package.getCreateReleaseURL() }}">Create Release</a>
|
2018-05-23 21:37:17 +02:00
|
|
|
{% else %}
|
|
|
|
A release is required before this package can be approved.
|
|
|
|
{% endif %}
|
2018-05-27 19:00:23 +02:00
|
|
|
|
|
|
|
{% elif (package.type == package.type.GAME or package.type == package.type.TXP) and package.screenshots.count() == 0 %}
|
|
|
|
You need to add at least one screenshot.
|
|
|
|
|
2018-07-07 01:28:27 +02:00
|
|
|
{% elif topic_error_lvl == "error" %}
|
|
|
|
Please fix the below topic issue(s).
|
|
|
|
|
2018-07-28 18:30:43 +02:00
|
|
|
{% elif "Other" in package.license.name or "Other" in package.media_license.name %}
|
|
|
|
Please wait for the license to be added to CDB.
|
|
|
|
|
2018-05-21 23:26:48 +02:00
|
|
|
{% else %}
|
2018-05-26 02:29:18 +02:00
|
|
|
{% if package.screenshots.count() == 0 %}
|
|
|
|
<b>You should add at least one screenshot, but this isn't required.</b><br />
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if not package.getDownloadRelease() %}
|
|
|
|
Please wait for the release to be approved.
|
|
|
|
{% elif package.checkPerm(current_user, "APPROVE_NEW") %}
|
2018-05-21 23:26:48 +02:00
|
|
|
You can now approve this package if you're ready.
|
|
|
|
<form method="post" action="{{ package.getApproveURL() }}">
|
|
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
|
|
|
<input type="submit" value="Approve" />
|
|
|
|
</form>
|
|
|
|
{% else %}
|
2018-05-26 02:29:18 +02:00
|
|
|
Please wait for the package to be approved.
|
2018-05-21 23:26:48 +02:00
|
|
|
{% endif %}
|
2018-03-21 20:03:14 +01:00
|
|
|
{% endif %}
|
|
|
|
<div style="clear: both;"></div>
|
|
|
|
</div>
|
2018-06-11 23:49:25 +02:00
|
|
|
|
2018-07-07 01:28:27 +02:00
|
|
|
{% if topic_error %}
|
|
|
|
<div class="box box_grey alert alert-{{ topic_error_lvl }}">
|
|
|
|
<span class="icon_message"></span>
|
|
|
|
{{ topic_error | safe }}
|
|
|
|
<div style="clear: both;"></div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2018-06-11 23:49:25 +02:00
|
|
|
{% if package.author == current_user or package.checkPerm(current_user, "APPROVE_NEW") %}
|
|
|
|
{% if review_thread %}
|
2018-07-28 16:08:08 +02:00
|
|
|
<h2>{% if review_thread.private %}🔒{% endif %} {{ review_thread.title }}</h2>
|
|
|
|
{% if review_thread.private %}
|
|
|
|
<p><i>
|
|
|
|
This thread is only visible to the package owner and users of
|
|
|
|
Editor rank or above.
|
|
|
|
</i></p>
|
|
|
|
{% endif %}
|
2018-06-12 00:14:14 +02:00
|
|
|
|
2018-06-11 23:49:25 +02:00
|
|
|
{% from "macros/threads.html" import render_thread %}
|
|
|
|
{{ render_thread(review_thread, current_user) }}
|
|
|
|
{% else %}
|
|
|
|
<div class="box box_grey alert alert-info">
|
|
|
|
Privately ask a question or give feedback
|
|
|
|
|
|
|
|
<a class="alert_right button" href="{{ url_for('new_thread_page', pid=package.id, title='Package approval comments') }}">Open Thread</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
2018-03-21 20:03:14 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2018-12-21 17:06:52 +01:00
|
|
|
<header class="jumbotron mb-0" style="background-image: url('{{ package.getMainScreenshotURL() }}')">
|
2018-12-21 16:58:43 +01:00
|
|
|
<div class="container">
|
|
|
|
<h1 class="display-3">{{ package.title }} by {{ package.author.display_name }}</h1>
|
2018-03-20 03:17:33 +01:00
|
|
|
|
2018-12-21 16:58:43 +01:00
|
|
|
<p class="lead">
|
|
|
|
{{ package.shortDesc }}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</header>
|
2018-05-29 22:24:50 +02:00
|
|
|
|
2018-12-21 16:58:43 +01:00
|
|
|
<main class="container">
|
2018-12-21 17:06:52 +01:00
|
|
|
<div class="row mt-1 mb-4">
|
2018-12-21 16:58:43 +01:00
|
|
|
<div class="col">
|
|
|
|
{% if package.getDownloadRelease() %}
|
|
|
|
<a class="btn btn-success" href="{{ package.getDownloadURL() }}" class="btn_green">Download</a>
|
|
|
|
{% else %}
|
|
|
|
No download available.
|
2018-05-28 00:45:12 +02:00
|
|
|
{% endif %}
|
2018-12-21 16:58:43 +01:00
|
|
|
</div>
|
|
|
|
<div class="btn-group-horizontal col-md-auto">
|
|
|
|
{% if package.repo %}<a class="btn btn-primary" href="{{ package.repo }}">View Source</a>{% endif %}
|
|
|
|
{% if package.forums %}<a class="btn btn-primary" href="https://forum.minetest.net/viewtopic.php?t={{ package.forums }}">Forums</a>{% endif %}
|
|
|
|
{% if package.issueTracker %}<a class="btn btn-primary" href="{{ package.issueTracker }}">Issue Tracker</a>{% endif %}
|
|
|
|
{% if package.website %}<a class="btn btn-primary" href="{{ package.website }}">Website</a>{% endif %}
|
2018-05-21 23:42:02 +02:00
|
|
|
{% if package.checkPerm(current_user, "EDIT_PACKAGE") %}
|
2018-12-21 16:58:43 +01:00
|
|
|
<a class="btn btn-primary" href="{{ package.getNewScreenshotURL() }}">Add screenshot</a>
|
2018-05-23 18:40:15 +02:00
|
|
|
{% endif %}
|
2018-05-29 21:51:42 +02:00
|
|
|
{# {% if current_user.is_authenticated %}
|
2018-12-21 16:58:43 +01:00
|
|
|
<a class="btn btn-primary" href="{{ package.getCreateEditRequestURL() }}">Suggest Changes</a>
|
2018-05-29 21:51:42 +02:00
|
|
|
{% endif %} #}
|
2018-05-21 23:42:02 +02:00
|
|
|
{% if package.checkPerm(current_user, "MAKE_RELEASE") %}
|
2018-12-21 16:58:43 +01:00
|
|
|
<a class="btn btn-primary" href="{{ package.getCreateReleaseURL() }}">Create Release</a>
|
2018-07-28 16:19:30 +02:00
|
|
|
{% endif %}
|
2018-05-25 19:28:24 +02:00
|
|
|
{% if package.checkPerm(current_user, "DELETE_PACKAGE") %}
|
2018-12-21 16:58:43 +01:00
|
|
|
<a class="btn btn-danger" href="{{ package.getDeleteURL() }}">Delete</a>
|
2018-05-25 19:28:24 +02:00
|
|
|
{% endif %}
|
2018-12-21 16:58:43 +01:00
|
|
|
</div>
|
2018-05-21 23:42:02 +02:00
|
|
|
</div>
|
2018-03-20 03:17:33 +01:00
|
|
|
|
2018-12-21 17:06:52 +01:00
|
|
|
<aside class="float-right ml-4" style="width: 18rem;">
|
2018-12-21 17:00:18 +01:00
|
|
|
<div class="card">
|
2018-12-21 16:58:43 +01:00
|
|
|
<div class="card-header">
|
|
|
|
Details
|
|
|
|
{% if package.checkPerm(current_user, "EDIT_PACKAGE") %}
|
|
|
|
<a class="btn btn-sm btn-xs btn-primary float-right" href="{{ package.getEditURL() }}">Edit</a>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
{% if not package.license.is_foss and not package.media_license.is_foss and package.type != package.type.TXP %}
|
|
|
|
{% set package_warning="Non-free code and media." %}
|
|
|
|
{% elif not package.license.is_foss and package.type != package.type.TXP %}
|
|
|
|
{% set package_warning="Non-free code." %}
|
|
|
|
{% elif not package.media_license.is_foss %}
|
|
|
|
{% set package_warning="Non-free media." %}
|
|
|
|
{% endif %}
|
|
|
|
{% if package_warning %}
|
|
|
|
<div class="alert alert-danger">
|
|
|
|
<b>Warning:</b> {{ package_warning }}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<td>Name</td>
|
|
|
|
<td>{{ package.name }}</td>
|
|
|
|
</tr>
|
|
|
|
{% if package.provides %}
|
|
|
|
<tr>
|
|
|
|
<td>Provides</td>
|
|
|
|
<td>{% for meta in package.provides %}
|
2018-12-21 17:06:52 +01:00
|
|
|
<a class="badge badge-primary"
|
|
|
|
href="{{ url_for('meta_package_page', name=meta.name) }}">{{ meta.name }}</a>
|
2018-12-21 16:58:43 +01:00
|
|
|
{%- if not loop.last %}
|
|
|
|
,
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}</td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
|
|
|
<tr>
|
|
|
|
<td>Author</td>
|
|
|
|
<td class="{{ package.author.rank }}">
|
|
|
|
<a href="{{ url_for('user_profile_page', username=package.author.username) }}">
|
|
|
|
{{ package.author.display_name }}
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Type</td>
|
|
|
|
<td>{{ package.type.value }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>License</td>
|
|
|
|
<td>
|
|
|
|
{% if package.license == package.media_license %}
|
|
|
|
{{ package.license.name }}
|
|
|
|
{% elif package.type == package.type.TXP %}
|
|
|
|
{{ package.media_license.name }}
|
|
|
|
{% else %}
|
|
|
|
{{ package.license.name }} for code,<br />
|
|
|
|
{{ package.media_license.name }} for media.
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Added</td>
|
|
|
|
<td>{{ package.created_at | datetime }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Tags</td>
|
|
|
|
<td>
|
|
|
|
{% for t in package.tags %}
|
|
|
|
<span class="badge badge-primary">{{ t.title }}</span>
|
|
|
|
{% else %}
|
|
|
|
<i>No tags.</i>
|
|
|
|
{% endfor %}
|
|
|
|
</td>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-12-21 17:00:18 +01:00
|
|
|
|
|
|
|
<div class="card my-4">
|
|
|
|
<div class="card-header">Dependencies</div>
|
|
|
|
<ul class="list-group list-group-flush">
|
|
|
|
{% for dep in package.dependencies %}
|
|
|
|
<li class="list-group-item">
|
|
|
|
{%- if dep.package %}
|
|
|
|
<a href="{{ dep.package.getDetailsURL() }}">{{ dep.package.title }}</a> by {{ dep.package.author.display_name }}
|
|
|
|
{% elif dep.meta_package %}
|
|
|
|
<a href="{{ url_for('meta_package_page', name=dep.meta_package.name) }}">{{ dep.meta_package.name }}</a>
|
|
|
|
{% else %}
|
|
|
|
{{ "Excepted package or meta_package in dep!" | throw }}
|
|
|
|
{% endif %}
|
|
|
|
{% if dep.optional %}
|
|
|
|
[optional]
|
|
|
|
{% endif %}
|
|
|
|
</li>
|
|
|
|
{% else %}
|
|
|
|
<li class="list-group-item"><i>No dependencies</i></li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card my-4">
|
|
|
|
<div class="card-header">
|
|
|
|
Releases
|
|
|
|
{% if package.checkPerm(current_user, "MAKE_RELEASE") %}
|
|
|
|
<a class="btn btn-xs btn-primary float-right"
|
|
|
|
href="{{ package.getCreateReleaseURL() }}">+</a>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<ul class="list-group list-group-flush">
|
|
|
|
{% for rel in releases %}
|
|
|
|
{% if rel.approved or package.checkPerm(current_user, "MAKE_RELEASE") or package.checkPerm(current_user, "APPROVE_RELEASE") %}
|
|
|
|
<li class="list-group-item list-group-item-action" href="{{ rel.getDownloadURL() }}">
|
|
|
|
{% if not rel.approved %}<i>{% endif %}
|
|
|
|
|
|
|
|
{{ rel.title }}{% if rel.commit_hash %}
|
|
|
|
[{{ rel.commit_hash | truncate(5, end='') }}]{% endif %},
|
|
|
|
<small>created {{ rel.releaseDate | datetime }}.</small>
|
|
|
|
{% if rel.task_id %}
|
|
|
|
<a href="{{ url_for('check_task', id=rel.task_id, r=package.getDetailsURL()) }}">Importing...</a>
|
|
|
|
{% elif not rel.approved %}
|
|
|
|
Waiting for approval.
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if not rel.approved %}</i>{% endif %}
|
|
|
|
|
|
|
|
{% if package.checkPerm(current_user, "MAKE_RELEASE") or package.checkPerm(current_user, "APPROVE_RELEASE") %}
|
|
|
|
<a class="btn btn-sm btn-primary float-right" href="{{ rel.getEditURL() }}">Edit
|
|
|
|
{% if not rel.task_id and not rel.approved and package.checkPerm(current_user, "APPROVE_RELEASE") %}
|
|
|
|
/ Approve
|
|
|
|
{% endif %}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
<li class="list-group-item">No releases available.</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card my-4"">
|
|
|
|
<div class="card-header">
|
|
|
|
Threads
|
|
|
|
{% if package.approved and package.checkPerm(current_user, "CREATE_THREAD") %}
|
|
|
|
<a class="btn btn-xs btn-primary float-right"
|
|
|
|
href="{{ url_for('new_thread_page', pid=package.id) }}">
|
|
|
|
+
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<ul class="list-group list-group-flush">
|
|
|
|
{% from "macros/threads.html" import render_threadlist %}
|
|
|
|
{{ render_threadlist(threads, list_group=True) }}
|
|
|
|
</ul>
|
|
|
|
</div>
|
2018-12-21 16:58:43 +01:00
|
|
|
</aside>
|
2018-03-20 03:17:33 +01:00
|
|
|
|
2018-12-21 16:58:43 +01:00
|
|
|
<ul class="screenshot_list">
|
|
|
|
{% for ss in package.screenshots %}
|
|
|
|
{% if ss.approved or package.checkPerm(current_user, "ADD_SCREENSHOTS") %}
|
|
|
|
<li>
|
|
|
|
<a href="{% if package.checkPerm(current_user, 'ADD_SCREENSHOTS') %}{{ ss.getEditURL() }}{% else %}{{ ss.url }}{% endif %}">
|
|
|
|
<img src="{{ ss.getThumbnailURL() }}" alt="{{ ss.title }}" />
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2018-03-20 19:20:30 +01:00
|
|
|
|
2018-12-21 16:58:43 +01:00
|
|
|
{{ package.desc | markdown }}
|
|
|
|
|
|
|
|
<div style="clear: both;"></div>
|
|
|
|
|
|
|
|
{#
|
|
|
|
{% if current_user.is_authenticated or requests %}
|
|
|
|
<h3>Edit Requests</h3>
|
2018-05-11 16:04:17 +02:00
|
|
|
|
2018-05-21 23:20:28 +02:00
|
|
|
<ul>
|
2018-12-21 16:58:43 +01:00
|
|
|
{% for r in requests %}
|
2018-05-27 22:31:11 +02:00
|
|
|
<li>
|
2018-12-21 16:58:43 +01:00
|
|
|
<a href="{{ r.getURL() }}">{{ r.title }}</a>
|
|
|
|
by
|
|
|
|
<a href="{{ url_for('user_profile_page', username=r.author.username) }}">{{ r.author.display_name }}</a>
|
2018-05-27 22:31:11 +02:00
|
|
|
</li>
|
2018-05-21 23:20:28 +02:00
|
|
|
{% else %}
|
2018-12-21 16:58:43 +01:00
|
|
|
<li>No edit requests have been made.</li>
|
2018-05-21 23:20:28 +02:00
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2018-12-21 16:58:43 +01:00
|
|
|
{% endif %}
|
|
|
|
#}
|
|
|
|
|
|
|
|
{% if alternatives %}
|
|
|
|
<h3>Related</h3>
|
2018-05-21 23:20:28 +02:00
|
|
|
|
2018-12-21 16:58:43 +01:00
|
|
|
{% from "macros/packagegridtile.html" import render_pkggrid %}
|
|
|
|
{{ render_pkggrid(alternatives) }}
|
|
|
|
{% endif %}
|
2018-05-29 21:51:42 +02:00
|
|
|
|
2018-12-21 16:58:43 +01:00
|
|
|
{% if similar_topics %}
|
|
|
|
<h3>Similar Forum Topics</h3>
|
|
|
|
{% if not package.approved and package.type == package.type.MOD %}
|
|
|
|
<div class="box box_grey alert alert-warning">
|
|
|
|
Please make sure that this package has the right to
|
|
|
|
the name '{{ package.name }}'.
|
|
|
|
See the
|
|
|
|
<a href="/policy_and_guidance/">Inclusion Policy</a>
|
|
|
|
for more info.
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2018-05-29 21:51:42 +02:00
|
|
|
<ul>
|
2018-12-21 16:58:43 +01:00
|
|
|
{% for t in similar_topics %}
|
2018-05-29 21:51:42 +02:00
|
|
|
<li>
|
2018-12-21 16:58:43 +01:00
|
|
|
[{{ t.type.value }}]
|
|
|
|
<a href="https://forum.minetest.net/viewtopic.php?t={{ t.topic_id }}">
|
|
|
|
{{ t.title }} by {{ t.author.display_name }}
|
|
|
|
</a>
|
|
|
|
{% if t.wip %}[WIP]{% endif %}
|
2018-05-29 21:51:42 +02:00
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
2018-12-21 16:58:43 +01:00
|
|
|
</main>
|
2018-03-19 19:08:41 +01:00
|
|
|
{% endblock %}
|