Commit fc420ded authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'extra-ee-specific-lines-from-discussion-views' into 'master'

Extract EE-specific lines from discussion views

Closes #6103 et #6226

See merge request gitlab-org/gitlab-ee!6129
parents e01a5098 17821419
......@@ -2,12 +2,4 @@
Unfortunately, your email message to GitLab could not be processed.
= markdown @reason
-# EE-specific start
- if Gitlab::CurrentSettings.email_additional_text.present?
%p
—
%br
%br
= Gitlab::Utils.nlbr(Gitlab::CurrentSettings.email_additional_text)
-# EE-specific end
= render_if_exists 'shared/additional_email_text'
Unfortunately, your email message to GitLab could not be processed.
\
= @reason
-# EE-specific start
- if Gitlab::CurrentSettings.email_additional_text.present?
\
= '---'
= Gitlab::Utils.nlbr(Gitlab::CurrentSettings.email_additional_text)
-# EE-specific end
= render_if_exists 'shared/additional_email_text'
......@@ -9,9 +9,7 @@
%p
Assignee: #{@merge_request.assignee_name}
- if @merge_request.approvers.any?
%p
Approvers: #{render_items_list(@merge_request.approvers_left.map(&:name))}
= render_if_exists 'notify/merge_request_approvers', merge_request: @merge_request
- if @merge_request.description
%div
......
......@@ -5,9 +5,6 @@ New Merge Request <%= @merge_request.to_reference %>
<%= merge_path_description(@merge_request, 'to') %>
Author: <%= @merge_request.author_name %>
Assignee: <%= @merge_request.assignee_name %>
<% if @merge_request.approvers.any? %>
Approvers: <%= render_items_list(@merge_request.approvers_left.map(&:name)) %>
<% end %>
<%= render_if_exists 'notify/merge_request_approvers', merge_request: @merge_request %>
<%= @merge_request.description %>
......@@ -11,8 +11,7 @@
= view_on_environment_button(@commit.sha, @path, @environment) if @environment
.btn-group{ role: "group" }<
= lock_file_link(html_options: { class: 'btn btn-sm path-lock' })
= render_if_exists 'projects/blob/header_file_locks_link'
= edit_blob_button
= ide_edit_button
- if current_user
......@@ -20,11 +19,4 @@
= delete_blob_link
= render 'projects/fork_suggestion'
- if @project.feature_available?(:file_locks)
-# haml-lint:disable InlineJavaScript
%script#js-file-lock{ type: "application/json" }
- data = {}
- data[:path] = @path
- data[:toggle_path] = toggle_project_path_locks_path(@project)
= data.to_json.html_safe
= render_if_exists 'projects/blob/header_file_locks', project: @project, path: @path
......@@ -69,7 +69,7 @@
.wiki
= markdown_field(@milestone, :description)
= render 'shared/milestones/burndown', milestone: @milestone, project: @project
= render_if_exists 'shared/milestones/burndown', milestone: @milestone, project: @project
- if can?(current_user, :read_issue, @project) && @milestone.total_items_count(current_user).zero?
.alert.alert-success.prepend-top-default
......
- @logs.each do |content_data|
- file_name = content_data[:file_name]
- commit = content_data[:commit]
- lock_label = content_data[:lock_label]
- next unless commit
:plain
......@@ -9,13 +8,7 @@
row.find("td.tree-time-ago").html('#{escape_javascript time_ago_with_tooltip(commit.committed_date)}');
row.find("td.tree-commit").html('#{escape_javascript render("projects/tree/tree_commit_column", commit: commit)}');
- if lock_label
:plain
var label = $("<span>")
.attr('title', '#{escape_javascript lock_label.html_safe}')
.attr('data-toggle', 'tooltip')
.addClass('fa fa-lock prepend-left-5');
row.find('td.tree-item-file-name').append(label);
= render_if_exists 'projects/refs/logs_tree_lock_label', lock_label: content_data[:lock_label]
- if @more_log_url
:plain
......
- merge_request = local_assigns.fetch(:merge_request)
- return unless merge_request.approvers.any?
%p
Approvers: #{render_items_list(merge_request.approvers_left.map(&:name))}
<%- merge_request = local_assigns.fetch(:merge_request) -%>
<%- return unless merge_request.approvers.any? -%>
Approvers: <%= render_items_list(merge_request.approvers_left.map(&:name)) %>
- project = local_assigns.fetch(:project)
- path = local_assigns.fetch(:path)
- return unless project.feature_available?(:file_locks)
-# haml-lint:disable InlineJavaScript
%script#js-file-lock{ type: "application/json" }
- data = { path: path, toggle_path: toggle_project_path_locks_path(project) }
= data.to_json.html_safe
= lock_file_link(html_options: { class: 'btn btn-sm path-lock' })
- lock_label = local_assigns.fetch(:lock_label)
- return unless lock_label
:plain
var label = $("<span>")
.attr('title', '#{escape_javascript lock_label.html_safe}')
.attr('data-toggle', 'tooltip')
.addClass('fa fa-lock prepend-left-5');
row.find('td.tree-item-file-name').append(label);
- return unless Gitlab::CurrentSettings.email_additional_text.present?
%p
&mdash;
%br
%br
= Gitlab::Utils.nlbr(Gitlab::CurrentSettings.email_additional_text)
- return unless Gitlab::CurrentSettings.email_additional_text.present?
\
= '---'
= Gitlab::Utils.nlbr(Gitlab::CurrentSettings.email_additional_text)
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