#table.table_filters = form_tag account_referrals_path(anchor: :social, per: params[:per]), method: :get .table_filters_content .table_search label for="guid" = t :find, scope: [:account, :refferals, :label] = text_field_tag :guid, params[:guid], placeholder: "#{t(:find, scope: [:account, :refferals, :placeholder])}" = submit_tag t(:find, scope: [:account, :refferals, :button]), class: 'button' .table_filters_dates .table_date_item label for="start_date" = t :start_date, scope: [:account, :refferals, :text] = text_field_tag :start_date, params[:start_date], readonly: true, placeholder: ' ', class: 'calendar' .table_date_item label for="end_date" = t :end_date, scope: [:account, :refferals, :text] = text_field_tag :end_date, params[:end_date], readonly: true, placeholder: ' ', class: 'calendar' .table_filters_level - [1, 2].each do |item| .table_level_item.ng-cloak = check_box_tag "referrals_level[]", item, params[:referrals_level] && params[:referrals_level].include?(item.to_s), class: "uniform", id: "referrals_level_#{item}" = label_tag "referrals_level_#{item}", [t("affilate.commission.level_#{item}"), "Level"].join(" ") .table_search_buttons = submit_tag t(:filter_set, scope: [:account, :refferals, :button]), class: 'button button_set' = link_to t(:filter_clear, scope: [:account, :refferals, :button]), account_referrals_path(page: nil, per: params[:per]), class: 'button button_clear' table thead tr td = t :date, scope: [:account, :refferals, :table_title] td = t :transaction, scope: [:account, :refferals, :table_title] td = t :referral, scope: [:account, :refferals, :table_title] td = t :level, scope: [:account, :refferals, :table_title] td = t :cost, scope: [:account, :refferals, :table_title] td = t :commission, scope: [:account, :refferals, :table_title] tbody = render partial: 'commission', collection: @commissions - if @commissions.empty? = render partial: 'account/no_records', locals: { theme: t('commissions', scope: [:account, :no_records]) } - else = render partial: 'table_mobile', object: @commissions.first, as: :commission .table_navigation .table_items_show = perpage theme: 'cabinet_default' .table_pagination = paginate @commissions, theme: 'cabinet_default' = content_for :javascript = javascript_include_tag "/assets/account/affiliate.js" coffee: document.addEventListener 'DOMContentLoaded', -> AffiliateProgram.init()