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
01ff8ae5
Commit
01ff8ae5
authored
Jul 14, 2016
by
winniehell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display tooltip for mentioned users and groups (!5261)
parent
c49517a0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
CHANGELOG
CHANGELOG
+1
-0
lib/banzai/filter/user_reference_filter.rb
lib/banzai/filter/user_reference_filter.rb
+5
-5
No files found.
CHANGELOG
View file @
01ff8ae5
...
@@ -22,6 +22,7 @@ v 8.10.0 (unreleased)
...
@@ -22,6 +22,7 @@ v 8.10.0 (unreleased)
- Add Sidekiq queue duration to transaction metrics.
- Add Sidekiq queue duration to transaction metrics.
- Add a new column `artifacts_size` to table `ci_builds` !4964
- Add a new column `artifacts_size` to table `ci_builds` !4964
- Let Workhorse serve format-patch diffs
- Let Workhorse serve format-patch diffs
- Display tooltip for mentioned users and groups !5261 (winniehell)
- Added day name to contribution calendar tooltips
- Added day name to contribution calendar tooltips
- Make images fit to the size of the viewport !4810
- Make images fit to the size of the viewport !4810
- Fix check for New Branch button on Issue page !4630 (winniehell)
- Fix check for New Branch button on Issue page !4630 (winniehell)
...
...
lib/banzai/filter/user_reference_filter.rb
View file @
01ff8ae5
...
@@ -112,7 +112,7 @@ module Banzai
...
@@ -112,7 +112,7 @@ module Banzai
data
=
data_attribute
(
project:
project
.
id
,
author:
author
.
try
(
:id
))
data
=
data_attribute
(
project:
project
.
id
,
author:
author
.
try
(
:id
))
text
=
link_text
||
User
.
reference_prefix
+
'all'
text
=
link_text
||
User
.
reference_prefix
+
'all'
link_tag
(
url
,
data
,
text
)
link_tag
(
url
,
data
,
text
,
'All Project and Group Members'
)
end
end
def
link_to_namespace
(
namespace
,
link_text:
nil
)
def
link_to_namespace
(
namespace
,
link_text:
nil
)
...
@@ -128,7 +128,7 @@ module Banzai
...
@@ -128,7 +128,7 @@ module Banzai
data
=
data_attribute
(
group:
namespace
.
id
)
data
=
data_attribute
(
group:
namespace
.
id
)
text
=
link_text
||
Group
.
reference_prefix
+
group
text
=
link_text
||
Group
.
reference_prefix
+
group
link_tag
(
url
,
data
,
text
)
link_tag
(
url
,
data
,
text
,
namespace
.
name
)
end
end
def
link_to_user
(
user
,
namespace
,
link_text:
nil
)
def
link_to_user
(
user
,
namespace
,
link_text:
nil
)
...
@@ -136,11 +136,11 @@ module Banzai
...
@@ -136,11 +136,11 @@ module Banzai
data
=
data_attribute
(
user:
namespace
.
owner_id
)
data
=
data_attribute
(
user:
namespace
.
owner_id
)
text
=
link_text
||
User
.
reference_prefix
+
user
text
=
link_text
||
User
.
reference_prefix
+
user
link_tag
(
url
,
data
,
text
)
link_tag
(
url
,
data
,
text
,
namespace
.
owner_name
)
end
end
def
link_tag
(
url
,
data
,
text
)
def
link_tag
(
url
,
data
,
text
,
title
)
%(<a href="#{url}" #{data} class="#{link_class}">#{escape_once(text)}</a>)
%(<a href="#{url}" #{data} class="#{link_class}"
title="#{escape_once(title)}"
>#{escape_once(text)}</a>)
end
end
end
end
end
end
...
...
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