gitcoinco/code_fund_ads

View on GitHub
app/views/property_campaigns/index.html.erb

Summary

Maintainability
Test Coverage
<%= render(PageComponent.new(subject: @property, sidebar: true, tabs: TabsComponent.new(tabs: property_tabs(@property)))) do |component| %>
  <% component.with(:header) do %>
    <%= render(Page::HeaderComponent.new(title: @property.name, sidebar: true, datepicker: true, buttons: [
      layout_button(link: new_property_path, icon: "fas fa-plus", title: "New property"),
      layout_button(link: new_property_path(clone: @property.id), icon: "fad fa-copy", title: "Clone property")
    ])) %>
  <% end %>
  <% component.with(:body) do %>
    <div class="alert alert-primary has-icon d-flex justify-content-between align-items-center " role="alert">
      <div class="alert-icon">
        <i class="fas fa-flag-alt"></i>
      </div>
      <p class="mb-0">View examples of our ad templates <%= link_to "here", demo_path, class: "alert-link", target: "_blank" %>.</p>
    </div>
    <%= render CardComponent.new do %>
      <%= render "/property_campaigns/table", report: @report, pagy: @pagy %>
    <% end %>
  <% end %>
<% end %>