mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-04 03:36:44 +08:00
Assign column update
This commit is contained in:
parent
4ca2981177
commit
2468b67de0
2 changed files with 30 additions and 7 deletions
|
@ -34,14 +34,36 @@
|
|||
// Assigned
|
||||
|
||||
.assigned-column {
|
||||
position: relative;
|
||||
|
||||
.repository-row-edit-icon {
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.circle-icon {
|
||||
.assign-counter-container {
|
||||
border-radius: 2px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
height: calc(100% - 2px);
|
||||
margin-left: 30px;
|
||||
padding-top: 7px;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
width: calc(100% - 38px);
|
||||
|
||||
.assign-counter {
|
||||
margin-left: 5px;
|
||||
|
||||
&.has-assigned {
|
||||
color: $brand-primary;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: $color-silver-chalice;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,8 +103,7 @@
|
|||
.repository-row-edit-icon {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.circle-icon {
|
||||
.assign-counter-container {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
@ -100,8 +121,7 @@
|
|||
.repository-row-edit-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.circle-icon {
|
||||
.assign-counter-container {
|
||||
margin-left: 30px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,9 +43,12 @@ module RepositoryDatatableHelper
|
|||
|
||||
def assigned_row(record)
|
||||
if record.assigned_my_modules_count.positive?
|
||||
"<span class='circle-icon'> </span>"
|
||||
tooltip = "#{record.assigned_my_modules_count} tasks, #{record.assigned_experiments_count} " \
|
||||
"experiments, #{record.assigned_projects_count} projects"
|
||||
"<div class='assign-counter-container' title='#{tooltip}'>"\
|
||||
"<span class='assign-counter has-assigned'>#{record.assigned_my_modules_count}</span></div>"
|
||||
else
|
||||
"<span class='circle-icon disabled'> </span>"
|
||||
"<div class='assign-counter-container'><span class='assign-counter'>0</span></div>"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue