diff options
author | Timm Drevensek <abubadabu@gmail.com> | 2014-04-01 22:30:16 +0200 |
---|---|---|
committer | Timm Drevensek <abubadabu@gmail.com> | 2014-04-01 22:30:16 +0200 |
commit | cb659e4c5a1c32bd2aa5c9994cd9d7b4a9841c9b (patch) | |
tree | 4b28ca521d9d7420feb2ec705669b90e57a37d58 /app | |
parent | ea82bcd396c9e6ab8542474ee70365297a4ff2dc (diff) | |
parent | 3b0510a7c124a8511966ad4785757bd4d78998ac (diff) | |
download | gitlab-ce-cb659e4c5a1c32bd2aa5c9994cd9d7b4a9841c9b.tar.gz |
Merge branch 'master' into request/relative_submodules
Conflicts:
CHANGELOG
Diffstat (limited to 'app')
29 files changed, 263 insertions, 135 deletions
diff --git a/app/assets/stylesheets/generic/lists.scss b/app/assets/stylesheets/generic/lists.scss index de70e47333f..963768044d5 100644 --- a/app/assets/stylesheets/generic/lists.scss +++ b/app/assets/stylesheets/generic/lists.scss @@ -13,6 +13,12 @@ border-bottom: 1px solid #eee; border-bottom: 1px solid rgba(0, 0, 0, 0.05); + &:after { + content: " "; + display: table; + clear: both; + } + &.disabled { color: #888; } @@ -46,6 +52,12 @@ .author { color: #999; } + .list-item-name { + float: left; + position: relative; + top: 3px; + } + p { padding-top: 1px; margin: 0; diff --git a/app/assets/stylesheets/sections/dashboard.scss b/app/assets/stylesheets/sections/dashboard.scss index e088ef82203..e70757e0406 100644 --- a/app/assets/stylesheets/sections/dashboard.scss +++ b/app/assets/stylesheets/sections/dashboard.scss @@ -113,6 +113,5 @@ float: left; margin-right: 3px; color: #999; - margin-bottom: 10px; width: 16px; } diff --git a/app/assets/stylesheets/sections/diff.scss b/app/assets/stylesheets/sections/diff.scss index 813566c4def..eb272f20f40 100644 --- a/app/assets/stylesheets/sections/diff.scss +++ b/app/assets/stylesheets/sections/diff.scss @@ -62,6 +62,29 @@ font-size: 12px; } } + + .text-file-parallel div { + display: inline-block; + padding-bottom: 16px; + } + .diff-side { + overflow-x: scroll; + width: 508px; + height: 700px; + } + .diff-side.diff-side-left{ + overflow-y:hidden; + } + .diff-side table, td.diff-middle table { + height: 700px; + } + .diff-middle { + width: 114px; + vertical-align: top; + height: 700px; + overflow: hidden + } + .old_line, .new_line, .diff_line { margin: 0px; padding: 0px; @@ -125,8 +148,6 @@ } &.parallel { display: table-cell; - overflow: hidden; - width: 50%; } } } diff --git a/app/controllers/projects/branches_controller.rb b/app/controllers/projects/branches_controller.rb index aa6914414ce..6a6cbe48184 100644 --- a/app/controllers/projects/branches_controller.rb +++ b/app/controllers/projects/branches_controller.rb @@ -16,11 +16,7 @@ class Projects::BranchesController < Projects::ApplicationController end def create - @repository.add_branch(params[:branch_name], params[:ref]) - - if new_branch = @repository.find_branch(params[:branch_name]) - Event.create_ref_event(@project, current_user, new_branch, 'add') - end + CreateBranchService.new.execute(project, params[:branch_name], params[:ref], current_user) redirect_to project_branches_path(@project) end diff --git a/app/controllers/projects/repositories_controller.rb b/app/controllers/projects/repositories_controller.rb index f686db70bd4..d1a6fecba20 100644 --- a/app/controllers/projects/repositories_controller.rb +++ b/app/controllers/projects/repositories_controller.rb @@ -14,7 +14,7 @@ class Projects::RepositoriesController < Projects::ApplicationController render_404 and return end - storage_path = Rails.root.join("tmp", "repositories") + storage_path = Gitlab.config.gitlab.repository_downloads_path file_path = @repository.archive_repo(params[:ref], storage_path, params[:format].downcase) diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb index 5e5f3f77a21..c6e4f574b67 100644 --- a/app/helpers/commits_helper.rb +++ b/app/helpers/commits_helper.rb @@ -105,8 +105,80 @@ module CommitsHelper branches.sort.map { |branch| link_to(branch, project_tree_path(project, branch)) }.join(", ").html_safe end - def get_old_file(project, commit, diff) - project.repository.blob_at(commit.parent_id, diff.old_path) if commit.parent_id + def parallel_diff_lines(project, commit, diff, file) + old_file = project.repository.blob_at(commit.parent_id, diff.old_path) if commit.parent_id + deleted_lines = {} + added_lines = {} + each_diff_line(diff, 0) do |line, type, line_code, line_new, line_old| + if type == "old" + deleted_lines[line_old] = { line_code: line_code, type: type, line: line } + elsif type == "new" + added_lines[line_new] = { line_code: line_code, type: type, line: line } + end + end + max_length = old_file ? old_file.sloc + added_lines.length : file.sloc + + offset1 = 0 + offset2 = 0 + old_lines = [] + new_lines = [] + + max_length.times do |line_index| + line_index1 = line_index - offset1 + line_index2 = line_index - offset2 + deleted_line = deleted_lines[line_index1 + 1] + added_line = added_lines[line_index2 + 1] + old_line = old_file.lines[line_index1] if old_file + new_line = file.lines[line_index2] + + if deleted_line && added_line + elsif deleted_line + new_line = nil + offset2 += 1 + elsif added_line + old_line = nil + offset1 += 1 + end + + old_lines[line_index] = DiffLine.new + new_lines[line_index] = DiffLine.new + + # old + if line_index == 0 && diff.new_file + old_lines[line_index].type = :file_created + old_lines[line_index].content = 'File was created' + elsif deleted_line + old_lines[line_index].type = :deleted + old_lines[line_index].content = old_line + old_lines[line_index].num = line_index1 + 1 + old_lines[line_index].code = deleted_line[:line_code] + elsif old_line + old_lines[line_index].type = :no_change + old_lines[line_index].content = old_line + old_lines[line_index].num = line_index1 + 1 + else + old_lines[line_index].type = :added + end + + # new + if line_index == 0 && diff.deleted_file + new_lines[line_index].type = :file_deleted + new_lines[line_index].content = "File was deleted" + elsif added_line + new_lines[line_index].type = :added + new_lines[line_index].num = line_index2 + 1 + new_lines[line_index].content = new_line + new_lines[line_index].code = added_line[:line_code] + elsif new_line + new_lines[line_index].type = :no_change + new_lines[line_index].num = line_index2 + 1 + new_lines[line_index].content = new_line + else + new_lines[line_index].type = :deleted + end + end + + return old_lines, new_lines end protected diff --git a/app/models/diff_line.rb b/app/models/diff_line.rb new file mode 100644 index 00000000000..ad37945874a --- /dev/null +++ b/app/models/diff_line.rb @@ -0,0 +1,3 @@ +class DiffLine + attr_accessor :type, :content, :num, :code +end diff --git a/app/models/user.rb b/app/models/user.rb index d9f420759d2..25c10a6faa0 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -204,7 +204,7 @@ class User < ActiveRecord::Base end def search query - where("name LIKE :query OR email LIKE :query OR username LIKE :query", query: "%#{query}%") + where("lower(name) LIKE :query OR lower(email) LIKE :query OR lower(username) LIKE :query", query: "%#{query.downcase}%") end def by_username_or_id(name_or_id) diff --git a/app/services/create_branch_service.rb b/app/services/create_branch_service.rb new file mode 100644 index 00000000000..98beeee8354 --- /dev/null +++ b/app/services/create_branch_service.rb @@ -0,0 +1,13 @@ +class CreateBranchService + def execute(project, branch_name, ref, current_user) + repository = project.repository + repository.add_branch(branch_name, ref) + new_branch = repository.find_branch(branch_name) + + if new_branch + Event.create_ref_event(project, current_user, new_branch, 'add') + end + + new_branch + end +end diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb index 6fda9868aa5..d85398809c2 100644 --- a/app/services/notification_service.rb +++ b/app/services/notification_service.rb @@ -178,21 +178,41 @@ class NotificationService # Get project users with WATCH notification level def project_watchers(project) - project_watchers = [] - member_methods = { project => :users_projects } - member_methods.merge!(project.group => :users_groups) if project.group - - member_methods.each do |object, member_method| - # Get project notification settings since it has higher priority - user_ids = object.send(member_method).where(notification_level: Notification::N_WATCH).pluck(:user_id) - project_watchers += User.where(id: user_ids) - - # next collect users who use global settings with watch state - user_ids = object.send(member_method).where(notification_level: Notification::N_GLOBAL).pluck(:user_id) - project_watchers += User.where(id: user_ids, notification_level: Notification::N_WATCH) + # Gather all user ids that have WATCH notification setting for project + project_notification_uids = project_notification_list(project, Notification::N_WATCH) + + # Gather all user ids that have WATCH notification setting for group + group_notification_uids = group_notification_list(project, Notification::N_WATCH) + + # Gather all user ids that have GLOBAL setting + global_notification_uids = global_notification_list(project) + + project_and_group_uids = [project_notification_uids, group_notification_uids].flatten.uniq + group_and_project_watchers = User.where(id: project_and_group_uids) + + # Find all users that have WATCH as their GLOBAL setting + global_watchers = User.where(id: global_notification_uids, notification_level: Notification::N_WATCH) + + [group_and_project_watchers, global_watchers].flatten.uniq + end + + def project_notification_list(project, notification_level) + project.users_projects.where(notification_level: notification_level).pluck(:user_id) + end + + def group_notification_list(project, notification_level) + if project.group + project.group.users_groups.where(notification_level: notification_level).pluck(:user_id) + else + [] end + end - project_watchers.uniq + def global_notification_list(project) + [ + project_notification_list(project, Notification::N_GLOBAL), + group_notification_list(project, Notification::N_GLOBAL) + ].flatten end # Remove users with disabled notifications from array diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index 252111875fa..6055865b4cb 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -70,8 +70,9 @@ - @group.users_groups.order('group_access DESC').each do |member| - user = member.user %li{class: dom_class(user)} - %strong - = link_to user.name, admin_user_path(user) + .list-item-name + %strong + = link_to user.name, admin_user_path(user) %span.pull-right.light = member.human_access = link_to group_users_group_path(@group, member), data: { confirm: remove_user_from_group_message(@group, user) }, method: :delete, remote: true, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do diff --git a/app/views/admin/hooks/index.html.haml b/app/views/admin/hooks/index.html.haml index ff90d513ca1..60773c20097 100644 --- a/app/views/admin/hooks/index.html.haml +++ b/app/views/admin/hooks/index.html.haml @@ -28,8 +28,10 @@ %ul.well-list - @hooks.each do |hook| %li + .list-item-name + = link_to admin_hook_path(hook) do + %strong= hook.url + .pull-right = link_to 'Test Hook', admin_hook_test_path(hook), class: "btn btn-small" = link_to 'Remove', admin_hook_path(hook), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn btn-remove btn-small" - = link_to admin_hook_path(hook) do - %strong= hook.url diff --git a/app/views/admin/projects/index.html.haml b/app/views/admin/projects/index.html.haml index 5f19d21f106..296094ab29c 100644 --- a/app/views/admin/projects/index.html.haml +++ b/app/views/admin/projects/index.html.haml @@ -44,9 +44,10 @@ %ul.well-list - @projects.each do |project| %li - %span{ class: visibility_level_color(project.visibility_level) } - = visibility_level_icon(project.visibility_level) - = link_to project.name_with_namespace, [:admin, project] + .list-item-name + %span{ class: visibility_level_color(project.visibility_level) } + = visibility_level_icon(project.visibility_level) + = link_to project.name_with_namespace, [:admin, project] .pull-right %span.label.label-gray = repository_size(project) diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml index 34a91cce163..11f07743ace 100644 --- a/app/views/admin/projects/show.html.haml +++ b/app/views/admin/projects/show.html.haml @@ -116,8 +116,9 @@ - @project.users_projects.each do |users_project| - user = users_project.user %li.users_project - %strong - = link_to user.name, admin_user_path(user) + .list-item-name + %strong + = link_to user.name, admin_user_path(user) .pull-right - if users_project.owner? %span.light Owner diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index 0b3934a712d..f42ae7c6a01 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -36,15 +36,16 @@ %ul.well-list - @users.each do |user| %li - - if user.blocked? - %i.icon-lock.cred - - else - %i.icon-user.cgreen - = link_to user.name, [:admin, user] - - if user.admin? - %strong.cred (Admin) - - if user == current_user - %span.cred It's you! + .list-item-name + - if user.blocked? + %i.icon-lock.cred + - else + %i.icon-user.cgreen + = link_to user.name, [:admin, user] + - if user.admin? + %strong.cred (Admin) + - if user == current_user + %span.cred It's you! .pull-right %span.light %i.icon-envelope diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index d66119e2712..764b34499ab 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -124,7 +124,8 @@ - @user.users_groups.each do |user_group| - group = user_group.group %li.users_group - %strong= link_to group.name, admin_group_path(group) + %span{class: ("list-item-name" unless user_group.owner?)} + %strong= link_to group.name, admin_group_path(group) .pull-right %span.light= user_group.human_access - unless user_group.owner? diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml index 9308bd8124e..500c37ab71d 100644 --- a/app/views/groups/edit.html.haml +++ b/app/views/groups/edit.html.haml @@ -73,8 +73,9 @@ %ul.well-list - @group.projects.each do |project| %li - = visibility_level_icon(project.visibility_level) - = link_to project.name_with_namespace, project + .list-item-name + = visibility_level_icon(project.visibility_level) + = link_to project.name_with_namespace, project .pull-right = link_to 'Members', project_team_index_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small" = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small" diff --git a/app/views/layouts/notify.html.haml b/app/views/layouts/notify.html.haml index 09d84a3eb9f..3e8dae0b230 100644 --- a/app/views/layouts/notify.html.haml +++ b/app/views/layouts/notify.html.haml @@ -23,4 +23,4 @@ - if @project You're receiving this notification because you are a member of the #{link_to @project.name_with_namespace, project_url(@project)} project team. - if @target_url - #{link_to "View in GitLab", @target_url} + #{link_to "View it on GitLab", @target_url} diff --git a/app/views/notify/repository_push_email.html.haml b/app/views/notify/repository_push_email.html.haml index ab0d6c653b9..85a01a567f3 100644 --- a/app/views/notify/repository_push_email.html.haml +++ b/app/views/notify/repository_push_email.html.haml @@ -7,7 +7,7 @@ %li #{commit.short_id} - #{commit.title} -%h4 Diff: +%h4 Changes: - @diffs.each do |diff| %li %strong @@ -23,6 +23,6 @@ %br - if @compare.timeout - %h5 Huge diff. To prevent performance issues it was hidden + %h5 To prevent performance issues changes are hidden - elsif @compare.commits_over_limit? - %h5 Diff for big amount of commits is disabled + %h5 Changes are not shown due to large amount of commits diff --git a/app/views/notify/repository_push_email.text.haml b/app/views/notify/repository_push_email.text.haml index 93b344d2c82..b8d7fbeb046 100644 --- a/app/views/notify/repository_push_email.text.haml +++ b/app/views/notify/repository_push_email.text.haml @@ -6,7 +6,7 @@ Commits: #{commit.short_id} - #{truncate(commit.title, length: 40)} \ \ -Diff: +Changes: - @diffs.each do |diff| \ \===================================== @@ -22,4 +22,4 @@ Diff: - if @compare.timeout Huge diff. To prevent performance issues it was hidden - elsif @compare.commits_over_limit? - Diff for big amount of commits is disabled + Changes are not shown due to large amount of commits diff --git a/app/views/projects/commits/_parallel_view.html.haml b/app/views/projects/commits/_parallel_view.html.haml index 3234e9da0ac..5b60ab80ba4 100644 --- a/app/views/projects/commits/_parallel_view.html.haml +++ b/app/views/projects/commits/_parallel_view.html.haml @@ -1,75 +1,55 @@ / Side-by-side diff view -- old_file = get_old_file(project, @commit, diff) -- deleted_lines = {} -- added_lines = {} -- each_diff_line(diff, index) do |line, type, line_code, line_new, line_old, raw_line| - - if type == "old" - - deleted_lines[line_old] = { line_code: line_code, type: type, line: line } - - elsif type == "new" - - added_lines[line_new] = { line_code: line_code, type: type, line: line } - -- max_length = old_file.sloc + added_lines.length if old_file -- max_length ||= file.sloc -- offset1 = 0 -- offset2 = 0 +- old_lines, new_lines = parallel_diff_lines(project, @commit, diff, file) +- num_lines = old_lines.length %div.text-file-parallel - %table{ style: "table-layout: fixed;" } - - max_length.times do |line_index| - - line_index1 = line_index - offset1 - - line_index2 = line_index - offset2 - - deleted_line = deleted_lines[line_index1 + 1] - - added_line = added_lines[line_index2 + 1] - - old_line = old_file.lines[line_index1] if old_file - - new_line = file.lines[line_index2] + %div.diff-side.diff-side-left + %table + - old_lines.each do |line| + + %tr.line_holder.parallel + - if line.type == :file_created + %td.line_content.parallel= "File was created" + - elsif line.type == :deleted + %td.line_content{class: "parallel noteable_line old #{line.code}", "line_code" => line.code }= line.content + - else line.type == :no_change + %td.line_content.parallel= line.content + + %div.diff-middle + %table + - num_lines.times do |index| + %tr + - if old_lines[index].type == :deleted + %td.old_line.old= old_lines[index].num + - else + %td.old_line= old_lines[index].num + + %td.diff_line="" - - if deleted_line && added_line - - elsif deleted_line - - new_line = nil - - offset2 += 1 - - elsif added_line - - old_line = nil - - offset1 += 1 + - if new_lines[index].type == :added + %td.new_line.new= new_lines[index].num + - else + %td.new_line= new_lines[index].num - %tr.line_holder.parallel - - if line_index == 0 && diff.new_file - %td.line_content.parallel= "File was created" - %td.old_line= "" - - elsif deleted_line - %td.line_content{class: "parallel noteable_line old #{deleted_line[:line_code]}", "line_code" => deleted_line[:line_code] }= old_line - %td.old_line.old - = line_index1 + 1 - - if @comments_allowed - =# render "projects/notes/diff_note_link", line_code: deleted_line[:line_code] - - elsif old_line - %td.line_content.parallel= old_line - %td.old_line= line_index1 + 1 - - else - %td.line_content.parallel= "" - %td.old_line= "" + %div.diff-side.diff-side-right + %table + - new_lines.each do |line| - %td.diff_line= "" + %tr.line_holder.parallel + - if line.type == :file_deleted + %td.line_content.parallel= "File was deleted" + - elsif line.type == :added + %td.line_content{class: "parallel noteable_line new #{line.code}", "line_code" => line.code }= line.content + - else line.type == :no_change + %td.line_content.parallel= line.content - - if diff.deleted_file && line_index == 0 - %td.new_line= "" - %td.line_content.parallel= "File was deleted" - - elsif added_line - %td.new_line.new - = line_index2 + 1 - - if @comments_allowed - =# render "projects/notes/diff_note_link", line_code: added_line[:line_code] - %td.line_content{class: "parallel noteable_line new #{added_line[:line_code]}", "line_code" => added_line[:line_code] }= new_line - - elsif new_line - %td.new_line= line_index2 + 1 - %td.line_content.parallel= new_line - - else - %td.new_line= "" - %td.line_content.parallel= "" +:javascript + $('.diff-side-right').on('scroll', function(){ + $('.diff-side-left, .diff-middle').scrollTop($(this).scrollTop()); + $('.diff-side-left').scrollLeft($(this).scrollLeft()); + }); - - if @reply_allowed - - comments1 = [] - - comments2 = [] - - comments1 = @line_notes.select { |n| n.line_code == deleted_line[:line_code] }.sort_by(&:created_at) if deleted_line - - comments2 = @line_notes.select { |n| n.line_code == added_line[:line_code] }.sort_by(&:created_at) if added_line - - unless comments1.empty? && comments2.empty? - = render "projects/notes/diff_notes_with_reply_parallel", notes1: comments1, notes2: comments2, line1: deleted_line, line2: added_line
\ No newline at end of file + $('.diff-side-left').on('scroll', function(){ + $('.diff-side-right, .diff-middle').scrollTop($(this).scrollTop()); // might never be relevant + $('.diff-side-right').scrollLeft($(this).scrollLeft()); + }); diff --git a/app/views/projects/commits/_text_file.html.haml b/app/views/projects/commits/_text_file.html.haml index c827d96d855..ba83d2e5a0f 100644 --- a/app/views/projects/commits/_text_file.html.haml +++ b/app/views/projects/commits/_text_file.html.haml @@ -1,6 +1,6 @@ - too_big = diff.diff.lines.count > 1000 - if too_big - %a.supp_diff_link Diff suppressed. Click to show + %a.supp_diff_link Changes suppressed. Click to show %table.text-file{class: "#{'hide' if too_big}"} - each_diff_line(diff, index) do |line, type, line_code, line_new, line_old, raw_line| diff --git a/app/views/projects/compare/show.html.haml b/app/views/projects/compare/show.html.haml index 9bd49855369..57331bff31b 100644 --- a/app/views/projects/compare/show.html.haml +++ b/app/views/projects/compare/show.html.haml @@ -18,17 +18,17 @@ - else %ul.well-list= render Commit.decorate(@commits), project: @project - %h4 Diff + %h4 Changes - if @diffs.present? = render "projects/commits/diffs", diffs: @diffs, project: @project - elsif @commits.size > MergeRequestDiff::COMMITS_SAFE_SIZE .bs-callout.bs-callout-danger %h4 This comparison includes more than #{MergeRequestDiff::COMMITS_SAFE_SIZE} commits. - %p To preserve performance the line diff is not shown. + %p To preserve performance the line changes are not shown. - elsif @timeout .bs-callout.bs-callout-danger - %h4 Diff for this comparison is extremely large. - %p Use command line to browse diff for this comparison. + %h4 Number of changed files for this comparison is extremely large. + %p Use command line to browse through changes for this comparison. - else diff --git a/app/views/projects/deploy_keys/show.html.haml b/app/views/projects/deploy_keys/show.html.haml index 67615e1781f..c66e6bc69c3 100644 --- a/app/views/projects/deploy_keys/show.html.haml +++ b/app/views/projects/deploy_keys/show.html.haml @@ -2,7 +2,7 @@ Deploy key: = @key.title %small - created at + created on = @key.created_at.stamp("Aug 21, 2011") .back-link = link_to project_deploy_keys_path(@project) do diff --git a/app/views/projects/issues/_form.html.haml b/app/views/projects/issues/_form.html.haml index dd091302c8e..05cae80e50c 100644 --- a/app/views/projects/issues/_form.html.haml +++ b/app/views/projects/issues/_form.html.haml @@ -1,7 +1,7 @@ %div.issue-form-holder %h3.page-title= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.iid}" %hr - - if @repository.contribution_guide && !@issue.persisted? + - if !@repository.empty? && @repository.contribution_guide && !@issue.persisted? - contribution_guide_url = project_blob_path(@project, tree_join(@repository.root_ref, @repository.contribution_guide.name)) .alert.alert-info.col-sm-10.col-sm-offset-2 ="Please review the <strong>#{link_to "guidelines for contribution", contribution_guide_url}</strong> to this repository.".html_safe diff --git a/app/views/projects/merge_requests/_show.html.haml b/app/views/projects/merge_requests/_show.html.haml index 809b01918cf..7a21c0dd069 100644 --- a/app/views/projects/merge_requests/_show.html.haml +++ b/app/views/projects/merge_requests/_show.html.haml @@ -20,7 +20,7 @@ %li.diffs-tab{data: {action: 'diffs'}} = link_to diffs_project_merge_request_path(@project, @merge_request) do %i.icon-list-alt - Diff + Changes - content_for :note_actions do - if can?(current_user, :modify_merge_request, @merge_request) diff --git a/app/views/projects/merge_requests/show/_diffs.html.haml b/app/views/projects/merge_requests/show/_diffs.html.haml index 7c4f43d2d80..3d48514f98b 100644 --- a/app/views/projects/merge_requests/show/_diffs.html.haml +++ b/app/views/projects/merge_requests/show/_diffs.html.haml @@ -5,7 +5,7 @@ - else .bs-callout.bs-callout-warning %h4 - Diff for this comparison is extremely large. + Changes view for this comparison is extremely large. %p You can = link_to "download it", project_merge_request_path(@merge_request.source_project, @merge_request, format: :diff), class: "vlink" diff --git a/app/views/projects/merge_requests/show/_mr_accept.html.haml b/app/views/projects/merge_requests/show/_mr_accept.html.haml index 4b1857ccb68..bd7c8435f4c 100644 --- a/app/views/projects/merge_requests/show/_mr_accept.html.haml +++ b/app/views/projects/merge_requests/show/_mr_accept.html.haml @@ -4,7 +4,10 @@ %strong Archived projects cannot be committed to! - else .bs-callout - %strong You don't have permission to merge this MR + .automerge_widget.cannot_be_merged.hide + %strong This can't be merged automatically, even if it could be merged you don't have the permission to do so. + .automerge_widget.can_be_merged.hide + %strong This can be merged automatically but you don't have the permission to do so. - if @show_merge_controls diff --git a/app/views/users_groups/_users_group.html.haml b/app/views/users_groups/_users_group.html.haml index 1784dab35b4..ad363eaba23 100644 --- a/app/views/users_groups/_users_group.html.haml +++ b/app/views/users_groups/_users_group.html.haml @@ -2,11 +2,12 @@ - return unless user - show_roles = true if show_roles.nil? %li{class: "#{dom_class(member)} js-toggle-container", id: dom_id(member)} - = image_tag avatar_icon(user.email, 16), class: "avatar s16" - %strong= user.name - %span.cgray= user.username - - if user == current_user - %span.label.label-success It's you + %span{class: ("list-item-name" if show_controls)} + = image_tag avatar_icon(user.email, 16), class: "avatar s16" + %strong= user.name + %span.cgray= user.username + - if user == current_user + %span.label.label-success It's you - if show_roles %span.pull-right @@ -22,7 +23,7 @@ - else = link_to group_users_group_path(@group, member), data: { confirm: remove_user_from_group_message(@group, user) }, method: :delete, remote: true, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do %i.icon-minus.icon-white - + .edit-member.hide.js-toggle-content = form_for [@group, member], remote: true do |f| .alert.prepend-top-20 |