mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-17 14:19:05 +08:00
Fix CSS UI issues for shareable links task sharing [SCI-9080] (#6031)
* Fix css UI issues for shareable links task sharing [SCI-9080]
This commit is contained in:
parent
2e55181510
commit
1d051aeb0f
13 changed files with 148 additions and 79 deletions
|
|
@ -80,6 +80,8 @@
|
||||||
<ul class="dropdown-menu" role="menu" aria-labelledby="rowReminders${row.DT_RowId}">
|
<ul class="dropdown-menu" role="menu" aria-labelledby="rowReminders${row.DT_RowId}">
|
||||||
</ul>
|
</ul>
|
||||||
</div>` + recordName;
|
</div>` + recordName;
|
||||||
|
} else {
|
||||||
|
recordName = `<span class='inline-block my-2'>${recordName}</span>`;
|
||||||
}
|
}
|
||||||
return recordName;
|
return recordName;
|
||||||
}
|
}
|
||||||
|
|
@ -119,6 +121,12 @@
|
||||||
},
|
},
|
||||||
columns: simpleTableColumns(tableContainer),
|
columns: simpleTableColumns(tableContainer),
|
||||||
columnDefs: simpleViewColumnDefs(tableContainer),
|
columnDefs: simpleViewColumnDefs(tableContainer),
|
||||||
|
language: {
|
||||||
|
paginate: {
|
||||||
|
previous: "<span class='hidden'></span>",
|
||||||
|
next: "<span class='hidden'></span>"
|
||||||
|
}
|
||||||
|
},
|
||||||
drawCallback: function() {
|
drawCallback: function() {
|
||||||
var repositoryContainer = $(this).closest('.assigned-repository-container');
|
var repositoryContainer = $(this).closest('.assigned-repository-container');
|
||||||
repositoryContainer.find('.table.dataTable').removeClass('hidden');
|
repositoryContainer.find('.table.dataTable').removeClass('hidden');
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@
|
||||||
@import "my_modules/repositories";
|
@import "my_modules/repositories";
|
||||||
@import "my_modules/status_flow";
|
@import "my_modules/status_flow";
|
||||||
@import "my_modules/stock_consumption_modal";
|
@import "my_modules/stock_consumption_modal";
|
||||||
|
@import "my_modules/shareable_links";
|
||||||
@import "protocols/index";
|
@import "protocols/index";
|
||||||
@import "protocols/preview_modal";
|
@import "protocols/preview_modal";
|
||||||
@import "protocols/protocol";
|
@import "protocols/protocol";
|
||||||
|
|
|
||||||
49
app/assets/stylesheets/my_modules/shareable_links.scss
Normal file
49
app/assets/stylesheets/my_modules/shareable_links.scss
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
// scss-lint:disable IdSelector SelectorDepth NestingDepth
|
||||||
|
|
||||||
|
#shareable-link-welcome-modal,
|
||||||
|
#team-sharing-tasks,
|
||||||
|
#modalDestroyShareableLink {
|
||||||
|
.modal-body {
|
||||||
|
padding: .625rem 1rem;
|
||||||
|
|
||||||
|
.text-sm:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.shareable-links {
|
||||||
|
.module-name {
|
||||||
|
width: calc(100vw - 27rem);
|
||||||
|
}
|
||||||
|
|
||||||
|
#assigned-items-container .assigned-repository {
|
||||||
|
border: unset;
|
||||||
|
|
||||||
|
.assigned-repository-caret {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_paginate .paginate_button {
|
||||||
|
&.next,
|
||||||
|
&.previous {
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
a {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.disabled {
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.paginate_button.next {
|
||||||
|
&::after {
|
||||||
|
padding-left: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
.sci--layout-content {
|
.sci--layout-content {
|
||||||
background-color: var(--sn-white);
|
background-color: var(--sn-white);
|
||||||
|
}
|
||||||
|
|
||||||
.content-pane {
|
|
||||||
.title-row {
|
.title-row {
|
||||||
background-color: var(--sn-white);
|
background-color: var(--sn-white);
|
||||||
}
|
}
|
||||||
|
|
@ -14,12 +14,10 @@
|
||||||
background-color: var(--sn-white);
|
background-color: var(--sn-white);
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 3rem;
|
height: 3rem;
|
||||||
padding: 0rem 1rem;
|
padding: 0 1.125rem;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
z-index: 205;
|
z-index: 205;
|
||||||
border-bottom: 1px solid var(--sn-light-grey);
|
border-bottom: 1px solid var(--sn-light-grey);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p>{{ i18n.t('shareable_links.destroy_modal.description')}}</p>
|
<p class="text-sm">{{ i18n.t('shareable_links.destroy_modal.description')}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button class="btn btn-secondary" tabindex="0" @click="cancel">{{ i18n.t('general.cancel') }}</button>
|
<button class="btn btn-secondary" tabindex="0" @click="cancel">{{ i18n.t('general.cancel') }}</button>
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
<span class="sci-toggle-checkbox-label"></span>
|
<span class="sci-toggle-checkbox-label"></span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="text-sm">
|
||||||
<div class="sci-input-container-v2 textarea-lg mb-2">
|
<div class="sci-input-container-v2 textarea-lg mb-2">
|
||||||
<textarea ref="textarea"
|
<textarea ref="textarea"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@
|
||||||
<%= javascript_include_tag 'jquery_bundle' %>
|
<%= javascript_include_tag 'jquery_bundle' %>
|
||||||
<%= javascript_include_tag 'application' %>
|
<%= javascript_include_tag 'application' %>
|
||||||
<%= javascript_include_tag 'application_pack' %>
|
<%= javascript_include_tag 'application_pack' %>
|
||||||
|
<%= stylesheet_link_tag 'datatables' %>
|
||||||
|
<%= stylesheet_link_tag 'my_modules/shared/layout_overrides' %>
|
||||||
|
|
||||||
<%= favicon_link_tag "favicon.ico" %>
|
<%= favicon_link_tag "favicon.ico" %>
|
||||||
<%= favicon_link_tag "favicon-16.png", type: "image/png", size: "16x16" %>
|
<%= favicon_link_tag "favicon-16.png", type: "image/png", size: "16x16" %>
|
||||||
|
|
@ -23,7 +25,7 @@
|
||||||
<%= csrf_meta_tags %>
|
<%= csrf_meta_tags %>
|
||||||
</head>
|
</head>
|
||||||
<body id="sci-shareable-links" data-datetime-picker-format="YYYY-MM-DD">
|
<body id="sci-shareable-links" data-datetime-picker-format="YYYY-MM-DD">
|
||||||
<div class="flex">
|
<div class="flex shareable-links">
|
||||||
<div class="sticky top-0 w-80 h-screen px-6 py-6 flex flex-col
|
<div class="sticky top-0 w-80 h-screen px-6 py-6 flex flex-col
|
||||||
border-0 border-r border-solid border-sn-sleepy-grey">
|
border-0 border-r border-solid border-sn-sleepy-grey">
|
||||||
<%= render "shareable_links/my_modules/left_navigation" %>
|
<%= render "shareable_links/my_modules/left_navigation" %>
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
<div class="header-actions">
|
<div class="header-actions">
|
||||||
<div class="flex items-center text-bold">
|
<div class="flex items-center text-bold">
|
||||||
<% if can_read_experiment?(@my_module.experiment) %>
|
<% if can_read_experiment?(@my_module.experiment) %>
|
||||||
<a class="p-4 border-b-4 border-transparent hover:no-underline first-letter:capitalize <%= is_module_protocols? ? "text-sn-blue" : "text-sn-grey" %>"
|
<a class="p-4 border-b-4 border-transparent hover:no-underline first-letter:capitalize <%= is_module_protocols? ? "text-sn-blue" : "text-sn-black" %>"
|
||||||
href="<%= protocols_my_module_url(@my_module) %>"
|
href="<%= protocols_my_module_url(@my_module) %>"
|
||||||
title="<%= t("nav2.modules.steps") %>"
|
title="<%= t("nav2.modules.steps") %>"
|
||||||
>
|
>
|
||||||
<%=t "nav2.modules.steps" %>
|
<%=t "nav2.modules.steps" %>
|
||||||
</a>
|
</a>
|
||||||
<a class="p-4 border-b-4 border-transparent hover:no-underline first-letter:capitalize <%= is_module_results? ? "text-sn-blue" : "text-sn-grey" %>"
|
<a class="p-4 border-b-4 border-transparent hover:no-underline first-letter:capitalize <%= is_module_results? ? "text-sn-blue" : "text-sn-black" %>"
|
||||||
href="<%= results_my_module_url(@my_module) %>"
|
href="<%= results_my_module_url(@my_module) %>"
|
||||||
title="<%= t("nav2.modules.results") %>"
|
title="<%= t("nav2.modules.results") %>"
|
||||||
>
|
>
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
<sup class="navigation-results-counter"><%= @my_module.archived_branch? ? @my_module.results.size : @active_results_size %></sup>
|
<sup class="navigation-results-counter"><%= @my_module.archived_branch? ? @my_module.results.size : @active_results_size %></sup>
|
||||||
<% end %>
|
<% end %>
|
||||||
</a>
|
</a>
|
||||||
<a class="p-4 border-b-4 border-transparent hover:no-underline first-letter:capitalize <%= is_module_activities? ? "text-sn-blue" : "text-sn-grey" %>"
|
<a class="p-4 border-b-4 border-transparent hover:no-underline first-letter:capitalize <%= is_module_activities? ? "text-sn-blue" : "text-sn-black" %>"
|
||||||
href="<%= activities_my_module_url(@my_module, view_mode: params[:view_mode]) %>"
|
href="<%= activities_my_module_url(@my_module, view_mode: params[:view_mode]) %>"
|
||||||
title="<%= t("nav2.modules.activities") %>"
|
title="<%= t("nav2.modules.activities") %>"
|
||||||
>
|
>
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
<div data-hook="secondary-navigation-tabs"></div>
|
<div data-hook="secondary-navigation-tabs"></div>
|
||||||
<% if can_read_experiment?(@my_module.experiment) && !@my_module.archived_branch? %>
|
<% if can_read_experiment?(@my_module.experiment) && !@my_module.archived_branch? %>
|
||||||
<a class="p-4 border-b-4 border-transparent hover:no-underline first-letter:capitalize <%= is_module_archive? ? "text-sn-blue" : "text-sn-grey" %>"
|
<a class="p-4 border-b-4 border-transparent hover:no-underline first-letter:capitalize <%= is_module_archive? ? "text-sn-blue" : "text-sn-black" %>"
|
||||||
href="<%= archive_my_module_url(@my_module) %>"
|
href="<%= archive_my_module_url(@my_module) %>"
|
||||||
title="<%= t'nav2.modules.archive' %>"
|
title="<%= t'nav2.modules.archive' %>"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<span class="inline-block whitespace-nowrap mr-1">
|
<span class="inline-block whitespace-nowrap mr-1">
|
||||||
<%= t "labels.archived" if @my_module.archived? %>
|
<%= t "labels.archived" if @my_module.archived? %>
|
||||||
</span>
|
</span>
|
||||||
<span class="inline-block truncate w-[calc(100vw-27rem)]" title="<%= @my_module.name %>">
|
<span class="inline-block truncate module-name" title="<%= @my_module.name %>">
|
||||||
<%= @my_module.name %>
|
<%= @my_module.name %>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,15 @@
|
||||||
<div class="text-3xl font-semibold"><%= @my_module.name %></div>
|
<div class="text-3xl font-semibold flex flex-row flex-nowrap">
|
||||||
|
<span class="inline-block whitespace-nowrap mr-1">
|
||||||
|
</span>
|
||||||
|
<span class="inline-block truncate module-name" title="<%= @my_module.name %>">
|
||||||
|
<%= @my_module.name %>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="px-4 my-5 flex-1 bg-sn-white">
|
<div class="my-5 flex-1 bg-sn-white">
|
||||||
<div class="content-pane flexible">
|
<div class="content-pane flexible">
|
||||||
<%= render partial: 'shareable_links/my_modules/header_actions' %>
|
<%= render partial: 'shareable_links/my_modules/header_actions' %>
|
||||||
|
<div class="px-4">
|
||||||
<div class="mt-5" id="results-toolbar">
|
<div class="mt-5" id="results-toolbar">
|
||||||
<div class="sci-btn-group collapse-expand-result">
|
<div class="sci-btn-group collapse-expand-result">
|
||||||
<button class="btn btn-light" id="results-collapse-btn">
|
<button class="btn btn-light" id="results-collapse-btn">
|
||||||
|
|
@ -28,7 +35,6 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="results">
|
<div id="results">
|
||||||
<% @results.each do |result| %>
|
<% @results.each do |result| %>
|
||||||
<%= render partial: "shareable_links/my_modules/results/result", locals: { result: result, gallery: @gallery } %>
|
<%= render partial: "shareable_links/my_modules/results/result", locals: { result: result, gallery: @gallery } %>
|
||||||
|
|
@ -37,6 +43,7 @@
|
||||||
<div class="kaminari-pagination">
|
<div class="kaminari-pagination">
|
||||||
<%= paginate @results, outer_window: 1, window: 1 %>
|
<%= paginate @results, outer_window: 1, window: 1 %>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
|
<div class="header-actions">
|
||||||
<div class="flex items-center uppercase">
|
<div class="flex items-center uppercase">
|
||||||
<a class="p-4 border-b-4 border-transparent hover:no-underline capitalize <%= is_module_protocols? ? "text-sn-blue" : "text-sn-grey" %>"
|
<a class="px-4 py-3 border-b-4 border-transparent hover:no-underline capitalize <%= is_module_protocols? ? "text-sn-blue" : "text-sn-black" %>"
|
||||||
href="<%= shared_protocol_url(@shareable_link.uuid) %>"
|
href="<%= shared_protocol_url(@shareable_link.uuid) %>"
|
||||||
title="<%= t("nav2.modules.steps") %>"
|
title="<%= t("nav2.modules.steps") %>"
|
||||||
>
|
>
|
||||||
<%= t("nav2.modules.steps") %>
|
<%= t("nav2.modules.steps") %>
|
||||||
</a>
|
</a>
|
||||||
<a class="p-4 border-b-4 border-transparent hover:no-underline capitalize <%= is_module_results? ? "text-sn-blue" : "text-sn-grey" %>"
|
<a class="px-4 py-3 border-b-4 border-transparent hover:no-underline capitalize <%= is_module_results? ? "text-sn-blue" : "text-sn-black" %>"
|
||||||
href="<%= shared_protocol_results_path(@shareable_link.uuid) %>"
|
href="<%= shared_protocol_results_path(@shareable_link.uuid) %>"
|
||||||
title="<%= t("nav2.modules.results") %>"
|
title="<%= t("nav2.modules.results") %>"
|
||||||
>
|
>
|
||||||
|
|
@ -16,3 +17,4 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p class="text-sm"><%= t("shareable_links.welcome_modal.description", my_module: @my_module.name)%></p>
|
<p class="text-sm"><%= t("shareable_links.welcome_modal.description", my_module: @my_module.name)%></p>
|
||||||
|
<% if @shareable_link.description.present? %>
|
||||||
<p class="text-sm"><%= @shareable_link.description %></p>
|
<p class="text-sm"><%= @shareable_link.description %></p>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-primary" data-dismiss="modal"><%= t("shareable_links.welcome_modal.view_task_btn")%></button>
|
<button type="button" class="btn btn-primary" data-dismiss="modal"><%= t("shareable_links.welcome_modal.view_task_btn")%></button>
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@
|
||||||
<h4 class="modal-title" id="team-sharing-tasks-label"><%= t("users.settings.teams.show.tasks_share.disable_modal.title") %></h4>
|
<h4 class="modal-title" id="team-sharing-tasks-label"><%= t("users.settings.teams.show.tasks_share.disable_modal.title") %></h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p><%= t("users.settings.teams.show.tasks_share.disable_modal.description_p1", team_name: @team.name) %></p>
|
<p class='text-sm'><%= t("users.settings.teams.show.tasks_share.disable_modal.description_p1", team_name: @team.name) %></p>
|
||||||
<p><%= t("users.settings.teams.show.tasks_share.disable_modal.description_p2", counter: @team.number_of_task_shared) %></p>
|
<p class='text-sm'><%= t("users.settings.teams.show.tasks_share.disable_modal.description_p2", counter: @team.number_of_task_shared) %></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal"><%= t('general.cancel') %></button>
|
<button type="button" class="btn btn-secondary" data-dismiss="modal"><%= t('general.cancel') %></button>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue