fatfreecrm/fat_free_crm

View on GitHub
app/views/shared/_empty.html.haml

Summary

Maintainability
Test Coverage
- assets = controller_name
- asset = assets.singularize
- new_asset_path = url_for(action: :new, controller: controller_name)
#empty
  - if @current_query.blank?
    == #{t(:could_not_find, t(assets.downcase))} #{link_to_inline(:"create_#{asset}", new_asset_path, plain: true, text: "#{t(:create_a_new)} #{t(asset + '_small')}")}.
  - else
    == #{t(:could_not_find_matching, t(assets.downcase + '_small'))} <span class="cool"><b>#{h @current_query}</b></span>; #{t :please_retry}