%table.records %thead %tr %th= orderable_column_link(:type) %th= orderable_column_link('campaign_group_name', :campaign_group) %th= orderable_column_link(:name) %th= orderable_column_link(:code) %th= orderable_column_link(:affiliate_fee) %th= orderable_column_link(:sales_fee) %th= e9_t(:actions) %tbody - if collection.empty? %tr %td{:colspan => 7}= e9_t(:no_records_text) - else - collection.each do |record| %tr{:id => "ids_#{record.id}", :class => cycle('odd', 'even')} %td.record-type = record.type[/(.*)Campaign/, 1] %td.record-campaign-group = record.campaign_group_name || e9_t(:no_group, :scope => 'e9_crm.campaigns') %td.record-name = record.name %td.record-code = display_campaign_code(record.code) %td.record-affiliate-fee = display_campaign_fee(record.affiliate_fee) %td.record-sales-fee = display_campaign_fee(record.sales_fee) %td.links - if record.is_a?(AdvertisingCampaign) = link_to t(:edit_dated_costs), advertising_campaign_dated_costs_path(record), :class => 'dated-costs' = link_to_edit_campaign(record) - if @controller.should_paginate_index = will_paginate collection