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

31 lines
1.3 KiB
Plaintext

p
= link_to t('layout.activity_feed.new_project'), new_project_path,
class: 'btn btn-primary btn-small', role: 'button'
== render 'filters'
hr
h5= t('layout.activity_feed.my_last_projects')
ul.nav.nav-pills.nav-stacked
- current_user.projects.order(updated_at: :desc).limit(5).each do |project|
li
= link_to project_path(project) do
= fa_visibility_icon project
= project.name_with_owner
li
= link_to t('layout.activity_feed.all_my_projects'), projects_path
hr
- midnight = Time.now.utc.to_date
h5= t 'layout.activity_feed.my_builds_by_day'
ul.nav.nav-pills.nav-stacked
- ['BuildList::BUILD_PUBLISHED', 'BuildList::SUCCESS', 'BuildList::BUILD_STARTED',
'BuildList::BUILD_PENDING', 'BuildList::BUILD_ERROR'].each do |state|
li
a[ href = 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}) ]
span.badge.pull-right
= BuildList.for_status(state.constantize).for_user(current_user).for_notified_date_period(midnight, nil).count
= t "layout.build_lists.statuses.#{state.demodulize.downcase}"
li
a[ href = build_lists_path ]=t 'layout.activity_feed.all_my_builds'