2017-05-31 18:42:52 +05:30
.row
.col-md-12
.page-header
%h1 Organizations
2018-01-13 21:24:00 -06:00
- if can? :manage, :all
.btn-group.pull-right
= link_to 'Create Organization', new_admin_organization_path, class: 'btn btn-success pull-right'
2017-05-31 18:42:52 +05:30
%p.text-muted
Manage organizations in OSEM
2017-06-13 10:22:23 +03:00
.row
.col-md-12
2018-06-15 18:20:18 -07:00
%table.datatable
2017-06-13 10:22:23 +03:00
%thead
2023-03-04 13:12:47 -08:00
%tr
%th Name
%th Upcoming Conferences
%th Past Conferences
%th Code of Conduct?
%th Actions
2017-06-13 10:22:23 +03:00
%tbody
- @organizations.each do |organization|
2018-03-16 12:02:49 -07:00
%tr{ id: "organization-#{organization.id}" }
2017-06-13 10:22:23 +03:00
%td
= organization.name
%td
2017-07-11 04:59:03 +05:30
= organization.conferences.upcoming.count
2017-06-13 10:22:23 +03:00
%td
2017-07-11 04:59:03 +05:30
= organization.conferences.past.count
2018-03-16 12:02:49 -07:00
%td.text-center
- unless organization.code_of_conduct.blank?
2022-05-18 06:31:12 +02:00
= icon 'fa-solid', 'check', title: 'yes'
2017-06-13 10:22:23 +03:00
%td
.btn-group
2017-08-22 17:25:34 +05:30
= link_to 'Admins', admins_admin_organization_path(organization),
method: :get, class: 'btn btn-success'
2017-06-13 10:22:23 +03:00
= 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?" }
2018-04-12 13:18:50 -04:00
= link_to 'Add Conference', new_admin_conference_path, method: :get, class: 'btn btn-info'