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
a5fb9581
Commit
a5fb9581
authored
Dec 28, 2016
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
render merge request tabs regardless of commit history
parent
b23fd4e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
47 deletions
+46
-47
app/views/projects/merge_requests/_show.html.haml
app/views/projects/merge_requests/_show.html.haml
+46
-47
No files found.
app/views/projects/merge_requests/_show.html.haml
View file @
a5fb9581
...
...
@@ -50,56 +50,55 @@
.content-block.content-block-small
=
render
'award_emoji/awards_block'
,
awardable:
@merge_request
,
inline:
true
-
if
@commits_count
.
nonzero?
.merge-request-tabs-holder
{
class:
(
"js-tabs-affix"
unless
ENV
[
'RAILS_ENV'
]
==
'test'
)
}
%div
{
class:
container_class
}
%ul
.merge-request-tabs.nav-links.no-top.no-bottom
%li
.notes-tab
=
link_to
namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
data:
{
target:
'div#notes'
,
action:
'notes'
,
toggle:
'tab'
}
do
Discussion
%span
.badge
=
@merge_request
.
related_notes
.
user
.
count
-
if
@merge_request
.
source_project
%li
.commits-tab
=
link_to
commits_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
data:
{
target:
'div#commits'
,
action:
'commits'
,
toggle:
'tab'
}
do
Commits
%span
.badge
=
@commits_count
-
if
@pipelines
.
any?
%li
.pipelines-tab
=
link_to
pipelines_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
data:
{
target:
'#pipelines'
,
action:
'pipelines'
,
toggle:
'tab'
}
do
Pipelines
%span
.badge
=
@pipelines
.
size
%li
.diffs-tab
=
link_to
diffs_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
data:
{
target:
'div#diffs'
,
action:
'diffs'
,
toggle:
'tab'
}
do
Changes
%span
.badge
=
@merge_request
.
diff_size
%li
#resolve-count-app
.line-resolve-all-container.pull-right.prepend-top-10.hidden-xs
{
"v-cloak"
=>
true
}
%resolve-count
{
"inline-template"
=>
true
,
":logged-out"
=>
"#{current_user.nil?}"
}
%div
.line-resolve-all
{
"v-show"
=>
"discussionCount > 0"
,
":class"
=>
"{ 'has-next-btn': !loggedOut && resolvedDiscussionCount !== discussionCount }"
}
%span
.line-resolve-btn.is-disabled
{
type:
"button"
,
":class"
=>
"{ 'is-active': resolvedDiscussionCount === discussionCount }"
}
=
render
"shared/icons/icon_status_success.svg"
%span
.line-resolve-text
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
=
render
"discussions/jump_to_next"
.merge-request-tabs-holder
{
class:
(
"js-tabs-affix"
unless
ENV
[
'RAILS_ENV'
]
==
'test'
)
}
%div
{
class:
container_class
}
%ul
.merge-request-tabs.nav-links.no-top.no-bottom
%li
.notes-tab
=
link_to
namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
data:
{
target:
'div#notes'
,
action:
'notes'
,
toggle:
'tab'
}
do
Discussion
%span
.badge
=
@merge_request
.
related_notes
.
user
.
count
-
if
@merge_request
.
source_project
%li
.commits-tab
=
link_to
commits_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
data:
{
target:
'div#commits'
,
action:
'commits'
,
toggle:
'tab'
}
do
Commits
%span
.badge
=
@commits_count
-
if
@pipelines
.
any?
%li
.pipelines-tab
=
link_to
pipelines_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
data:
{
target:
'#pipelines'
,
action:
'pipelines'
,
toggle:
'tab'
}
do
Pipelines
%span
.badge
=
@pipelines
.
size
%li
.diffs-tab
=
link_to
diffs_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
data:
{
target:
'div#diffs'
,
action:
'diffs'
,
toggle:
'tab'
}
do
Changes
%span
.badge
=
@merge_request
.
diff_size
%li
#resolve-count-app
.line-resolve-all-container.pull-right.prepend-top-10.hidden-xs
{
"v-cloak"
=>
true
}
%resolve-count
{
"inline-template"
=>
true
,
":logged-out"
=>
"#{current_user.nil?}"
}
%div
.line-resolve-all
{
"v-show"
=>
"discussionCount > 0"
,
":class"
=>
"{ 'has-next-btn': !loggedOut && resolvedDiscussionCount !== discussionCount }"
}
%span
.line-resolve-btn.is-disabled
{
type:
"button"
,
":class"
=>
"{ 'is-active': resolvedDiscussionCount === discussionCount }"
}
=
render
"shared/icons/icon_status_success.svg"
%span
.line-resolve-text
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
=
render
"discussions/jump_to_next"
.tab-content
#diff-notes-app
#notes
.notes.tab-pane.voting_notes
.row
%section
.col-md-12
.issuable-discussion
=
render
"projects/merge_requests/discussion"
.tab-content
#diff-notes-app
#notes
.notes.tab-pane.voting_notes
.row
%section
.col-md-12
.issuable-discussion
=
render
"projects/merge_requests/discussion"
#commits
.commits.tab-pane
-
# This tab is always loaded via AJAX
#pipelines
.pipelines.tab-pane
-
# This tab is always loaded via AJAX
#diffs
.diffs.tab-pane
-
# This tab is always loaded via AJAX
#commits
.commits.tab-pane
-
# This tab is always loaded via AJAX
#pipelines
.pipelines.tab-pane
-
# This tab is always loaded via AJAX
#diffs
.diffs.tab-pane
-
# This tab is always loaded via AJAX
.mr-loading-status
=
spinner
.mr-loading-status
=
spinner
=
render
'shared/issuable/sidebar'
,
issuable:
@merge_request
-
if
@merge_request
.
can_be_reverted?
(
current_user
)
...
...
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