From 2468b67de0e9ad7665b504dcf36a3c7e95595f98 Mon Sep 17 00:00:00 2001 From: Urban Rotnik Date: Mon, 13 Jan 2020 13:28:18 +0100 Subject: [PATCH] Assign column update --- .../repository/repository_table.scss | 30 +++++++++++++++---- app/helpers/repository_datatable_helper.rb | 7 +++-- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/app/assets/stylesheets/repository/repository_table.scss b/app/assets/stylesheets/repository/repository_table.scss index 8c355a6dc..d63f0a715 100644 --- a/app/assets/stylesheets/repository/repository_table.scss +++ b/app/assets/stylesheets/repository/repository_table.scss @@ -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; } } diff --git a/app/helpers/repository_datatable_helper.rb b/app/helpers/repository_datatable_helper.rb index 3d06f38ae..aabb4f4dd 100644 --- a/app/helpers/repository_datatable_helper.rb +++ b/app/helpers/repository_datatable_helper.rb @@ -43,9 +43,12 @@ module RepositoryDatatableHelper def assigned_row(record) if record.assigned_my_modules_count.positive? - " " + tooltip = "#{record.assigned_my_modules_count} tasks, #{record.assigned_experiments_count} " \ + "experiments, #{record.assigned_projects_count} projects" + "
"\ + "#{record.assigned_my_modules_count}
" else - " " + "
0
" end end