Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configurable content provider sidebar #887

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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