]> git.phdru.name Git - phdru.name/cgi-bin/blog-ru/search-tags.git/commitdiff
Change list implementation from <br> to <ul>
authorOleg Broytman <phd@phdru.name>
Tue, 20 May 2014 14:24:36 +0000 (18:24 +0400)
committerOleg Broytman <phd@phdru.name>
Tue, 20 May 2014 14:24:36 +0000 (18:24 +0400)
search-tags.py

index d1bc93ef697cc40a9593e9a58bb0c39e6e7818a7..35fd288773e0b5f34f8ed4ece6a333fa967c4d99 100755 (executable)
@@ -44,10 +44,17 @@ else:
         status = None
         title = "Записи, найденные для выражения " + q
         if posts:
-            _posts = []
-            for suburl, title in posts:
-                _posts.append('<a href="../../../../Russian/blog/%s">%s</a>' % (suburl, title))
-            body = "<br>\n".join(_posts)
+            _posts = ["""\
+<p class="head">
+<ul>
+"""]
+            for year, month, day, suburl, title in posts:
+                _posts.append('<li>%s-%s-%s <a href="../../../../Russian/blog/%s">%s</a></li>\n' % (year, month, day, suburl, title))
+            _posts .append("""\
+</ul>
+</p>
+""")
+            body = ''.join(_posts)
         else:
             body = "Не найдено ни одной записи."