Added Attract project sidebar
This commit is contained in:
@@ -19,6 +19,8 @@ ROLES_REQUIRED_TO_VIEW_ITEMS = {'demo', 'subscriber', 'admin'}
|
|||||||
|
|
||||||
|
|
||||||
class AttractExtension(PillarExtension):
|
class AttractExtension(PillarExtension):
|
||||||
|
has_project_settings = True
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self._log = logging.getLogger('%s.AttractExtension' % __name__)
|
self._log = logging.getLogger('%s.AttractExtension' % __name__)
|
||||||
self.task_manager = attract.tasks.TaskManager()
|
self.task_manager = attract.tasks.TaskManager()
|
||||||
@@ -161,10 +163,8 @@ class AttractExtension(PillarExtension):
|
|||||||
if not self.is_attract_project(project):
|
if not self.is_attract_project(project):
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
# Temporarily disabled until Attract is nicer to look at.
|
return flask.render_template('attract/sidebar.html',
|
||||||
return ''
|
project=project)
|
||||||
# return flask.render_template('attract/sidebar.html',
|
|
||||||
# project=project)
|
|
||||||
|
|
||||||
def activities_for_node(self, node_id, max_results=20, page=1):
|
def activities_for_node(self, node_id, max_results=20, page=1):
|
||||||
"""Returns a page of activities for the given task or shot.
|
"""Returns a page of activities for the given task or shot.
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
li.tabs-attract(
|
li.tabs-attract(
|
||||||
title="Attract",
|
title="Attract",
|
||||||
data-toggle="tooltip",
|
data-toggle="tooltip",
|
||||||
data-placement="left")
|
data-placement="right")
|
||||||
|
| {% if project %}
|
||||||
a(href="{{url_for('attract.project_index', project_url=project.url, _external=True)}}")
|
a(href="{{url_for('attract.project_index', project_url=project.url, _external=True)}}")
|
||||||
i.pi-attract
|
i.pi-attract
|
||||||
|
| {% endif %}
|
||||||
|
Reference in New Issue
Block a user