diff --git a/app/views/activity_feeds/_sidebar.html.haml b/app/views/activity_feeds/_sidebar.html.haml index 22680450b..5d6c0e3a4 100644 --- a/app/views/activity_feeds/_sidebar.html.haml +++ b/app/views/activity_feeds/_sidebar.html.haml @@ -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 diff --git a/config/locales/models/activity_feed.en.yml b/config/locales/models/activity_feed.en.yml index 3a3e70e9b..c1ded633c 100644 --- a/config/locales/models/activity_feed.en.yml +++ b/config/locales/models/activity_feed.en.yml @@ -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: diff --git a/config/locales/models/activity_feed.ru.yml b/config/locales/models/activity_feed.ru.yml index a89b1ce3e..cb4f93263 100644 --- a/config/locales/models/activity_feed.ru.yml +++ b/config/locales/models/activity_feed.ru.yml @@ -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: