Merge remote-tracking branch 'origin/90-pull' into 90-pull

This commit is contained in:
Alexander Machehin 2012-09-26 23:10:45 +06:00
commit a994e7dd74
6 changed files with 12 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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() {

View File

@ -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

View File

@ -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: Заблокирован