fatfreecrm/fat_free_crm

View on GitHub
app/views/leads/_title_bar.html.haml

Summary

Maintainability
Test Coverage
#confirm{ hidden }
.title_tools#menu
  - unless %w(converted rejected).include?(@lead.status)
    = link_to_inline(:convert_lead, convert_lead_path(@lead), text: t(:convert)) + " | "
  = link_to_inline(:edit_lead, edit_lead_path(@lead), text: t(:edit)) + " | "
  - if @lead.status != "rejected"
    = link_to_function(t(:reject) + '?', confirm_reject(@lead)) + " | "
  = link_to_function(t(:delete) + '?', confirm_delete(@lead))
.title_tools#buttons
  = view_buttons
.title#title
  = h(@lead.full_name)
  = image_tag("loading.gif", size: :thumb, id: "loading", style: "display: none;")

%div#convert_lead{ hidden }
%div#edit_lead{ hidden }