Merge remote-tracking branch 'origin/90-pull' into 90-pull
This commit is contained in:
commit
a994e7dd74
|
@ -135,7 +135,9 @@ class Projects::PullRequestsController < Projects::BaseController
|
|||
@base_commit = @pull.common_ancestor
|
||||
@head_commit = repo.commits(@pull.head_branch).first
|
||||
|
||||
@commits = repo.commits_between repo.commits(@pull.base_ref).first, @head_commit
|
||||
@commits = repo.commits_between(repo.commits(@pull.base_ref).first, @head_commit)
|
||||
@total_commits = @commits.count
|
||||
@commits = @commits.last(100)
|
||||
|
||||
@diff = @pull.diff repo, @base_commit, @head_commit
|
||||
@stats = @pull.diff_stats repo, @base_commit, @head_commit
|
||||
|
|
|
@ -15,4 +15,4 @@
|
|||
- GitPresenters::CommitAsMessagePresenter.present(commit, :branch => @branch, :project => @project) do |presenter|
|
||||
= render 'shared/feed_message', :presenter => presenter, :item_no => counter
|
||||
- counter += 1
|
||||
.both
|
||||
.both
|
||||
|
|
|
@ -14,4 +14,6 @@
|
|||
%p= t 'layout.git.repositories.commit_diff_too_big'
|
||||
|
||||
#commits.tab-pane
|
||||
- if @total_commits > @commits.count
|
||||
%div= t("projects.pull_requests.is_big", :count => @commits.count)
|
||||
= render :partial => 'projects/git/commits/commits', :object => @commits
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
%a{"data-toggle" => "tab", :href => "#diff"}="#{t'pull_requests.tabs.diff'} (#{@stats.count})"
|
||||
-if @commits
|
||||
%li
|
||||
%a{"data-toggle" => "tab", :href => "#commits"}="#{t'pull_requests.tabs.commits'} (#{@commits.count})"
|
||||
- commits_message = @commits.count.to_s
|
||||
- commits_message << '+' if @total_commits > @commits.count
|
||||
%a{"data-toggle" => "tab", :href => "#commits"}="#{t'pull_requests.tabs.commits'} (#{commits_message})"
|
||||
|
||||
:javascript
|
||||
$(document).ready(function() {
|
||||
|
@ -17,4 +19,4 @@
|
|||
tab = 'commits';
|
||||
};
|
||||
$('#pull_tabs a[href="#'+tab+'"]').tab('show');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -21,6 +21,7 @@ en:
|
|||
%{user} merged into <span class="label-bootstrap label-info font14">%{base_ref}</span>
|
||||
from <span class="label-bootstrap label-info font14">%{head_ref}</span> at %{time}
|
||||
closed: '%{user} closed this pull request at %{time}'
|
||||
is_big: This pull request is big! We're only showing the most recent %{count} commits.
|
||||
open: ''
|
||||
statuses:
|
||||
blocked: Blocked
|
||||
|
|
|
@ -23,6 +23,7 @@ ru:
|
|||
%{user} смержил <span class="label-bootstrap label-info font14">%{base_ref}</span>
|
||||
с <span class="label-bootstrap label-info font14">%{head_ref}</span> в %{time}'
|
||||
closed: '%{user} закрыл пул реквест в %{time}'
|
||||
is_big: Этот пул реквест слишком большой! Мы показываем только последние %{count} комитов.
|
||||
open: ''
|
||||
statuses:
|
||||
blocked: Заблокирован
|
||||
|
|
Loading…
Reference in New Issue