Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
92 lines (89 sloc) 6.38 KB
{% extends 'plugins/plugin_base.html' %}{% load i18n %}
{% block content %}
<h2>{% trans "Plugin" %}: {{ object.name }}</h2>
<div class="details">
{% if object.deprecated %}<p class="error"><strong>{% trans "This plugin is deprecated!" %}</strong></p>{% endif %}
<p>{% if object.icon %}<img class="plugin-icon" src="{{ object.icon.url }}" alt="{% trans "Plugin icon" %}" />{% endif %}<strong>{% trans "Description" %}:</strong> {{ object.description }}</p>
{% if object.author %}
<p><strong>{% trans "Author"%}:</strong> {{ object.author }}</p>
{% endif %}
{% if object.email and not user.is_anonymous %}
<p><strong>{% trans "Author's email"%}:</strong> <a href="mailto:{{ object.email }}">{{ object.email }}</a></p>
{% endif %}
<p><strong>{% trans "Maintainer"%}:</strong> <a href="{% url user_details object.created_by %}">{{ object.created_by }}</a></p>
{% if object.owners.count %}<p><strong>{% trans "Owners"%}:</strong>{% for owner in object.owners.all %}
<a href="{% url user_details owner.username %}">{{ owner.username }}</a>{% if not forloop.last %},{% endif %}{% endfor %}
</p>{% endif %}
{% if object.tags.count %}<p><strong>{% trans "Tags"%}:</strong>
{% for tag in object.tags.all %}<a href="{% url tags_plugins tag.name %}">{{tag}}</a>{% if not forloop.last %},&nbsp;{% endif %}{% endfor %}</p>{% endif %}
{% if object.homepage %}<p><strong>{% trans "Plugin home page"%}:</strong> <a href="{{ object.homepage }}">{{ object.homepage }}</a></p>{% endif %}
{% if object.tracker %}<p><strong>{% trans "Tracker" %}:</strong> <a href="{{ object.tracker }}">{% trans "Browse and report bugs" %}</a></p>{% endif %}
{% if object.repository %}<p><strong>{% trans "Code repository" %}:</strong> <a href="{{ object.repository }}">{{ object.repository }}</a></p>{% endif %}
{% if object.stable %}<p><strong>{% trans "Latest stable version"%}:</strong> <a title="{% trans "Click to download" %}" href="{% url version_detail object.package_name object.stable.version %}">{{ object.stable.version }}</a></p>{% endif %}
{% if object.experimental %}<p><strong>{% trans "Latest experimental version"%}:</strong> <a title="{% trans "Click to download" %}" href="{% url version_detail object.package_name object.experimental.version %}">{{ object.experimental.version }}</a></p>{% endif %}
{% if not object.experimental and not object.stable %}<p class="warning">{% trans "This plugin has no public version yet." %}</p>{% endif %}
{% if not object.created_by.is_active %}<p class="warning">{% trans "The plugin maintainer has been blocked." %}</p>{% endif %}
</div>
{% if user.is_staff or user in object.editors %}
<form method="post" action="{% url plugin_manage object.package_name %}">
<div id="admin">
<ul class="actions">
<li><a href="{% url plugin_update object.package_name %}">{% trans "Edit" %}</a></li>
<li><a href="{% url version_create object.package_name %}">{% trans "Add version" %}</a></li>
{% if user.is_staff %}
{% if object.featured %}<li><input type="submit" name="unset_featured" id="unset_featured" value="{% trans "Unset featured" %}" /></li>
{% else %}<li><input type="submit" name="set_featured" id="set_featured" value="{% trans "Set featured" %}" /></li>
{% endif %}
{% endif %}
{% if user.is_staff or user in object.editors %}
<li><a class="delete" href="{% url plugin_delete object.package_name %}">{% trans "Delete" %}</a></li>
{% endif %}
</ul>
</div>
</form>
{% endif %}
{# end admin #}
{% if object.pluginversion_set.count %}
{# show all versions if user is authorized #}
<div id="version_list">
<h3>{% trans "Version list" %}</h3>
<table class="plugins">
<thead>
<tr>
<th>{% trans "Version" %}</th>
{% if not user.is_anonymous %}<th>{% trans "Approved" %}</th>{% endif %}
<th>{% trans "Experimental" %}</th>
<th>{% trans "Minimum QGIS version" %}</th>
<th>{% trans "Downloads" %}</th>
<th>{% trans "Uploaded by" %}</th>
<th>{% trans "Date" %}</th>
{% if user.is_staff or user in object.approvers or user in object.editors %}<th>{% trans "Manage" %}</th>{% endif %}
</tr>
</thead>
<tbody>
{% for version in object.pluginversion_set.all %}
{% if version.approved or not user.is_anonymous %}
<tr class="{% cycle "even" "odd" %}">
<td><a title="{% trans "Version details" %}" href="{% url version_detail object.package_name version.version %}">{{ version.version }}</a></td>
{% if not user.is_anonymous %}<td>{{ version.approved|yesno }}</td>{% endif %}
<td>{{ version.experimental|yesno }}</td>
<td>{{ version.min_qg_version }}</td>
<td>{{ version.downloads }}</td>
<td><a href="{% url user_details version.created_by.username %}">{{ version.created_by }}</a></td>
<td>{{ version.created_on }}</td>
{% if user.is_staff or user in version.plugin.approvers or user in version.plugin.editors %}<td><form method="post" action="{% url version_manage object.package_name version.version %}">
{% if user.is_staff or user in version.plugin.approvers %}
{% if not version.approved %}<input type="submit" name="version_approve" id="version_approve" value="{% trans "Approve" %}" />&nbsp;{% else %}<input type="submit" name="version_unapprove" id="version_unapprove" value="{% trans "Unapprove" %}" />{% endif %}
{% endif %}
{% if user.is_staff or user in version.plugin.editors %}
<a href="{% url version_update object.package_name version.version %}">{% trans "Edit" %}</a>&nbsp;<a class="delete" href="{% url version_delete object.package_name version.version %}">{% trans "Delete" %}</a>{% endif %}</form>
</td>
{% endif %}
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
{% endblock %}
Something went wrong with that request. Please try again.