Fix collapsed sidebar messages and icon
This commit is contained in:
parent
f39fe4d8db
commit
d8462638e1
5 changed files with 18 additions and 6 deletions
|
@ -158,6 +158,6 @@ class GlobalMilestone
|
|||
end
|
||||
|
||||
def human_total_time_spent
|
||||
Gitlab::TimeTrackingFormatter.output(total_time_spent) || 0
|
||||
Gitlab::TimeTrackingFormatter.output(total_time_spent)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -218,7 +218,7 @@ class Milestone < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def human_total_time_spent
|
||||
Gitlab::TimeTrackingFormatter.output(total_time_spent) || 0
|
||||
Gitlab::TimeTrackingFormatter.output(total_time_spent)
|
||||
end
|
||||
|
||||
private
|
||||
|
|
1
app/views/shared/icons/_icon_hourglass.svg
Normal file
1
app/views/shared/icons/_icon_hourglass.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M10.331 4.889A2.988 2.988 0 0 0 11 3V2H5v1c0 .362.064.709.182 1.03l5.15.859zM3 14v-1c0-1.78.93-3.342 2.33-4.228.447-.327.67-.582.67-.764 0-.19-.242-.46-.725-.815A4.996 4.996 0 0 1 3 3V2H2a1 1 0 1 1 0-2h12a1 1 0 0 1 0 2h-1v1a4.997 4.997 0 0 1-2.39 4.266c-.407.3-.61.545-.61.734 0 .19.203.434.61.734A4.997 4.997 0 0 1 13 13v1h1a1 1 0 0 1 0 2H2a1 1 0 0 1 0-2h1zm8 0v-1a3 3 0 0 0-6 0v1h6z"/></svg>
|
After Width: | Height: | Size: 486 B |
|
@ -87,13 +87,19 @@
|
|||
|
||||
.block.time_spent
|
||||
.sidebar-collapsed-icon
|
||||
%strong
|
||||
= custom_icon('icon_clock_o')
|
||||
%span= milestone.human_total_time_spent
|
||||
= custom_icon('icon_hourglass')
|
||||
%span.collapsed-milestone-total-time-spent
|
||||
- if milestone.human_total_time_spent
|
||||
= milestone.human_total_time_spent
|
||||
- else
|
||||
None
|
||||
.title.hide-collapsed
|
||||
Total time spent
|
||||
.value.hide-collapsed
|
||||
= milestone.human_total_time_spent
|
||||
- if milestone.human_total_time_spent
|
||||
%span.bold= milestone.human_total_time_spent
|
||||
-else
|
||||
%span.no-value No time spent
|
||||
|
||||
.block.merge-requests
|
||||
.sidebar-collapsed-icon
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Add total time spent to milestones
|
||||
merge_request: 15116
|
||||
author: George Andrinopoulos
|
||||
type: added
|
Loading…
Reference in a new issue