mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 13:13:22 +08:00
Experiment table - fix comments view mode [SCI-7695]
This commit is contained in:
parent
631608e7db
commit
c513e6bca7
3 changed files with 6 additions and 0 deletions
|
@ -635,6 +635,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}">
|
||||
|
|
|
@ -153,6 +153,10 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
.comments-column .disabled {
|
||||
color: $color-silver-chalice;
|
||||
}
|
||||
|
||||
.table-row {
|
||||
display: contents;
|
||||
|
||||
|
|
|
@ -168,6 +168,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
|
||||
|
|
Loading…
Reference in a new issue