Merge pull request #2302 from urbanrotnik/ur-sci-4026-renew-assign-column-fix

Keep circles for task page [FIX]
This commit is contained in:
Urban Rotnik 2020-01-14 14:02:42 +01:00 committed by GitHub
commit bb9c1e6fff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 3 deletions

View file

@ -65,6 +65,10 @@
background-color: $color-alto; background-color: $color-alto;
} }
} }
.circle-icon {
margin-left: 30px;
}
} }
// Checklists // Checklists
@ -103,7 +107,9 @@
.repository-row-edit-icon { .repository-row-edit-icon {
display: inline-block; display: inline-block;
} }
.assign-counter-container {
.assign-counter-container,
.circle-icon {
margin-left: 0; margin-left: 0;
} }
} }
@ -121,7 +127,9 @@
.repository-row-edit-icon { .repository-row-edit-icon {
display: none; display: none;
} }
.assign-counter-container {
.assign-counter-container,
.circle-icon {
margin-left: 30px; margin-left: 30px;
} }
} }

View file

@ -42,9 +42,16 @@ module RepositoryDatatableHelper
end end
def assigned_row(record) def assigned_row(record)
if record.assigned_my_modules_count.positive? if @my_module
if record.assigned_my_modules_count.positive?
"<span class='circle-icon'>&nbsp;</span>"
else
"<span class='circle-icon disabled'>&nbsp;</span>"
end
elsif record.assigned_my_modules_count.positive?
tooltip = "#{record.assigned_my_modules_count} tasks,&#10;#{record.assigned_experiments_count} " \ tooltip = "#{record.assigned_my_modules_count} tasks,&#10;#{record.assigned_experiments_count} " \
"experiments,&#10;#{record.assigned_projects_count} projects" "experiments,&#10;#{record.assigned_projects_count} projects"
"<div class='assign-counter-container' title='#{tooltip}'>"\ "<div class='assign-counter-container' title='#{tooltip}'>"\
"<span class='assign-counter has-assigned'>#{record.assigned_my_modules_count}</span></div>" "<span class='assign-counter has-assigned'>#{record.assigned_my_modules_count}</span></div>"
else else