marnen/duckbill

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

Summary

Maintainability
Test Coverage
- content_for :title do
  = _ 'My Projects'

%p
  = link_to new_project_path, class: :button do
    %span.fi-clipboard-notes
    = _("New project")

- if !@has_clients
  %p!= _ 'You have no clients yet. Please %{a}add some%{/a} and then come back here to create your first project.' % {a: "<a href='#{new_client_path}'>".html_safe, '/a': '</a>'.html_safe}
- elsif @projects.present?
  %table
    %thead= render 'header'
    %tbody= render @projects
- else
  %p!= _ 'You have no projects yet. Why not %{a}add some%{/a}?' % {a: "<a href='#{new_project_path}'>".html_safe, '/a': '</a>'.html_safe}