rosa-build/app/views/activity_feeds/_sidebar.html.haml

49 lines
2.4 KiB
Plaintext
Raw Normal View History

.bordered
= link_to t("layout.activity_feed.new_project"), new_project_path, :class => 'button'
%h3= t("layout.activity_feed.my_last_projects")
%table
%tbody
2012-03-11 20:04:49 +00:00
- current_user.projects.order('updated_at DESC').limit(5).each do |project|
%tr
%td
- if project.public?
= image_tag("unlock.png")
- else
= image_tag("lock.png")
%td
= link_to "#{project.owner.uname}/#{project.name}", project_path(project)
%tr
%td
\ 
%td
= link_to t("layout.activity_feed.all_my_projects"), projects_path
.block
2012-03-12 08:52:38 +00:00
- 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, :updated_at => midnight})
2012-03-12 08:52:38 +00:00
%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, :updated_at => midnight})
2012-03-12 08:52:38 +00:00
%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, :updated_at => midnight})
2012-03-12 08:52:38 +00:00
%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, :updated_at => midnight})
2012-03-12 08:52:38 +00:00
%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, :updated_at => midnight})
2012-03-12 08:52:38 +00:00
%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
%td