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 %}
|
|
|
|
|
|
|
|
{% block content %}
|
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>
|
|
|
|
<a class="button" href="{{ package.getCreateReleaseURL() }}">Create Release</a>
|
|
|
|
{% 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-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>
|
|
|
|
{% endif %}
|
|
|
|
|
2018-03-20 03:17:33 +01:00
|
|
|
<h1>{{ package.title }} by {{ package.author.display_name }}</h1>
|
|
|
|
|
2018-03-26 11:52:25 +02:00
|
|
|
<ul class="screenshot_list">
|
|
|
|
{% for ss in package.screenshots %}
|
2018-05-25 20:06:05 +02:00
|
|
|
{% 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 %}
|
2018-03-26 11:52:25 +02:00
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
|
2018-03-20 03:17:33 +01:00
|
|
|
<aside class="asideright box box_grey">
|
2018-05-21 23:42:02 +02:00
|
|
|
<h3>Details</h3>
|
|
|
|
<div class="box-body">
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<td>Name</td>
|
|
|
|
<td>{{ package.name }}</td>
|
|
|
|
</tr>
|
2018-05-27 17:37:54 +02:00
|
|
|
<tr>
|
|
|
|
<td>Provides</td>
|
2018-05-27 17:51:46 +02:00
|
|
|
<td>{% for meta in package.provides %}
|
|
|
|
<a href="{{ url_for('meta_package_page', name=meta.name) }}">{{ meta.name }}</a>
|
|
|
|
{%- if not loop.last %}
|
|
|
|
,
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}</td>
|
2018-05-27 17:37:54 +02:00
|
|
|
</tr>
|
2018-05-21 23:42:02 +02:00
|
|
|
<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>{{ package.license.name }}</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2018-03-20 03:17:33 +01:00
|
|
|
|
2018-05-21 23:42:02 +02:00
|
|
|
<ul class="buttonset linedbuttonset">
|
|
|
|
{% if package.getDownloadRelease() %}<li><a href="{{ package.getDownloadURL() }}">Download</a></li>{% endif %}
|
|
|
|
{% if package.repo %}<li><a href="{{ package.repo }}">View Source</a></li>{% endif %}
|
|
|
|
{% if package.forums %}<li><a href="https://forum.minetest.net/viewtopic.php?t={{ package.forums }}">Forums</a></li>{% endif %}
|
|
|
|
{% if package.issueTracker %}<li><a href="{{ package.issueTracker }}">Issue Tracker</a></li>{% endif %}
|
|
|
|
{% if package.website %}<li><a href="{{ package.website }}">Website</a></li>{% endif %}
|
|
|
|
{% if package.checkPerm(current_user, "EDIT_PACKAGE") %}
|
|
|
|
<li><a href="{{ package.getEditURL() }}">Edit</a></li>
|
|
|
|
<li><a href="{{ package.getNewScreenshotURL() }}">Add screenshot</a></li>
|
2018-05-23 18:40:15 +02:00
|
|
|
{% endif %}
|
|
|
|
{% if current_user.is_authenticated %}
|
2018-05-25 18:12:34 +02:00
|
|
|
<li><a href="{{ package.getCreateEditRequestURL() }}">Suggest Changes</a></li>
|
2018-05-21 23:42:02 +02:00
|
|
|
{% endif %}
|
|
|
|
{% if package.checkPerm(current_user, "MAKE_RELEASE") %}
|
|
|
|
<li><a href="{{ package.getCreateReleaseURL() }}">Create Release</a></li>
|
|
|
|
{% endif %}
|
2018-05-25 19:28:24 +02:00
|
|
|
{% if package.checkPerm(current_user, "DELETE_PACKAGE") %}
|
|
|
|
<li><a href="{{ package.getDeleteURL() }}">Delete</a></li>
|
|
|
|
{% endif %}
|
2018-05-21 23:42:02 +02:00
|
|
|
</ul>
|
|
|
|
</div>
|
2018-03-20 03:17:33 +01:00
|
|
|
</aside>
|
|
|
|
|
|
|
|
<p class="package-short-large">{{ package.shortDesc }}</p>
|
|
|
|
|
|
|
|
{{ package.desc | markdown }}
|
2018-03-20 19:20:30 +01:00
|
|
|
|
|
|
|
<h3>Releases</h3>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
{% for rel in releases %}
|
2018-05-11 16:04:17 +02:00
|
|
|
{% if rel.approved or package.checkPerm(current_user, "MAKE_RELEASE") or package.checkPerm(current_user, "APPROVE_RELEASE") %}
|
|
|
|
<li>
|
|
|
|
{% if not rel.approved %}<i>{% endif %}
|
|
|
|
|
|
|
|
<a href="{{ rel.url }}">{{ rel.title }}</a>,
|
|
|
|
created {{ rel.releaseDate }}.
|
|
|
|
{% if rel.task_id %}
|
2018-05-23 20:31:25 +02:00
|
|
|
<a href="{{ url_for('check_task', id=rel.task_id, r=package.getDetailsURL()) }}">Importing...</a>
|
2018-05-11 16:04:17 +02:00
|
|
|
{% elif not rel.approved %}
|
|
|
|
Waiting for approval.
|
2018-03-20 19:20:30 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2018-05-23 20:31:25 +02:00
|
|
|
{% if package.checkPerm(current_user, "MAKE_RELEASE") or package.checkPerm(current_user, "APPROVE_RELEASE") %}
|
2018-05-11 16:04:17 +02:00
|
|
|
<a href="{{ rel.getEditURL() }}">Edit
|
2018-05-23 20:31:25 +02:00
|
|
|
{% if not rel.task_id and not rel.approved and package.checkPerm(current_user, "APPROVE_RELEASE") %}
|
2018-05-11 16:04:17 +02:00
|
|
|
/ Approve
|
|
|
|
{% endif %}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if not rel.approved %}</i>{% endif %}
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
2018-03-20 19:20:30 +01:00
|
|
|
{% else %}
|
|
|
|
<li>No releases available.</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2018-03-23 20:25:48 +01:00
|
|
|
|
2018-03-26 12:28:34 +02:00
|
|
|
<h3>Tags</h3>
|
|
|
|
<ul>
|
|
|
|
{% for t in package.tags %}
|
|
|
|
<li>{{ t.title }}</li>
|
|
|
|
{% else %}
|
|
|
|
<li>No tags.</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
|
2018-05-27 17:37:54 +02:00
|
|
|
<!-- <table class="table-topalign">
|
2018-05-21 23:20:28 +02:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<h3>Dependencies</h3>
|
|
|
|
<ul>
|
|
|
|
{% for p in package.harddeps %}
|
|
|
|
<li><a href="{{ p.getDetailsURL() }}">{{ p.title }}</a> by {{ p.author.display_name }}</li>
|
|
|
|
{% else %}
|
|
|
|
{% if not package.softdeps %}
|
|
|
|
<li>No dependencies.</li>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% for p in package.softdeps %}
|
|
|
|
<li><a href="{{ p.getDetailsURL() }}">{{ p.title }}</a> by {{ p.author.display_name }} [optional]</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<h3>Required by</h3>
|
|
|
|
<ul>
|
|
|
|
{% for p in package.dependents %}
|
|
|
|
<li><a href="{{ p.getDetailsURL() }}">{{ p.title }}</a> by {{ p.author.display_name }}</li>
|
|
|
|
{% else %}
|
|
|
|
{% if not package.softdependents %}
|
|
|
|
<li>No dependents.</li>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% for p in package.softdependents %}
|
|
|
|
<li><a href="{{ p.getDetailsURL() }}">{{ p.title }}</a> by {{ p.author.display_name }} [optional]</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2018-05-27 17:37:54 +02:00
|
|
|
</table> -->
|
2018-05-21 23:20:28 +02:00
|
|
|
|
2018-03-23 20:49:57 +01:00
|
|
|
{% if current_user.is_authenticated or requests %}
|
2018-03-23 20:25:48 +01:00
|
|
|
<h3>Edit Requests</h3>
|
|
|
|
|
|
|
|
<ul>
|
2018-03-23 20:49:57 +01:00
|
|
|
{% for r in requests %}
|
2018-03-23 20:25:48 +01:00
|
|
|
<li>
|
|
|
|
<a href="{{ r.getURL() }}">{{ r.title }}</a>
|
|
|
|
by
|
|
|
|
<a href="{{ url_for('user_profile_page', username=r.author.username) }}">{{ r.author.display_name }}</a>
|
|
|
|
</li>
|
|
|
|
{% else %}
|
|
|
|
<li>No edit requests have been made.</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
2018-03-19 19:08:41 +01:00
|
|
|
{% endblock %}
|