joshsoftware/code-curiosity

View on GitHub
app/views/admin/repositories/_repos_table.html.haml

Summary

Maintainability
Test Coverage
%table.table.table-hover.table-bordered#repos
  %thead
    %tr
      %th.col-xs-2
        Name
        .badge Forks
      %th.col-xs-3 Description
      %th.col-xs-1 Stars
      %th.col-xs-1 Ignored
      %th.col-xs-1 To be Ignored?
  %tbody
    - @repos.each do |repo|
      %tr
        %td.col-xs-2
          = link_to repo.name,  repo.source_url, target: "_blank"
          - if repo.popular? || repo.source_gh_id.nil?
            .badge= child_count(repo.id)
        %td.col-xs-3= repo.description
        %td.col-xs-1= repo.stars
        %td.col-xs-1= repo.ignore ? 'Yes' : 'No'
        %td.col-xs-1
          %input.secondary{:type => "checkbox", name: "ignore",checked: check_boolean("#{repo.ignore}"), id: "#{repo.id}"}