Tweaks to attract index and text for empty list of own tasks

This commit is contained in:
2016-11-04 12:48:31 +01:00
parent f364f2aa89
commit a0576c6e7c
2 changed files with 26 additions and 16 deletions

View File

@@ -1,9 +1,14 @@
| {% extends 'attract/layout.html' %} | {% extends 'attract/layout.html' %}
| {% block bodyattrs %}{{ super() }} data-context='dashboard'{% endblock %} | {% block bodyattrs %}{{ super() }} data-context='dashboard'{% endblock %}
| {% block page_title %}Attract{% endblock %} | {% block page_title %}Dashboard{% endblock %}
| {% block body %} | {% block body %}
#col_main #col_main
.dashboard
.d-stats
h3
i.pi-attract
| Attract
| {% if current_user.is_authenticated %} | {% if current_user.is_authenticated %}
| {% from "attract/tasks/task_list_for_user.html" import task_list_for_user %} | {% from "attract/tasks/task_list_for_user.html" import task_list_for_user %}
| {{ task_list_for_user(tasks['_meta']['total'], tasks['_items']) }} | {{ task_list_for_user(tasks['_meta']['total'], tasks['_items']) }}
@@ -14,7 +19,7 @@
#col_right #col_right
.dashboard .dashboard
.d-stats .d-stats
h3 Attract Projects h3 Statistics
| {% for proj, summary in projs_with_summaries %} | {% for proj, summary in projs_with_summaries %}
.d-stats-card .d-stats-card

View File

@@ -1,9 +1,9 @@
| {% macro task_list_for_user(task_count, tasks, include_shotname=True) -%} | {% macro task_list_for_user(task_count, tasks, include_shotname=True) -%}
.col_header.task-list-header .col_header.task-list-header
| Your tasks ({{ task_count }}) | Your Tasks ({{ task_count }})
#task-list.col-list #task-list.col-list
| {% for task in tasks %} | {% for task in tasks if tasks %}
//- NOTE: this is tightly linked to the JS in tasks.js, function task_add() //- NOTE: this is tightly linked to the JS in tasks.js, function task_add()
a.col-list-item.task-list-item( a.col-list-item.task-list-item(
class="status-{{ task.properties.status }} task-link", class="status-{{ task.properties.status }} task-link",
@@ -15,5 +15,10 @@
| {% endif %} | {% endif %}
span.name {{ task.name }} span.name {{ task.name }}
span.type {{ task.properties.task_type }} span.type {{ task.properties.task_type }}
| {% else %}
.col-list-item.empty
span.no-tasks
i.pi-grin
| No tasks assigned to you. Holidays!
| {% endfor %} | {% endfor %}
| {%- endmacro %} | {%- endmacro %}