diff --git a/app/assets/javascripts/global_activities/side_pane.js b/app/assets/javascripts/global_activities/side_pane.js index 8698fd86a..1156711fc 100644 --- a/app/assets/javascripts/global_activities/side_pane.js +++ b/app/assets/javascripts/global_activities/side_pane.js @@ -124,6 +124,7 @@ $(function() { // update_filter function reloadActivities() { var moreButton = $('.btn-more-activities'); + var noActivitiesMessage = $('.no-activities-message'); if (updateRunning) return false; updateRunning = true; $('.ga-activities-list .activities-day').remove(); @@ -141,6 +142,11 @@ $(function() { } else { moreButton.addClass('hidden'); } + if (json.activities_html === "") { + noActivitiesMessage.removeClass('hidden'); + } else { + noActivitiesMessage.addClass('hidden'); + } updateRunning = false; animateSpinner(null, false); }, diff --git a/app/assets/stylesheets/global_activities.scss b/app/assets/stylesheets/global_activities.scss index d2121bdd8..d9f61fa7f 100644 --- a/app/assets/stylesheets/global_activities.scss +++ b/app/assets/stylesheets/global_activities.scss @@ -77,6 +77,9 @@ } } } + .no-activities-message { + margin-top: 20px; + } } } diff --git a/app/views/global_activities/index.html.erb b/app/views/global_activities/index.html.erb index 239571cfe..8a1729cb8 100644 --- a/app/views/global_activities/index.html.erb +++ b/app/views/global_activities/index.html.erb @@ -11,6 +11,9 @@