mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-24 15:02:25 +01:00
05444e8018
Fixes #4
126 lines
3.5 KiB
HTML
126 lines
3.5 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}
|
|
{{ package.title }}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
{% if not package.approved %}
|
|
<div class="box box_grey alert alert-warning">
|
|
<span class="icon_message"></span>
|
|
This package needs to be approved before it can be found.
|
|
{% if package.checkPerm(current_user, "APPROVE_NEW") %}
|
|
<a href="{{ package.getApproveURL() }}">Approve</a>
|
|
{% endif %}
|
|
<div style="clear: both;"></div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<h1>{{ package.title }} by {{ package.author.display_name }}</h1>
|
|
|
|
<ul class="screenshot_list">
|
|
{% for ss in package.screenshots %}
|
|
<li>
|
|
<a href="{{ ss.url }}">
|
|
<img src="{{ ss.getThumbnailURL() }}" alt="{{ ss.title }}" />
|
|
</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
|
|
<aside class="asideright box box_grey">
|
|
<table>
|
|
<tr>
|
|
<td>Name</td>
|
|
<td>{{ package.name }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Author</td>
|
|
<td>
|
|
<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>
|
|
</table>
|
|
|
|
<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>
|
|
{% elif current_user.is_authenticated %}
|
|
<li><a href="{{ package.getCreateEditRequestURL() }}">Suggest Change</a></li>
|
|
{% endif %}
|
|
{% if package.checkPerm(current_user, "MAKE_RELEASE") %}
|
|
<li><a href="{{ package.getCreateReleaseURL() }}">Create Release</a></li>
|
|
{% endif %}
|
|
</ul>
|
|
</aside>
|
|
|
|
<p class="package-short-large">{{ package.shortDesc }}</p>
|
|
|
|
{{ package.desc | markdown }}
|
|
|
|
<h3>Releases</h3>
|
|
|
|
<ul>
|
|
{% for rel in releases %}
|
|
<li>
|
|
{% if not rel.approved %}<i>{% endif %}
|
|
|
|
<a href="{{ rel.url }}">{{ rel.title }}</a>,
|
|
created {{ rel.releaseDate }}.
|
|
{% if not rel.approved %}
|
|
Waiting for approval.
|
|
{% endif %}
|
|
|
|
{% if package.checkPerm(current_user, "MAKE_RELEASE") or package.checkPerm(current_user, "APPROVE_RELEASE") %}
|
|
<a href="{{ rel.getEditURL() }}">Edit
|
|
{% if not rel.approved and package.checkPerm(current_user, "APPROVE_RELEASE") %}
|
|
/ Approve
|
|
{% endif %}
|
|
</a>
|
|
{% endif %}
|
|
|
|
{% if not rel.approved %}</i>{% endif %}
|
|
</li>
|
|
{% else %}
|
|
<li>No releases available.</li>
|
|
{% endfor %}
|
|
</ul>
|
|
|
|
<h3>Tags</h3>
|
|
<ul>
|
|
{% for t in package.tags %}
|
|
<li>{{ t.title }}</li>
|
|
{% else %}
|
|
<li>No tags.</li>
|
|
{% endfor %}
|
|
</ul>
|
|
|
|
{% if current_user.is_authenticated or requests %}
|
|
<h3>Edit Requests</h3>
|
|
|
|
<ul>
|
|
{% for r in requests %}
|
|
<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 %}
|
|
{% endblock %}
|