Merge pull request #33 from differentreality/final_difficulty_levels
Add difficulty levels
This commit is contained in:
commit
4ed72d4967
15 changed files with 119 additions and 3 deletions
|
|
@ -31,6 +31,10 @@
|
|||
%li.active= link_to "Event Types", "#"
|
||||
- else
|
||||
%li= link_to "Event Types", admin_conference_eventtype_list_path(@conference.short_title)
|
||||
- if activated == "Difficulty Levels"
|
||||
%li.active= link_to "Difficulty Levels", "#"
|
||||
- else
|
||||
%li= link_to "Difficulty Levels", admin_conference_difficulty_levels_path(@conference.short_title)
|
||||
- if activated == "Social Events"
|
||||
%li.active= link_to "Social Events", "#"
|
||||
- else
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
.nested-fields
|
||||
= f.inputs do
|
||||
= f.input :title, :required => true
|
||||
= f.input :description, :input_html => {:rows => 3, :class => "span6"}
|
||||
= f.input :color, :input_html => {:size => 6, :type => "color"}
|
||||
= remove_association_link :difficulty_level, f
|
||||
9
app/views/admin/difficulty_levels/index.html.haml
Normal file
9
app/views/admin/difficulty_levels/index.html.haml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span3
|
||||
= render 'admin/conference/sidebar', :activated => "Difficulty Levels"
|
||||
.span9
|
||||
= semantic_form_for(@conference, :url => admin_conference_difficulty_levels_path(@conference.short_title)) do |f|
|
||||
= f.input :use_difficulty_levels, :label => false
|
||||
= dynamic_association :difficulty_levels, "Difficulty_Levels", f
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
|
|
@ -71,6 +71,21 @@
|
|||
- @tracks.each do |track|
|
||||
%li= link_to track.name, admin_conference_event_path(@conference.short_title, @event, :track_id => track.id) ,
|
||||
:method => :put, :track_id => track.id
|
||||
%tr
|
||||
%td
|
||||
%b Difficulty
|
||||
%td
|
||||
.dropdown
|
||||
= link_to "#", :class => "dropdown-toggle", :id => "difficulty-dropdown" do
|
||||
- if @event.difficulty_level.nil?
|
||||
Difficulty Level
|
||||
- else
|
||||
= @event.difficulty_level.title
|
||||
<b class="caret"></b>
|
||||
%ul.dropdown-menu
|
||||
- @difficulty_levels.each do |difficulty|
|
||||
%li= link_to difficulty.title, admin_conference_event_path(@conference.short_title, @event, :difficulty_level_id => difficulty.id) ,
|
||||
:method => :put, :difficulty_level_id => difficulty.id
|
||||
- if !@event.room.nil?
|
||||
%tr
|
||||
%td
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@
|
|||
%b Type
|
||||
%th
|
||||
%b Track
|
||||
%th
|
||||
%b Difficulty
|
||||
%th
|
||||
%b State
|
||||
- @events.each do |event|
|
||||
|
|
@ -92,6 +94,8 @@
|
|||
- @tracks.each do |track|
|
||||
%li= link_to track.name, admin_conference_event_path(@conference.short_title, event, :track_id => track.id) ,
|
||||
:method => :put, :track_id => track.id
|
||||
%td
|
||||
= event.difficulty_level.title if @conference.use_difficulty_levels && event.difficulty_level
|
||||
%td
|
||||
- if event.state == "withdrawn"
|
||||
Withdrawn
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue