djeuscan: move problem to another page, use an icon, restrict to registered
We may move it back to the package page later. Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
This commit is contained in:
122
euscanwww/djeuscan/templates/euscan/_package_details.html
Normal file
122
euscanwww/djeuscan/templates/euscan/_package_details.html
Normal file
@ -0,0 +1,122 @@
|
||||
{% load djeuscan_helpers %}
|
||||
{% load url from future %}
|
||||
|
||||
<dl>
|
||||
{% if package.description %}
|
||||
<dt>Description</dt>
|
||||
<dd>{{ package.description }}</dd>
|
||||
{% endif %}
|
||||
{% if package.homepage %}
|
||||
<dt>Homepage</dt>
|
||||
<dd>
|
||||
{% for homepage in package.homepages %}
|
||||
<a href="{{ homepage }}">{{ homepage }}</a><br />
|
||||
{% endfor %}
|
||||
</dd>
|
||||
{% endif %}
|
||||
{% if package.herds.all %}
|
||||
<dt>Herds</dt>
|
||||
<dd>
|
||||
{% for herd in package.herds.all %}
|
||||
<a href="{% url "herd" herd.herd %}">
|
||||
{{ 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 %}
|
||||
<a href="{% url "maintainer" maintainer.id %}">
|
||||
{{ maintainer.name }}
|
||||
</a>
|
||||
<{{ maintainer.email }}>
|
||||
{% else %}
|
||||
<a href="{% url "maintainer" maintainer.id %}">
|
||||
{{ maintainer.email }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</dd>
|
||||
{% endif %}
|
||||
{% if packaged %}
|
||||
<dt>Packaged Versions</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
{% for version in packaged %}
|
||||
<li id="{{ version.version }}-{{version.revision }}:{{ version.slot }}-[{{ version.overlay }}]">
|
||||
{% 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 %}
|
||||
|
||||
{% if version.vtype and not version.vtype|is_stable %}
|
||||
<img src="{{ STATIC_URL }}img/unstable-icon.png" alt="unstable" title="{{ version.vtype }}" />
|
||||
{% endif %}
|
||||
|
||||
{{ version.version }}-{{ version.revision }} :{{ version.slot }} [{{ version.overlay }}]
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</dd>
|
||||
{% endif %}
|
||||
{% if upstream %}
|
||||
<dt>Upstream versions</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
{% for version in upstream %}
|
||||
<li>
|
||||
<img src="{{ STATIC_URL }}img/upstream-icon.png" alt="upstream" title="Upstream" />
|
||||
|
||||
{% if version.vtype and not version.vtype|is_stable %}
|
||||
<img src="{{ STATIC_URL }}img/unstable-icon.png" alt="unstable" title="{{ version.vtype }}" />
|
||||
{% endif %}
|
||||
|
||||
{{ version.version }} - {{ version.urls }}
|
||||
{% if confidence < 100 %}({{ version.confidence }}%){% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</dd>
|
||||
{% endif %}
|
||||
{% if vlog %}
|
||||
<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 %}
|
||||
{% 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 %}
|
||||
|
||||
{% if version.vtype and not version.vtype|is_stable %}
|
||||
<img src="{{ STATIC_URL }}img/unstable-icon.png" alt="unstable" title="{{ version.vtype }}" />
|
||||
{% endif %}
|
||||
|
||||
{{ version }} - {{ version.datetime }}
|
||||
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</dd>
|
||||
{% endif %}
|
||||
{% if log %}
|
||||
<dt>euscan log</dt>
|
||||
<dd>
|
||||
<p>Date: {{ log.datetime }}
|
||||
<pre class="log">{{ msg|ansi_to_html|safe }}</pre>
|
||||
</dd>
|
||||
{% endif %}
|
||||
</dl>
|
Reference in New Issue
Block a user