2011-04-15 00:24:45 +02:00
|
|
|
{% extends "euscan/_datatable.html" %}
|
|
|
|
|
|
|
|
{% load sub %}
|
2012-07-17 13:18:44 +02:00
|
|
|
{% load euscan_tags %}
|
2012-05-06 20:27:14 +02:00
|
|
|
{% load url from future %}
|
2011-04-15 00:24:45 +02:00
|
|
|
|
2011-08-25 15:39:54 +02:00
|
|
|
{% block meta %}
|
|
|
|
{{ block.super }}
|
2012-05-06 20:27:14 +02:00
|
|
|
<link rel="alternate" type="application/atom+xml" title="{{ package }} Feed"
|
|
|
|
href="{% url "package_feed" package.category package.name %}" />
|
2011-08-25 15:39:54 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block menu_feed %}
|
|
|
|
{{ block.super }}
|
|
|
|
<li>
|
2012-04-04 14:33:40 +02:00
|
|
|
<img src="{{ STATIC_URL }}/img/feed.png" alt="feed" />
|
2012-05-06 20:27:14 +02:00
|
|
|
<a title="{{ package }} Feed" href="{% url "package_feed" package.category package.name %}">
|
|
|
|
{{ package }}
|
|
|
|
</a>
|
2011-08-25 15:39:54 +02:00
|
|
|
</li>
|
|
|
|
{% endblock %}
|
|
|
|
|
2011-04-15 00:24:45 +02:00
|
|
|
{% block title %}
|
|
|
|
{{ block.super }} - {{ package.category }}/{{ package.name }}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2012-07-09 14:29:42 +02:00
|
|
|
|
|
|
|
{% if thanks_for_reporting %}
|
|
|
|
<div class="alert alert-success">
|
|
|
|
<strong>Thanks!</strong> Your report has been sent to admins
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2012-06-05 13:10:25 +02:00
|
|
|
<h2>
|
|
|
|
{{ package.category }}/{{ package.name }}
|
|
|
|
|
2012-06-12 15:27:28 +02:00
|
|
|
{% if user.is_authenticated %}
|
2012-07-07 15:44:00 +02:00
|
|
|
<button class="btn refresh-button" data-category="{{ package.category }}" data-package="{{ package.name }}">
|
2012-06-05 13:10:25 +02:00
|
|
|
Refresh
|
|
|
|
</button>
|
2012-06-29 14:13:25 +02:00
|
|
|
<button class="btn favourite-button {% if favourited %}hide{% endif %}" data-url="{% url "favourite_package" package.category package.name %}">
|
2012-07-10 16:15:06 +02:00
|
|
|
Watch
|
2012-06-12 15:27:28 +02:00
|
|
|
</button>
|
2012-06-29 14:13:25 +02:00
|
|
|
<button class="btn unfavourite-button {% if not favourited %}hide{% endif %}" data-url="{% url "unfavourite_package" package.category package.name %}">
|
2012-07-10 16:15:06 +02:00
|
|
|
Unwatch
|
2012-06-14 10:03:49 +02:00
|
|
|
</button>
|
2012-06-05 13:10:25 +02:00
|
|
|
{% endif %}
|
|
|
|
</h2>
|
2011-04-15 00:24:45 +02:00
|
|
|
<dl>
|
|
|
|
{% if package.description %}
|
|
|
|
<dt>Description</dt>
|
|
|
|
<dd>{{ package.description }}</dd>
|
|
|
|
{% endif %}
|
|
|
|
{% if package.homepage %}
|
|
|
|
<dt>Homepage</dt>
|
2011-04-19 11:33:28 +02:00
|
|
|
<dd>
|
|
|
|
{% for homepage in package.homepages %}
|
2011-04-25 22:27:32 +02:00
|
|
|
<a href="{{ homepage }}">{{ homepage }}</a><br />
|
2011-04-19 11:33:28 +02:00
|
|
|
{% endfor %}
|
|
|
|
</dd>
|
2011-04-15 00:24:45 +02:00
|
|
|
{% endif %}
|
|
|
|
{% if package.herds.all %}
|
|
|
|
<dt>Herds</dt>
|
|
|
|
<dd>
|
|
|
|
{% for herd in package.herds.all %}
|
2012-05-06 20:27:14 +02:00
|
|
|
<a href="{% url "herd" herd.herd %}">
|
2011-04-15 00:24:45 +02:00
|
|
|
{{ herd.herd }}
|
|
|
|
</a>
|
|
|
|
<{{ herd.email }}>
|
|
|
|
{% endfor %}
|
|
|
|
</dd>
|
|
|
|
{% endif %}
|
|
|
|
{% if package.maintainers.all %}
|
|
|
|
<dt>Maintainers</dt>
|
|
|
|
<dd>
|
|
|
|
{% for maintainer in package.maintainers.all %}
|
|
|
|
{% if maintainer.name != maintainer.email %}
|
2012-05-06 20:27:14 +02:00
|
|
|
<a href="{% url "maintainer" maintainer.id %}">
|
2012-04-28 18:29:21 +02:00
|
|
|
{{ maintainer.name }}
|
2011-04-15 00:24:45 +02:00
|
|
|
</a>
|
|
|
|
<{{ maintainer.email }}>
|
|
|
|
{% else %}
|
2012-05-06 20:27:14 +02:00
|
|
|
<a href="{% url "maintainer" maintainer.id %}">
|
2011-04-15 00:24:45 +02:00
|
|
|
{{ maintainer.email }}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</dd>
|
|
|
|
{% endif %}
|
|
|
|
{% if packaged %}
|
|
|
|
<dt>Packaged Versions</dt>
|
|
|
|
<dd>
|
|
|
|
<ul>
|
|
|
|
{% for version in packaged %}
|
2011-08-28 11:22:17 +02:00
|
|
|
<li id="{{ version.version }}-{{version.revision }}:{{ version.slot }}-[{{ version.overlay }}]">
|
2012-04-28 18:29:21 +02:00
|
|
|
{% if version.overlay == "gentoo" %}
|
|
|
|
<img src="{{ STATIC_URL }}img/gentoo-icon.png" alt="gentoo" title="In Gentoo" />
|
|
|
|
{% else %}
|
|
|
|
<img src="{{ STATIC_URL }}img/overlay-icon.png" alt="overlays" title="In Overlays" />
|
|
|
|
{% endif %}
|
2012-07-17 13:18:44 +02:00
|
|
|
|
|
|
|
{% if version.vtype and not version.vtype|is_stable %}
|
|
|
|
<img src="{{ STATIC_URL }}img/unstable-icon.png" alt="unstable" title="{{ version.vtype }}" />
|
|
|
|
{% endif %}
|
|
|
|
|
2012-04-28 18:29:21 +02:00
|
|
|
{{ version.version }}-{{ version.revision }} :{{ version.slot }} [{{ version.overlay }}]
|
2011-04-15 00:24:45 +02:00
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</dd>
|
|
|
|
{% endif %}
|
|
|
|
{% if upstream %}
|
|
|
|
<dt>Upstream versions</dt>
|
|
|
|
<dd>
|
|
|
|
<ul>
|
|
|
|
{% for version in upstream %}
|
|
|
|
<li>
|
2012-04-28 18:29:21 +02:00
|
|
|
<img src="{{ STATIC_URL }}img/upstream-icon.png" alt="upstream" title="Upstream" />
|
2012-07-17 13:18:44 +02:00
|
|
|
|
|
|
|
{% if version.vtype and not version.vtype|is_stable %}
|
|
|
|
<img src="{{ STATIC_URL }}img/unstable-icon.png" alt="unstable" title="{{ version.vtype }}" />
|
|
|
|
{% endif %}
|
|
|
|
|
2012-04-28 18:29:21 +02:00
|
|
|
{{ version.version }} - {{ version.urls }}
|
2011-04-15 00:24:45 +02:00
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</dd>
|
|
|
|
{% endif %}
|
2011-08-25 15:39:54 +02:00
|
|
|
<dt>Version history</dt>
|
|
|
|
<dd>
|
|
|
|
<ul class="log">
|
|
|
|
{% for version in vlog %}
|
|
|
|
{% if version.action == version.VERSION_ADDED %}
|
|
|
|
<li class="added">
|
|
|
|
{% else %}
|
|
|
|
<li class="removed">
|
|
|
|
{% endif %}
|
2012-04-28 18:29:21 +02:00
|
|
|
{% if version.overlay == "gentoo" %}
|
|
|
|
<img src="{{ STATIC_URL }}img/gentoo-icon.png" alt="gentoo" title="In Gentoo" />
|
|
|
|
{% elif version.overlay %}
|
|
|
|
<img src="{{ STATIC_URL }}img/overlay-icon.png" alt="overlays" title="In Overlays" />
|
|
|
|
{% else %}
|
|
|
|
<img src="{{ STATIC_URL }}img/upstream-icon.png" alt="upstream" title="Upstream" />
|
|
|
|
{% endif %}
|
|
|
|
|
2012-07-17 13:18:44 +02:00
|
|
|
{% if version.vtype and not version.vtype|is_stable %}
|
|
|
|
<img src="{{ STATIC_URL }}img/unstable-icon.png" alt="unstable" title="{{ version.vtype }}" />
|
|
|
|
{% endif %}
|
|
|
|
|
2012-04-28 18:29:21 +02:00
|
|
|
{{ version }} - {{ version.datetime }}
|
|
|
|
|
2011-08-25 15:39:54 +02:00
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</dt>
|
2011-04-18 21:49:27 +02:00
|
|
|
{% if log %}
|
|
|
|
<dt>euscan log</dt>
|
|
|
|
<dd>
|
|
|
|
<p>Date: {{ log.datetime }}
|
2011-08-25 15:39:54 +02:00
|
|
|
<pre class="log">
|
2011-04-18 21:49:27 +02:00
|
|
|
{{ log.result }}
|
|
|
|
</pre>
|
|
|
|
</dd>
|
|
|
|
{% endif %}
|
2011-04-15 00:24:45 +02:00
|
|
|
</dl>
|
2012-06-05 13:10:25 +02:00
|
|
|
|
2012-07-09 14:29:42 +02:00
|
|
|
<hr/>
|
|
|
|
|
|
|
|
<h3>Report problems</h3>
|
|
|
|
|
|
|
|
<form action="." method="post" class="form-horizontal">
|
|
|
|
<div class="control-group {% if problem_form.version.errors %}error{% endif %}">
|
|
|
|
<label class="control-label" for="version">{{ problem_form.version.label }}</label>
|
|
|
|
<div class="controls">
|
|
|
|
{{ problem_form.version }}
|
|
|
|
<span class="help-inline">{{ problem_form.version.errors.as_text }}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="control-group {% if problem_form.subject.errors %}error{% endif %}">
|
|
|
|
<label class="control-label" for="subject">{{ problem_form.subject.label }}</label>
|
|
|
|
<div class="controls">
|
|
|
|
{{ problem_form.subject }}
|
|
|
|
<span class="help-inline">{{ problem_form.subject.errors.as_text }}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="control-group {% if problem_form.message.errors %}error{% endif %}">
|
|
|
|
<label class="control-label" for="message">{{ problem_form.message.label }}</label>
|
|
|
|
<div class="controls">
|
|
|
|
{{ problem_form.message }}
|
|
|
|
<span class="help-inline">{{ problem_form.message.errors.as_text }}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="control-group">
|
|
|
|
<div class="controls">
|
|
|
|
<input class="btn" type="submit" value="Submit" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
2012-06-05 13:10:25 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
$(".refresh-button").click(function() {
|
2012-07-07 15:44:00 +02:00
|
|
|
var url = "{% url "refresh_package" "XXX" "YYY" %}";
|
|
|
|
$.post(url.replace("XXX", $(this).data("category")).replace("YYY", $(this).data("package")),
|
|
|
|
function() {
|
|
|
|
alert("Submitted!");
|
|
|
|
});
|
2012-06-05 13:10:25 +02:00
|
|
|
});
|
2012-06-12 15:27:28 +02:00
|
|
|
|
|
|
|
$(".favourite-button").click(function() {
|
|
|
|
$.post($(this).data("url"), function() {
|
2012-06-14 10:03:49 +02:00
|
|
|
$(".unfavourite-button").removeClass("hide");
|
|
|
|
$(".favourite-button").addClass("hide");
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
$(".unfavourite-button").click(function() {
|
|
|
|
$.post($(this).data("url"), function() {
|
|
|
|
$(".favourite-button").removeClass("hide");
|
|
|
|
$(".unfavourite-button").addClass("hide");
|
2012-06-12 15:27:28 +02:00
|
|
|
});
|
|
|
|
});
|
2012-06-05 13:10:25 +02:00
|
|
|
</script>
|
|
|
|
|
2011-04-15 00:24:45 +02:00
|
|
|
{% endblock %}
|