Commit a5fb9581 authored by Mike Greiling's avatar Mike Greiling

render merge request tabs regardless of commit history

parent b23fd4e9
...@@ -50,56 +50,55 @@ ...@@ -50,56 +50,55 @@
.content-block.content-block-small .content-block.content-block-small
= render 'award_emoji/awards_block', awardable: @merge_request, inline: true = 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') }
.merge-request-tabs-holder{ class: ("js-tabs-affix" unless ENV['RAILS_ENV'] == 'test') } %div{ class: container_class }
%div{ class: container_class } %ul.merge-request-tabs.nav-links.no-top.no-bottom
%ul.merge-request-tabs.nav-links.no-top.no-bottom %li.notes-tab
%li.notes-tab = link_to namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: { target: 'div#notes', action: 'notes', toggle: 'tab' } do
= link_to namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: { target: 'div#notes', action: 'notes', toggle: 'tab' } do Discussion
Discussion %span.badge= @merge_request.related_notes.user.count
%span.badge= @merge_request.related_notes.user.count - if @merge_request.source_project
- if @merge_request.source_project %li.commits-tab
%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
= link_to commits_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: { target: 'div#commits', action: 'commits', toggle: 'tab' } do Commits
Commits %span.badge= @commits_count
%span.badge= @commits_count - if @pipelines.any?
- if @pipelines.any? %li.pipelines-tab
%li.pipelines-tab = link_to pipelines_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: { target: '#pipelines', action: 'pipelines', toggle: 'tab' } do
= link_to pipelines_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: { target: '#pipelines', action: 'pipelines', toggle: 'tab' } do Pipelines
Pipelines %span.badge= @pipelines.size
%span.badge= @pipelines.size %li.diffs-tab
%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
= link_to diffs_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: { target: 'div#diffs', action: 'diffs', toggle: 'tab' } do Changes
Changes %span.badge= @merge_request.diff_size
%span.badge= @merge_request.diff_size %li#resolve-count-app.line-resolve-all-container.pull-right.prepend-top-10.hidden-xs{ "v-cloak" => true }
%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?}" }
%resolve-count{ "inline-template" => true, ":logged-out" => "#{current_user.nil?}" } %div
%div .line-resolve-all{ "v-show" => "discussionCount > 0",
.line-resolve-all{ "v-show" => "discussionCount > 0", ":class" => "{ 'has-next-btn': !loggedOut && resolvedDiscussionCount !== discussionCount }" }
":class" => "{ 'has-next-btn': !loggedOut && resolvedDiscussionCount !== discussionCount }" } %span.line-resolve-btn.is-disabled{ type: "button",
%span.line-resolve-btn.is-disabled{ type: "button", ":class" => "{ 'is-active': resolvedDiscussionCount === discussionCount }" }
":class" => "{ 'is-active': resolvedDiscussionCount === discussionCount }" } = render "shared/icons/icon_status_success.svg"
= render "shared/icons/icon_status_success.svg" %span.line-resolve-text
%span.line-resolve-text {{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved = render "discussions/jump_to_next"
= render "discussions/jump_to_next"
.tab-content#diff-notes-app .tab-content#diff-notes-app
#notes.notes.tab-pane.voting_notes #notes.notes.tab-pane.voting_notes
.row .row
%section.col-md-12 %section.col-md-12
.issuable-discussion .issuable-discussion
= render "projects/merge_requests/discussion" = render "projects/merge_requests/discussion"
#commits.commits.tab-pane #commits.commits.tab-pane
- # This tab is always loaded via AJAX - # This tab is always loaded via AJAX
#pipelines.pipelines.tab-pane #pipelines.pipelines.tab-pane
- # This tab is always loaded via AJAX - # This tab is always loaded via AJAX
#diffs.diffs.tab-pane #diffs.diffs.tab-pane
- # This tab is always loaded via AJAX - # This tab is always loaded via AJAX
.mr-loading-status .mr-loading-status
= spinner = spinner
= render 'shared/issuable/sidebar', issuable: @merge_request = render 'shared/issuable/sidebar', issuable: @merge_request
- if @merge_request.can_be_reverted?(current_user) - if @merge_request.can_be_reverted?(current_user)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment