Dalphi/dalphi

View on GitHub
app/views/annotators/_projects.slim

Summary

Maintainability
Test Coverage
.row
  .col-xs-12
    .card
      h3.card-header
        = t('activerecord.attributes.annotator.projects')
      - if annotator.projects.any?
        .card-block.table
          table.table.table-striped.table-hover
            thead.thead-default
              tr
                th = t('activerecord.attributes.project.title')
                th = t('activerecord.attributes.project.description')
            tbody
              - annotator.projects.each do |project|
                ruby:
                  data = {}
                  data = { href: project_path(project) } if current_role.projects.include?(project)
                tr data=data
                  td
                    = project.title
                    - if project == current_project
                      |  
                      span.tag.tag-primary
                        = t('projects.current')
                  td = project.description
              coffee:
                window.clickableTableRow = new window.ClickableTableRow()
      - else
        .card-block
          p.card-text
            = t('annotators.projects.blank-slate')