Skip to content

Commit

Permalink
display deleted files in a sensible way
Browse files Browse the repository at this point in the history
  • Loading branch information
rachaelcodes committed May 28, 2024
1 parent cc6f32f commit 3281f36
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions django_app/redbox_app/templates/documents.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,31 @@ <h1 class="govuk-heading-l govuk-!-margin-bottom-0">Documents</h1>
{% for file in files %}
<tr class="govuk-table__row">
<td class="govuk-table__cell govuk-!-padding-top-3">{{file.name}}</td>
<td class="govuk-table__cell govuk-!-padding-top-3">
<td class="govuk-table__cell govuk-!-padding-top-3 govuk-!-padding-bottom-3">
{% if file.get_status_text() | lower == 'complete' %}
<strong class="govuk-tag govuk-tag--green iai-docs__status">{{file.get_status_text()}}</strong>
{% elif file.get_status_text() | lower == 'deleted' %}
<strong class="govuk-tag govuk-tag--red iai-docs__status">{{file.get_status_text()}}</strong>
{% else %}
<strong class="govuk-tag govuk-tag--yellow iai-docs__status" x-data="file-status" data-id="{{file.id}}" x-text="status">{{file.get_status_text()}}</strong>
{% endif %}
</td>
<td class="govuk-table__cell iai-docs__actions">
{# Removed for now until we've validated a user need for this
{{ govukButton(
text="Download" + "<span class=\"govuk-visually-hidden\">" + file.name + "</span>",
href=file.url,
classes="govuk-button--secondary govuk-!-margin-bottom-0",
download=True
) }}
#}
{{ govukButton(
text="Remove" + "<span class=\"govuk-visually-hidden\">" + file.name + "</span>",
href=url('remove-doc', file.id),
classes="govuk-button--warning govuk-!-margin-bottom-0"
) }}
{% if file.get_status_text() | lower != 'deleted' %}
{# Removed for now until we've validated a user need for this
{{ govukButton(
text="Download" + "<span class=\"govuk-visually-hidden\">" + file.name + "</span>",
href=file.url,
classes="govuk-button--secondary govuk-!-margin-bottom-0",
download=True
) }}
#}
{{ govukButton(
text="Remove" + "<span class=\"govuk-visually-hidden\">" + file.name + "</span>",
href=url('remove-doc', file.id),
classes="govuk-button--warning govuk-!-margin-bottom-0"
) }}
{% endif %}
</td>
</tr>
{% endfor %}
Expand Down

0 comments on commit 3281f36

Please sign in to comment.