gitcoinco/code_fund_ads

View on GitHub
app/views/campaign_properties/_tr.html.erb

Summary

Maintainability
Test Coverage
<%= table_row add_class: campaign.prohibited_property_ids.include?(report.scoped_by.id) ? "bg-light" : "" do %>
  <%= table_data do %>
    <div class="d-block text-dark">
      <%= authorized_user.can_admin_system? ? link_to(report.scoped_by.name, report.scoped_by) : report.scoped_by.name %>
      <%= link_to tag.sup("", class: "fa-xs fad fa-external-link"), report.scoped_by.url, target: "_blank", class: "link-muted" %>
    </div>
  <% end %>
  <% if @campaign.standard? %>
    <%= table_data number_with_delimiter report.impressions_count %>
  <% end %>
  <%= table_data number_with_delimiter(report.clicks_count) %>
  <% if @campaign.standard? %>
    <%= table_data number_to_percentage(report.click_rate, precision: 2) %>
    <%= table_data number_with_delimiter(report.cpm.format) %>
    <%= table_data number_with_delimiter(report.cpc.format) %>
  <% end %>
<% end %>