From 8e059087539a45cfb85b36cdf4c6efe9f99a3bbb Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Tue, 25 Feb 2020 17:19:11 +0100 Subject: [PATCH] Small fixes --- .../shared/my_modules_list_partial.scss | 16 ++++++++++------ .../dashboard/calendars_controller.rb | 2 ++ app/helpers/icons_helper.rb | 2 ++ .../shared/_my_modules_list_partial.html.erb | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/app/assets/stylesheets/shared/my_modules_list_partial.scss b/app/assets/stylesheets/shared/my_modules_list_partial.scss index 0fd51f9e4..95f9e023d 100644 --- a/app/assets/stylesheets/shared/my_modules_list_partial.scss +++ b/app/assets/stylesheets/shared/my_modules_list_partial.scss @@ -14,7 +14,7 @@ color: $color-silver-chalice; display: flex; height: 20px; - margin: 5px 0; + margin-top: 5px; width: 100%; .project, @@ -38,13 +38,17 @@ align-items: center; display: flex; line-height: 25px; - } - .task-icon { - margin-right: 9px; + .task-icon { + margin-right: 9px; - path { - fill: $brand-primary; + path { + fill: $brand-primary; + } + } + + .task-link { + line-height: 24px; } } } diff --git a/app/controllers/dashboard/calendars_controller.rb b/app/controllers/dashboard/calendars_controller.rb index 65128f18f..13bafffa5 100644 --- a/app/controllers/dashboard/calendars_controller.rb +++ b/app/controllers/dashboard/calendars_controller.rb @@ -2,6 +2,8 @@ module Dashboard class CalendarsController < ApplicationController + include IconsHelper + def show date = DateTime.parse(params[:date]) start_date = date.at_beginning_of_month.utc - 7.days diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb index b0bd9cd07..37be8c8f3 100644 --- a/app/helpers/icons_helper.rb +++ b/app/helpers/icons_helper.rb @@ -13,6 +13,8 @@ module IconsHelper when 'shared-read' title = "#{t('repositories.icon_title.shared_read', team_name: team.name)}" icon = '' + when 'task-icon' + return ''.html_safe end ('' + title + icon + '').html_safe end diff --git a/app/views/shared/_my_modules_list_partial.html.erb b/app/views/shared/_my_modules_list_partial.html.erb index c1f1b375c..94f3ca145 100644 --- a/app/views/shared/_my_modules_list_partial.html.erb +++ b/app/views/shared/_my_modules_list_partial.html.erb @@ -9,7 +9,7 @@
<% task_group[:tasks].each do |task| %>
- + <%= draw_custom_icon('task-icon') %> <%= link_to(task[:task_name], protocols_my_module_path(task[:id]), {class: "task-link", title: task[:task_name]}) %>
<% end %>