diff --git a/app/assets/javascripts/projects/index.js b/app/assets/javascripts/projects/index.js index 3eb1798e0..14bf901a8 100644 --- a/app/assets/javascripts/projects/index.js +++ b/app/assets/javascripts/projects/index.js @@ -598,8 +598,12 @@ $('#breadcrumbsWrapper').html(data.breadcrumbs_html); $('#toolbarWrapper').html(data.toolbar_html); viewContainer.data('projects-cards-url', data.projects_cards_url); - viewContainer.find('.card, .projects-group').remove(); + viewContainer.removeClass('no-results'); + viewContainer.find('.card, .projects-group, .no-results-container').remove(); viewContainer.append(data.cards_html); + if (viewContainer.find('.no-results-container').length) { + viewContainer.addClass('no-results'); + } selectedProjects.length = 0; selectedProjectFolders.length = 0; updateProjectsToolbar(); @@ -756,7 +760,6 @@ $(e.target).closest('.dropdown').removeClass('open'); - createdOnFromFilter = $createdOnFromFilter.val(); createdOnToFilter = $createdOnToFilter.val(); membersFilter = dropdownSelector.getValues($('.members-filter')); diff --git a/app/assets/stylesheets/projects.scss b/app/assets/stylesheets/projects.scss index 182faf4d8..50b480f5c 100644 --- a/app/assets/stylesheets/projects.scss +++ b/app/assets/stylesheets/projects.scss @@ -775,6 +775,30 @@ li.module-hover { grid-template-columns: repeat(auto-fill, minmax(291px, 1fr)); width: 100%; + &.no-results { + display: block; + margin-top: 100px; + + .no-results-img { + display: block; + margin: auto; + max-height: 230px; + } + + .no-results-title { + @include font-h1; + margin-bottom: .25em; + margin-top: 1.25em; + text-align: center; + } + + .no-results-description { + @include font-main; + color: $color-silver-chalice; + text-align: center; + } + } + .table-header { display: none; } @@ -1219,4 +1243,3 @@ li.module-hover { margin: 1em 0; } } - diff --git a/app/views/projects/index/_team_projects_grouped_by_folder.html.erb b/app/views/projects/index/_team_projects_grouped_by_folder.html.erb index b052401d5..38fcceb0d 100644 --- a/app/views/projects/index/_team_projects_grouped_by_folder.html.erb +++ b/app/views/projects/index/_team_projects_grouped_by_folder.html.erb @@ -1,10 +1,18 @@ -<% projects_by_folder.each do |folder, projects| %> -