<%= admin_breadcrumbs(@breadcrumbs) %>

Classrooms

<%= link_to "New Classroom", new_admin_classroom_path, class: "inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700" %>
<% if @classrooms.any? %> <% @classrooms.each do |classroom| %> <% end %> <% else %> <% end %>
<%= sort_link(:id, "ID") %> <%= sort_link(:name, "Name") %> Grade School Year <%= sort_link(:archived, "Archived") %> <%= sort_link(:trading_enabled, "Trading Enabled") %> Actions
<%= classroom.id %> <%= classroom.name %> <%= classroom.grades.pluck(:name).join(', ') %> <%= "#{classroom.school_name} - #{classroom.year_name}" %> <% if classroom.archived? %> Yes <% else %> No <% end %> <% if classroom.trading_enabled? %> Yes <% else %> No <% end %>
<%= link_to "View", admin_classroom_path(classroom), class: "text-blue-600 hover:text-blue-800" %> <%= link_to "Edit", edit_admin_classroom_path(classroom), class: "text-gray-600 hover:text-gray-800" %> <% if classroom.archived? %> <%= link_to "Activate", toggle_archive_admin_classroom_path(classroom), data: { turbo_method: :patch, turbo_confirm: "Are you sure you want to activate this classroom?" }, class: "text-blue-600 hover:text-blue-800" %> <% else %> <%= link_to "Archive", toggle_archive_admin_classroom_path(classroom), data: { turbo_method: :patch, turbo_confirm: "Are you sure you want to archive this classroom? Teachers and students will no longer be able to access it, but all historical data will be preserved." }, class: "text-red-600 hover:text-red-800" %> <% end %>

No records found

No classrooms found. Create your first classroom to get started.