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' %}
| {% 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

View File

@@ -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 %}