From 376ce4a69e016d13eff28589a5caa627bf7c451b Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 7 Feb 2011 12:48:12 -0600 Subject: Clean up Package related objects code Main change is just to move groups from the default packagegroup_set location to a related_name of groups. Also refer to the Package class directly rather than by text string if we have it available. Signed-off-by: Dan McGee --- templates/packages/details.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'templates/packages') diff --git a/templates/packages/details.html b/templates/packages/details.html index fcbaf083..de6b637f 100644 --- a/templates/packages/details.html +++ b/templates/packages/details.html @@ -112,7 +112,7 @@ {{ pkg.license }} Groups: - {% with pkg.packagegroup_set.all as groups %} + {% with pkg.groups.all as groups %} {% if groups %} {% for g in groups %} Date: Mon, 7 Feb 2011 13:45:05 -0600 Subject: Move license to a related model This allows us to store multiple licenses per package in a more elegant fashion, and will later allow us to search and filter on this information. Signed-off-by: Dan McGee --- templates/packages/details.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'templates/packages') diff --git a/templates/packages/details.html b/templates/packages/details.html index de6b637f..14b657e3 100644 --- a/templates/packages/details.html +++ b/templates/packages/details.html @@ -108,8 +108,8 @@ {% if pkg.url %}{{ pkg.url }}{% endif %} - License: - {{ pkg.license }} + License(s): + {{ pkg.licenses.all|join:", " }} Groups: {% with pkg.groups.all as groups %} -- cgit v1.2.3-2-g168b From 7f1c7b08227e49172734f09552ceae8bc1f685ad Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 15 Feb 2011 19:31:56 -0600 Subject: Read in optional deps and show in web interface Signed-off-by: Dan McGee --- templates/packages/details.html | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'templates/packages') diff --git a/templates/packages/details.html b/templates/packages/details.html index 14b657e3..ac997184 100644 --- a/templates/packages/details.html +++ b/templates/packages/details.html @@ -159,16 +159,18 @@ {% if deps %}
    - {% for depend in deps %} - {% ifequal depend.pkg None %} -
  • {{ depend.dep.depname }} (virtual)
  • - {% else %} + {% for depend in deps %} + {% ifequal depend.pkg None %} +
  • {{ depend.dep.depname }} (virtual)
  • + {% else %}
  • {{ depend.dep.depname }} - {{ depend.dep.depvcmp }}{% if depend.pkg.repo.testing %} - (testing){% endif %}
  • - {% endifequal %} - {% endfor %} + title="View package details for {{ depend.dep.depname }}">{{ depend.dep.depname }}{{ depend.dep.depvcmp|default:"" }} + {% if depend.pkg.repo.testing %}(testing){% endif %} + {% if depend.dep.optional %}(optional){% endif %} + {% if depend.dep.description %}{{ depend.dep.description }}{% endif %} + + {% endifequal %} + {% endfor %}
{% endif %} @@ -184,9 +186,10 @@ {% if rqdby %}
    {% for req in rqdby %} -
  • {{ req.pkgname }} - {% if req.repo.testing %} (testing){% endif %}
  • + {% if req.repo.testing %}(testing){% endif %} + {% endfor %}
{% endif %} -- cgit v1.2.3-2-g168b From 8d3d05c7cb81611537aa34fa68e98e5e22b74847 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 15 Feb 2011 20:00:33 -0600 Subject: Allow for optional info in required by display We need to make our root object the PackageDepend rather than the Package to get at this, so do a slight refactor on get_requiredby(). Signed-off-by: Dan McGee --- templates/packages/details.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'templates/packages') diff --git a/templates/packages/details.html b/templates/packages/details.html index ac997184..09b970cd 100644 --- a/templates/packages/details.html +++ b/templates/packages/details.html @@ -186,9 +186,10 @@ {% if rqdby %}
    {% for req in rqdby %} -
  • {{ req.pkgname }} - {% if req.repo.testing %}(testing){% endif %} +
  • {{ req.pkg.pkgname }} + {% if req.pkg.repo.testing %}(testing){% endif %} + {% if req.optional %}(optional){% endif %}
  • {% endfor %}
-- cgit v1.2.3-2-g168b From 4b12255d1cf52fcc1a98c230d940d0c1d3809ad2 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 21 Dec 2010 21:34:40 -0600 Subject: Use new split package file fields everywhere Signed-off-by: Dan McGee --- templates/packages/files-list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'templates/packages') 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.

{% if files.count %}
    {% for file in files %} -
  • {{ file.path }}
  • +
  • {{ file.directory }}{{ file.filename|default:'' }}
  • {% endfor %}
{% else %} -- cgit v1.2.3-2-g168b From dfc4d919f1b0349d5143764c3f8f62c240e50623 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 22 Feb 2011 17:24:09 -0600 Subject: Use hyphen to offset optdep description Signed-off-by: Dan McGee --- templates/packages/details.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'templates/packages') diff --git a/templates/packages/details.html b/templates/packages/details.html index 09b970cd..ea5e528c 100644 --- a/templates/packages/details.html +++ b/templates/packages/details.html @@ -167,7 +167,7 @@ title="View package details for {{ depend.dep.depname }}">{{ depend.dep.depname }}{{ depend.dep.depvcmp|default:"" }} {% if depend.pkg.repo.testing %}(testing){% endif %} {% if depend.dep.optional %}(optional){% endif %} - {% if depend.dep.description %}{{ depend.dep.description }}{% endif %} + {% if depend.dep.description %}- {{ depend.dep.description }}{% endif %} {% endifequal %} {% endfor %} -- cgit v1.2.3-2-g168b From 3181e970ce9dcc4fd996499ee536e4c2454e89dd Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 23 Feb 2011 12:09:29 -0600 Subject: Add stale package relations status screen For now it is read only. Display a few tables of various ways of detecting stale package relations. These include inactive users, pkgbase values that no longer exist, and users that are listed as maintainers that don't have the proper permissions for that package anymore. Signed-off-by: Dan McGee --- templates/packages/stale_relations.html | 101 ++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 templates/packages/stale_relations.html (limited to 'templates/packages') diff --git a/templates/packages/stale_relations.html b/templates/packages/stale_relations.html new file mode 100644 index 00000000..975ef1b6 --- /dev/null +++ b/templates/packages/stale_relations.html @@ -0,0 +1,101 @@ +{% extends "base.html" %} +{% block title %}Arch Linux - Stale Package Relations{% endblock %} +{% block navbarclass %}anb-packages{% endblock %} + +{% block content %} +
+

Stale Package Relations

+ +

Inactive User Relations ({{ inactive_user|length }})

+ + + + + + + + + + + + {% for relation in inactive_user %} + + + + + + + {% empty %} + + {% endfor %} + +
Package BasePackagesUserType
{{ relation.pkgbase }}{% for pkg in relation.get_associated_packages %} + {{ pkg.repo|lower }}/{{ pkg.pkgname }} ({{ pkg.arch }}){% if not forloop.last %}, {% endif %} + {% endfor %}{{ relation.user.get_full_name }}{{ relation.get_type_display }}
No inactive user relations.
+ +

Relations with Non-existent pkgbase ({{ missing_pkgbase|length }})

+ + + + + + + + + + + {% for relation in missing_pkgbase %} + + + + + + {% empty %} + + {% endfor %} + +
Package BaseUserType
{{ relation.pkgbase }}{{ relation.user.get_full_name }}{{ relation.get_type_display }}
No non-existent pkgbase relations.
+ +

Maintainers with Wrong Permissions ({{ wrong_permissions|length }})

+ + + + + + + + + + + + + {% for relation in wrong_permissions %} + + + + + + + + {% empty %} + + {% endfor %} + +
Package BasePackagesUserAllowed ReposCurrently in Repos
{{ relation.pkgbase }}{% for pkg in relation.get_associated_packages %} + {{ pkg.repo|lower }}/{{ pkg.pkgname }} ({{ pkg.arch }}){% if not forloop.last %}, {% endif %} + {% endfor %}{{ relation.user.get_full_name }}{{ relation.user.userprofile.allowed_repos.all|join:", " }}{{ relation.repositories|join:", " }}
No relations with wrong permissions.
+ +
+{% load cdn %}{% jquery %} + + + +{% endblock %} -- cgit v1.2.3-2-g168b From 93bca8b0ed79afc30f6237e13dacaf32ed8cd4b3 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 23 Feb 2011 12:36:49 -0600 Subject: Allow deleting of stale package relations via status page Add a column of checkboxes to each table, enclose the whole thing in a form, and add a super-simple delete view that takes a list of IDs and removes them from the database. The delete_packagerelation permission is required to be able to delete relations. Signed-off-by: Dan McGee --- templates/packages/stale_relations.html | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'templates/packages') diff --git a/templates/packages/stale_relations.html b/templates/packages/stale_relations.html index 975ef1b6..8e2f8930 100644 --- a/templates/packages/stale_relations.html +++ b/templates/packages/stale_relations.html @@ -6,11 +6,13 @@

Stale Package Relations

+
{% csrf_token %}

Inactive User Relations ({{ inactive_user|length }})

+ @@ -20,6 +22,7 @@ {% for relation in inactive_user %} + {% empty %} - + {% endfor %}
  Package Base Packages User
{{ relation.pkgbase }} {% for pkg in relation.get_associated_packages %} {{ relation.get_type_display }}
No inactive user relations.
No inactive user relations.
@@ -39,6 +42,7 @@ + @@ -47,12 +51,13 @@ {% for relation in missing_pkgbase %} + {% empty %} - + {% endfor %}
  Package Base User Type
{{ relation.pkgbase }} {{ relation.user.get_full_name }} {{ relation.get_type_display }}
No non-existent pkgbase relations.
No non-existent pkgbase relations.
@@ -62,6 +67,7 @@ + @@ -72,6 +78,7 @@ {% for relation in wrong_permissions %} + {% empty %} - + {% endfor %}
  Package Base Packages User
{{ relation.pkgbase }} {% for pkg in relation.get_associated_packages %} {{ relation.repositories|join:", " }}
No relations with wrong permissions.
No relations with wrong permissions.
+

+

+
{% load cdn %}{% jquery %} {% endblock %} -- cgit v1.2.3-2-g168b From 8b77efbfabfb3d65b0400e123025c02346454214 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 3 Mar 2011 14:59:04 -0600 Subject: Template fine-grained permissioning Rather than use user.is_authenticated, rely on certain permissions being set for the user. This allows us to open up the developer side and not assume everyone is a package maintainer. Allow all logged-in users to still view todo lists, but don't show the complete/incomplete links (only the text) unless they are allowed to mess with todo lists. Signed-off-by: Dan McGee --- templates/packages/details.html | 4 ++-- templates/packages/search.html | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'templates/packages') diff --git a/templates/packages/details.html b/templates/packages/details.html index ea5e528c..f73e9d7c 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 }} in testing {% endif %}{% endwith %} - {% if user.is_authenticated %} + {% if perms.main.change_package %}
  • Click here to unflag
  • Click here to unflag all split packages
  • {% endif %} @@ -40,7 +40,7 @@
  • Download From Mirror
  • - {% if user.is_authenticated %} + {% if perms.main.change_package %}
    {% csrf_token %}

    {% if user in pkg.maintainers %} diff --git a/templates/packages/search.html b/templates/packages/search.html index 4a779aa0..dad05ffa 100644 --- a/templates/packages/search.html +++ b/templates/packages/search.html @@ -71,7 +71,7 @@ - {% if user.is_authenticated %} + {% if perms.main.change_package %} {% endif %} - {% if user.is_authenticated %} + {% if perms.main.change_package %} {% endif %} @@ -134,7 +134,7 @@ {% endif %} - {% if user.is_authenticated %} + {% if perms.main.change_package %}

    Date: Fri, 4 Mar 2011 12:39:53 -0600 Subject: Send only one email per todolist Customize each email on a per-maintainer basis and list all the relevant packages inside, rather than spamming people. Signed-off-by: Dan McGee --- templates/packages/outofdate.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'templates/packages') 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 }} -- cgit v1.2.3-2-g168b

      {% for pkg in package_list %}
    {{ pkg.arch.name }}