Files
osem/app/views/admin/difficulty_levels/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

36 lines
1.5 KiB
Plaintext

.row
.col-md-12
.page-header
%h1 Difficulty Levels
%p.text-muted
Classify your conference.program.events by difficulty
.row
.col-md-12
%table.table.table-hover#difficulty_levels
%thead
%tr
%th Title
%th Description
%th Color
%th Actions
%tbody
- @conference.program.difficulty_levels.each do |difficulty_level|
%tr
%td
= difficulty_level.title
%td
= difficulty_level.description
%td
%span.label{ style: "background-color: #{difficulty_level.color}; color: #{ contrast_color(difficulty_level.color) };" }
= difficulty_level.color
%td
.btn-group{ role: 'group' }
= link_to 'Edit', edit_admin_conference_program_difficulty_level_path(@conference.short_title, difficulty_level.id),
method: :get, class: 'btn btn-primary'
= link_to 'Delete', admin_conference_program_difficulty_level_path(@conference.short_title, difficulty_level.id),
method: :delete, class: 'btn btn-danger',
data: { confirm: "Do you really want to delete #{difficulty_level.title}? Attention: This difficulty level will be removed from all Events that have it set" }
.row
.col-md-12.text-right
= link_to 'Add Difficulty Level', new_admin_conference_program_difficulty_level_path(@conference.short_title), class: 'btn btn-primary'