From ff1359050f686437b6078e2b12948674d2f7388f Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 5 Jun 2015 08:15:32 -0500 Subject: Tweak display of todolist descriptions Indent, call out, and add some borders, among other things. Signed-off-by: Dan McGee --- sitestatic/archweb.css | 13 ++++++++++++- templates/todolists/view.html | 23 ++++++++++++++--------- todolists/models.py | 4 ++++ 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/sitestatic/archweb.css b/sitestatic/archweb.css index cc3b9742..2ea582fb 100644 --- a/sitestatic/archweb.css +++ b/sitestatic/archweb.css @@ -1047,7 +1047,18 @@ ul.admin-actions { /* todo lists (public and private) */ .todo-info { - margin: 0; color: #999; + color: #999; + border-bottom: 1px dotted #bbb; +} + +.todo-description { + margin-top: 1em; + padding-left: 2em; + max-width: 900px; +} + +.todo-pkgbases { + border-top: 1px dotted #bbb; } .todo-list h4 { diff --git a/templates/todolists/view.html b/templates/todolists/view.html index 0045390c..ec203b39 100644 --- a/templates/todolists/view.html +++ b/templates/todolists/view.html @@ -22,16 +22,18 @@

Todo List: {{ list.name }}

{% endif %} -

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

+
{{ list.created|date }} - {{ list.creator.get_full_name }}
-
{{list.description|urlize|linebreaks}}
- -

Link to lists of pkgbase values:

- +
+ {{list.stripped_description|default:'(no description)'|urlize|linebreaks}} +
-

{{ list.packages|length }} total todo list package{{ list.packages|pluralize }} found.

+
+

Link to lists of pkgbase values:

+ +

Filter Todo List Packages

@@ -54,7 +56,10 @@

Filter Todo List Packages

-
{{ list.packages|length }} todo list packages displayed.
+
+ {{ list.packages|length }} packages displayed out of + {{ list.packages|length }} total package{{ list.packages|pluralize }}. +
diff --git a/todolists/models.py b/todolists/models.py index 59b14616..92ca5839 100644 --- a/todolists/models.py +++ b/todolists/models.py @@ -35,6 +35,10 @@ class Meta: def __unicode__(self): return self.name + @property + def stripped_description(self): + return self.description.strip() + def get_absolute_url(self): return '/todo/%s/' % self.slug -- cgit v1.2.3-54-g00ecf