diffux/diffux

View on GitHub
app/views/sweeps/index.html.haml

Summary

Maintainability
Test Coverage
- provide :title, Sweep.model_name.human(count: 2)

= render 'shared/breadcrumbs',
  crumbs: [[@project.name, @project],
           [Sweep.model_name.human(count: 2)]]

.page-header
  %h1
    = yield :title
    = start_new_sweep_button(@project)

= render 'sweeps/protip_curl'

%table.table.table-striped
  %thead
    %tr
      %th= Sweep.human_attribute_name(:title)
      %th= Sweep.human_attribute_name(:created_at)
      %th= t('.status')

  %tbody
    - @project.sweeps.each do |sweep|
      %tr{ data: { keyboard_focusable: true } }
        %td= link_to sweep.title, [@project, sweep], title: sweep.description
        %td
          = time_tag sweep.created_at do
            = t(:time_ago, time: time_ago_in_words(sweep.created_at))
        %td= sweep_progress_bar(sweep)