somleng/somleng

View on GitHub
app/views/dashboard/sip_trunks/index.html.erb

Summary

Maintainability
Test Coverage
<%= page_title(title: "SIP Trunks") do %>
  <%= render("shared/filters") do |form| %>
    <%= form.text_field_tag(:name, params.dig(:filter, :name)) %>
    <%= form.date_range title: "Created At", filter_value: [params.dig(:filter, :from_date), params.dig(:filter, :to_date)] %>
  <% end %>
  <% if policy(:sip_trunk).new? %>
    <%= render("shared/new_resource_page_action", path: new_dashboard_sip_trunk_path) %>
  <% end %>
<% end %>

<div class="card-body">
  <%= render "collection", resources: @resources %>

  <%= render "shared/pagination", resources: @resources %>
</div>