2014-03-17 16:36:32 +01:00
.row
2014-11-25 10:47:18 +01:00
.col-md-12
.page-header
%h1 Difficulty Levels
%p.text-muted
2015-10-25 13:29:02 +02:00
Classify your conference.program.events by difficulty
2014-11-25 10:47:18 +01:00
.row
.col-md-12
%table.table.table-hover#difficulty_levels
%thead
2023-03-04 13:12:47 -08:00
%tr
%th Title
%th Description
%th Color
%th Actions
2014-11-25 10:47:18 +01:00
%tbody
2015-10-25 13:29:02 +02:00
- @conference.program.difficulty_levels.each do |difficulty_level|
2014-11-25 10:47:18 +01:00
%tr
%td
= difficulty_level.title
%td
= difficulty_level.description
%td
2017-03-11 13:25:39 +05:30
%span.label{ style: "background-color: #{difficulty_level.color}; color: #{ contrast_color(difficulty_level.color) };" }
2014-11-25 10:47:18 +01:00
= difficulty_level.color
%td
2017-03-11 13:25:39 +05:30
.btn-group{ role: 'group' }
2015-10-25 13:29:02 +02:00
= link_to 'Edit', edit_admin_conference_program_difficulty_level_path(@conference.short_title, difficulty_level.id),
2014-11-25 10:47:18 +01:00
method: :get, class: 'btn btn-primary'
2015-10-25 13:29:02 +02:00
= link_to 'Delete', admin_conference_program_difficulty_level_path(@conference.short_title, difficulty_level.id),
2014-12-18 13:38:40 +01:00
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" }
2014-11-25 10:47:18 +01:00
.row
.col-md-12.text-right
2015-10-25 13:29:02 +02:00
= link_to 'Add Difficulty Level', new_admin_conference_program_difficulty_level_path(@conference.short_title), class: 'btn btn-primary'