BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
c0220198
Commit
c0220198
authored
Jan 12, 2016
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removing last chunk of MR ajax changes, rest will be in another MR
parent
63363e47
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
5 deletions
+17
-5
merge_request.rb
app/models/merge_request.rb
+10
-0
_discussion.html.haml
app/views/projects/issues/_discussion.html.haml
+4
-2
_closed.html.haml
app/views/projects/merge_requests/widget/_closed.html.haml
+1
-1
_locked.html.haml
app/views/projects/merge_requests/widget/_locked.html.haml
+1
-1
_merged.html.haml
app/views/projects/merge_requests/widget/_merged.html.haml
+1
-1
No files found.
app/models/merge_request.rb
View file @
c0220198
...
...
@@ -466,6 +466,16 @@ class MergeRequest < ActiveRecord::Base
::
Gitlab
::
GitAccess
.
new
(
user
,
project
).
can_push_to_branch?
(
target_branch
)
end
def
state_human_name
if
merged?
"Merged"
elsif
closed?
"Closed"
else
"Open"
end
end
def
target_sha
@target_sha
||=
target_project
.
repository
.
commit
(
target_branch
).
sha
...
...
app/views/projects/issues/_discussion.html.haml
View file @
c0220198
-
content_for
:note_actions
do
-
if
can?
(
current_user
,
:update_issue
,
@issue
)
=
link_to
'Reopen Issue'
,
issue_path
(
@issue
,
issue:
{
state_event: :reopen
},
status_only:
true
,
format:
'json'
),
data:
{
no_turbolink:
true
},
class:
"btn btn-nr btn-grouped btn-reopen btn-comment js-note-target-reopen
#{
issue_button_visibility
(
@issue
,
false
)
}
"
,
title:
'Reopen Issue'
=
link_to
'Close Issue'
,
issue_path
(
@issue
,
issue:
{
state_event: :close
},
status_only:
true
,
format:
'json'
),
data:
{
no_turbolink:
true
},
class:
"btn btn-nr btn-grouped btn-close btn-comment js-note-target-close
#{
issue_button_visibility
(
@issue
,
true
)
}
"
,
title:
'Close Issue'
-
if
@issue
.
closed?
=
link_to
'Reopen Issue'
,
issue_path
(
@issue
,
issue:
{
state_event: :reopen
},
status_only:
true
),
method: :put
,
class:
'btn btn-nr btn-grouped btn-reopen js-note-target-reopen'
,
title:
'Reopen Issue'
-
else
=
link_to
'Close Issue'
,
issue_path
(
@issue
,
issue:
{
state_event: :close
},
status_only:
true
),
method: :put
,
class:
'btn btn-nr btn-grouped btn-close js-note-target-close'
,
title:
'Close Issue'
#notes
=
render
'projects/notes/notes_with_form'
app/views/projects/merge_requests/widget/_closed.html.haml
View file @
c0220198
.mr-state-widget
.mr-state-widget-closed
{
class:
merge_request_widget_visibility
(
@merge_request
,
'closed'
)}
.mr-state-widget
=
render
'projects/merge_requests/widget/heading'
.mr-widget-body
%h4
...
...
app/views/projects/merge_requests/widget/_locked.html.haml
View file @
c0220198
.mr-state-widget
.mr-state-widget-locked
{
class:
merge_request_widget_visibility
(
@merge_request
,
'locked'
)}
.mr-state-widget
=
render
'projects/merge_requests/widget/heading'
.mr-widget-body
%h4
...
...
app/views/projects/merge_requests/widget/_merged.html.haml
View file @
c0220198
.mr-state-widget
.mr-state-widget-merged
{
class:
merge_request_widget_visibility
(
@merge_request
,
'merged'
)}
.mr-state-widget
=
render
'projects/merge_requests/widget/heading'
.mr-widget-body
%h4
...
...
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