Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce

This commit is contained in:
Dmitriy Zaporozhets 2015-03-23 17:10:56 -07:00
commit 27809a8059
11 changed files with 31 additions and 22 deletions

View file

@ -31,6 +31,7 @@ v 7.10.0 (unreleased)
- Replace commits calendar with faster contribution calendar that includes issues and merge requests
- Add inifinite scroll to user page activity
- Don't show commit comment button when user is not signed in.
- Don't include system notes in issue/MR comment count.
v 7.9.0
- Send EmailsOnPush email when branch or tag is created or deleted.

View file

@ -188,7 +188,7 @@ GEM
dotenv (>= 0.7)
thor (>= 0.13.6)
formatador (0.2.4)
gemnasium-gitlab-service (0.2.5)
gemnasium-gitlab-service (0.2.4)
rugged (~> 0.21)
gemojione (2.0.0)
json

View file

@ -15,6 +15,11 @@
word-break: break-all;
margin-right: 200px;
display: block;
.file-mode {
margin-left: 10px;
color: #777;
}
}
.diff-btn-group {
@ -34,11 +39,6 @@
font-family: $monospace_font;
font-size: smaller;
}
.file-mode {
font-family: $monospace_font;
margin-left: 10px;
}
}
.diff-content {
overflow: auto;

View file

@ -16,13 +16,17 @@ module Emails
subject: subject("Project was moved"))
end
def repository_push_email(project_id, recipient, author_id:,
ref:,
action:,
def repository_push_email(project_id, recipient, author_id: nil,
ref: nil,
action: nil,
compare: nil,
reverse_compare: false,
send_from_committer_email: false,
disable_diffs: false)
unless author_id && ref && action
raise ArgumentError, "missing keywords: author_id, ref, action"
end
@project = Project.find(project_id)
@author = User.find(author_id)
@reverse_compare = reverse_compare

View file

@ -48,6 +48,7 @@ class Note < ActiveRecord::Base
scope :inline, ->{ where("line_code IS NOT NULL") }
scope :not_inline, ->{ where(line_code: [nil, '']) }
scope :system, ->{ where(system: true) }
scope :user, ->{ where(system: false) }
scope :common, ->{ where(noteable_type: ["", nil]) }
scope :fresh, ->{ order(created_at: :asc, id: :asc) }
scope :inc_author_project, ->{ includes(:project, :author) }

View file

@ -13,7 +13,7 @@
- note_count = @note_counts.fetch(commit.id, 0)
- else
- notes = project.notes.for_commit_id(commit.id)
- note_count = notes.count
- note_count = notes.user.count
- if note_count > 0
%span.light

View file

@ -13,12 +13,13 @@
- submodule_item = project.repository.blob_at(@commit.id, diff_file.file_path)
= submodule_link(submodule_item, @commit.id)
- else
- if diff_file.renamed_file
%span= "#{diff_file.old_path} renamed to #{diff_file.new_path}"
- else
%span= diff_file.new_path
- if diff_file.mode_changed?
%span.file-mode= "#{diff_file.diff.a_mode} → #{diff_file.diff.b_mode}"
%span
- if diff_file.renamed_file
= "#{diff_file.old_path} renamed to #{diff_file.new_path}"
- else
= diff_file.new_path
- if diff_file.mode_changed?
%span.file-mode= "#{diff_file.diff.a_mode} → #{diff_file.diff.b_mode}"
.diff-btn-group
- if blob.text?

View file

@ -10,11 +10,12 @@
- if issue.closed?
%span
CLOSED
- if issue.notes.any?
- note_count = issue.notes.user.count
- if note_count > 0
&nbsp;
%span
%i.fa.fa-comments
= issue.notes.count
= note_count
.issue-info
= link_to "##{issue.iid}", issue_path(issue), class: "light"

View file

@ -16,11 +16,12 @@
%span.label-branch<
%i.fa.fa-code-fork
%span= merge_request.target_branch
- if merge_request.notes.any?
- note_count = merge_request.mr_and_commit_notes.user.count
- if note_count > 0
&nbsp;
%span
%i.fa.fa-comments
= merge_request.mr_and_commit_notes.count
= note_count
.merge-request-info
= link_to "##{merge_request.iid}", merge_request_path(merge_request), class: "light"
- if merge_request.assignee

View file

@ -40,7 +40,7 @@
= link_to merge_request_path(@merge_request) do
%i.fa.fa-comments
Discussion
%span.badge= @merge_request.mr_and_commit_notes.count
%span.badge= @merge_request.mr_and_commit_notes.user.count
%li.commits-tab{data: {action: 'commits'}}
= link_to merge_request_path(@merge_request), title: 'Commits' do
%i.fa.fa-history

View file

@ -67,7 +67,7 @@ module Gitlab
end
def notes
Note.where(project_id: limit_project_ids).search(query).order('updated_at DESC')
Note.where(project_id: limit_project_ids).user.search(query).order('updated_at DESC')
end
def limit_project_ids