diff --git a/src/templates/attract/index.jade b/src/templates/attract/index.jade index 75da69f..eb376c9 100644 --- a/src/templates/attract/index.jade +++ b/src/templates/attract/index.jade @@ -1,9 +1,14 @@ | {% extends 'attract/layout.html' %} | {% block bodyattrs %}{{ super() }} data-context='dashboard'{% endblock %} -| {% block page_title %}Attract{% endblock %} +| {% block page_title %}Dashboard{% endblock %} | {% block body %} #col_main + .dashboard + .d-stats + h3 + i.pi-attract + | Attract | {% if current_user.is_authenticated %} | {% from "attract/tasks/task_list_for_user.html" import task_list_for_user %} | {{ task_list_for_user(tasks['_meta']['total'], tasks['_items']) }} @@ -14,7 +19,7 @@ #col_right .dashboard .d-stats - h3 Attract Projects + h3 Statistics | {% for proj, summary in projs_with_summaries %} .d-stats-card diff --git a/src/templates/attract/tasks/task_list_for_user.jade b/src/templates/attract/tasks/task_list_for_user.jade index 31f4a35..ecfbb9f 100644 --- a/src/templates/attract/tasks/task_list_for_user.jade +++ b/src/templates/attract/tasks/task_list_for_user.jade @@ -1,19 +1,24 @@ | {% macro task_list_for_user(task_count, tasks, include_shotname=True) -%} .col_header.task-list-header - | Your tasks ({{ task_count }}) + | Your Tasks ({{ task_count }}) #task-list.col-list - | {% for task in tasks %} - //- NOTE: this is tightly linked to the JS in tasks.js, function task_add() - a.col-list-item.task-list-item( - class="status-{{ task.properties.status }} task-link", - title="In project '{{ task._project_info.name }}'", - href="{{ url_for('attract.tasks.perproject.view_task', project_url=task._project_info.url, task_id=task._id) }}") - span.status-indicator - | {% if include_shotname and task._parent_info %} - span.shotname {{ task._parent_info.name }} - | {% endif %} - span.name {{ task.name }} - span.type {{ task.properties.task_type }} - | {% endfor %} + | {% for task in tasks if tasks %} + //- NOTE: this is tightly linked to the JS in tasks.js, function task_add() + a.col-list-item.task-list-item( + class="status-{{ task.properties.status }} task-link", + title="In project '{{ task._project_info.name }}'", + href="{{ url_for('attract.tasks.perproject.view_task', project_url=task._project_info.url, task_id=task._id) }}") + span.status-indicator + | {% if include_shotname and task._parent_info %} + span.shotname {{ task._parent_info.name }} + | {% endif %} + span.name {{ task.name }} + span.type {{ task.properties.task_type }} + | {% else %} + .col-list-item.empty + span.no-tasks + i.pi-grin + | No tasks assigned to you. Holidays! + | {% endfor %} | {%- endmacro %}