summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2015-06-05 08:15:32 -0500
committerDan McGee <dan@archlinux.org>2015-06-05 08:28:30 -0500
commitff1359050f686437b6078e2b12948674d2f7388f (patch)
treee1683d25f76cdd09b949c023f11906422af7d5cc
parentbecb5b2356b384178002d9db6084547325ff7787 (diff)
Tweak display of todolist descriptions
Indent, call out, and add some borders, among other things. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--sitestatic/archweb.css13
-rw-r--r--templates/todolists/view.html23
-rw-r--r--todolists/models.py4
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 @@
{% endif %}
</ul>
- <p class="todo-info">{{ list.created|date }} - {{ list.creator.get_full_name }}</p>
+ <div class="todo-info">{{ list.created|date }} - {{ list.creator.get_full_name }}</div>
- <div>{{list.description|urlize|linebreaks}}</div>
-
- <p>Link to lists of pkgbase values:</p>
- <ul>{% for svn_root in svn_roots %}
- <li><a href="pkgbases/{{ svn_root }}/">{{ svn_root }}</a></li>
- {% endfor %}</ul>
+ <div class="todo-description">
+ {{list.stripped_description|default:'(no description)'|urlize|linebreaks}}
+ </div>
- <p>{{ list.packages|length }} total todo list package{{ list.packages|pluralize }} found.</p>
+ <div class="todo-pkgbases">
+ <p>Link to lists of pkgbase values:</p>
+ <ul>{% for svn_root in svn_roots %}
+ <li><a href="pkgbases/{{ svn_root }}/">{{ svn_root }}</a></li>
+ {% endfor %}</ul>
+ </div>
<div class="box filter-criteria">
<h3>Filter Todo List Packages</h3>
@@ -54,7 +56,10 @@
<input type="checkbox" name="incomplete" id="id_incomplete" value="incomplete"/></div>
<div ><label>&nbsp;</label><input title="Reset search criteria" type="button" id="criteria_reset" value="Reset"/></div>
<div class="clear"></div>
- <div id="filter-info"><span id="filter-count">{{ list.packages|length }}</span> todo list packages displayed.</div>
+ <div id="filter-info">
+ <span id="filter-count">{{ list.packages|length }}</span> packages displayed out of
+ {{ list.packages|length }} total package{{ list.packages|pluralize }}.
+ </div>
</fieldset>
</form>
</div>
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 Todolist(models.Model):
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