Navigation: Unified cloud navigation

* Removed main drop down menu
* Added "My cloud" to user menu
* Attract/Flamenco is found under Production Tools menu
* Attract/Flamenco has the same navigation as its project
This commit is contained in:
2019-02-07 14:45:55 +01:00
parent 763866787d
commit 66212ec5fa
15 changed files with 104 additions and 141 deletions

View File

@@ -10,7 +10,7 @@ from pillar.api.utils import str2id
from pillar.web.utils import mass_attach_project_pictures
import pillar.web.subquery
from pillar.web.system_util import pillar_api
from pillar.web.projects.routes import project_view
from pillar.web.projects.routes import project_view, project_navigation_links
import pillarsdk
from attract import current_attract
@@ -64,10 +64,12 @@ def index():
except (ValueError, wz_exceptions.NotFound):
act.link = None
project = session.get('attract_last_project')
return render_template('attract/index.html',
tasks=tasks,
projs_with_summaries=projs_with_summaries,
activities=activities)
activities=activities,
project=project)
def error_project_not_setup_for_attract():
@@ -92,8 +94,6 @@ def attract_project_view(extra_project_projections: dict=None, extension_props=F
:param full_project: skip projections altogether, fetching the whole project.
"""
from . import EXTENSION_NAME
if callable(extra_project_projections):
raise TypeError('Use with @attract_project_view() <-- note the parentheses')
@@ -101,14 +101,14 @@ def attract_project_view(extra_project_projections: dict=None, extension_props=F
'_id': 1,
'name': 1,
'node_types': 1,
'nodes_featured': 1,
'extension_props': 1,
# We don't need this here, but this way the wrapped function has access
# to the orignal URL passed to it.
'url': 1,
}
if extra_project_projections:
projections.update(extra_project_projections)
if extension_props:
projections['extension_props.%s' % EXTENSION_NAME] = 1
def decorator(wrapped):
@functools.wraps(wrapped)