-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1922 from laws-africa/perf-tasks
improve task page performance by loading assignees on demand
- Loading branch information
Showing
8 changed files
with
65 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 16 additions & 16 deletions
32
indigo_app/templates/indigo_api/_task_assign_to_menu.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
{% load account i18n %} | ||
|
||
<div class="dropdown-menu"> | ||
{% if unassign %} | ||
<button class="dropdown-item" type="submit" name="assigned_to" value="-1">{% trans 'Unassign' %}</button> | ||
{% endif %} | ||
{% if unassign %} | ||
<button class="dropdown-item" type="submit" name="assigned_to" value="-1">{% trans 'Unassign' %}</button> | ||
{% endif %} | ||
|
||
{% for potential_assignee in potential_assignees %} | ||
<button class="dropdown-item" type="submit" name="assigned_to" | ||
{% if potential_assignee.too_many_tasks %}disabled{% endif %} | ||
{% if task %}formaction="{% url 'assign_task' place=place.place_code pk=task.pk %}"{% endif %} | ||
value="{{ potential_assignee.id }}"> | ||
{% user_display potential_assignee %} | ||
{% if potential_assignee.too_many_tasks %} | ||
– {% trans 'too many tasks' %} ({{ potential_assignee.assigned_tasks_count }}) | ||
{% endif %} | ||
</button> | ||
{% endfor %} | ||
</div> | ||
{% for potential_assignee in potential_assignees %} | ||
<button class="dropdown-item" type="submit" name="assigned_to" | ||
{% if potential_assignee.too_many_tasks %}disabled{% endif %} | ||
{% if task %}formaction="{% url 'assign_task' place=place.place_code pk=task.pk %}"{% endif %} | ||
value="{{ potential_assignee.id }}"> | ||
{% user_display potential_assignee %} | ||
{% if potential_assignee.too_many_tasks %} | ||
– {% trans 'too many tasks' %} ({{ potential_assignee.assigned_tasks_count }}) | ||
{% endif %} | ||
</button> | ||
{% empty %} | ||
<div class="dropdown-item text-muted">{% trans "No users available" %}</div> | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters