Skip to content

Commit

Permalink
Feature/tss 2283/dashboard group tasks by barrier merge (#861)
Browse files Browse the repository at this point in the history
* Rearrange dashboard task HTML to accomidate links in content

* Update URL links

* Bugfix for single task barriers

---------

Co-authored-by: santinomolinaro <santino.molinaro@mail>
Co-authored-by: Feroze Rub <feroze@taridigital.com>
  • Loading branch information
3 people authored Dec 11, 2024
1 parent c9fd320 commit 2079d3d
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions templates/barriers/partials/dashboard_tasks.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,27 @@ <h3 class="govuk-summary-card__title">Tasks you need to complete for barriers yo
<p class="govuk-body m-b-0 m-t-2"><strong>{{ barrier.task_list|length }} Tasks on this barrier</strong></p>
<ul class="govuk-list govuk-list--bullet govuk-body">
{% for task in barrier.task_list %}
<li>{{ task.message }}</li>
<li>
{% for text_section in task.message %}
{% if text_section == task.link_text %}
<a class="govuk-link" href="{% url task.task_url barrier.barrier_id %}">{{ text_section }}</a>
{% else %}
{{ text_section }}
{% endif %}
{% endfor %}
</li>
{% endfor %}
</ul>
{% else %}
<p>{{ barrier.task_list.0.message }}</p>
<p>
{% for text_section in barrier.task_list.0.message %}
{% if text_section == barrier.task_list.0.link_text %}
<a class="govuk-link" href="{% url barrier.task_list.0.task_url barrier.barrier_id %}">{{ text_section }}</a>
{% else %}
{{ text_section }}
{% endif %}
{% endfor %}
</p>
{% endif %}
<p class="govuk-hint">{{ barrier.modified_by }} updated on {{ barrier.modified_on }}</p>
</div>
Expand Down

0 comments on commit 2079d3d

Please sign in to comment.