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.
This commit is contained in:
2016-10-12 10:33:09 +02:00
parent 4bba35f473
commit 25a666d8d4
3 changed files with 13 additions and 14 deletions

View File

@@ -67,7 +67,6 @@ class AttractExtension(PillarExtension):
routes.blueprint, routes.blueprint,
attract.tasks.routes.blueprint, attract.tasks.routes.blueprint,
attract.tasks.routes.perproject_blueprint, attract.tasks.routes.perproject_blueprint,
attract.shots.routes.blueprint,
attract.shots.routes.perproject_blueprint, attract.shots.routes.perproject_blueprint,
] ]

View File

@@ -13,19 +13,11 @@ from attract.routes import attract_project_view
from attract.node_types.shot import node_type_shot from attract.node_types.shot import node_type_shot
from attract import current_attract, ROLES_REQUIRED_TO_VIEW_ITEMS 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__, perproject_blueprint = Blueprint('attract.shots.perproject', __name__,
url_prefix='/<project_url>/shots') url_prefix='/<project_url>/shots')
log = logging.getLogger(__name__) 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('/', endpoint='index')
@perproject_blueprint.route('/with-task/<task_id>', endpoint='with_task') @perproject_blueprint.route('/with-task/<task_id>', endpoint='with_task')
@attract_project_view(extension_props=True) @attract_project_view(extension_props=True)

View File

@@ -28,12 +28,21 @@ html(lang="en")
nav.sidebar(role="navigation") nav.sidebar(role="navigation")
dl dl
dd dd
a(href="{{ url_for('attract.index') }}") A a(href="{{ url_for('attract.index') }}",
title='Attract')
i.pi-film-thick
| {% if project %}
dd 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 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 %} | {% block body %}
#col_left #col_left
#col_main #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) script(src="{{ url_for('static_pillar', filename='assets/js/vendor/jquery.select2.min.js') }}", async=true)
| {% block footer_scripts %}{% endblock %} | {% block footer_scripts %}{% endblock %}