Skip to content

Commit

Permalink
Merge pull request #887 from DaanVanVugt/feature/configurable_content…
Browse files Browse the repository at this point in the history
…_provider_sidebar

configurable content provider sidebar
  • Loading branch information
fbacall authored Sep 7, 2023
2 parents f8349fb + c046f30 commit 372e97f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<h4 class="nav-heading">Type</h4>
<div class="nav-block">
<%= content_provider.content_provider_type %>
</div>
<% unless content_provider.keywords.blank? %>
<% unless TeSS::Config.feature['content_providers_disabled'].include?('type') %>
<h4 class="nav-heading">Type</h4>
<div class="nav-block">
<%= content_provider.content_provider_type %>
</div>
<% end %>
<% unless content_provider.keywords.blank? || TeSS::Config.feature['content_providers_disabled'].include?('keywords') %>
<h4 class="nav-heading">Keywords</h4>
<div class="nav-block">
<%= content_provider.keywords.join(', ') %>
Expand All @@ -21,7 +23,7 @@
</p>
</div>
<% end %>
<% unless @content_provider.contact.blank? %>
<% unless @content_provider.contact.blank? || TeSS::Config.feature['content_providers_disabled'].include?('contact') %>
<h4 class="nav-heading">Contact</h4>
<div class="nav-block">
<%= content_provider.contact %>
Expand All @@ -33,11 +35,13 @@
<%= render partial: 'content_providers/partials/twitter_card',
locals: { content_provider: @content_provider } %>
<h4 class="nav-heading">Owner</h4>
<div class="nav-block">
<%= link_to content_provider.user.name, content_provider.user %>
</div>
<% if content_provider.editors.any? %>
<% unless TeSS::Config.feature['content_providers_disabled'].include?('owner') %>
<h4 class="nav-heading">Owner</h4>
<div class="nav-block">
<%= link_to content_provider.user.name, content_provider.user %>
</div>
<% end %>
<% unless !content_provider.editors.any? || TeSS::Config.feature['content_providers_disabled'].include?('editors') %>
<h4 class="nav-heading"><%= ContentProvider.human_attribute_name(:editors) %></h4>
<% content_provider.editors.each do |editor| %>
<div class="nav-block">
Expand Down
1 change: 1 addition & 0 deletions config/tess.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ default: &default
# other_types, subsets, syllabus, approved_editors address_finder
disabled: ['ardc_fields_of_research', 'other_types', 'subsets', 'syllabus', 'approved_editors']
materials_disabled: []
content_providers_disabled: []
restrict_content_provider_selection: false
user_ingestion_methods: ['bioschemas']
placeholder:
Expand Down

0 comments on commit 372e97f

Please sign in to comment.