#907: add count of commits

This commit is contained in:
Vokhmin Alexey V 2013-02-12 20:52:01 +04:00
parent 77d3a01614
commit 61d638e172
3 changed files with 5 additions and 3 deletions

View File

@ -30,8 +30,10 @@
%ul.tabnav-tabs
%li{:class => ('selected' if act == :show && contr == :trees )}
= link_to t('project_menu.files'), tree_path(project, treeish)
- commit_count = project.repo.commit_count(treeish)
- commit_count = '1000+' if commit_count > 1000
%li{:class => ('selected' if act == :index && contr == :commits )}
= link_to t('project_menu.commits'), commits_path(project, treeish)
= link_to t('project_menu.commits', :count => commit_count), commits_path(project, treeish)
%li{:class => ('selected' if act == :branches && contr == :trees )}
= link_to t('project_menu.branches', :count => project.repo.branches.count), branches_path(project)
%li.tags{:class => ('selected' if act == :tags && contr == :trees )}

View File

@ -24,7 +24,7 @@ en:
project_menu:
code: Code
files: Files
commits: Commits
commits: Commits (%{count})
branches: Branches (%{count})
tags: Tags (%{count})
builds: Builds

View File

@ -24,7 +24,7 @@ ru:
project_menu:
code: Код
files: Файлы
commits: Коммиты
commits: Коммиты (%{count})
branches: Ветки (%{count})
tags: Теги (%{count})
builds: Сборки