summaryrefslogtreecommitdiff
path: root/templates/packages
diff options
context:
space:
mode:
Diffstat (limited to 'templates/packages')
-rw-r--r--templates/packages/details.html38
-rw-r--r--templates/packages/files-list.html2
-rw-r--r--templates/packages/outofdate.txt4
-rw-r--r--templates/packages/search.html6
-rw-r--r--templates/packages/stale_relations.html112
5 files changed, 138 insertions, 24 deletions
diff --git a/templates/packages/details.html b/templates/packages/details.html
index b1b50d6e..4fae6c68 100644
--- a/templates/packages/details.html
+++ b/templates/packages/details.html
@@ -26,7 +26,7 @@
title="Testing package details for {{ tp.pkgname }}">{{ tp.pkgver }}-{{ tp.pkgrel }}</a>
in testing</span></li>
{% endif %}{% endwith %}
- {% if user.is_authenticated %}
+ {% if perms.main.change_package %}
<li><a href="unflag/" title="Unflag this package">Click here to unflag</a></li>
<li><a href="unflag/all/" title="Unflag all matching pkgbase">Click here to unflag all split packages</a></li>
{% endif %}
@@ -40,7 +40,7 @@
<li><a href="download/" title="Download {{ pkg.pkgname }} from mirror">Download From Mirror</a></li>
</ul>
- {% if user.is_authenticated %}
+ {% if perms.main.change_package %}
<form id="pkg-action" method="post" action="/packages/update/">{% csrf_token %}
<div><input type="hidden" name="pkgid" value="{{ pkg.id }}" /></div>
<p>{% if user in pkg.maintainers %}
@@ -108,11 +108,11 @@
<td>{% if pkg.url %}<a href="{{ pkg.url }}"
title="Visit the website for {{ pkg.pkgname }}">{{ pkg.url }}</a>{% endif %}</td>
</tr><tr>
- <th>License:</th>
- <td>{{ pkg.license }}</td>
+ <th>License(s):</th>
+ <td>{{ pkg.licenses.all|join:", " }}</td>
</tr><tr>
<th>Groups:</th>
- {% with pkg.packagegroup_set.all as groups %}
+ {% with pkg.groups.all as groups %}
<td>{% if groups %}
{% for g in groups %}
<a href="/groups/{{ pkg.arch.name }}/{{ g.name }}/"
@@ -159,16 +159,18 @@
{% if deps %}
<ul>
- {% for depend in deps %}
- {% ifequal depend.pkg None %}
- <li>{{ depend.dep.depname }} (virtual)</li>
- {% else %}
+ {% for depend in deps %}
+ {% ifequal depend.pkg None %}
+ <li>{{ depend.dep.depname }} <span class="virtual-dep">(virtual)</span></li>
+ {% else %}
<li><a href="{{ depend.pkg.get_absolute_url }}"
- title="View package details for {{ depend.dep.depname }}">{{ depend.dep.depname }}</a>
- {{ depend.dep.depvcmp }}{% if depend.pkg.repo.testing %}
- <span class="testing-dep">(testing)</span>{% endif %}</li>
- {% endifequal %}
- {% endfor %}
+ title="View package details for {{ depend.dep.depname }}">{{ depend.dep.depname }}</a>{{ depend.dep.depvcmp|default:"" }}
+ {% if depend.pkg.repo.testing %}<span class="testing-dep">(testing)</span>{% endif %}
+ {% if depend.dep.optional %}<span class="opt-dep">(optional)</span>{% endif %}
+ {% if depend.dep.description %}- <span class="dep-desc">{{ depend.dep.description }}</span>{% endif %}
+ </li>
+ {% endifequal %}
+ {% endfor %}
</ul>
{% endif %}
@@ -184,9 +186,11 @@
{% if rqdby %}
<ul>
{% for req in rqdby %}
- <li><a href="{{req.get_absolute_url}}"
- title="View package details for {{ req.pkgname }}">{{ req.pkgname }}</a>
- {% if req.repo.testing %} (testing){% endif %}</li>
+ <li><a href="{{ req.pkg.get_absolute_url }}"
+ title="View package details for {{ req.pkg.pkgname }}">{{ req.pkg.pkgname }}</a>
+ {% if req.pkg.repo.testing %}<span class="testing-dep">(testing)</span>{% endif %}
+ {% if req.optional %}<span class="opt-dep">(optional)</span>{% endif %}
+ </li>
{% endfor %}
</ul>
{% endif %}
diff --git a/templates/packages/files-list.html b/templates/packages/files-list.html
index 1c9ea635..bb89b663 100644
--- a/templates/packages/files-list.html
+++ b/templates/packages/files-list.html
@@ -5,7 +5,7 @@ of the package; it may be out of date.</p>
{% if files.count %}
<ul>
{% for file in files %}
- <li>{{ file.path }}</li>
+ <li>{{ file.directory }}{{ file.filename|default:'' }}</li>
{% endfor %}
</ul>
{% else %}
diff --git a/templates/packages/outofdate.txt b/templates/packages/outofdate.txt
index d8b74005..93abea03 100644
--- a/templates/packages/outofdate.txt
+++ b/templates/packages/outofdate.txt
@@ -1,6 +1,4 @@
-{% autoescape off %}* Note: this is an automated message
-
-{{ email }} wants to notify you that the following package may be out-of-date:
+{% autoescape off %}{{ email }} wants to notify you that the following package may be out-of-date:
Package Name: {{ pkg.pkgname }}
Architecture: {{ pkg.arch.name }}
diff --git a/templates/packages/search.html b/templates/packages/search.html
index 3f0d49c7..74f7ede3 100644
--- a/templates/packages/search.html
+++ b/templates/packages/search.html
@@ -71,7 +71,7 @@
<table class="results">
<thead>
<tr>
- {% if user.is_authenticated %}
+ {% if perms.main.change_package %}
<th>&nbsp;</th>
{% endif %}
<th><a href="/packages/{% buildsortqs "arch" %}"
@@ -91,7 +91,7 @@
<tbody>
{% for pkg in package_list %}
<tr class="{% cycle 'odd' 'even' %}">
- {% if user.is_authenticated %}
+ {% if perms.main.change_package %}
<td><input type="checkbox" name="pkgid" value="{{ pkg.id }}" /></td>
{% endif %}
<td>{{ pkg.arch.name }}</td>
@@ -134,7 +134,7 @@
</div>
{% endif %}
- {% if user.is_authenticated %}
+ {% if perms.main.change_package %}
<p><input title="Adopt selected packages" type="submit" id="adopt-btn"
name="adopt" value="Adopt Packages" />
<input title="Orphan selected packages" type="submit" id="disown-btn"
diff --git a/templates/packages/stale_relations.html b/templates/packages/stale_relations.html
new file mode 100644
index 00000000..8e2f8930
--- /dev/null
+++ b/templates/packages/stale_relations.html
@@ -0,0 +1,112 @@
+{% extends "base.html" %}
+{% block title %}Arch Linux - Stale Package Relations{% endblock %}
+{% block navbarclass %}anb-packages{% endblock %}
+
+{% block content %}
+<div class="box">
+ <h2>Stale Package Relations</h2>
+
+ <form id="stale-relations-form" method="post" action="update/">{% csrf_token %}
+ <h3>Inactive User Relations ({{ inactive_user|length }})</h3>
+
+ <table class="results" id="inactive-user">
+ <thead>
+ <tr>
+ <th>&nbsp;</th>
+ <th>Package Base</th>
+ <th>Packages</th>
+ <th>User</th>
+ <th>Type</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for relation in inactive_user %}
+ <tr class="{% cycle 'odd' 'even' %}">
+ <td><input type="checkbox" name="relation_id" value="{{ relation.id }}" /></td>
+ <td>{{ relation.pkgbase }}</td>
+ <td class="wrap">{% for pkg in relation.get_associated_packages %}
+ <a href="{{ pkg.get_absolute_url }}"
+ title="View package details for {{ pkg.pkgname }}">{{ pkg.repo|lower }}/{{ pkg.pkgname }} ({{ pkg.arch }})</a>{% if not forloop.last %}, {% endif %}
+ {% endfor %}</td>
+ <td>{{ relation.user.get_full_name }}</td>
+ <td>{{ relation.get_type_display }}</td>
+ </tr>
+ {% empty %}
+ <tr class="empty"><td colspan="5"><em>No inactive user relations.</em></td></tr>
+ {% endfor %}
+ </tbody>
+ </table>
+
+ <h3>Relations with Non-existent <tt>pkgbase</tt> ({{ missing_pkgbase|length }})</h3>
+
+ <table class="results" id="missing-pkgbase">
+ <thead>
+ <tr>
+ <th>&nbsp;</th>
+ <th>Package Base</th>
+ <th>User</th>
+ <th>Type</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for relation in missing_pkgbase %}
+ <tr class="{% cycle 'odd' 'even' %}">
+ <td><input type="checkbox" name="relation_id" value="{{ relation.id }}" /></td>
+ <td>{{ relation.pkgbase }}</td>
+ <td>{{ relation.user.get_full_name }}</td>
+ <td>{{ relation.get_type_display }}</td>
+ </tr>
+ {% empty %}
+ <tr class="empty"><td colspan="4"><em>No non-existent pkgbase relations.</em></td></tr>
+ {% endfor %}
+ </tbody>
+ </table>
+
+ <h3>Maintainers with Wrong Permissions ({{ wrong_permissions|length }})</h3>
+
+ <table class="results" id="wrong-permissions">
+ <thead>
+ <tr>
+ <th>&nbsp;</th>
+ <th>Package Base</th>
+ <th>Packages</th>
+ <th>User</th>
+ <th>Allowed Repos</th>
+ <th>Currently in Repos</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for relation in wrong_permissions %}
+ <tr class="{% cycle 'odd' 'even' %}">
+ <td><input type="checkbox" name="relation_id" value="{{ relation.id }}" /></td>
+ <td>{{ relation.pkgbase }}</td>
+ <td class="wrap">{% for pkg in relation.get_associated_packages %}
+ <a href="{{ pkg.get_absolute_url }}"
+ title="View package details for {{ pkg.pkgname }}">{{ pkg.repo|lower }}/{{ pkg.pkgname }} ({{ pkg.arch }})</a>{% if not forloop.last %}, {% endif %}
+ {% endfor %}</td>
+ <td>{{ relation.user.get_full_name }}</td>
+ <td class="wrap">{{ relation.user.userprofile.allowed_repos.all|join:", " }}</td>
+ <td class="wrap">{{ relation.repositories|join:", " }}</td>
+ </tr>
+ {% empty %}
+ <tr class="empty"><td colspan="6"><em>No relations with wrong permissions.</em></td></tr>
+ {% endfor %}
+ </tbody>
+ </table>
+
+ <p><input title="Delete selected relations" type="submit" id="delete-relations"
+ name="delete" value="Delete Selected Relations" />
+ </form>
+
+</div>
+{% load cdn %}{% jquery %}
+<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="/media/archweb.js"></script>
+<script type="text/javascript">
+$(document).ready(function() {
+ $('#inactive-user:not(:has(tbody tr.empty))').tablesorter({widgets: ['zebra'], headers: { 0: { sorter: false } }, sortList: [[3,0]]});
+ $('#missing-pkgbase:not(:has(tbody tr.empty))').tablesorter({widgets: ['zebra'], headers: { 0: { sorter: false } }, sortList: [[1,0]]});
+});
+ $('#wrong-permissions:not(:has(tbody tr.empty))').tablesorter({widgets: ['zebra'], headers: { 0: { sorter: false } }, sortList: [[3,0]]});
+</script>
+{% endblock %}