Merge pull request #3338 from alphagov/remove-permission-checks-uploads

Clean up the codebase after moving everyone to the new uploads page
This commit is contained in:
Chris Hill-Scott
2020-03-26 17:00:16 +00:00
committed by GitHub
5 changed files with 27 additions and 163 deletions

View File

@@ -9,26 +9,22 @@
{% block maincolumn_content %}
<h1 class="heading-medium">Uploads</h1>
<div class="dashboard">
{% if show_scheduled_jobs %}
{% with hide_heading = True %}
{% include 'views/jobs/_scheduled.html' %}
{% endwith %}
{% endif %}
{% if jobs %}
{% include 'views/dashboard/_jobs.html' %}
{% endif %}
{% if not jobs and not show_scheduled_jobs %}
{% else %}
<p class="govuk-body">
You have not uploaded any files recently.
</p>
{% if current_service.has_permission('upload_letters') %}
{% if current_user.has_permissions('send_messages') %}
{% if current_service.has_permission('letter') %}
<p class="govuk-body">
Upload a letter and Notify will print, pack and post it for you.
</p>
{% endif %}
<p class="govuk-body">
Upload a letter and Notify will print, pack and post it for you.
To upload a list of contact details, first <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.choose_template', service_id=current_service.id) }}">choose a template</a>.
</p>
{% endif %}
<p class="govuk-body">
To upload a list of contact details, first <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.choose_template', service_id=current_service.id) }}">choose a template</a>.
</p>
{% endif %}
{{ previous_next_navigation(prev_page, next_page) }}
{% if current_user.has_permissions('send_messages') %}
@@ -38,14 +34,14 @@
"element": "a",
"text": "Upload a letter",
"href": url_for('.upload_letter', service_id=current_service.id),
"classes": "govuk-button--secondary"
"classes": "govuk-button--secondary govuk-!-margin-right-3"
}) }}
{% endif %}
{{ govukButton({
"element": "a",
"text": "Upload an emergency contact list",
"href": url_for('.upload_contact_list', service_id=current_service.id),
"classes": "govuk-button--secondary govuk-!-margin-left-3"
"classes": "govuk-button--secondary"
}) }}
</div>
{% endif %}