Skip to content
Open
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
9 changes: 9 additions & 0 deletions app/frontend/stylesheets/all/sequencescape.scss
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,15 @@ td.qc_pass {
background-color: #ff8;
}

#template_form_body table {
@extend .mb-2;
}

#template_form_body td {
vertical-align: top;
line-height: 1.1em;
}

#plate td.selected {
background-color: #72cf3f;
}
Expand Down
8 changes: 7 additions & 1 deletion app/helpers/samples_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ def should_be_accessioned_warning(sample)
def no_accessionable_studies_warning(sample)
accession_warning(
'Sample cannot be accessioned:',
sample.studies.map { |study| "Study '#{link(study)}' is missing an accession number" }
sample.studies.map do |study| # Add list item for each study
"Study '#{link(study)}' is not accessionable - #{accessioning_checklist_link(study)}"
end
)
end

Expand Down Expand Up @@ -65,4 +67,8 @@ def accession_warning(message, items)
def link(study)
link_to(ERB::Util.html_escape(study.name), study_path(study))
end

def accessioning_checklist_link(study)
link_to 'view accessioning checklist', properties_study_path(study, anchor: 'study-accessioning-checklist')
end
end
55 changes: 32 additions & 23 deletions app/views/studies/properties.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,40 @@
<% if can? :edit, @study %>
<% add :menu, "Edit" => edit_study_path(@study) -%>
<% end %>
<% if can? :administer, @study %>
<% add :menu, "Manage" => url_for(controller: "admin/studies", action: "show", id: @study.id) -%>
<% end %>
<% add :back_menu, I18n.t("navigation.menu.back_to_study") => study_path(@study) -%>

<div id="content-links">
<%= link_to "View status", study_path(@study) %>
</div>

<div class="page-header"><h1>Study Specification</h1></div>
<div class="card my-4">
<div class="card-body p-3">
<h1 class="text-center">Study Specification</h1>

<table width='100%' cellspacing='0' cellpadding='0'>
<tbody>
<tr>
<td class="item" width="40%">Name:</td>
<td><strong><%=h @study.name %></strong></td>
</tr>
<tr>
<td class="item">Created at:</td>
<td><strong><%=h @study.created_at.to_formatted_s(:day_full_with_time) %></strong></td>
</tr>
<tr>
<td class="item">Study reference genome:</td>
<td><strong><%= @study.study_metadata.reference_genome&.name %></strong></td>
</tr>
</tbody>
</table>
<div id="template_form_body">
<table width='100%' cellspacing='0' cellpadding='0'>
<tbody>
<tr>
<td class="item" width="40%">Name:</td>
<td><strong><%=h @study.name %></strong></td>
</tr>
<tr>
<td class="item">Created at:</td>
<td><strong><%=h @study.created_at.to_formatted_s(:day_full_with_time) %></strong></td>
</tr>
<tr>
<td class="item">Study reference genome:</td>
<td><strong><%= @study.study_metadata.reference_genome&.name %></strong></td>
</tr>
</tbody>
</table>
<%= render partial: 'shared/metadata/show/study', locals: { study: @study } %>
</div>
</div>
</div>

<div id="template_form_body">
<%= render partial: 'shared/metadata/show/study', locals: { study: @study } %>
<div class="card my-4" id="study-accessioning-checklist">
<div class="card-header">Study Accessioning Checklist</div>
<div class="card-body p-4">
<%= render partial: 'studies/information/study_accession_checklist' %>
</div>
</div>
Loading