summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2008-04-07 00:56:52 +0200
committerGuillaume Seguin <guillaume@segu.in>2008-04-07 00:56:52 +0200
commitb47cbd4d8326cf81a6dd3e43c43ac295e4ec1686 (patch)
tree5bf7a92403d43c95e95458841f33c27dae34b387
parent4e25007b4fbac2b0b3e9fe94a2ff878e949810b9 (diff)
downloadmarks-b47cbd4d8326cf81a6dd3e43c43ac295e4ec1686.tar.gz
marks-b47cbd4d8326cf81a6dd3e43c43ac295e4ec1686.tar.bz2
* Don't include <h3> tag if block title is empty
-rw-r--r--main/templatetags/marks_tags.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/main/templatetags/marks_tags.py b/main/templatetags/marks_tags.py
index c7c931a..783d27a 100644
--- a/main/templatetags/marks_tags.py
+++ b/main/templatetags/marks_tags.py
@@ -23,7 +23,7 @@ register = template.Library ()
@register.simple_tag
def rounded_block_start (classes, title):
- return '''<div class="%s">
+ base = '''<div class="%s">
<b class="block-bg">
<b class="block-bg1"><b></b></b>
<b class="block-bg2"><b></b></b>
@@ -32,8 +32,11 @@ def rounded_block_start (classes, title):
<b class="block-bg5"></b></b>
<div class="block-bgfg block">
- <h3>%s</h3>
-''' % (classes, title)
+''' % classes
+ if title:
+ return "%s<h3>%s</h3>" % (base, title)
+ else:
+ return base
@register.simple_tag
def rounded_block_end ():