Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
8323b9c9
Commit
8323b9c9
authored
Sep 20, 2017
by
Vitaliy @blackst0ne Klachkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tooltip for milestone due date to issue and merge request lists
parent
20295b3d
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
4 deletions
+15
-4
app/helpers/milestones_helper.rb
app/helpers/milestones_helper.rb
+6
-0
app/views/projects/issues/_issue.html.haml
app/views/projects/issues/_issue.html.haml
+1
-1
app/views/projects/merge_requests/_merge_request.html.haml
app/views/projects/merge_requests/_merge_request.html.haml
+1
-1
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+2
-2
changelogs/unreleased/add_tooltip_for_milestone_in_issues_list.yml
...s/unreleased/add_tooltip_for_milestone_in_issues_list.yml
+5
-0
No files found.
app/helpers/milestones_helper.rb
View file @
8323b9c9
...
...
@@ -94,6 +94,12 @@ module MilestonesHelper
end
end
def
milestone_tooltip_title
(
milestone
)
if
milestone
.
due_date
[
milestone
.
due_date
.
to_s
(
:medium
),
"(
#{
milestone_remaining_days
(
milestone
)
}
)"
].
join
(
' '
)
end
end
def
milestone_remaining_days
(
milestone
)
if
milestone
.
expired?
content_tag
(
:strong
,
'Past due'
)
...
...
app/views/projects/issues/_issue.html.haml
View file @
8323b9c9
...
...
@@ -24,7 +24,7 @@
-
if
issue
.
milestone
%span
.issuable-milestone.hidden-xs
=
link_to
project_issues_path
(
issue
.
project
,
milestone_title:
issue
.
milestone
.
title
)
do
=
link_to
project_issues_path
(
issue
.
project
,
milestone_title:
issue
.
milestone
.
title
)
,
data:
{
html:
1
,
toggle:
'tooltip'
,
title:
milestone_tooltip_title
(
issue
.
milestone
)
}
do
=
icon
(
'clock-o'
)
=
issue
.
milestone
.
title
-
if
issue
.
due_date
...
...
app/views/projects/merge_requests/_merge_request.html.haml
View file @
8323b9c9
...
...
@@ -23,7 +23,7 @@
-
if
merge_request
.
milestone
%span
.issuable-milestone.hidden-xs
=
link_to
project_merge_requests_path
(
merge_request
.
project
,
milestone_title:
merge_request
.
milestone
.
title
)
do
=
link_to
project_merge_requests_path
(
merge_request
.
project
,
milestone_title:
merge_request
.
milestone
.
title
)
,
data:
{
html:
1
,
toggle:
'tooltip'
,
title:
milestone_tooltip_title
(
merge_request
.
milestone
)
}
do
=
icon
(
'clock-o'
)
=
merge_request
.
milestone
.
title
-
if
merge_request
.
target_project
.
default_branch
!=
merge_request
.
target_branch
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
8323b9c9
...
...
@@ -26,7 +26,7 @@
=
icon
(
'clock-o'
,
'aria-hidden'
:
'true'
)
%span
.milestone-title
-
if
issuable
.
milestone
%span
.has-tooltip
{
title:
"#{issuable.milestone.title}<br>#{milestone_
remaining_days
(issuable.milestone)}"
,
data:
{
container:
'body'
,
html:
1
,
placement:
'left'
}
}
%span
.has-tooltip
{
title:
"#{issuable.milestone.title}<br>#{milestone_
tooltip_title
(issuable.milestone)}"
,
data:
{
container:
'body'
,
html:
1
,
placement:
'left'
}
}
=
issuable
.
milestone
.
title
-
else
None
...
...
@@ -37,7 +37,7 @@
=
link_to
'Edit'
,
'#'
,
class:
'js-sidebar-dropdown-toggle edit-link pull-right'
.value.hide-collapsed
-
if
issuable
.
milestone
=
link_to
issuable
.
milestone
.
title
,
milestone_path
(
issuable
.
milestone
),
class:
"bold has-tooltip"
,
title:
milestone_
remaining_days
(
issuable
.
milestone
),
data:
{
container:
"body"
,
html:
1
}
=
link_to
issuable
.
milestone
.
title
,
milestone_path
(
issuable
.
milestone
),
class:
"bold has-tooltip"
,
title:
milestone_
tooltip_title
(
issuable
.
milestone
),
data:
{
container:
"body"
,
html:
1
}
-
else
%span
.no-value
None
...
...
changelogs/unreleased/add_tooltip_for_milestone_in_issues_list.yml
0 → 100644
View file @
8323b9c9
---
title
:
Add tooltip for milestone due date to issue and merge request lists
merge_request
:
14318
author
:
Vitaliy @blackst0ne Klachkov
type
:
added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment