Skip to content

Commit

Permalink
Increase visibility of the full tool list link #1409
Browse files Browse the repository at this point in the history
  • Loading branch information
MontrealSergiy committed Aug 8, 2024
1 parent 03a77d4 commit d66b423
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
14 changes: 14 additions & 0 deletions BrainPortal/app/controllers/portal_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,20 @@ def welcome #:nodoc:
@default_data_provider = DataProvider.find_by_id(current_user.meta["pref_data_provider_id"])
@default_bourreau = Bourreau.find_by_id(current_user.meta["pref_bourreau_id"])

@tools = Tool
.all
.order(:name)
.to_a
.reject { |t| t.category == 'background' }
.select { |t| t.tool_configs.to_a.any? { |tc|
tc.bourreau_id.present? &&
tc.bourreau_id > 0 &&
tc.version_name.present?
}
}

@avaiable_tools = @tools

@dashboard_messages = Message
.where(:message_type => 'cbrain_dashboard')
.order("created_at desc")
Expand Down
8 changes: 4 additions & 4 deletions BrainPortal/app/views/portal/welcome.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,14 @@
<strong>Your current time:</strong> <%= to_localtime(Time.now, :datetime) %><BR>
</p>
<p>
<strong>Projects you belong to:</strong> <%= array_to_table(@groups, :table_class => 'simple', :cols => 4) { |g,r,c| link_to_group_if_accessible(g) } %>
<strong>Tools available to you ( out of <%= link_to @tools.count , available_path %> ) :</strong><br/>
<%= array_to_table(current_user.available_tools.where( "category <> 'background'" ).to_a.map(&:name).sort, :table_class => 'simple', :cols => 4) %>
</p>
<p>
<strong>Tools available to you:</strong><br/>
<%= array_to_table(current_user.available_tools.where( "category <> 'background'" ).to_a.map(&:name).sort, :table_class => 'simple', :cols => 4) %>
<strong>Note:</strong> The full list of <em> all tools </em> and curated datasets is <%= link_to 'here', available_path %>
</p>
<p>
<strong>Note:</strong> A full list of all tools and datasets is <%= link_to 'here', available_path %>
<strong>Projects you belong to:</strong> <%= array_to_table(@groups, :table_class => 'simple', :cols => 4) { |g,r,c| link_to_group_if_accessible(g) } %>
</p>
<p>
<strong>Your default Data Provider:</strong> <%= link_to_data_provider_if_accessible(@default_data_provider) %>
Expand Down

0 comments on commit d66b423

Please sign in to comment.