move Activities section into an admin page for easy editing
This commit is contained in:
@@ -93,6 +93,24 @@ def blog_edit(request):
|
||||
def blog_search(request):
|
||||
|
||||
criteria = ''
|
||||
liste = ''
|
||||
# generate a list of all tags of all topics
|
||||
if request.authenticated_userid:
|
||||
# get all topics
|
||||
topics = BlogRecordService.get_topics(request)
|
||||
|
||||
for topic in topics:
|
||||
liste += '<h4>' + topic.topic_name + '</h4>'
|
||||
# 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(
|
||||
tag.tag_name, count)
|
||||
liste += '</ul>'
|
||||
|
||||
form = BlogSearchForm(request.POST)
|
||||
items = []
|
||||
if 'form.submitted' in request.params and form.validate():
|
||||
@@ -105,6 +123,7 @@ def blog_search(request):
|
||||
'form': form,
|
||||
'items': items,
|
||||
'criteria': criteria,
|
||||
'liste': liste,
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user