Files
notifications-admin/app/templates/views/templates/copy.html
Tom Byers ee9f348ce4 Update all links to use GOVUK Frontend style
Includes:
- turning off :visited styles to match existing
  design
- swapping heading classes used to make links bold
  for the GOVUK Frontend bold override class
- adding visually hidden text to some links to
  make them work when isolated from their context

We may need to revisit whether some links, such as
those for documentation and features, may benefit
from having some indication that their target has
been visited.
2020-02-25 10:47:24 +00:00

58 lines
2.9 KiB
HTML

{% from "components/folder-path.html" import copy_folder_path, page_title_folder_path %}
{% from "components/live-search.html" import live_search %}
{% extends "withnav_template.html" %}
{% block service_page_title %}
Copy an existing template
{% endblock %}
{% block maincolumn_content %}
<div class="bottom-gutter-1-2">
<h1 class="heading-large">Copy an existing template</h1>
{{ copy_folder_path(template_folder_path, current_service.id, from_service, current_user) }}
</div>
{% if not services_templates_and_folders.templates_to_show %}
<p class="template-list-empty">
This folder is empty
</p>
{% else %}
{{ live_search(target_selector='#template-list .template-list-item', show=True, form=search_form) }}
<nav id="template-list">
{% for item in services_templates_and_folders %}
<div class="template-list-item {% if item.ancestors %}template-list-item-hidden-by-default{% endif %} {% if not item.ancestors %}template-list-item-without-ancestors{% endif %}">
<h2 class="message-name">
{% for ancestor in item.ancestors %}
{% if ancestor.is_service %}
<a href="{{ url_for('.choose_template_to_copy', service_id=current_service.id, from_service=ancestor.service_id) }}" class="govuk-link govuk-link--no-visited-state template-list-folder">
{% else %}
<a href="{{ url_for('.choose_template_to_copy', service_id=current_service.id, from_folder=ancestor.id) }}" class="govuk-link govuk-link--no-visited-state template-list-folder">
{% endif %}
{{ ancestor.name }}
</a> <span class="message-name-separator"></span>
{% endfor %}
{% if item.is_service %}
<a href="{{ url_for('.choose_template_to_copy', service_id=current_service.id, from_service=item.service_id) }}" class="govuk-link govuk-link--no-visited-state template-list-folder">
<span class="live-search-relevant">{{ item.name }}</span>
</a>
{% elif item.is_folder %}
<a href="{{ url_for('.choose_template_to_copy', service_id=current_service.id, from_service=item.service_id, from_folder=item.id) }}" class="govuk-link govuk-link--no-visited-state template-list-folder">
<span class="live-search-relevant">{{ item.name }}</span>
</a>
{% else %}
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.copy_template', service_id=current_service.id, template_id=item.id, from_service=item.service_id) }}">
<span class="live-search-relevant">{{ item.name }}</span>
</a>
{% endif %}
</h2>
<p class="message-type">
{{ item.hint }}
</p>
</div>
{% endfor %}
</nav>
{% endif %}
{% endblock %}