Linking comments works

This commit is contained in:
2016-11-03 12:27:28 +01:00
parent 47f7727a4b
commit 464469f496
3 changed files with 37 additions and 17 deletions

View File

@@ -1,7 +1,7 @@
import functools
import logging
from flask import Blueprint, render_template, url_for
from flask import Blueprint, render_template
import flask_login
from pillar.web.utils import attach_project_pictures
@@ -50,25 +50,10 @@ def index():
}, api=api)
# Fetch more info for each activity.
node_type_task_name = node_type_task['name']
node_type_shot_name = node_type_shot['name']
for act in activities['_items']:
act.actor_user = pillar.web.subquery.get_user_info(act.actor_user)
act.project = id_to_proj[act.project]
if act.node_type == node_type_task_name:
if act.context_object:
act.link = url_for('attract.shots.perproject.with_task',
project_url=act.project.url,
task_id=act.object)
else:
act.link = url_for('attract.tasks.perproject.view_task',
project_url=act.project.url,
task_id=act.object)
elif act.node_type == node_type_shot_name:
act.link = url_for('attract.shots.perproject.view_shot',
project_url=act.project.url,
shot_id=act.object)
act.link = current_attract.link_for_activity(act)
return render_template('attract/index.html',
tasks=tasks,