From 25a666d8d4e07c683a550f4e9ba863190bbba341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Wed, 12 Oct 2016 10:33:09 +0200 Subject: [PATCH] Removed /attract/shots, and added tooltips to sidebar buttons. Also made the Attract button a film strip instead of "A". I like that film strip. --- attract/__init__.py | 1 - attract/shots/routes.py | 8 -------- src/templates/attract/layout.jade | 18 +++++++++++++----- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/attract/__init__.py b/attract/__init__.py index 02e58af..caab405 100644 --- a/attract/__init__.py +++ b/attract/__init__.py @@ -67,7 +67,6 @@ class AttractExtension(PillarExtension): routes.blueprint, attract.tasks.routes.blueprint, attract.tasks.routes.perproject_blueprint, - attract.shots.routes.blueprint, attract.shots.routes.perproject_blueprint, ] diff --git a/attract/shots/routes.py b/attract/shots/routes.py index 49fdc2f..b30de85 100644 --- a/attract/shots/routes.py +++ b/attract/shots/routes.py @@ -13,19 +13,11 @@ from attract.routes import attract_project_view from attract.node_types.shot import node_type_shot from attract import current_attract, ROLES_REQUIRED_TO_VIEW_ITEMS -blueprint = Blueprint('attract.shots', __name__, url_prefix='/shots') perproject_blueprint = Blueprint('attract.shots.perproject', __name__, url_prefix='//shots') log = logging.getLogger(__name__) -@blueprint.route('/') -def index(): - projects = current_attract.attract_projects() - return render_template('attract/shots/index.html', - projects=projects['_items']) - - @perproject_blueprint.route('/', endpoint='index') @perproject_blueprint.route('/with-task/', endpoint='with_task') @attract_project_view(extension_props=True) diff --git a/src/templates/attract/layout.jade b/src/templates/attract/layout.jade index 4799698..deb6d0f 100644 --- a/src/templates/attract/layout.jade +++ b/src/templates/attract/layout.jade @@ -28,12 +28,21 @@ html(lang="en") nav.sidebar(role="navigation") dl dd - a(href="{{ url_for('attract.index') }}") A + a(href="{{ url_for('attract.index') }}", + title='Attract') + i.pi-film-thick + | {% if project %} dd - a(href="{% if project %}{{ url_for('attract.tasks.perproject.index', project_url=project.url) }}{% else %}{{ url_for('attract.tasks.index') }}{% endif %}") T + a(href="{{ url_for('attract.tasks.perproject.index', project_url=project.url) }}", + title='Tasks for project {{ project.name }}') T dd - a(href="{% if project %}{{ url_for('attract.shots.perproject.index', project_url=project.url) }}{% else %}{{ url_for('attract.shots.index') }}{% endif %}") S - + a(href="{{ url_for('attract.shots.perproject.index', project_url=project.url) }}", + title='Shots for project {{ project.name }}') S + | {% else %} + dd + a(href="{{ url_for('attract.tasks.index') }}", + title='Your tasks') T + | {% endif %} | {% block body %} #col_left #col_main @@ -45,4 +54,3 @@ html(lang="en") script(src="{{ url_for('static_pillar', filename='assets/js/vendor/jquery.select2.min.js') }}", async=true) | {% block footer_scripts %}{% endblock %} -