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-20 03:17:33 +01:00
|
|
|
<h1>{{ package.title }} by {{ package.author.display_name }}</h1>
|
|
|
|
|
|
|
|
<aside class="asideright box box_grey">
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<td>Name</td>
|
|
|
|
<td>{{ package.name }}</td>
|
|
|
|
</tr>
|
2018-03-20 05:03:13 +01:00
|
|
|
<tr>
|
|
|
|
<td>Author</td>
|
|
|
|
<td>
|
|
|
|
<a href="{{ url_for('user_profile_page', username=package.author.username) }}">
|
|
|
|
{{ package.author.display_name }}
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2018-03-20 03:17:33 +01:00
|
|
|
<tr>
|
|
|
|
<td>Type</td>
|
2018-03-20 04:16:46 +01:00
|
|
|
<td>{{ package.type.value }}</td>
|
2018-03-20 03:17:33 +01:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<ul class="buttonset linedbuttonset">
|
|
|
|
{% if package.repo %}<li><a href="{{ package.repo }}">View Source</a></li>{% endif %}
|
|
|
|
{% if package.forums %}<li><a href="{{ 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 %}
|
2018-03-20 04:24:52 +01:00
|
|
|
{% if package.checkPerm(current_user, "EDIT_PACKAGE") %}
|
|
|
|
<li><a href="{{ package.getEditURL() }}">Edit</a></li>
|
|
|
|
{% elif current_user.is_authenticated %}
|
|
|
|
<li><a href="">Suggest Change</a></li>
|
|
|
|
{% endif %}
|
2018-03-20 19:40:19 +01:00
|
|
|
{% if package.checkPerm(current_user, "MAKE_RELEASE") %}
|
|
|
|
<li><a href="{{ package.getCreateReleaseURL() }}">Create Release</a></li>
|
|
|
|
{% endif %}
|
2018-03-20 03:17:33 +01:00
|
|
|
</ul>
|
|
|
|
</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 %}
|
|
|
|
<li>
|
|
|
|
{% if not rel.approved %}<i>{% endif %}
|
|
|
|
|
|
|
|
<a href="{{ rel.url }}">{{ rel.title }}</a>,
|
|
|
|
created {{ rel.releaseDate }}.
|
|
|
|
{% if not rel.approved %}
|
|
|
|
Waiting for approval.
|
2018-03-21 17:41:34 +01:00
|
|
|
{% 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
|
2018-03-20 19:20:30 +01:00
|
|
|
{% endif %}
|
2018-03-21 17:41:34 +01:00
|
|
|
</a>
|
2018-03-20 19:20:30 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if not rel.approved %}</i>{% endif %}
|
|
|
|
</li>
|
|
|
|
{% else %}
|
|
|
|
<li>No releases available.</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2018-03-19 19:08:41 +01:00
|
|
|
{% endblock %}
|