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

34 lines
1.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
2012-08-10 17:37:21 +01:00
= link_to project.name_with_owner, project_path(project)
%tr
%td
\ 
%td
= link_to t("layout.activity_feed.all_my_projects"), projects_path
.block
- midnight = Time.now.utc.to_date
%h3= t("layout.activity_feed.my_builds_by_day")
%table{:cellpadding => "0", :cellspacing => "0"}
%tbody
2013-01-24 11:32:00 +00:00
- ['BuildList::BUILD_PUBLISHED', 'BuildList::SUCCESS', 'BuildList::BUILD_STARTED', 'BuildList::BUILD_PENDING', 'BuildList::BUILD_ERROR'].each do |state|
2012-04-13 19:26:34 +01:00
%tr
%td.first
= link_to t("layout.build_lists.statuses.#{state.demodulize.downcase}"), build_lists_path(:filter => {:status => state.constantize, :'updated_at_start(1i)' => midnight.year, :'updated_at_start(2i)' => midnight.month, :'updated_at_start(3i)' => midnight.day})
2012-04-13 19:26:34 +01:00
%td= BuildList.for_status(state.constantize).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