Merge pull request #740 from warpc/737-dont_show_branch_in_commit

[refs #737] dont show branch in commit
This commit is contained in:
Vladimir Sharshov 2012-11-28 05:27:23 -08:00
commit e7e80164cb
9 changed files with 8 additions and 13 deletions

View File

@ -7,15 +7,12 @@ class GitPresenters::CommitAsMessagePresenter < ApplicationPresenter
def initialize(commit, opts = {})
@commit = commit
@options = opts#[:branch] if opts[:branch]
@options = opts
prepare_message
end
def header
@header ||= if options[:branch].present?
I18n.t("layout.messages.commits.header_with_branch",
:committer => committer_link, :commit => commit_link, :branch => options[:branch].name)
elsif options[:project].present?
@header ||= if options[:project].present?
I18n.t("layout.messages.commits.header",
:committer => committer_link, :commit => commit_link, :project => options[:project].name)
end.html_safe

View File

@ -3,7 +3,7 @@
= render 'about_block', :project => @project
%h3= t("layout.projects.last_commit")
- GitPresenters::CommitAsMessagePresenter.present(@commit, :branch => @branch, :project => @project) do |presenter|
- GitPresenters::CommitAsMessagePresenter.present(@commit, :project => @project) do |presenter|
= render 'shared/feed_message', :presenter => presenter, :item_no => 1
.both

View File

@ -5,7 +5,7 @@
%h3= t("layout.projects.last_commit")
- GitPresenters::CommitAsMessagePresenter.present(@commit, :branch => @branch, :project => @project) do |presenter|
- GitPresenters::CommitAsMessagePresenter.present(@commit, :project => @project) do |presenter|
= render 'shared/feed_message', :presenter => presenter, :item_no => 1
.both

View File

@ -12,7 +12,7 @@
.date= raw l(commits.first.authored_date, :format => :date_block_format)
.messages
- commits.each_with_index do |commit|
- GitPresenters::CommitAsMessagePresenter.present(commit, :branch => @branch, :project => @project) do |presenter|
- GitPresenters::CommitAsMessagePresenter.present(commit, :project => @project) do |presenter|
= render 'shared/feed_message', :presenter => presenter, :item_no => counter
- counter += 1
.both

View File

@ -3,7 +3,7 @@
%tbody
- commits.each do |commit|
- item_no = commit.id
- GitPresenters::CommitAsMessagePresenter.present(commit, :branch => @branch, :project => @project) do |presenter|
- GitPresenters::CommitAsMessagePresenter.present(commit, :project => @project) do |presenter|
%tr
%td
%img{:height => 16, :alt => "avatar", :src => presenter.image}

View File

@ -3,7 +3,7 @@
= render 'about_block', :project => @project
%h3= t("layout.projects.last_commit")
- GitPresenters::CommitAsMessagePresenter.present(@commit, :branch => @branch, :project => @project) do |presenter|
- GitPresenters::CommitAsMessagePresenter.present(@commit, :project => @project) do |presenter|
= render :partial => 'shared/feed_message', :locals => {:presenter => presenter, :item_no => 1}
.both

View File

@ -2,5 +2,4 @@ en:
layout:
messages:
commits:
header_with_branch: "%{committer} has added %{commit} into %{branch} branch"
header: "%{committer} has added %{commit}"

View File

@ -2,5 +2,4 @@ ru:
layout:
messages:
commits:
header_with_branch: "%{committer} добавил коммит %{commit} в ветку %{branch}"
header: "%{committer} добавил коммит %{commit}"

View File

@ -1,7 +1,7 @@
ru:
title_editing:
'Редактирование'
at: at
at: в
users:
settings:
profile: