Files
notifications-admin/app/templates/components/folder-path.html
Chris Hill-Scott ee1c8ccf53 Don’t put folder icon on templates ‘folder’
After showing this to a few people the consensus seems to be that
‘Templates’ isn’t itself a folder. Therefore it shouldn’t have a folder
icon.

This has the advantage of disambiguating between being in a folder:
> [screenshot]

…and being in a subfolder:
> [screenshot]
2018-12-07 11:12:32 +00:00

52 lines
1.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% macro folder_path(
folders,
service_id,
template_type,
fallback_page_title=None,
show_fallback_page_title=False,
link_current_item=False
) %}
{% if show_fallback_page_title %}
<h1 class="heading-large">
{{ fallback_page_title }}
</h1>
{% else %}
<h1 class="heading-medium folder-heading">
{% for folder in folders %}
{% if loop.last and not link_current_item %}
<span class="folder-heading-folder">{{ folder.name }}</span>
{% else %}
{% if folder.id %}
<a href="{{ url_for('.choose_template', service_id=service_id, template_type=template_type, template_folder_id=folder.id) }}" class="folder-heading-folder">{{ folder.name }}</a> {% if not loop.last %}{{ folder_path_separator() }}{% endif %}
{% else %}
<a href="{{ url_for('.choose_template', service_id=service_id, template_type=template_type) }}">Templates</a> {% if not loop.last %}{{ folder_path_separator() }}{% endif %}
{% endif %}
{% endif %}
{% endfor %}
</h1>
{% endif %}
{% endmacro %}
{% macro page_title_folder_path(
folders,
fallback_page_title=None,
show_fallback_page_title=False
) %}
{% if show_fallback_page_title %}
{{ fallback_page_title }}
{% else %}
{% for folder in folders|reverse %}
{{ folder.name }}
{% if not loop.last %}
{% endif %}
{% endfor %}
{% endif %}
{% endmacro %}
{% macro folder_path_separator() %}
<span class="folder-heading-separator">/</span>
{% endmacro %}