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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
b667a459
Commit
b667a459
authored
Dec 18, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restyle issue/mr/milestone to new layout
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
c0d589de
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
256 additions
and
380 deletions
+256
-380
app/assets/stylesheets/generic/issue_box.scss
app/assets/stylesheets/generic/issue_box.scss
+11
-109
app/assets/stylesheets/sections/issues.scss
app/assets/stylesheets/sections/issues.scss
+4
-0
app/assets/stylesheets/sections/votes.scss
app/assets/stylesheets/sections/votes.scss
+0
-10
app/views/projects/issues/_issue_context.html.haml
app/views/projects/issues/_issue_context.html.haml
+21
-22
app/views/projects/issues/show.html.haml
app/views/projects/issues/show.html.haml
+60
-74
app/views/projects/merge_requests/_show.html.haml
app/views/projects/merge_requests/_show.html.haml
+82
-30
app/views/projects/merge_requests/show/_context.html.haml
app/views/projects/merge_requests/show/_context.html.haml
+20
-21
app/views/projects/merge_requests/show/_mr_box.html.haml
app/views/projects/merge_requests/show/_mr_box.html.haml
+3
-23
app/views/projects/merge_requests/show/_mr_title.html.haml
app/views/projects/merge_requests/show/_mr_title.html.haml
+9
-43
app/views/projects/milestones/show.html.haml
app/views/projects/milestones/show.html.haml
+46
-48
No files found.
app/assets/stylesheets/generic/issue_box.scss
View file @
b667a459
/**
/**
* Issue box:
* Issue box for showing Open/Closed state:
* Huge block (one per page) for storing title, descripion and other information.
* Used for Issue#show page, MergeRequest#show page etc
* Used for Issue#show page, MergeRequest#show page etc
*
*
* CLasses:
* .issue-box - Regular box
*/
*/
.issue-box
{
.issue-box
{
color
:
#555
;
display
:
inline-block
;
margin
:
20px
0
;
padding
:
0
10px
;
background
:
$box_bg
;
@include
box-shadow
(
0
1px
1px
rgba
(
0
,
0
,
0
,
0
.09
));
&
.issue-box-closed
{
&
.issue-box-closed
{
.state
{
background-color
:
$bg_danger
;
background-color
:
#F3CECE
;
color
:
#FFF
;
border-color
:
$border_danger
;
}
.state-label
{
background-color
:
$bg_danger
;
color
:
#FFF
;
}
}
}
&
.issue-box-merged
{
&
.issue-box-merged
{
.state
{
background-color
:
$bg_primary
;
background-color
:
#B7CEE7
;
color
:
#FFF
;
border-color
:
$border_primary
;
}
.state-label
{
background-color
:
$bg_primary
;
color
:
#FFF
;
}
}
}
&
.issue-box-open
{
&
.issue-box-open
{
.state
{
background-color
:
$bg_success
;
background-color
:
#D6F1D7
;
color
:
#FFF
;
border-color
:
$bg_success
;
}
.state-label
{
background-color
:
$bg_success
;
color
:
#FFF
;
}
}
}
&
.issue-box-expired
{
&
.issue-box-expired
{
.state
{
background
:
#cea61b
;
background-color
:
#EEE9B3
;
color
:
#FFF
;
border-color
:
#faebcc
;
}
.state-label
{
background
:
#cea61b
;
color
:
#FFF
;
}
}
.control-group
{
margin-bottom
:
0
;
}
.state
{
background-color
:
#f9f9f9
;
}
.title
{
font-size
:
28px
;
font-weight
:
normal
;
line-height
:
1
.5
;
margin
:
0
;
color
:
#333
;
padding
:
10px
15px
;
}
.context
{
border
:
none
;
border-top
:
1px
solid
#eee
;
padding
:
10px
15px
;
// Reset text align for children
.text-right
>
*
{
text-align
:
left
;
}
@media
(
max-width
:
$screen-xs-max
)
{
// Don't right align on mobile
.text-right
{
text-align
:
left
;
}
.row
.col-md-6
{
padding-top
:
5px
;
}
}
}
.description
{
padding
:
0
15px
10px
15px
;
code
{
white-space
:
pre-wrap
;
}
}
.title
,
.context
,
.description
{
.clearfix
{
margin
:
0
;
}
}
.state-label
{
font-size
:
14px
;
float
:
left
;
font-weight
:
bold
;
padding
:
10px
15px
;
}
.cross-project-ref
{
float
:
left
;
padding
:
10px
15px
;
}
.creator
{
float
:
right
;
padding
:
10px
15px
;
a
{
text-decoration
:
underline
;
}
}
}
}
}
app/assets/stylesheets/sections/issues.scss
View file @
b667a459
...
@@ -162,3 +162,7 @@ form.edit-issue {
...
@@ -162,3 +162,7 @@ form.edit-issue {
}
}
}
}
}
}
.issue-title
{
margin-top
:
0
;
}
app/assets/stylesheets/sections/votes.scss
View file @
b667a459
...
@@ -37,13 +37,3 @@
...
@@ -37,13 +37,3 @@
margin
:
0
8px
;
margin
:
0
8px
;
}
}
.votes-holder
{
float
:
right
;
width
:
250px
;
@media
(
max-width
:
$screen-xs-max
)
{
width
:
100%
;
margin-top
:
5px
;
margin-bottom
:
10px
;
}
}
app/views/projects/issues/_issue_context.html.haml
View file @
b667a459
=
form_for
[
@project
,
@issue
],
remote:
true
,
html:
{
class:
'edit-issue inline-update'
}
do
|
f
|
=
form_for
[
@project
,
@issue
],
remote:
true
,
html:
{
class:
'edit-issue inline-update'
}
do
|
f
|
.row
%div
.prepend-top-20
.col-sm-6
%strong
%strong
.append-right-10
Assignee:
Assignee:
-
if
can?
(
current_user
,
:modify_issue
,
@issue
)
-
if
can?
(
current_user
,
:modify_issue
,
@issue
)
=
project_users_select_tag
(
'issue[assignee_id]'
,
placeholder:
'Select assignee'
,
class:
'custom-form-control js-select2 js-assignee'
,
selected:
@issue
.
assignee_id
)
=
project_users_select_tag
(
'issue[assignee_id]'
,
placeholder:
'Select assignee'
,
class:
'custom-form-control js-select2 js-assignee'
,
selected:
@issue
.
assignee_id
)
-
elsif
issue
.
assignee
-
elsif
issue
.
assignee
=
link_to_member
(
@project
,
@issue
.
assignee
)
=
link_to_member
(
@project
,
@issue
.
assignee
)
-
else
-
else
None
None
.col-sm-6.text-right
%div
.prepend-top-20
%strong
.append-right-10
%strong
Milestone:
Milestone:
-
if
can?
(
current_user
,
:modify_issue
,
@issue
)
-
if
can?
(
current_user
,
:modify_issue
,
@issue
)
=
f
.
select
(
:milestone_id
,
milestone_options
(
@issue
),
{
include_blank:
"Select milestone"
},
{
class:
'select2 select2-compact js-select2 js-milestone'
})
=
f
.
select
(
:milestone_id
,
milestone_options
(
@issue
),
{
include_blank:
"Select milestone"
},
{
class:
'select2 select2-compact js-select2 js-milestone'
})
=
hidden_field_tag
:issue_context
=
hidden_field_tag
:issue_context
=
f
.
submit
class:
'btn'
=
f
.
submit
class:
'btn'
-
elsif
issue
.
milestone
-
elsif
issue
.
milestone
=
link_to
project_milestone_path
(
@project
,
@issue
.
milestone
)
do
=
link_to
project_milestone_path
(
@project
,
@issue
.
milestone
)
do
=
@issue
.
milestone
.
title
=
@issue
.
milestone
.
title
-
else
-
else
None
None
app/views/projects/issues/show.html.haml
View file @
b667a459
%h3
.page-title
%h3
.page-title
Issue ##{@issue.iid}
.issue-box
{
class:
issue_box_class
(
@issue
)
}
%span
.pull-right.issue-btn-group
-
if
can?
(
current_user
,
:write_issue
,
@project
)
=
link_to
new_project_issue_path
(
@project
),
class:
"btn btn-grouped"
,
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"
do
%i
.fa.fa-pencil-square-o
Edit
.clearfix
.votes-holder
#votes
=
render
'votes/votes_block'
,
votable:
@issue
.back-link
=
link_to
project_issues_path
(
@project
)
do
←
To issues list
%span
.milestone-nav-link
-
if
@issue
.
milestone
|
%span
.light
Milestone
=
link_to
project_milestone_path
(
@project
,
@issue
.
milestone
)
do
=
@issue
.
milestone
.
title
.issue-box
{
class:
issue_box_class
(
@issue
)
}
.state.clearfix
.state-label
-
if
@issue
.
closed?
Closed
-
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
)
}
%h4
.title
=
gfm
escape_once
(
@issue
.
title
)
-
if
@issue
.
description
.
present?
.description
.wiki
=
preserve
do
=
markdown
(
@issue
.
description
,
parse_tasks:
true
)
.context
%cite
.cgray
=
render
partial:
'issue_context'
,
locals:
{
issue:
@issue
}
-
content_for
:note_actions
do
-
if
can?
(
current_user
,
:modify_issue
,
@issue
)
-
if
@issue
.
closed?
-
if
@issue
.
closed?
=
link_to
'Reopen Issue'
,
project_issue_path
(
@project
,
@issue
,
issue:
{
state_event: :reopen
},
status_only:
true
),
method: :put
,
class:
"btn btn-grouped btn-reopen js-note-target-reopen"
,
title:
'Reopen Issue'
Closed
-
else
-
else
=
link_to
'Close Issue'
,
project_issue_path
(
@project
,
@issue
,
issue:
{
state_event: :close
},
status_only:
true
),
method: :put
,
class:
"btn btn-grouped btn-close js-note-target-close"
,
title:
"Close Issue"
Open
Issue ##{@issue.iid}
.participants
.pull-right.creator
%cite
.cgray
%small
Created by
#{
link_to_member
(
@project
,
@issue
.
author
)
}
#{
issue_timestamp
(
@issue
)
}
=
pluralize
(
@issue
.
participants
.
count
,
'participant'
)
%hr
-
@issue
.
participants
.
each
do
|
participant
|
.row
=
link_to_member
(
@project
,
participant
,
name:
false
,
size:
24
)
.col-sm-9
%h3
.issue-title
=
gfm
escape_once
(
@issue
.
title
)
%div
-
if
@issue
.
description
.
present?
.description
.wiki
=
preserve
do
=
markdown
(
@issue
.
description
,
parse_tasks:
true
)
%hr
-
content_for
:note_actions
do
-
if
can?
(
current_user
,
:modify_issue
,
@issue
)
-
if
@issue
.
closed?
=
link_to
'Reopen Issue'
,
project_issue_path
(
@project
,
@issue
,
issue:
{
state_event: :reopen
},
status_only:
true
),
method: :put
,
class:
"btn btn-grouped btn-reopen js-note-target-reopen"
,
title:
'Reopen Issue'
-
else
=
link_to
'Close Issue'
,
project_issue_path
(
@project
,
@issue
,
issue:
{
state_event: :close
},
status_only:
true
),
method: :put
,
class:
"btn btn-grouped btn-close js-note-target-close"
,
title:
"Close Issue"
.participants
%cite
.cgray
=
pluralize
(
@issue
.
participants
.
count
,
'participant'
)
-
@issue
.
participants
.
each
do
|
participant
|
=
link_to_member
(
@project
,
participant
,
name:
false
,
size:
24
)
.issue-show-labels.pull-right
-
@issue
.
labels
.
each
do
|
label
|
=
link_to
project_issues_path
(
@project
,
label_name:
label
.
name
)
do
=
render_colored_label
(
label
)
.issue-show-labels.pull-right
.voting_notes
#notes
=
render
"projects/notes/notes_with_form"
-
@issue
.
labels
.
each
do
|
label
|
.col-sm-3
=
link_to
project_issues_path
(
@project
,
label_name:
label
.
name
)
do
%div
=
render_colored_label
(
label
)
-
if
can?
(
current_user
,
:write_issue
,
@project
)
=
link_to
new_project_issue_path
(
@project
),
class:
"btn btn-block"
,
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-block btn-reopen"
-
else
=
link_to
'Close'
,
project_issue_path
(
@project
,
@issue
,
issue:
{
state_event: :close
},
status_only:
true
),
method: :put
,
class:
"btn btn-block btn-close"
,
title:
"Close Issue"
.voting_notes
#notes
=
render
"projects/notes/notes_with_form"
=
link_to
edit_project_issue_path
(
@project
,
@issue
),
class:
"btn btn-block"
do
%i
.fa.fa-pencil-square-o
Edit
.clearfix
%span
.slead.has_tooltip
{
:"data-original-title"
=>
'Cross-project reference'
}
=
cross_project_reference
(
@project
,
@issue
)
%hr
.clearfix
.votes-holder
%h6
Votes
#votes
=
render
'votes/votes_block'
,
votable:
@issue
%hr
.context
%cite
.cgray
=
render
partial:
'issue_context'
,
locals:
{
issue:
@issue
}
app/views/projects/merge_requests/_show.html.haml
View file @
b667a459
.merge-request
.merge-request
=
render
"projects/merge_requests/show/mr_title"
=
render
"projects/merge_requests/show/mr_title"
=
render
"projects/merge_requests/show/how_to_merge"
%hr
=
render
"projects/merge_requests/show/mr_box"
.row
=
render
"projects/merge_requests/show/state_widget"
.col-sm-9
=
render
"projects/merge_requests/show/commits"
=
render
"projects/merge_requests/show/how_to_merge"
=
render
"projects/merge_requests/show/participants"
=
render
"projects/merge_requests/show/mr_box"
%hr
.append-bottom-20
%p
.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
}
=
render
"projects/merge_requests/show/state_widget"
=
render
"projects/merge_requests/show/commits"
=
render
"projects/merge_requests/show/participants"
-
if
@commits
.
present?
-
if
@commits
.
present?
%ul
.nav.nav-pills.merge-request-tabs
%ul
.nav.nav-pills.merge-request-tabs
%li
.notes-tab
{
data:
{
action:
'notes'
}}
%li
.notes-tab
{
data:
{
action:
'notes'
}}
=
link_to
project_merge_request_path
(
@project
,
@merge_request
)
do
=
link_to
project_merge_request_path
(
@project
,
@merge_request
)
do
%i
.fa.fa-comment
%i
.fa.fa-comment
Discussion
Discussion
%span
.badge
=
@merge_request
.
mr_and_commit_notes
.
count
%span
.badge
=
@merge_request
.
mr_and_commit_notes
.
count
%li
.diffs-tab
{
data:
{
action:
'diffs'
}}
%li
.diffs-tab
{
data:
{
action:
'diffs'
}}
=
link_to
diffs_project_merge_request_path
(
@project
,
@merge_request
)
do
=
link_to
diffs_project_merge_request_path
(
@project
,
@merge_request
)
do
%i
.fa.fa-list-alt
%i
.fa.fa-list-alt
Changes
Changes
%span
.badge
=
@merge_request
.
diffs
.
size
%span
.badge
=
@merge_request
.
diffs
.
size
-
content_for
:note_actions
do
-
if
can?
(
current_user
,
:modify_merge_request
,
@merge_request
)
-
if
@merge_request
.
open?
=
link_to
'Close'
,
project_merge_request_path
(
@project
,
@merge_request
,
merge_request:
{
state_event: :close
}),
method: :put
,
class:
"btn btn-grouped btn-close close-mr-link js-note-target-close"
,
title:
"Close merge request"
-
if
@merge_request
.
closed?
=
link_to
'Reopen'
,
project_merge_request_path
(
@project
,
@merge_request
,
merge_request:
{
state_event: :reopen
}),
method: :put
,
class:
"btn btn-grouped btn-reopen reopen-mr-link js-note-target-reopen"
,
title:
"Reopen merge request"
.diffs.tab-content
-
if
current_page?
(
action:
'diffs'
)
=
render
"projects/merge_requests/show/diffs"
.notes.tab-content.voting_notes
#notes
{
class:
(
controller
.
action_name
==
'show'
)
?
""
:
"hide"
}
=
render
"projects/notes/notes_with_form"
.mr-loading-status
=
spinner
.col-sm-3
.issue-btn-group
-
if
can?
(
current_user
,
:modify_merge_request
,
@merge_request
)
-
if
@merge_request
.
open?
.btn-group-justified.append-bottom-20
.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
)
=
link_to
'Close'
,
project_merge_request_path
(
@project
,
@merge_request
,
merge_request:
{
state_event: :close
}),
method: :put
,
class:
"btn btn-block btn-close"
,
title:
"Close merge request"
=
link_to
edit_project_merge_request_path
(
@project
,
@merge_request
),
class:
"btn btn-block"
,
id
:"edit_merge_request"
do
%i
.fa.fa-pencil-square-o
Edit
-
if
@merge_request
.
closed?
=
link_to
'Reopen'
,
project_merge_request_path
(
@project
,
@merge_request
,
merge_request:
{
state_event: :reopen
}),
method: :put
,
class:
"btn btn-block btn-reopen reopen-mr-link"
,
title:
"Close merge request"
.clearfix
%span
.slead.has_tooltip
{
:"data-original-title"
=>
'Cross-project reference'
}
=
cross_project_reference
(
@project
,
@merge_request
)
%hr
.votes-holder.hidden-sm.hidden-xs
%h6
Votes
#votes
=
render
'votes/votes_block'
,
votable:
@merge_request
%hr
.context
%cite
.cgray
=
render
partial:
'projects/merge_requests/show/context'
,
locals:
{
merge_request:
@merge_request
}
-
content_for
:note_actions
do
-
if
can?
(
current_user
,
:modify_merge_request
,
@merge_request
)
-
if
@merge_request
.
open?
=
link_to
'Close'
,
project_merge_request_path
(
@project
,
@merge_request
,
merge_request:
{
state_event: :close
}),
method: :put
,
class:
"btn btn-grouped btn-close close-mr-link js-note-target-close"
,
title:
"Close merge request"
-
if
@merge_request
.
closed?
=
link_to
'Reopen'
,
project_merge_request_path
(
@project
,
@merge_request
,
merge_request:
{
state_event: :reopen
}),
method: :put
,
class:
"btn btn-grouped btn-reopen reopen-mr-link js-note-target-reopen"
,
title:
"Reopen merge request"
.diffs.tab-content
-
if
current_page?
(
action:
'diffs'
)
=
render
"projects/merge_requests/show/diffs"
.notes.tab-content.voting_notes
#notes
{
class:
(
controller
.
action_name
==
'show'
)
?
""
:
"hide"
}
=
render
"projects/notes/notes_with_form"
.mr-loading-status
=
spinner
:javascript
:javascript
var
merge_request
;
var
merge_request
;
...
...
app/views/projects/merge_requests/show/_context.html.haml
View file @
b667a459
=
form_for
[
@project
,
@merge_request
],
remote:
true
,
html:
{
class:
'edit-merge_request inline-update'
}
do
|
f
|
=
form_for
[
@project
,
@merge_request
],
remote:
true
,
html:
{
class:
'edit-merge_request inline-update'
}
do
|
f
|
.row
%div
.prepend-top-20
.col-sm-6
%strong
%strong
.append-right-10
Assignee:
Assignee:
-
if
can?
(
current_user
,
:modify_merge_request
,
@merge_request
)
-
if
can?
(
current_user
,
:modify_merge_request
,
@merge_request
)
=
project_users_select_tag
(
'merge_request[assignee_id]'
,
placeholder:
'Select assignee'
,
class:
'custom-form-control js-select2 js-assignee'
,
selected:
@merge_request
.
assignee_id
)
=
project_users_select_tag
(
'merge_request[assignee_id]'
,
placeholder:
'Select assignee'
,
class:
'custom-form-control js-select2 js-assignee'
,
selected:
@merge_request
.
assignee_id
)
-
elsif
merge_request
.
assignee
-
elsif
merge_request
.
assignee
=
link_to_member
(
@project
,
@merge_request
.
assignee
)
=
link_to_member
(
@project
,
@merge_request
.
assignee
)
-
else
-
else
None
None
.col-sm-6.text-right
%div
.prepend-top-20
%strong
.append-right-10
%strong
Milestone:
Milestone:
-
if
can?
(
current_user
,
:modify_merge_request
,
@merge_request
)
-
if
can?
(
current_user
,
:modify_merge_request
,
@merge_request
)
=
f
.
select
(
:milestone_id
,
milestone_options
(
@merge_request
),
{
include_blank:
"Select milestone"
},
{
class:
'select2 select2-compact js-select2 js-milestone'
})
=
f
.
select
(
:milestone_id
,
milestone_options
(
@merge_request
),
{
include_blank:
"Select milestone"
},
{
class:
'select2 select2-compact js-select2 js-milestone'
})
=
hidden_field_tag
:merge_request_context
=
hidden_field_tag
:merge_request_context
=
f
.
submit
class:
'btn'
=
f
.
submit
class:
'btn'
-
elsif
merge_request
.
milestone
-
elsif
merge_request
.
milestone
=
link_to
merge_request
.
milestone
.
title
,
project_milestone_path
=
link_to
merge_request
.
milestone
.
title
,
project_milestone_path
-
else
-
else
None
None
app/views/projects/merge_requests/show/_mr_box.html.haml
View file @
b667a459
.issue-box
{
class:
issue_box_class
(
@merge_request
)
}
%h3
.issue-title
.state.clearfix
=
gfm
escape_once
(
@merge_request
.
title
)
.state-label
-
if
@merge_request
.
merged?
Merged
-
elsif
@merge_request
.
closed?
Closed
-
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
)
}
%h4
.title
=
gfm
escape_once
(
@merge_request
.
title
)
%div
-
if
@merge_request
.
description
.
present?
-
if
@merge_request
.
description
.
present?
.description
.description
.wiki
.wiki
=
preserve
do
=
preserve
do
=
markdown
(
@merge_request
.
description
,
parse_tasks:
true
)
=
markdown
(
@merge_request
.
description
,
parse_tasks:
true
)
.context
%cite
.cgray
=
render
partial:
'projects/merge_requests/show/context'
,
locals:
{
merge_request:
@merge_request
}
app/views/projects/merge_requests/show/_mr_title.html.haml
View file @
b667a459
%h3
.page-title
%h3
.page-title
=
"Merge Request #
#{
@merge_request
.
iid
}
"
.issue-box
{
class:
issue_box_class
(
@merge_request
)
}
-
if
@merge_request
.
merged?
%span
.pull-right.issue-btn-group
Merged
-
if
can?
(
current_user
,
:modify_merge_request
,
@merge_request
)
-
elsif
@merge_request
.
closed?
-
if
@merge_request
.
open?
Closed
.btn-group.pull-left
%a
.btn.btn-grouped.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
)
=
link_to
'Close'
,
project_merge_request_path
(
@project
,
@merge_request
,
merge_request:
{
state_event: :close
}),
method: :put
,
class:
"btn btn-grouped btn-close"
,
title:
"Close merge request"
=
link_to
edit_project_merge_request_path
(
@project
,
@merge_request
),
class:
"btn btn-grouped"
,
id
:"edit_merge_request"
do
%i
.fa.fa-pencil-square-o
Edit
-
if
@merge_request
.
closed?
=
link_to
'Reopen'
,
project_merge_request_path
(
@project
,
@merge_request
,
merge_request:
{
state_event: :reopen
}),
method: :put
,
class:
"btn btn-grouped btn-reopen reopen-mr-link"
,
title:
"Close merge request"
.votes-holder.hidden-sm.hidden-xs
#votes
=
render
'votes/votes_block'
,
votable:
@merge_request
.back-link
=
link_to
project_merge_requests_path
(
@project
)
do
←
To merge requests
%span
.prepend-left-20
%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
-
else
%strong
.label-branch
#{
@merge_request
.
source_branch
}
Open
%span
into
=
"Merge Request #
#{
@merge_request
.
iid
}
"
%strong
.label-branch
#{
@merge_request
.
target_branch
}
.pull-right.creator
%small
Created by
#{
link_to_member
(
@project
,
@merge_request
.
author
)
}
#{
time_ago_with_tooltip
(
@merge_request
.
created_at
)
}
app/views/projects/milestones/show.html.haml
View file @
b667a459
=
render
"projects/issues_nav"
=
render
"projects/issues_nav"
%h3
.page-title
%h3
.page-title
.issue-box
{
class:
issue_box_class
(
@milestone
)
}
-
if
@milestone
.
closed?
Closed
-
elsif
@milestone
.
expired?
Expired
-
else
Open
Milestone ##{@milestone.iid}
Milestone ##{@milestone.iid}
.pull-right
.pull-right.creator
-
if
can?
(
current_user
,
:admin_milestone
,
@project
)
%small
=
@milestone
.
expires_at
=
link_to
edit_project_milestone_path
(
@project
,
@milestone
),
class:
"btn btn-grouped"
do
%i
.fa.fa-pencil-square-o
Edit
-
if
@milestone
.
active?
=
link_to
'Close Milestone'
,
project_milestone_path
(
@project
,
@milestone
,
milestone:
{
state_event: :close
}),
method: :put
,
class:
"btn btn-close btn-grouped"
-
else
=
link_to
'Reopen Milestone'
,
project_milestone_path
(
@project
,
@milestone
,
milestone:
{
state_event: :activate
}),
method: :put
,
class:
"btn btn-reopen btn-grouped"
%hr
-
if
@milestone
.
issues
.
any?
&&
@milestone
.
can_be_closed?
-
if
@milestone
.
issues
.
any?
&&
@milestone
.
can_be_closed?
.alert.alert-success
.alert.alert-success
%span
All issues for this milestone are closed. You may close milestone now.
%span
All issues for this milestone are closed. You may close milestone now.
.row
.col-sm-9
%h3
.issue-title
=
gfm
escape_once
(
@milestone
.
title
)
%div
-
if
@milestone
.
description
.
present?
.description
.wiki
=
preserve
do
=
markdown
@milestone
.
description
.back-link
%hr
=
link_to
project_milestones_path
(
@project
)
do
.context
←
To milestones list
%p
.lead
Progress:
#{
@milestone
.
closed_items_count
}
closed
.issue-box
{
class:
issue_box_class
(
@milestone
)
}
–
.state.clearfix
#{
@milestone
.
open_items_count
}
open
.state-label
-
if
@milestone
.
closed?
%span
.light
#{
@milestone
.
percent_complete
}
% complete
Closed
%span
.pull-right
=
@milestone
.
expires_at
-
elsif
@milestone
.
expired?
.progress.progress-info
Expired
.progress-bar
{
style:
"width: #{@milestone.percent_complete}%;"
}
-
else
Open
.creator
=
@milestone
.
expires_at
%h4
.title
=
gfm
escape_once
(
@milestone
.
title
)
-
if
@milestone
.
description
.
present?
.col-sm-3
.description
%div
.wiki
-
if
can?
(
current_user
,
:admin_milestone
,
@project
)
=
preserve
do
=
link_to
edit_project_milestone_path
(
@project
,
@milestone
),
class:
"btn btn-block"
do
=
markdown
@milestone
.
description
%i
.fa.fa-pencil-square-o
Edit
-
if
@milestone
.
active?
=
link_to
'Close Milestone'
,
project_milestone_path
(
@project
,
@milestone
,
milestone:
{
state_event: :close
}),
method: :put
,
class:
"btn btn-close btn-block"
-
else
=
link_to
'Reopen Milestone'
,
project_milestone_path
(
@project
,
@milestone
,
milestone:
{
state_event: :activate
}),
method: :put
,
class:
"btn btn-reopen btn-block"
=
link_to
new_project_issue_path
(
@project
,
issue:
{
milestone_id:
@milestone
.
id
}),
class:
"btn btn-block"
,
title:
"New Issue"
do
%i
.fa.fa-plus
New Issue
=
link_to
'Browse Issues'
,
project_issues_path
(
@milestone
.
project
,
milestone_id:
@milestone
.
id
),
class:
"btn edit-milestone-link btn-block"
.context
%p
Progress:
#{
@milestone
.
closed_items_count
}
closed
–
#{
@milestone
.
open_items_count
}
open
%span
.light
#{
@milestone
.
percent_complete
}
% complete
%span
.pull-right
=
@milestone
.
expires_at
.progress.progress-info
.progress-bar
{
style:
"width: #{@milestone.percent_complete}%;"
}
%ul
.nav.nav-tabs
%ul
.nav.nav-tabs
...
@@ -69,10 +71,6 @@
...
@@ -69,10 +71,6 @@
%span
.badge
=
@users
.
count
%span
.badge
=
@users
.
count
.pull-right
.pull-right
=
link_to
new_project_issue_path
(
@project
,
issue:
{
milestone_id:
@milestone
.
id
}),
class:
"btn btn-small btn-grouped"
,
title:
"New Issue"
do
%i
.fa.fa-plus
New Issue
=
link_to
'Browse Issues'
,
project_issues_path
(
@milestone
.
project
,
milestone_id:
@milestone
.
id
),
class:
"btn btn-small edit-milestone-link btn-grouped"
.tab-content
.tab-content
.tab-pane.active
#tab-issues
.tab-pane.active
#tab-issues
...
...
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