mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-11 09:28:27 -04:00
Put all nested items on page
So that the live search can filter things, they need to be on the page when it loads. We want to make search work across folders, so all the things in subfolders need to be in the page. They also need the full path appending to them, so that you can tell which ones are in which folders. This won’t show items that are in a folder above the one you’re currently in – my reckon is that when you’re narrowing down by clicking into a folder that you only want to search for things in that folder.
This commit is contained in:
@@ -5,11 +5,19 @@
|
||||
margin: 0;
|
||||
|
||||
a {
|
||||
display: block;
|
||||
display: inline-block;
|
||||
margin-bottom: -$gutter;
|
||||
padding-bottom: $gutter;
|
||||
}
|
||||
|
||||
&-separator {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
color: $secondary-text-colour;
|
||||
padding: 0 4px 0 5px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
&-type {
|
||||
@@ -44,7 +52,7 @@
|
||||
|
||||
&-folder {
|
||||
|
||||
a {
|
||||
a:first-child {
|
||||
text-indent: 40px;
|
||||
background-image: file-url('folder-blue-bold.svg');
|
||||
background-repeat: no-repeat;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
{% else %}
|
||||
<nav id=template-list>
|
||||
{% for item in template_list %}
|
||||
<div class="template-list-item {% if can_manage_folders %}template-list-item-with-checkbox{% endif %}">
|
||||
<div class="template-list-item {% if can_manage_folders %}template-list-item-with-checkbox{% endif %} {% if item.ancestors %}template-list-item-hidden-by-default{% endif %}">
|
||||
{% if can_manage_folders %}
|
||||
{{ unlabelled_checkbox(
|
||||
id='templates-or-folder-{}'.format(item.id),
|
||||
@@ -20,17 +20,22 @@
|
||||
value=item.id,
|
||||
) }}
|
||||
{% endif %}
|
||||
{% if item.is_folder %}
|
||||
<h2 class="message-name template-list-folder">
|
||||
<h2 class="message-name {% if item.is_folder or (item.ancestors and not item.is_folder) %}template-list-folder{% endif %}">
|
||||
{% for ancestor in item.ancestors %}
|
||||
<a href="{{ url_for('.choose_template', service_id=current_service.id, template_type=template_type, template_folder_id=ancestor.id) }}">
|
||||
{{ ancestor.name }}
|
||||
</a> <span class="message-name-separator">/</span>
|
||||
{% endfor %}
|
||||
{% if item.is_folder %}
|
||||
<a href="{{ url_for('.choose_template', service_id=current_service.id, template_type=template_type, template_folder_id=item.id) }}">
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</h2>
|
||||
{% else %}
|
||||
<h2 class="message-name">
|
||||
<a href="{{ url_for('.view_template', service_id=current_service.id, template_id=item.id) }}">{{ item.name }}</a>
|
||||
</h2>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<a href="{{ url_for('.view_template', service_id=current_service.id, template_id=item.id) }}">
|
||||
{{ item.name }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</h2>
|
||||
<p class="message-type">
|
||||
{{ item.hint }}
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user