education/classroom

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

Summary

Maintainability
Test Coverage
<div class="border-bottom border-gray-dark py-3" >
  <% if @organizations.present? %>

    <%= render partial: "organization_filters", locals: {
        submit_url: search_organizations_path,
        query: @query,
        sort_options: @sort_modes.keys,
        sort_option_links: @sort_modes_links,
        active_sort_option: @current_sort_mode,
        view_options: @view_modes.keys,
        view_option_links: @view_modes_links,
        active_view_option: @current_view_mode
      } %>
  <% end %>
</div>

<% if @organizations.present? %>
    <div class="my-4" id="js-search-results">
      <%= render partial: 'organization_card_layout', locals: {organizations: @organizations} %>
    </div>
<% else %>
    <div class="blankslate large-format spacious clean-background">
      <h3><%= t('views.organizations.no_classrooms') %></h3>
      <p><%= t('views.organizations.no_classrooms_desc') %></p>

      <%= link_to new_organization_path, class: 'btn btn-primary btn-big', role: 'button' do %>
        <%= t('views.organizations.create_first_classroom') %>
      <% end %>
    </div>
<% end %>