From f46e5b1a94c845ea2125b4f9d6777dff56c9ad29 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 23 Mar 2011 12:44:12 -0500 Subject: Generalize group details page We will be able to use this same table-based package listing elsewhere. Signed-off-by: Dan McGee --- packages/views.py | 5 ++-- templates/packages/group_details.html | 47 ----------------------------------- templates/packages/packages_list.html | 47 +++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 49 deletions(-) delete mode 100644 templates/packages/group_details.html create mode 100644 templates/packages/packages_list.html diff --git a/packages/views.py b/packages/views.py index d393e694..374a1a20 100644 --- a/packages/views.py +++ b/packages/views.py @@ -111,11 +111,12 @@ def group_details(request, arch, name): if len(pkgs) == 0: raise Http404 context = { - 'groupname': name, + 'list_title': 'Group Details', + 'name': name, 'arch': arch, 'packages': pkgs, } - return direct_to_template(request, 'packages/group_details.html', context) + return direct_to_template(request, 'packages/packages_list.html', context) def getmaintainer(request, name, repo, arch): "Returns the maintainers as plaintext." diff --git a/templates/packages/group_details.html b/templates/packages/group_details.html deleted file mode 100644 index 22b805d4..00000000 --- a/templates/packages/group_details.html +++ /dev/null @@ -1,47 +0,0 @@ -{% extends "base.html" %} -{% block title %}Arch Linux - {{ groupname }} - {{ arch.name }} - Group Details{% endblock %} -{% block navbarclass %}anb-packages{% endblock %} - -{% block content %} -
-

Details for group {{ groupname }} - {{ arch.name }}

- - - - - - - - - - - - - - {% for pkg in packages %} - - - - - {% if pkg.flag_date %} - - {% else %} - - {% endif %} - - - - - {% endfor %} - -
ArchRepoNameVersionDescriptionLast UpdatedFlag Date
{{ pkg.arch.name }}{{ pkg.repo.name|capfirst }}{{ pkg.pkgname }}{{ pkg.full_version }}{{ pkg.full_version }}{{ pkg.pkgdesc }}{{ pkg.last_update|date }}{{ pkg.flag_date|date }}
-
-{% load cdn %}{% jquery %} - - -{% endblock %} diff --git a/templates/packages/packages_list.html b/templates/packages/packages_list.html new file mode 100644 index 00000000..c897aac5 --- /dev/null +++ b/templates/packages/packages_list.html @@ -0,0 +1,47 @@ +{% extends "base.html" %} +{% block title %}Arch Linux - {{ name }} ({{ arch.name }}) - {{ list_title }}{% endblock %} +{% block navbarclass %}anb-packages{% endblock %} + +{% block content %} +
+

{{ list_title }} - {{ name }} ({{ arch.name }})

+ + + + + + + + + + + + + + {% for pkg in packages %} + + + + + {% if pkg.flag_date %} + + {% else %} + + {% endif %} + + + + + {% endfor %} + +
ArchRepoNameVersionDescriptionLast UpdatedFlag Date
{{ pkg.arch.name }}{{ pkg.repo.name|capfirst }}{{ pkg.pkgname }}{{ pkg.full_version }}{{ pkg.full_version }}{{ pkg.pkgdesc }}{{ pkg.last_update|date }}{{ pkg.flag_date|date }}
+
+{% load cdn %}{% jquery %} + + +{% endblock %} -- cgit v1.2.3-54-g00ecf