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
iv
gitlab-ce
Commits
ac04665a
Commit
ac04665a
authored
Dec 03, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'show-cross-project-ref' into 'master'
Show cross project ref Fixes #1661 See merge request !1292
parents
03d1ee17
ed1c2256
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
0 deletions
+25
-0
app/assets/stylesheets/generic/issue_box.scss
app/assets/stylesheets/generic/issue_box.scss
+5
-0
app/helpers/gitlab_markdown_helper.rb
app/helpers/gitlab_markdown_helper.rb
+12
-0
app/views/projects/issues/show.html.haml
app/views/projects/issues/show.html.haml
+4
-0
app/views/projects/merge_requests/show/_mr_box.html.haml
app/views/projects/merge_requests/show/_mr_box.html.haml
+4
-0
No files found.
app/assets/stylesheets/generic/issue_box.scss
View file @
ac04665a
...
...
@@ -113,6 +113,11 @@
padding
:
10px
15px
;
}
.cross-project-ref
{
float
:
left
;
padding
:
10px
15px
;
}
.creator
{
float
:
right
;
padding
:
10px
15px
;
...
...
app/helpers/gitlab_markdown_helper.rb
View file @
ac04665a
...
...
@@ -254,4 +254,16 @@ module GitlabMarkdownHelper
truncated
end
end
def
cross_project_reference
(
project
,
entity
)
path
=
project
.
path_with_namespace
if
entity
.
kind_of?
(
Issue
)
[
path
,
entity
.
iid
].
join
(
'#'
)
elsif
entity
.
kind_of?
(
MergeRequest
)
[
path
,
entity
.
iid
].
join
(
'!'
)
else
raise
'Not supported type'
end
end
end
app/views/projects/issues/show.html.haml
View file @
ac04665a
...
...
@@ -38,6 +38,10 @@
-
else
Open
.cross-project-ref
%i
.fa.fa-link.has_tooltip
{
:"data-original-title"
=>
'Cross-project reference'
}
=
cross_project_reference
(
@project
,
@issue
)
.creator
Created by
#{
link_to_member
(
@project
,
@issue
.
author
)
}
#{
issue_timestamp
(
@issue
)
}
...
...
app/views/projects/merge_requests/show/_mr_box.html.haml
View file @
ac04665a
...
...
@@ -8,6 +8,10 @@
-
else
Open
.cross-project-ref
%i
.fa.fa-link.has_tooltip
{
:"data-original-title"
=>
'Cross-project reference'
}
=
cross_project_reference
(
@project
,
@merge_request
)
.creator
Created by
#{
link_to_member
(
@project
,
@merge_request
.
author
)
}
#{
time_ago_with_tooltip
(
@merge_request
.
created_at
)
}
...
...
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