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
f4c81aea
Commit
f4c81aea
authored
Feb 17, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Affix assignee/milestone block
parent
b8926183
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
162 additions
and
106 deletions
+162
-106
app/assets/javascripts/issue.js.coffee
app/assets/javascripts/issue.js.coffee
+6
-0
app/assets/javascripts/merge_request.js.coffee
app/assets/javascripts/merge_request.js.coffee
+6
-0
app/assets/stylesheets/sections/issuable.scss
app/assets/stylesheets/sections/issuable.scss
+25
-0
app/assets/stylesheets/sections/issues.scss
app/assets/stylesheets/sections/issues.scss
+9
-2
app/assets/stylesheets/sections/merge_requests.scss
app/assets/stylesheets/sections/merge_requests.scss
+8
-1
app/views/projects/issues/_discussion.html.haml
app/views/projects/issues/_discussion.html.haml
+20
-20
app/views/projects/issues/show.html.haml
app/views/projects/issues/show.html.haml
+36
-33
app/views/projects/merge_requests/_discussion.html.haml
app/views/projects/merge_requests/_discussion.html.haml
+19
-18
app/views/projects/merge_requests/_show.html.haml
app/views/projects/merge_requests/_show.html.haml
+33
-32
No files found.
app/assets/javascripts/issue.js.coffee
View file @
f4c81aea
...
...
@@ -15,3 +15,9 @@ class @Issue
"issue"
updateTaskState
)
$
(
'.issuable-affix'
).
affix
offset
:
top
:
->
@
top
=
$
(
'.issue-details'
).
outerHeight
(
true
)
+
25
bottom
:
->
@
bottom
=
$
(
'.footer'
).
outerHeight
(
true
)
app/assets/javascripts/merge_request.js.coffee
View file @
f4c81aea
...
...
@@ -20,6 +20,12 @@ class @MergeRequest
if
$
(
"a.btn-close"
).
length
$
(
"li.task-list-item input:checkbox"
).
prop
(
"disabled"
,
false
)
$
(
'.issuable-affix'
).
affix
offset
:
top
:
->
@
top
=
$
(
'.merge-request-details'
).
outerHeight
(
true
)
+
70
bottom
:
->
@
bottom
=
$
(
'.footer'
).
outerHeight
(
true
)
# Local jQuery finder
$
:
(
selector
)
->
this
.
$el
.
find
(
selector
)
...
...
app/assets/stylesheets/sections/issuable.scss
0 → 100644
View file @
f4c81aea
@media
(
max-width
:
$screen-sm-max
)
{
.issuable-affix
{
margin-top
:
20px
;
}
}
@media
(
max-width
:
$screen-md-max
)
{
.issuable-affix
{
position
:
static
;
}
}
@media
(
min-width
:
$screen-md-max
)
{
.issuable-affix
{
&
.affix-top
{
position
:
static
;
}
&
.affix
{
position
:
fixed
;
top
:
70px
;
width
:
220px
;
}
}
}
app/assets/stylesheets/sections/issues.scss
View file @
f4c81aea
...
...
@@ -94,8 +94,15 @@
}
}
.issue-show-labels
.color-label
{
padding
:
6px
10px
;
.issue-show-labels
{
a
{
margin-right
:
5px
;
margin-bottom
:
5px
;
display
:
inline-block
;
.color-label
{
padding
:
6px
10px
;
}
}
}
form
.edit-issue
{
...
...
app/assets/stylesheets/sections/merge_requests.scss
View file @
f4c81aea
...
...
@@ -95,7 +95,14 @@
color
:
#999
;
.merge-request-labels
{
display
:
inline-block
;
a
{
margin-right
:
5px
;
margin-bottom
:
5px
;
display
:
inline-block
;
.color-label
{
padding
:
6px
10px
;
}
}
}
}
}
...
...
app/views/projects/issues/_discussion.html.haml
View file @
f4c81aea
...
...
@@ -14,24 +14,24 @@
.voting_notes
#notes
=
render
"projects/notes/notes_with_form"
.col-md-3
%div
.clearfix
%span
.slead.has_tooltip
{
:"data-original-title"
=>
'Cross-project reference'
}
=
cross_project_reference
(
@project
,
@issue
)
%hr
.context
%cite
.cgray
=
render
partial:
'issue_context'
,
locals:
{
issue:
@issue
}
%hr
.clearfix
.votes-holder
%h6
Votes
#votes
=
render
'votes/votes_block'
,
votable:
@issue
-
if
@issue
.
labels
.
any?
.issuable-affix
.clearfix
%span
.slead.has_tooltip
{
:"data-original-title"
=>
'Cross-project reference'
}
=
cross_project_reference
(
@project
,
@issue
)
%hr
%h6
Labels
.issue-show-labels
-
@issue
.
labels
.
each
do
|
label
|
=
link_to
project_issues_path
(
@project
,
label_name:
label
.
name
)
do
%p
=
render_colored_label
(
label
)
.context
%cite
.cgray
=
render
partial:
'issue_context'
,
locals:
{
issue:
@issue
}
%hr
.clearfix
.votes-holder
%h6
Votes
#votes
=
render
'votes/votes_block'
,
votable:
@issue
-
if
@issue
.
labels
.
any?
%hr
%h6
Labels
.issue-show-labels
-
@issue
.
labels
.
each
do
|
label
|
=
link_to
project_issues_path
(
@project
,
label_name:
label
.
name
)
do
=
render_colored_label
(
label
)
app/views/projects/issues/show.html.haml
View file @
f4c81aea
%h4
.page-title
.issue-box
{
class:
issue_box_class
(
@issue
)
}
-
if
@issue
.
closed?
Closed
-
else
Open
Issue ##{@issue.iid}
%small
.creator
·
created by
#{
link_to_member
(
@project
,
@issue
.
author
)
}
#{
issue_timestamp
(
@issue
)
}
.issue
.issue-details
%h4
.page-title
.issue-box
{
class:
issue_box_class
(
@issue
)
}
-
if
@issue
.
closed?
Closed
-
else
Open
Issue ##{@issue.iid}
%small
.creator
·
created by
#{
link_to_member
(
@project
,
@issue
.
author
)
}
#{
issue_timestamp
(
@issue
)
}
.pull-right
-
if
can?
(
current_user
,
:write_issue
,
@project
)
=
link_to
new_project_issue_path
(
@project
),
class:
"btn btn-grouped new-issue-link"
,
title:
"New Issue"
,
id:
"new_issue_link"
do
%i
.fa.fa-plus
New Issue
-
if
can?
(
current_user
,
:modify_issue
,
@issue
)
-
if
@issue
.
closed?
=
link_to
'Reopen'
,
project_issue_path
(
@project
,
@issue
,
issue:
{
state_event: :reopen
},
status_only:
true
),
method: :put
,
class:
"btn btn-grouped btn-reopen"
-
else
=
link_to
'Close'
,
project_issue_path
(
@project
,
@issue
,
issue:
{
state_event: :close
},
status_only:
true
),
method: :put
,
class:
"btn btn-grouped btn-close"
,
title:
"Close Issue"
.pull-right
-
if
can?
(
current_user
,
:write_issue
,
@project
)
=
link_to
new_project_issue_path
(
@project
),
class:
"btn btn-grouped new-issue-link"
,
title:
"New Issue"
,
id:
"new_issue_link"
do
%i
.fa.fa-plus
New Issue
-
if
can?
(
current_user
,
:modify_issue
,
@issue
)
-
if
@issue
.
closed?
=
link_to
'Reopen'
,
project_issue_path
(
@project
,
@issue
,
issue:
{
state_event: :reopen
},
status_only:
true
),
method: :put
,
class:
"btn btn-grouped btn-reopen"
-
else
=
link_to
'Close'
,
project_issue_path
(
@project
,
@issue
,
issue:
{
state_event: :close
},
status_only:
true
),
method: :put
,
class:
"btn btn-grouped btn-close"
,
title:
"Close Issue"
=
link_to
edit_project_issue_path
(
@project
,
@issue
),
class:
"btn btn-grouped issuable-edit"
do
%i
.fa.fa-pencil-square-o
Edit
=
link_to
edit_project_issue_path
(
@project
,
@issue
),
class:
"btn btn-grouped issuable-edit"
do
%i
.fa.fa-pencil-square-o
Edit
%hr
%h3
.issue-title
=
gfm
escape_once
(
@issue
.
title
)
%div
-
if
@issue
.
description
.
present?
.description
.wiki
=
preserve
do
=
markdown
(
@issue
.
description
,
parse_tasks:
true
)
%hr
%h3
.issue-title
=
gfm
escape_once
(
@issue
.
title
)
%div
-
if
@issue
.
description
.
present?
.description
.wiki
=
preserve
do
=
markdown
(
@issue
.
description
,
parse_tasks:
true
)
%hr
=
render
"projects/issues/discussion"
%hr
.issue-discussion
=
render
"projects/issues/discussion"
app/views/projects/merge_requests/_discussion.html.haml
View file @
f4c81aea
...
...
@@ -10,22 +10,23 @@
=
render
"projects/merge_requests/show/participants"
=
render
"projects/notes/notes_with_form"
.col-md-3
.clearfix
%span
.slead.has_tooltip
{
:"data-original-title"
=>
'Cross-project reference'
}
=
cross_project_reference
(
@project
,
@merge_request
)
%hr
.context
%cite
.cgray
=
render
partial:
'projects/merge_requests/show/context'
,
locals:
{
merge_request:
@merge_request
}
%hr
.votes-holder
%h6
Votes
#votes
=
render
'votes/votes_block'
,
votable:
@merge_request
-
if
@merge_request
.
labels
.
any?
.issuable-affix
.clearfix
%span
.slead.has_tooltip
{
:"data-original-title"
=>
'Cross-project reference'
}
=
cross_project_reference
(
@project
,
@merge_request
)
%hr
.context
%cite
.cgray
=
render
partial:
'projects/merge_requests/show/context'
,
locals:
{
merge_request:
@merge_request
}
%hr
%h6
Labels
.merge-request-show-labels
-
@merge_request
.
labels
.
each
do
|
label
|
=
link_to
project_merge_requests_path
(
@project
,
label_name:
label
.
name
)
do
%p
=
render_colored_label
(
label
)
.votes-holder
%h6
Votes
#votes
=
render
'votes/votes_block'
,
votable:
@merge_request
-
if
@merge_request
.
labels
.
any?
%hr
%h6
Labels
.merge-request-show-labels
-
@merge_request
.
labels
.
each
do
|
label
|
=
link_to
project_merge_requests_path
(
@project
,
label_name:
label
.
name
)
do
=
render_colored_label
(
label
)
app/views/projects/merge_requests/_show.html.haml
View file @
f4c81aea
.merge-request
{
'data-url'
=>
project_merge_request_path
(
@project
,
@merge_request
)}
=
render
"projects/merge_requests/show/mr_title"
%hr
=
render
"projects/merge_requests/show/mr_box"
%hr
.append-bottom-20
.slead
%span
From
-
if
@merge_request
.
for_fork?
%strong
.label-branch
<
-
if
@merge_request
.
source_project
=
link_to
@merge_request
.
source_project_namespace
,
project_path
(
@merge_request
.
source_project
)
-
else
\
#{
@merge_request
.
source_project_namespace
}
\
:
#{
@merge_request
.
source_branch
}
%span
into
%strong
.label-branch
#{
@merge_request
.
target_project_namespace
}
:
#{
@merge_request
.
target_branch
}
-
else
%strong
.label-branch
#{
@merge_request
.
source_branch
}
%span
into
%strong
.label-branch
#{
@merge_request
.
target_branch
}
-
if
@merge_request
.
open?
%span
.pull-right
.btn-group
%a
.btn.dropdown-toggle
{
data:
{
toggle: :dropdown
}
}
%i
.fa.fa-download
Download
as
%span
.caret
%ul
.dropdown-menu
%li
=
link_to
"Email Patches"
,
project_merge_request_path
(
@project
,
@merge_request
,
format: :patch
)
%li
=
link_to
"Plain Diff"
,
project_merge_request_path
(
@project
,
@merge_request
,
format: :diff
)
.merge-request-details
=
render
"projects/merge_requests/show/mr_title"
%hr
=
render
"projects/merge_requests/show/mr_box"
%hr
.append-bottom-20
.slead
%span
From
-
if
@merge_request
.
for_fork?
%strong
.label-branch
<
-
if
@merge_request
.
source_project
=
link_to
@merge_request
.
source_project_namespace
,
project_path
(
@merge_request
.
source_project
)
-
else
\
#{
@merge_request
.
source_project_namespace
}
\
:
#{
@merge_request
.
source_branch
}
%span
into
%strong
.label-branch
#{
@merge_request
.
target_project_namespace
}
:
#{
@merge_request
.
target_branch
}
-
else
%strong
.label-branch
#{
@merge_request
.
source_branch
}
%span
into
%strong
.label-branch
#{
@merge_request
.
target_branch
}
-
if
@merge_request
.
open?
%span
.pull-right
.btn-group
%a
.btn.dropdown-toggle
{
data:
{
toggle: :dropdown
}
}
%i
.fa.fa-download
Download
as
%span
.caret
%ul
.dropdown-menu
%li
=
link_to
"Email Patches"
,
project_merge_request_path
(
@project
,
@merge_request
,
format: :patch
)
%li
=
link_to
"Plain Diff"
,
project_merge_request_path
(
@project
,
@merge_request
,
format: :diff
)
=
render
"projects/merge_requests/show/how_to_merge"
=
render
"projects/merge_requests/show/state_widget"
=
render
"projects/merge_requests/show/how_to_merge"
=
render
"projects/merge_requests/show/state_widget"
-
if
@commits
.
present?
%ul
.nav.nav-tabs.merge-request-tabs
...
...
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