Skip to content

Commit f9e1747

Browse files
committed
Don't show non-space-restricted resource counts on space front page
1 parent e911c06 commit f9e1747

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

app/views/static/home.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<% else %>
4242
<%= render partial: 'static/home/space_welcome' %>
4343

44-
<%= render partial: 'static/home/counters' %>
44+
<%= render partial: 'static/home/counters', locals: { features: ['events', 'materials', 'workflows', 'learning_paths'] } %>
4545
<% end %>
4646

4747
<%= render partial: 'static/home/upcoming_events' if @events.present? %>

app/views/static/home/_counters.html.erb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<% features = ['events', 'materials', 'workflows', 'learning_paths', 'trainers'].select { |f| TeSS::Config.feature[f] } %>
1+
<% features ||= ['events', 'materials', 'workflows', 'learning_paths', 'trainers'] %>
2+
<% features = features.select { |f| TeSS::Config.feature[f] } %>
23

34
<section id="counters">
45
<ul class="counter">

0 commit comments

Comments
 (0)