Merge pull request #289 from warpc/265-new_design_for_activity_feed

[refs #265] Work today builds statistics
This commit is contained in:
Vladimir Sharshov 2012-03-12 02:15:26 -07:00
commit 04622790fc
3 changed files with 13 additions and 12 deletions

View File

@ -18,29 +18,30 @@
%td
= link_to t("layout.activity_feed.all_my_projects"), projects_path
.block
- midnight = Time.new.midnight
%h3= t("layout.activity_feed.my_builds_by_day")
%table{:cellpadding => "0", :cellspacing => "0"}
%tbody
%tr
%td.first
= link_to t("layout.build_lists.statuses.#{:build_published}"), build_lists_path(:filter => {:status => BuildList::BUILD_PUBLISHED})
%td= BuildList.for_status(BuildList::BUILD_PUBLISHED).for_user(current_user).count
= link_to t("layout.build_lists.statuses.#{:build_published}"), build_lists_path(:filter => {:status => BuildList::BUILD_PUBLISHED, :notified_at => midnight})
%td= BuildList.for_status(BuildList::BUILD_PUBLISHED).for_user(current_user).for_notified_date_period(midnight, nil).count
%tr
%td.first
= link_to t("layout.build_lists.statuses.#{:success}"), build_lists_path(:filter => {:status => BuildServer::SUCCESS})
%td= BuildList.for_status(BuildServer::SUCCESS).for_user(current_user).count
= link_to t("layout.build_lists.statuses.#{:success}"), build_lists_path(:filter => {:status => BuildServer::SUCCESS, :notified_at => midnight})
%td= BuildList.for_status(BuildServer::SUCCESS).for_user(current_user).for_notified_date_period(midnight, nil).count
%tr
%td.first
= link_to t("layout.build_lists.statuses.#{:build_started}"), build_lists_path(:filter => {:status => BuildServer::BUILD_STARTED})
%td= BuildList.for_status(BuildServer::BUILD_STARTED).for_user(current_user).count
= link_to t("layout.build_lists.statuses.#{:build_started}"), build_lists_path(:filter => {:status => BuildServer::BUILD_STARTED, :notified_at => midnight})
%td= BuildList.for_status(BuildServer::BUILD_STARTED).for_user(current_user).for_notified_date_period(midnight, nil).count
%tr
%td.first
= link_to t("layout.build_lists.statuses.#{:build_pending}"), build_lists_path(:filter => {:status => BuildList::BUILD_PENDING})
%td= BuildList.for_status(BuildList::BUILD_PENDING).for_user(current_user).count
= link_to t("layout.build_lists.statuses.#{:build_pending}"), build_lists_path(:filter => {:status => BuildList::BUILD_PENDING, :notified_at => midnight})
%td= BuildList.for_status(BuildList::BUILD_PENDING).for_user(current_user).for_notified_date_period(midnight, nil).count
%tr
%td.first
= link_to t("layout.build_lists.statuses.#{:build_error}"), build_lists_path(:filter => {:status => BuildServer::BUILD_ERROR})
%td= BuildList.for_status(BuildServer::BUILD_ERROR).for_user(current_user).count
= link_to t("layout.build_lists.statuses.#{:build_error}"), build_lists_path(:filter => {:status => BuildServer::BUILD_ERROR, :notified_at => midnight})
%td= BuildList.for_status(BuildServer::BUILD_ERROR).for_user(current_user).for_notified_date_period(midnight, nil).count
%tr
%td.first
= link_to t("layout.activity_feed.all_my_builds"), build_lists_path

View File

@ -5,7 +5,7 @@ en:
my_last_projects: My last projects
all_my_projects: All my projects
all_my_builds: All my builds
my_builds_by_day: My buils for last 24 hours
my_builds_by_day: My today builds
new_project: Create project
notifications:

View File

@ -5,7 +5,7 @@ ru:
my_last_projects: Мои последние проекты
all_my_projects: Все мои проекты
all_my_builds: Все мои сборки
my_builds_by_day: Мои сборки за 24 часа
my_builds_by_day: Мои сборки за день
new_project: Создать проект
notifications: