|
11 | 11 | <%= render partial: 'collaborations/collaborators_button', locals: { resource: @collection } %> |
12 | 12 | <% end %> |
13 | 13 | <% if TeSS::Config.feature['collection_curation'] && current_user && policy(@collection).curate? %> |
14 | | - <% if TeSS::Config.feature['events'] %> |
| 14 | + <% if Space.current_space.feature_enabled?('events') %> |
15 | 15 | <%= link_to t('.curate_events', default: [:'helpers.links.events', 'events']), |
16 | 16 | curate_events_collection_path(@collection), class: 'btn btn-default' %> |
17 | 17 | <% end %> |
18 | | - <% if TeSS::Config.feature['materials'] %> |
| 18 | + <% if Space.current_space.feature_enabled?('materials') %> |
19 | 19 | <%= link_to t('.curate_materials', default: [:'helpers.links.materials', 'materials']), |
20 | 20 | curate_materials_collection_path(@collection), class: 'btn btn-default' %> |
21 | 21 | <% end %> |
|
33 | 33 | <% not_finished_events_count = e.not_finished.count %> |
34 | 34 | <% activator = tab_activator %> |
35 | 35 | <ul class="nav nav-tabs"> |
36 | | - <% if TeSS::Config.feature['materials'] %> |
| 36 | + <% if Space.current_space.feature_enabled?('materials') %> |
37 | 37 | <%= tab('Materials', icon_class_for_model('materials'), 'materials', activator: activator, |
38 | 38 | disabled: { check: materials_count.zero?, message: 'No registered training materials' }, |
39 | 39 | count: materials_count) %> |
40 | 40 | <% end %> |
41 | | - <% if TeSS::Config.feature['events'] %> |
| 41 | + <% if Space.current_space.feature_enabled?('events') %> |
42 | 42 | <%= tab('Events', icon_class_for_model('events'), 'events', activator: activator, |
43 | 43 | disabled: { check: events_count.zero?, message: 'No associated events' }, |
44 | 44 | count: not_finished_events_count.zero? && events_count.positive? ? '0*' : not_finished_events_count) %> |
|
47 | 47 | </div> |
48 | 48 |
|
49 | 49 | <div class="tab-content ml-3"> |
50 | | - <% if TeSS::Config.feature['materials'] %> |
| 50 | + <% if Space.current_space.feature_enabled?('materials') %> |
51 | 51 | <%= render partial: 'common/associated_resources', |
52 | 52 | locals: { model: Material, |
53 | 53 | total_count: materials_count, |
|
56 | 56 | view_all_link: materials_path(collections: @collection.title) } %> |
57 | 57 | <% end %> |
58 | 58 |
|
59 | | - <% if TeSS::Config.feature['events'] %> |
| 59 | + <% if Space.current_space.feature_enabled?('events') %> |
60 | 60 | <%= render partial: 'common/associated_events', |
61 | 61 | locals: { total_count: events_count, |
62 | 62 | resources: event_items, |
|
0 commit comments