Added Attract project sidebar

This commit is contained in:
2017-06-14 16:28:13 +02:00
parent ab72357336
commit 725f93175c
2 changed files with 7 additions and 5 deletions

View File

@@ -19,6 +19,8 @@ ROLES_REQUIRED_TO_VIEW_ITEMS = {'demo', 'subscriber', 'admin'}
class AttractExtension(PillarExtension):
has_project_settings = True
def __init__(self):
self._log = logging.getLogger('%s.AttractExtension' % __name__)
self.task_manager = attract.tasks.TaskManager()
@@ -161,10 +163,8 @@ class AttractExtension(PillarExtension):
if not self.is_attract_project(project):
return ''
# Temporarily disabled until Attract is nicer to look at.
return ''
# return flask.render_template('attract/sidebar.html',
# project=project)
return flask.render_template('attract/sidebar.html',
project=project)
def activities_for_node(self, node_id, max_results=20, page=1):
"""Returns a page of activities for the given task or shot.

View File

@@ -1,6 +1,8 @@
li.tabs-attract(
title="Attract",
data-toggle="tooltip",
data-placement="left")
data-placement="right")
| {% if project %}
a(href="{{url_for('attract.project_index', project_url=project.url, _external=True)}}")
i.pi-attract
| {% endif %}