From c8ece67cec9c421ac0c711554edd34f022623b45 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 28 Dec 2012 00:27:20 -0600 Subject: Convert to using new todolist models everywhere This is a rather widespread set of changes converting usage to the new todo list and todo list package model recently introduced. The data migration is not included in this commit. After this commit, the old model should no longer be referenced anywhere. Signed-off-by: Dan McGee --- templates/devel/index.html | 10 +++++----- templates/todolists/email_notification.txt | 2 +- templates/todolists/list.html | 4 ++-- templates/todolists/public_list.html | 18 ++++++------------ templates/todolists/view.html | 27 +++++++++++---------------- 5 files changed, 25 insertions(+), 36 deletions(-) (limited to 'templates') diff --git a/templates/devel/index.html b/templates/devel/index.html index a07a4190..57151041 100644 --- a/templates/devel/index.html +++ b/templates/devel/index.html @@ -59,11 +59,11 @@

My Incomplete Todo List Packages

{% for todopkg in todopkgs %} - {{ todopkg.list.name }} + {{ todopkg.todolist.name }} {% pkg_details_link todopkg.pkg %} - {{ todopkg.pkg.repo.name }} - {{ todopkg.pkg.arch.name }} + {{ todopkg.repo.name }} + {{ todopkg.arch.name }} {{ todopkg.pkg.maintainers|join:', ' }} {% empty %} @@ -90,7 +90,7 @@

Package Todo Lists

{{ todo.name }} - {{ todo.date_added|date }} + {{ todo.created|date }} {{ todo.creator.get_full_name }} {{ todo.description|urlize }} {{ todo.pkg_count }} diff --git a/templates/todolists/email_notification.txt b/templates/todolists/email_notification.txt index 8b22b465..e454ec79 100644 --- a/templates/todolists/email_notification.txt +++ b/templates/todolists/email_notification.txt @@ -1,7 +1,7 @@ {% autoescape off %}The todo list "{{ todolist.name }}" has had the following packages added to it for which you are a maintainer: {% for tpkg in todo_packages %} -* {{ tpkg.pkg.repo.name|lower }}/{{ tpkg.pkg.pkgname }} ({{ tpkg.pkg.arch.name }}) - {{ tpkg.pkg.get_full_url }}{% endfor %} +* {{ tpkg.repo.name|lower }}/{{ tpkg.pkgname }} ({{ tpkg.arch.name }}) - {{ tpkg.pkg.get_full_url }}{% endfor %} Todo list information: Name: {{ todolist.name }} diff --git a/templates/todolists/list.html b/templates/todolists/list.html index 51f9b570..4e456d28 100644 --- a/templates/todolists/list.html +++ b/templates/todolists/list.html @@ -8,7 +8,7 @@

Package Todo Lists

- {% if perms.main.add_todolist %} + {% if perms.todolists.add_todolist %} @@ -31,7 +31,7 @@

Package Todo Lists

{{ list.name }} - {{ list.date_added|date }} + {{ list.created|date }} {{ list.creator.get_full_name }} {{ list.description|urlize }} {{ list.pkg_count }} diff --git a/templates/todolists/public_list.html b/templates/todolists/public_list.html index 9e0e5234..41caf5b0 100644 --- a/templates/todolists/public_list.html +++ b/templates/todolists/public_list.html @@ -30,7 +30,7 @@

Open Developer Todo Lists

{{ list.name }}

-

{{ list.date_added|date }} - {{ list.creator.get_full_name }}

+

{{ list.created|date }} - {{ list.creator.get_full_name }}

{{ list.description|urlize|linebreaks }}
@@ -45,17 +45,11 @@

{{ list.name }}

{% for pkg in list.packages %} - - - - - + + + + + {% endfor %} diff --git a/templates/todolists/view.html b/templates/todolists/view.html index b6f59704..0f3475a2 100644 --- a/templates/todolists/view.html +++ b/templates/todolists/view.html @@ -10,17 +10,17 @@

Todo List: {{ list.name }}

    - {% if perms.main.delete_todolist %} + {% if perms.todolists.delete_todolist %}
  • Delete Todo List
  • {% endif %} - {% if perms.main.change_todolist %} + {% if perms.todolists.change_todolist %}
  • Edit Todo List
  • {% endif %}
-

{{ list.date_added|date }} - {{ list.creator.get_full_name }}

+

{{ list.created|date }} - {{ list.creator.get_full_name }}

{{list.description|urlize|linebreaks}}
@@ -68,27 +68,22 @@

Filter Todo List Packages

{% for pkg in list.packages %} - - - - + + + + {% if pkg.pkg.flag_date %} {% else %} {% endif %} - + -- cgit v1.2.3-54-g00ecf
{% pkg_details_link pkg.pkg %}{{ pkg.pkg.arch.name }}{{ pkg.pkg.repo.name|capfirst }}{{ pkg.pkg.maintainers|join:', ' }} - {% if pkg.complete %} - Complete - {% else %} - Incomplete - {% endif %} - {% pkg_details_link pkg.pkg pkg.pkgname %}{{ pkg.arch.name }}{{ pkg.repo.name|capfirst }}{{ pkg.maintainers|join:', ' }}{{ pkg.get_status_display }}
{{ pkg.pkg.arch.name }}{{ pkg.pkg.repo.name|capfirst }}{% pkg_details_link pkg.pkg %}
{{ pkg.arch.name }}{{ pkg.repo.name|capfirst }}{% pkg_details_link pkg.pkg pkg.pkgname %}{{ pkg.pkg.full_version }}{{ pkg.pkg.full_version }}{{ pkg.pkg.maintainers|join:', ' }}{{ pkg.maintainers|join:', ' }} - {% if perms.main.change_todolistpkg %} - {% if pkg.complete %} + {% if perms.todolist.change_todolistpackage %} Complete + class="status-link {{ pkg.status_css_class }}" title="Toggle completion status">{{ pkg.get_status_display }} {% else %} - Incomplete - {% endif %} - {% else %} - {% if pkg.complete %}Complete{% else %}Incomplete{% endif %} + {{ pkg.get_status_display }} {% endif %}