mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 11:45:18 +08:00
Update the Tasks screens for the Shareable-links feature [SCI-8649] (#5679)
Co-authored-by: Sboursen <dev.sboursen@gmail.com>
This commit is contained in:
parent
563605e6ef
commit
1a9ef4a1d5
11 changed files with 87 additions and 46 deletions
|
@ -12,7 +12,7 @@
|
|||
padding: 0 15px;
|
||||
|
||||
&.task-activities {
|
||||
height: calc(100vh - 136px);
|
||||
height: calc(100vh - var(--navbar-height) - var(--title-row-height) - 3rem);
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,12 @@
|
|||
min-width: 5rem;
|
||||
width: 100%;
|
||||
|
||||
.view-mode {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.fas {
|
||||
margin-right: .5em;
|
||||
}
|
||||
|
@ -48,9 +54,9 @@
|
|||
.my-module-position-container {
|
||||
background-color: $color-white;
|
||||
box-shadow: $flyout-shadow;
|
||||
margin: 1rem auto;
|
||||
margin: 1rem auto 0 0;
|
||||
max-width: 900px;
|
||||
padding: 1rem 0;
|
||||
padding: 0 0 1rem;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
.sci--layout-navigation-breadcrumbs {
|
||||
background-color: var(--sn-white);
|
||||
}
|
||||
|
||||
.sci--layout-content {
|
||||
background-color: var(--sn-white);
|
||||
|
||||
.content-pane {
|
||||
.title-row {
|
||||
background-color: var(--sn-white);
|
||||
}
|
||||
|
||||
.header-actions {
|
||||
background-color: var(--sn-white);
|
||||
display: flex;
|
||||
height: 3rem;
|
||||
padding: 0rem 1rem;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
align-self: stretch;
|
||||
z-index: 205;
|
||||
border-bottom: 1px solid var(--sn-light-grey);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -11,6 +11,7 @@ body.navigator-collapsed {
|
|||
--left-navigation-width: 192px;
|
||||
--navbar-height: calc(var(--top-navigation-height) + var(--breadcrumbs-navigation-height));
|
||||
--navigator-navigation-width: 240px;
|
||||
--title-row-height: 4em;
|
||||
--top-navigation-height: 72px;
|
||||
display: grid;
|
||||
grid-template-areas: "left top top"
|
||||
|
|
|
@ -17,47 +17,6 @@
|
|||
</div>
|
||||
<% end %>
|
||||
</h1>
|
||||
<div class="header-actions">
|
||||
<div class="flex items-center uppercase text-bold">
|
||||
<% if can_read_experiment?(@my_module.experiment) %>
|
||||
<a class="p-4 border-b-4 border-transparent text-sn-grey hover:no-underline <%= "border-sn-blue" if is_module_protocols? %>"
|
||||
href="<%= protocols_my_module_url(@my_module) %>"
|
||||
title="<%= t("nav2.modules.steps") %>"
|
||||
>
|
||||
<%=t "nav2.modules.steps" %>
|
||||
</a>
|
||||
<a class="p-4 border-b-4 border-transparent text-sn-grey hover:no-underline <%= "border-sn-blue" if is_module_results? %>"
|
||||
href="<%= results_my_module_url(@my_module) %>"
|
||||
title="<%= t("nav2.modules.results") %>"
|
||||
>
|
||||
<%= t("nav2.modules.results") %>
|
||||
<% @active_results_size = @my_module.results.where(archived:false).size %>
|
||||
<% if @active_results_size.positive? %>
|
||||
<sup class="navigation-results-counter"><%= @my_module.archived_branch? ? @my_module.results.size : @active_results_size %></sup>
|
||||
<% end %>
|
||||
</a>
|
||||
<a class="p-4 border-b-4 border-transparent text-sn-grey hover:no-underline <%= "border-sn-blue" if is_module_activities? %>"
|
||||
href="<%= activities_my_module_url(@my_module) %>"
|
||||
title="<%= t("nav2.modules.activities") %>"
|
||||
>
|
||||
<%= t("nav2.modules.activities") %>
|
||||
</a>
|
||||
<% end %>
|
||||
|
||||
<div data-hook="secondary-navigation-tabs"></div>
|
||||
<% if can_read_experiment?(@my_module.experiment) && !@my_module.archived_branch? %>
|
||||
<a class="p-4 border-b-4 border-transparent text-sn-grey hover:no-underline <%= "border-sn-blue" if is_module_archive? %>"
|
||||
href="<%= archive_my_module_url(@my_module) %>"
|
||||
title="<%= t'nav2.modules.archive' %>"
|
||||
>
|
||||
<%= t("nav2.modules.archive") %>
|
||||
<% @archived_results_size = @my_module.results.where(archived:true).size %>
|
||||
<% if @archived_results_size.positive? %>
|
||||
<sup class="navigation-results-counter"><%= @archived_results_size %></sup>
|
||||
<% end %>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%= stylesheet_link_tag 'my_modules/shared/layout_overrides' %>
|
||||
|
|
42
app/views/my_modules/_header_actions.html.erb
Normal file
42
app/views/my_modules/_header_actions.html.erb
Normal file
|
@ -0,0 +1,42 @@
|
|||
<div class="header-actions">
|
||||
<div class="flex items-center uppercase text-bold">
|
||||
<% if can_read_experiment?(@my_module.experiment) %>
|
||||
<a class="p-4 border-b-4 border-transparent hover:no-underline capitalize <%= is_module_protocols? ? "text-sn-blue" : "text-sn-grey" %>"
|
||||
href="<%= protocols_my_module_url(@my_module) %>"
|
||||
title="<%= t("nav2.modules.steps") %>"
|
||||
>
|
||||
<%=t "nav2.modules.steps" %>
|
||||
</a>
|
||||
<a class="p-4 border-b-4 border-transparent hover:no-underline capitalize <%= is_module_results? ? "text-sn-blue" : "text-sn-grey" %>"
|
||||
href="<%= results_my_module_url(@my_module) %>"
|
||||
title="<%= t("nav2.modules.results") %>"
|
||||
>
|
||||
<%= t("nav2.modules.results") %>
|
||||
<% @active_results_size = @my_module.results.where(archived:false).size %>
|
||||
<% if @active_results_size.positive? %>
|
||||
<sup class="navigation-results-counter"><%= @my_module.archived_branch? ? @my_module.results.size : @active_results_size %></sup>
|
||||
<% end %>
|
||||
</a>
|
||||
<a class="p-4 border-b-4 border-transparent hover:no-underline capitalize <%= is_module_activities? ? "text-sn-blue" : "text-sn-grey" %>"
|
||||
href="<%= activities_my_module_url(@my_module) %>"
|
||||
title="<%= t("nav2.modules.activities") %>"
|
||||
>
|
||||
<%= t("nav2.modules.activities") %>
|
||||
</a>
|
||||
<% end %>
|
||||
|
||||
<div data-hook="secondary-navigation-tabs"></div>
|
||||
<% if can_read_experiment?(@my_module.experiment) && !@my_module.archived_branch? %>
|
||||
<a class="p-4 border-b-4 border-transparent hover:no-underline capitalize <%= is_module_archive? ? "text-sn-blue" : "text-sn-grey" %>"
|
||||
href="<%= archive_my_module_url(@my_module) %>"
|
||||
title="<%= t'nav2.modules.archive' %>"
|
||||
>
|
||||
<%= t("nav2.modules.archive") %>
|
||||
<% @archived_results_size = @my_module.results.where(archived:true).size %>
|
||||
<% if @archived_results_size.positive? %>
|
||||
<sup class="navigation-results-counter"><%= @archived_results_size %></sup>
|
||||
<% end %>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
|
@ -13,6 +13,8 @@
|
|||
<% provide(:container_class, 'no-second-nav-container') %>
|
||||
<div class="content-pane flexible">
|
||||
<%= render partial: 'my_modules/header' %>
|
||||
<!-- Header Actions -->
|
||||
<%= render partial: 'my_modules/header_actions' %>
|
||||
<div class="global-activities-container container-flex task-activities">
|
||||
<div class="ga-top ">
|
||||
<%= render partial: "my_modules/activities/top_pane" %>
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
<% provide(:container_class, 'no-second-nav-container') %>
|
||||
<div class="content-pane flexible">
|
||||
<%= render partial: 'my_modules/header' %>
|
||||
<div class="row">
|
||||
<!-- Header Actions -->
|
||||
<%= render partial: 'my_modules/header_actions' %>
|
||||
<div class="row mt-5">
|
||||
<% if @archived_results.any? %>
|
||||
<% @archived_results.each do |result| %>
|
||||
<div class="col-xs-3">
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
<div class="content-pane flexible my-modules-protocols-index" data-task-id="<%= @my_module.id %>">
|
||||
<%= render partial: 'my_modules/header' %>
|
||||
<div class="my-module-position-container">
|
||||
<!-- Header Actions -->
|
||||
<%= render partial: 'my_modules/header_actions' %>
|
||||
<!-- Details -->
|
||||
<div class="task-section task-information hidden">
|
||||
<div id="task-details" class="task-section-header">
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
<div class="content-pane flexible">
|
||||
<%= render partial: 'my_modules/header' %>
|
||||
<%= render partial: 'my_modules/header_actions' %>
|
||||
<div class="mt-5" id="results-toolbar">
|
||||
<% if can_manage_my_module?(@my_module) %>
|
||||
<div class="add-result-dropdown dropdown sci-dropdown">
|
||||
|
|
|
@ -124,6 +124,7 @@ Rails.application.config.assets.precompile += %w(results/result_texts/edit.js)
|
|||
Rails.application.config.assets.precompile += %w(shared/file_preview.js)
|
||||
Rails.application.config.assets.precompile += %w(users/shared/linkedin_sign_in_links.js)
|
||||
Rails.application.config.assets.precompile += %w(reports/template_helpers.js)
|
||||
Rails.application.config.assets.precompile += %w(my_modules/shared/layout_overrides.css)
|
||||
|
||||
# Libraries needed for Handsontable formulas
|
||||
Rails.application.config.assets.precompile += %w(jquery.js)
|
||||
|
|
Loading…
Reference in a new issue