From 80dbe54b604d02eab3c176608725fcecad967585 Mon Sep 17 00:00:00 2001 From: Anton Date: Wed, 13 Nov 2024 15:01:46 +0100 Subject: [PATCH] Update shared tasks with new native tables helper [SCI-11245] --- .../stylesheets/shared/handson_table.scss | 46 +++++++++++++++++++ .../my_module_protocol_show.html.erb | 1 + .../my_module_results_show.html.erb | 1 + .../my_modules/_left_navigation.html.erb | 2 +- .../my_modules/step_elements/_table.html.erb | 10 ++-- 5 files changed, 56 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/shared/handson_table.scss b/app/assets/stylesheets/shared/handson_table.scss index 5a67dbba1..d7790b0db 100644 --- a/app/assets/stylesheets/shared/handson_table.scss +++ b/app/assets/stylesheets/shared/handson_table.scss @@ -15,3 +15,49 @@ border-color: var(--sn-light-grey) !important; } } + +.common-table-format { + page-break-inside: avoid; + width: 100%; + + tr { + text-align: left; + vertical-align: top; + + td, + th { + border: 1px solid $color-silver; + padding: 5px; + + span { + display: inline-block; + min-height: 19px; + } + + &.htCenter { + text-align: center; + } + + &.htRight { + text-align: right; + } + + &.htJustify { + text-align: justify; + } + + &.htMiddle { + vertical-align: middle; + } + + &.htBottom { + vertical-align: bottom; + } + + } + + th { + background: $color-concrete; + } + } +} diff --git a/app/views/shareable_links/my_module_protocol_show.html.erb b/app/views/shareable_links/my_module_protocol_show.html.erb index 6e1d46ec6..e75939d08 100644 --- a/app/views/shareable_links/my_module_protocol_show.html.erb +++ b/app/views/shareable_links/my_module_protocol_show.html.erb @@ -89,3 +89,4 @@ <%= render 'shared/formulas_libraries' %> <%= javascript_include_tag 'shareable_links/my_module_protocol_show' %> <%= javascript_include_tag 'shareable_links/repositories' %> +<%= javascript_include_tag 'vue_legacy_report_table' %> diff --git a/app/views/shareable_links/my_module_results_show.html.erb b/app/views/shareable_links/my_module_results_show.html.erb index 62b198e4e..6e56e200f 100644 --- a/app/views/shareable_links/my_module_results_show.html.erb +++ b/app/views/shareable_links/my_module_results_show.html.erb @@ -54,3 +54,4 @@ <%= javascript_include_tag 'shared/file_preview' %> <%= javascript_include_tag 'pdf_js' %> <%= stylesheet_link_tag 'pdf_js_styles' %> +<%= javascript_include_tag 'vue_legacy_report_table' %> diff --git a/app/views/shareable_links/my_modules/_left_navigation.html.erb b/app/views/shareable_links/my_modules/_left_navigation.html.erb index df0cf08da..16bc97f92 100644 --- a/app/views/shareable_links/my_modules/_left_navigation.html.erb +++ b/app/views/shareable_links/my_modules/_left_navigation.html.erb @@ -1,5 +1,5 @@
- <%= image_tag "scinote_logo.svg" %> + <%= image_tag "scinote_logo.svg", class: "w-full" %>

<%= t("shareable_links.left_navigation.welcome")%> diff --git a/app/views/shareable_links/my_modules/step_elements/_table.html.erb b/app/views/shareable_links/my_modules/step_elements/_table.html.erb index 67fd64167..fbe120e2a 100644 --- a/app/views/shareable_links/my_modules/step_elements/_table.html.erb +++ b/app/views/shareable_links/my_modules/step_elements/_table.html.erb @@ -8,8 +8,12 @@ <% end %>
- - -
+
+ + +