osem-fcy/app/views/admin/organizations/index.html.haml
Andrew Kvalheim 1f31c1c80d Correct invalid table markup
- Add required <tr> within <thead>
  - Add implicit <tbody> after <thead>
2023-03-04 14:33:08 -08:00

40 lines
1.6 KiB
Text

.row
.col-md-12
.page-header
%h1 Organizations
- if can? :manage, :all
.btn-group.pull-right
= link_to 'Create Organization', new_admin_organization_path, class: 'btn btn-success pull-right'
%p.text-muted
Manage organizations in OSEM
.row
.col-md-12
%table.datatable
%thead
%tr
%th Name
%th Upcoming Conferences
%th Past Conferences
%th Code of Conduct?
%th Actions
%tbody
- @organizations.each do |organization|
%tr{ id: "organization-#{organization.id}" }
%td
= organization.name
%td
= organization.conferences.upcoming.count
%td
= organization.conferences.past.count
%td.text-center
- unless organization.code_of_conduct.blank?
= icon 'fa-solid', 'check', title: 'yes'
%td
.btn-group
= link_to 'Admins', admins_admin_organization_path(organization),
method: :get, class: 'btn btn-success'
= link_to 'Edit', edit_admin_organization_path(organization),
method: :get, class: 'btn btn-primary'
= link_to 'Delete', admin_organization_path(organization),
method: :delete, class: 'btn btn-danger', data: { confirm: "Warning: This will delete #{organization.name} and all its data which includes data for all conferences within #{organization.name}. Do you really want to continue?" }
= link_to 'Add Conference', new_admin_conference_path, method: :get, class: 'btn btn-info'