mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-30 11:41:19 +08:00
Merge pull request #1597 from urbanrotnik/ur-SCI-3224-add-message-for-empty-activity-list
Add message for empty activity list [SCI-3224]
This commit is contained in:
commit
685b7138b7
4 changed files with 13 additions and 0 deletions
|
@ -124,6 +124,7 @@ $(function() {
|
||||||
// update_filter
|
// update_filter
|
||||||
function reloadActivities() {
|
function reloadActivities() {
|
||||||
var moreButton = $('.btn-more-activities');
|
var moreButton = $('.btn-more-activities');
|
||||||
|
var noActivitiesMessage = $('.no-activities-message');
|
||||||
if (updateRunning) return false;
|
if (updateRunning) return false;
|
||||||
updateRunning = true;
|
updateRunning = true;
|
||||||
$('.ga-activities-list .activities-day').remove();
|
$('.ga-activities-list .activities-day').remove();
|
||||||
|
@ -141,6 +142,11 @@ $(function() {
|
||||||
} else {
|
} else {
|
||||||
moreButton.addClass('hidden');
|
moreButton.addClass('hidden');
|
||||||
}
|
}
|
||||||
|
if (json.activities_html === "") {
|
||||||
|
noActivitiesMessage.removeClass('hidden');
|
||||||
|
} else {
|
||||||
|
noActivitiesMessage.addClass('hidden');
|
||||||
|
}
|
||||||
updateRunning = false;
|
updateRunning = false;
|
||||||
animateSpinner(null, false);
|
animateSpinner(null, false);
|
||||||
},
|
},
|
||||||
|
|
|
@ -77,6 +77,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.no-activities-message {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ga-main col-lg-9 col-md-12 col-xl-10">
|
<div class="ga-main col-lg-9 col-md-12 col-xl-10">
|
||||||
|
<div class="no-activities-message text-center <%= 'hidden' if @grouped_activities.keys.any? %>">
|
||||||
|
<p><%= t('activities.index.no_activities_message') %></p>
|
||||||
|
</div>
|
||||||
<div class="ga-activities-list" data-activities-url="<%= global_activities_path %>">
|
<div class="ga-activities-list" data-activities-url="<%= global_activities_path %>">
|
||||||
<%= render partial: "activity_list.html.erb" %>
|
<%= render partial: "activity_list.html.erb" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1309,6 +1309,7 @@ en:
|
||||||
today: "Today"
|
today: "Today"
|
||||||
more_activities: "Show more activities"
|
more_activities: "Show more activities"
|
||||||
no_activities: "No activities!"
|
no_activities: "No activities!"
|
||||||
|
no_activities_message: "No activities could be displayed. Update filters or start using SciNote to generate your first activities."
|
||||||
activity_counter_label: " activity"
|
activity_counter_label: " activity"
|
||||||
activities_counter_label: " activities"
|
activities_counter_label: " activities"
|
||||||
expand_all: "Expand all"
|
expand_all: "Expand all"
|
||||||
|
|
Loading…
Reference in a new issue