Merge pull request #4769 from aignatov-bio/ai-sci-7695-fix-comments-view-mode-experiment-table

Experiment table - fix comments view mode [SCI-7695]
This commit is contained in:
aignatov-bio 2023-01-06 13:10:42 +01:00 committed by GitHub
commit 29c13d8578
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View file

@ -636,6 +636,7 @@ ExperimnetTable.render.tags = function(data) {
};
ExperimnetTable.render.comments = function(data) {
if (data.count === 0 && !data.can_create) return '<span class="disabled">0</span>';
return `<a href="#"
class="open-comments-sidebar" id="comment-count-${data.id}"
data-object-type="MyModule" data-object-id="${data.id}">

View file

@ -153,6 +153,10 @@
display: none;
}
.comments-column .disabled {
color: $color-silver-chalice;
}
.table-row {
display: contents;

View file

@ -169,6 +169,7 @@ module Experiments
{
id: my_module.id,
count: my_module.comments.count,
can_create: can_create_my_module_comments?(@user, my_module),
count_unseen: count_unseen_comments(my_module, @user)
}
end