added link to topic
This commit is contained in:
@@ -100,14 +100,16 @@ def blog_search(request):
|
||||
topics = BlogRecordService.get_topics(request)
|
||||
|
||||
for topic in topics:
|
||||
liste += '<h4>' + topic.topic_name + '</h4>'
|
||||
liste += '<h4><a href="{0}">{1}</a></h4>'.format(
|
||||
request.route_url('topic', topic=topic.topic), topic.topic_name)
|
||||
|
||||
# get all the tags of the topic
|
||||
tags = BlogRecordService.get_tags_byTopic(request, topic.topic)
|
||||
if tags:
|
||||
liste += '<ul>'
|
||||
for tag in tags:
|
||||
count = len(BlogRecordService.by_topic(request, tag.topic, tag.tag))
|
||||
liste += '<button type="button" class="btn">{0} <span class="badge">{1}</span></button> '.format(
|
||||
liste += '<button type="button" class="btn">{0} <span class="badge">{1}</span></button> '.format(
|
||||
tag.tag_name, count)
|
||||
liste += '</ul>'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user