mirror of
https://github.com/GSA/notifications-admin.git
synced 2025-12-09 06:33:52 -05:00
added no results found and no live search on /template page
This commit is contained in:
@@ -293,10 +293,12 @@
|
||||
|
||||
if (this.currentState === 'add-new-template') {
|
||||
this.$form.find('.template-list-item').addClass('js-hidden');
|
||||
$('.live-search').addClass('js-hidden');
|
||||
this.$form.find('input[type=checkbox]').prop('checked', false);
|
||||
this.selectionStatus.update({ total: 0, templates: 0, folders: 0 });
|
||||
} else {
|
||||
this.$form.find('.template-list-item').removeClass('js-hidden');
|
||||
$('.live-search').removeClass('js-hidden');
|
||||
}
|
||||
|
||||
if (currentStateObj && 'setFocus' in currentStateObj) {
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<nav id="template-list" aria-label="Choose reply">
|
||||
<ul>
|
||||
{% for item in templates_and_folders %}
|
||||
<li class="template-list-item {% if item.ancestors %}template-list-item-hidden-by-default{% endif %} {% if not item.ancestors %}template-list-item-without-ancestors{% endif %}">
|
||||
<li class="template-list-item {% if item.ancestors %}template-list-item-hidden-by-default{% else %}template-list-item-without-ancestors{% endif %}">
|
||||
{% for ancestor in item.ancestors %}
|
||||
<a href="{{ url_for('.conversation_reply', service_id=current_service.id, notification_id=notification_id, from_folder=ancestor.id) }}" class="usa-link template-list-folder">
|
||||
{{ ancestor.name }}
|
||||
|
||||
@@ -25,11 +25,14 @@
|
||||
form=search_form,
|
||||
autofocus=True
|
||||
) }}
|
||||
<div class="js-live-search-no-results" style="display: none;">
|
||||
<p class="usa-body margin-top-2">No templates found</p>
|
||||
</div>
|
||||
<nav id="template-list" aria-label="Copy template list">
|
||||
<ul>
|
||||
{% for item in services_templates_and_folders %}
|
||||
|
||||
<li class="template-list-item margin-bottom-2 {% if item.ancestors %}template-list-item-hidden-by-default{% endif %} {% if not item.ancestors %}template-list-item-without-ancestors{% endif %}">
|
||||
<li class="template-list-item margin-bottom-2">
|
||||
{% if item.is_service %}
|
||||
{% elif item.is_folder %}
|
||||
{% else %}
|
||||
|
||||
Reference in New Issue
Block a user