marnen/duckbill

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

Summary

Maintainability
Test Coverage
- content_for :title do
  = _ 'Time Entries'

%p
  = link_to new_time_entry_path, class: :button do
    %span.fi-clock
    = _("New time entry")

- if @time_entries.present?
  %table.time_entries
    %thead= render 'header'
    %tbody= render @time_entries
- else
  %p!= _ 'You have no time entries yet. Why not %{a}add some%{/a}?' % {a: "<a href='#{new_time_entry_path}'>".html_safe, '/a': '</a>'.html_safe}