app/views/homes/show.html.erb
<%= page_title "Home" %>
<% add :about, "This page lets you quickly get to where you want to. It provides links to your most recent work." -%>
<% unless current_user.swipecard_code? %>
<%= alert(:warning) do %>
You don't currently have a swipe-card configured. This is required to use some of the pipeline applications.
<%= link_to 'Click here to set one up now', edit_profile_path(current_user), class: "alert-link" %>
<%= help_link 'Further information', 'Add a swipecard to Sequencescape' %>
<% end %>
<% end %>
<!-- Internal Links -->
<% add :menu, 'Create Submission' => new_submission_path %>
<% add :menu, 'Create Bulk Submission' => bulk_submissions_path %>
<% add :menu, 'Create Study' => new_study_path %>
<% add :menu, 'Create Project' => new_project_path %>
<% add :menu, 'Plate Summaries' => plate_summaries_path %>
<% add :menu, 'Create Custom Pools' => new_pooling_path %>
<% add :menu, 'Status of Tube Rack Imports' => tube_rack_statuses_path %>
<% add :menu, 'Tag Sets' => tag_sets_path %>
<!-- External links -->
<% @links.each do |name, link| %>
<% add :menu, name => link %>
<% end %>
<div class="card-columns">
<% if @latest_batches.present? || @assigned_batches.present? %>
<%= render partial: 'batches', locals: { latest_batches: @latest_batches, assigned_batches: @assigned_batches, style: 'success' } %>
<% end %>
<% if @submissions.present? %>
<%= render partial: 'submissions', locals: { submissions: @submissions, style: 'success' } %>
<% end %>
<% if @pipelines.present? %>
<%= render partial: 'pipelines/pipelines', locals: { title: 'Your Most Recent', pipelines: @pipelines, style: 'success' } %>
<% end %>
<% if @studies.present? %>
<%= render partial: 'studies', locals: { studies: @studies, style: 'success' } %>
<% end %>
</div>