Simplify sidebar and navigation

Check existence of supporter levels
This commit is contained in:
Henne Vogelsang 2014-03-04 10:10:07 +01:00
parent 59933115fc
commit 0982be8579
21 changed files with 93 additions and 169 deletions

View file

@ -1,4 +1,13 @@
module ApplicationHelper module ApplicationHelper
def active_nav_li(link)
if current_page?(link)
return 'active'
else
return ''
end
end
def getdatetime(registration, field) def getdatetime(registration, field)
if registration.send(field.to_sym).kind_of?(String) if registration.send(field.to_sym).kind_of?(String)
DateTime.parse(registration.send(field.to_sym)).strftime("%d %b %H:%M") if registration.send(field.to_sym) DateTime.parse(registration.send(field.to_sym)).strftime("%d %b %H:%M") if registration.send(field.to_sym)

View file

@ -1,7 +1,7 @@
.container-fluid .container-fluid
.row-fluid .row-fluid
.span3 .span3
= render 'admin/conference/sidebar', :activated => "Call for Papers" = render 'admin/conference/sidebar'
.span9 .span9
= semantic_form_for(@cfp, :url => admin_conference_cfp_update_path(@conference.short_title),:html => {:multipart => true}) do |f| = semantic_form_for(@cfp, :url => admin_conference_cfp_update_path(@conference.short_title),:html => {:multipart => true}) do |f|
= f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" } = f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" }

View file

@ -3,55 +3,27 @@
%li.nav-header %li.nav-header
=@conference.short_title =@conference.short_title
Settings Settings
- if activated == "Conference" %li{:class=> active_nav_li(admin_conference_path(@conference.short_title))}
%li.active= link_to "Conference", "#" = link_to "Conference", admin_conference_path(@conference.short_title)
- else %li{:class=> active_nav_li(admin_conference_venue_info_path(@conference.short_title))}
%li= link_to "Conference", admin_conference_path(@conference.short_title) = link_to "Venue", admin_conference_venue_info_path(@conference.short_title)
- if activated == "Levels" %li{:class=> active_nav_li(admin_conference_cfp_info_path(@conference.short_title))}
%li.active= link_to "Supporter Levels", "#" = link_to "Call for Papers", admin_conference_cfp_info_path(@conference.short_title)
- else %li{:class=> active_nav_li(admin_conference_rooms_list_path(@conference.short_title))}
%li= link_to "Supporter Levels", admin_conference_supporter_levels_path(@conference.short_title) = link_to "Rooms", admin_conference_rooms_list_path(@conference.short_title)
- if activated == "Call for Papers" %li{:class=> active_nav_li(admin_conference_tracks_list_path(@conference.short_title))}
%li.active= link_to "Call for Papers", "#" = link_to "Tracks", admin_conference_tracks_list_path(@conference.short_title)
- else %li{:class=> active_nav_li(admin_conference_eventtype_list_path(@conference.short_title))}
%li= link_to "Call for Papers", admin_conference_cfp_info_path(@conference.short_title) = link_to "Event Types", admin_conference_eventtype_list_path(@conference.short_title)
- if activated == "Venue" %li{:class=> active_nav_li(admin_conference_difficulty_levels_path(@conference.short_title))}
%li.active= link_to "Venue", "#" = link_to "Difficulty Levels", admin_conference_difficulty_levels_path(@conference.short_title)
- else %li{:class=> active_nav_li(admin_conference_social_events_path(@conference.short_title))}
%li= link_to "Venue", admin_conference_venue_info_path(@conference.short_title) = link_to "Social Events", admin_conference_social_events_path(@conference.short_title)
- if activated == "Rooms" %li{:class=> active_nav_li(admin_conference_supporter_levels_path(@conference.short_title))}
%li.active= link_to "Rooms", "#" = link_to "Supporter Levels", admin_conference_supporter_levels_path(@conference.short_title)
- else %li{:class=> active_nav_li(admin_conference_email_settings_path(@conference.short_title))}
%li= link_to "Rooms", admin_conference_rooms_list_path(@conference.short_title) = link_to "Emails", admin_conference_email_settings_path(@conference.short_title)
- if activated == "Tracks" %li{:class=> active_nav_li(admin_conference_questions_path(@conference.short_title))}
%li.active= link_to "Tracks", "#" = link_to "Questions", admin_conference_questions_path(@conference.short_title)
- else %li{:class=> active_nav_li(admin_conference_volunteers_info_path(@conference.short_title))}
%li= link_to "Tracks", admin_conference_tracks_list_path(@conference.short_title) = link_to "Volunteers", admin_conference_volunteers_info_path(@conference.short_title)
- if activated == "Event Types"
%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
%li= link_to "Social Events", admin_conference_social_events_path(@conference.short_title)
- if activated == "Emails"
%li.active= link_to "Emails", "#"
- else
%li= link_to "Emails", admin_conference_email_settings_path(@conference.short_title)
- if activated == "Diet"
%li.active= link_to "Dietary Choices", "#"
- else
%li= link_to "Dietary Choices", admin_conference_dietary_list_path(@conference.short_title)
- if activated == "Questions"
%li.active= link_to "Questions", "#"
- else
%li= link_to "Questions", admin_conference_questions_path(@conference.short_title)
- if activated == "volunteers"
%li.active= link_to "Volunteer Options", "#"
- else
%li= link_to "Volunteer Options", admin_conference_volunteer_options_path(@conference.short_title)

View file

@ -1,7 +1,7 @@
.container-fluid .container-fluid
.row-fluid .row-fluid
.span3 .span3
= render 'admin/conference/sidebar', :activated => "Conference" = render 'admin/conference/sidebar'
.span9 .span9
= semantic_form_for(@conference, :url => admin_conference_path(@conference.short_title),:html => {:multipart => true}) do |f| = semantic_form_for(@conference, :url => admin_conference_path(@conference.short_title),:html => {:multipart => true}) do |f|
= f.input :title, :hint => "The full name of the conference, such as 'OpenSUSE Conference 2013'" = f.input :title, :hint => "The full name of the conference, such as 'OpenSUSE Conference 2013'"
@ -17,4 +17,4 @@
= image_tag @conference.logo(:thumb) = image_tag @conference.logo(:thumb)
= f.input :logo, :label => "Conference Logo", :hint => "This will be displayed on the front page." = f.input :logo, :label => "Conference Logo", :hint => "This will be displayed on the front page."
= f.input :html_export_path, :hint => "The path for static HTML exports" = f.input :html_export_path, :hint => "The path for static HTML exports"
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}

View file

@ -1,9 +1,9 @@
.container-fluid .container-fluid
.row-fluid .row-fluid
.span3 .span3
= render 'admin/conference/sidebar', :activated => "Difficulty Levels" = render 'admin/conference/sidebar'
.span9 .span9
= semantic_form_for(@conference, :url => admin_conference_difficulty_levels_path(@conference.short_title)) do |f| = semantic_form_for(@conference, :url => admin_conference_difficulty_levels_path(@conference.short_title)) do |f|
= f.input :use_difficulty_levels, :label => false = f.input :use_difficulty_levels, :label => false
= dynamic_association :difficulty_levels, "Difficulty_Levels", f = dynamic_association :difficulty_levels, "Difficulty_Levels", f
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}

View file

@ -1,7 +1,7 @@
.container-fluid .container-fluid
.row-fluid .row-fluid
.span3 .span3
= render 'admin/conference/sidebar', :activated => "Emails" = render 'admin/conference/sidebar'
.span9 .span9
= link_to "Template Help", "#", :id => "template-help-link" = link_to "Template Help", "#", :id => "template-help-link"
#template-help #template-help
@ -47,4 +47,4 @@
$("#template-help-link").click(function() { $("#template-help-link").click(function() {
$("#template-help").toggle(); $("#template-help").toggle();
}); });
}); });

View file

@ -1,8 +1,8 @@
.container-fluid .container-fluid
.row-fluid .row-fluid
.span3 .span3
= render 'admin/conference/sidebar', :activated => "Event Types" = render 'admin/conference/sidebar'
.span9 .span9
= semantic_form_for(@conference, :url => admin_conference_eventtype_update_path(@conference.short_title)) do |f| = semantic_form_for(@conference, :url => admin_conference_eventtype_update_path(@conference.short_title)) do |f|
= dynamic_association :event_types, "Event Types", f = dynamic_association :event_types, "Event Types", f
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}

View file

@ -1,7 +1,7 @@
.container-fluid .container-fluid
.row-fluid .row-fluid
.span3 .span3
= render 'admin/conference/sidebar', :activated => "Questions" = render 'admin/conference/sidebar'
.span9 .span9
.pull-right .pull-right
%b= link_to "Create New Question","#", "data-toggle" => "modal", "data-target" => "#new-question", :class => "btn btn-success" %b= link_to "Create New Question","#", "data-toggle" => "modal", "data-target" => "#new-question", :class => "btn btn-success"
@ -28,4 +28,4 @@
Save Save
.pull-right .pull-right
%button{:class=> "btn btn-danger", "data-dismiss"=> "modal", "aria-hidden"=>"true"} %button{:class=> "btn btn-danger", "data-dismiss"=> "modal", "aria-hidden"=>"true"}
Cancel Cancel

View file

@ -18,7 +18,7 @@
= p.text_field :company, :placeholder => "Company/User Group/nothing", :as => :string = p.text_field :company, :placeholder => "Company/User Group/nothing", :as => :string
= f.inputs "Registration Information" do = f.inputs "Registration Information" do
- if @conference.use_supporter_levels? - if @conference.use_supporter_levels? and @conference.supporter_levels.length > 0
= f.semantic_fields_for :supporter_registration do |reg| = f.semantic_fields_for :supporter_registration do |reg|
= reg.input :supporter_level, :as => :select, :collection => @conference.supporter_levels = reg.input :supporter_level, :as => :select, :collection => @conference.supporter_levels
= reg.input :code, :label => "Confirmation or registration code (if applicable)" = reg.input :code, :label => "Confirmation or registration code (if applicable)"
@ -35,11 +35,6 @@
%br %br
= f.input :social_events, :as => :check_boxes, :label => false, :collection => @conference.social_events = f.input :social_events, :as => :check_boxes, :label => false, :collection => @conference.social_events
- if @conference.use_dietary_choices?
= f.inputs "Food" do
= f.input :dietary_choice, :collection => [["None", nil]] + @conference.dietary_choices.map {|x| [x.title, x.id]},
:include_blank => false, :label => "Special Dietary Restriction"
= f.input :other_dietary_choice, :input_html => {:rows => "2", :class => "span6"}, :label => "Other Dietary Restictions (please describe)"
= f.action :submit, :button_html => { :value => "Edit Registration", :class => "btn btn-primary" } = f.action :submit, :button_html => { :value => "Edit Registration", :class => "btn btn-primary" }
:javascript :javascript
$("#registration_supporter_registration_attributes_supporter_level_id").change(function () { $("#registration_supporter_registration_attributes_supporter_level_id").change(function () {
@ -69,4 +64,4 @@
onSelect: function(selected) { onSelect: function(selected) {
$("#registration-arrival-datepicker").datepicker("option","maxDate", selected) $("#registration-arrival-datepicker").datepicker("option","maxDate", selected)
} }
}); });

View file

@ -19,7 +19,7 @@
= p.text_field :company, :placeholder => "Company/User Group/nothing", :as => :string = p.text_field :company, :placeholder => "Company/User Group/nothing", :as => :string
= f.inputs "Registration Information" do = f.inputs "Registration Information" do
- if @conference.use_supporter_levels? - if @conference.use_supporter_levels? and @conference.supporter_levels.length > 0
= f.semantic_fields_for @supporter_registration do |reg| = f.semantic_fields_for @supporter_registration do |reg|
= reg.input :supporter_level, :as => :select, :collection => @conference.supporter_levels = reg.input :supporter_level, :as => :select, :collection => @conference.supporter_levels
= reg.input :code, :label => "Confirmation or registration code (if applicable)" = reg.input :code, :label => "Confirmation or registration code (if applicable)"
@ -36,11 +36,6 @@
%br %br
= f.input :social_events, :as => :check_boxes, :label => false, :collection => @conference.social_events = f.input :social_events, :as => :check_boxes, :label => false, :collection => @conference.social_events
- if @conference.use_dietary_choices?
= f.inputs "Food" do
= f.input :dietary_choice, :collection => [["None", nil]] + @conference.dietary_choices.map {|x| [x.title, x.id]},
:include_blank => false, :label => "Special Dietary Restriction"
= f.input :other_dietary_choice, :input_html => {:rows => "2", :class => "span6"}, :label => "Other Dietary Restictions (please describe)"
= f.action :submit, :button_html => { :value => "Create", :class => "btn btn-primary"} = f.action :submit, :button_html => { :value => "Create", :class => "btn btn-primary"}
:javascript :javascript

View file

@ -1,8 +1,8 @@
.container-fluid .container-fluid
.row-fluid .row-fluid
.span3 .span3
= render 'admin/conference/sidebar', :activated => "Rooms" = render 'admin/conference/sidebar'
.span9 .span9
= semantic_form_for(@conference, :url => admin_conference_rooms_update_path(@conference.short_title)) do |f| = semantic_form_for(@conference, :url => admin_conference_rooms_update_path(@conference.short_title)) do |f|
= dynamic_association :rooms, "Rooms", f = dynamic_association :rooms, "Rooms", f
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}

View file

@ -1,8 +1,8 @@
.container-fluid .container-fluid
.row-fluid .row-fluid
.span3 .span3
= render 'admin/conference/sidebar', :activated => "Social Events" = render 'admin/conference/sidebar'
.span9 .span9
= semantic_form_for(@conference, :url => admin_conference_social_events_path(@conference.short_title)) do |f| = semantic_form_for(@conference, :url => admin_conference_social_events_path(@conference.short_title)) do |f|
= dynamic_association :social_events, "Social Events", f = dynamic_association :social_events, "Social Events", f
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}

View file

@ -1,9 +1,9 @@
.container-fluid .container-fluid
.row-fluid .row-fluid
.span3 .span3
= render 'admin/conference/sidebar', :activated => "Levels" = render 'admin/conference/sidebar'
.span9 .span9
= semantic_form_for(@conference, :url => admin_conference_supporter_levels_path(@conference.short_title)) do |f| = semantic_form_for(@conference, :url => admin_conference_supporter_levels_path(@conference.short_title)) do |f|
= f.input :use_supporter_levels, :label => false = f.input :use_supporter_levels, :label => false
= dynamic_association :supporter_levels, "Supporter Levels", f = dynamic_association :supporter_levels, "Supporter Levels", f
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}

View file

@ -1,8 +1,8 @@
.container-fluid .container-fluid
.row-fluid .row-fluid
.span3 .span3
= render 'admin/conference/sidebar', :activated => "Tracks" = render 'admin/conference/sidebar'
.span9 .span9
= semantic_form_for(@conference, :url => admin_conference_tracks_update_path(@conference.short_title)) do |f| = semantic_form_for(@conference, :url => admin_conference_tracks_update_path(@conference.short_title)) do |f|
= dynamic_association :tracks, "Tracks", f = dynamic_association :tracks, "Tracks", f
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}

View file

@ -1,11 +1,11 @@
.container-fluid .container-fluid
.row-fluid .row-fluid
.span3 .span3
= render 'admin/conference/sidebar', :activated => "Venue" = render 'admin/conference/sidebar'
.span9 .span9
= semantic_form_for(@venue, :url => admin_conference_venue_update_path(@conference.short_title),:html => {:multipart => true}) do |f| = semantic_form_for(@venue, :url => admin_conference_venue_update_path(@conference.short_title),:html => {:multipart => true}) do |f|
= f.input :name, :input_html => {:rows => 1} = f.input :name, :input_html => {:rows => 1}
= f.input :address, :input_html => {:rows => 1} = f.input :address, :input_html => {:rows => 1}
= f.input :website = f.input :website
= f.input :description, :input_html => { :rows => 10, :cols => 20 } = f.input :description, :input_html => { :rows => 10, :cols => 20 }
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}

View file

@ -1,9 +1,9 @@
.container-fluid .container-fluid
.row-fluid .row-fluid
.span3 .span3
= render 'admin/conference/sidebar', :activated => "Volunteers" = render 'admin/conference/sidebar'
.span9 .span9
= semantic_form_for(@conference, :url => admin_conference_volunteer_options_update_path(@conference.short_title)) do |f| = semantic_form_for(@conference, :url => admin_conference_volunteers_update_path(@conference.short_title)) do |f|
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
%br %br
%br %br
@ -12,4 +12,4 @@
= dynamic_association :vdays, "Volunteer Days", f = dynamic_association :vdays, "Volunteer Days", f
.span5 .span5
= f.input :use_vpositions, :label => false = f.input :use_vpositions, :label => false
= dynamic_association :vpositions, "Volunteer positions", f = dynamic_association :vpositions, "Volunteer positions", f

View file

@ -16,7 +16,7 @@
%br %br
= f.fields_for :person do |p| = f.fields_for :person do |p|
= p.text_field :public_name, :for => :person = p.text_field :public_name, :for => :person
- if @conference.use_supporter_levels? - if @conference.use_supporter_levels? and @conference.supporter_levels.length > 0
= f.semantic_fields_for :supporter_registration do |reg| = f.semantic_fields_for :supporter_registration do |reg|
= reg.input :supporter_level, :as => :select, :collection => @conference.supporter_levels = reg.input :supporter_level, :as => :select, :collection => @conference.supporter_levels
= reg.input :code, :label => "Confirmation or registration code (if applicable)" = reg.input :code, :label => "Confirmation or registration code (if applicable)"
@ -38,11 +38,6 @@
%br Yes, I'll be attending... %br Yes, I'll be attending...
%br %br
= f.input :social_events, :as => :check_boxes, :label => false = f.input :social_events, :as => :check_boxes, :label => false
- if @conference.use_dietary_choices?
= f.inputs "Food" do
= f.input :dietary_choice, :collection => [["None", nil]] + @conference.dietary_choices.map {|x| [x.title, x.id]},
:include_blank => false, :label => "Special Dietary Restriction"
= f.input :other_dietary_choice, :input_html => {:rows => "2"}, :label => "Other Dietary Restictions (please describe)"
:javascript :javascript
$("#registration_supporter_registration_attributes_supporter_level_id").change(function () { $("#registration_supporter_registration_attributes_supporter_level_id").change(function () {

View file

@ -12,7 +12,7 @@
= render :partial => "questions", :locals => {:f => f} = render :partial => "questions", :locals => {:f => f}
%br %br
- if @conference.use_supporter_levels? && @conference.supporter_levels.count > 0 - if @conference.use_supporter_levels? && @conference.supporter_levels.length > 0
= f.semantic_fields_for :supporter_registration do |reg| = f.semantic_fields_for :supporter_registration do |reg|
= reg.input :supporter_level, :as => :select, :collection => @conference.supporter_levels = reg.input :supporter_level, :as => :select, :collection => @conference.supporter_levels
= reg.input :code, :label => "Confirmation or registration code (if applicable)" = reg.input :code, :label => "Confirmation or registration code (if applicable)"
@ -32,11 +32,6 @@
%br Yes, I'll be attending... %br Yes, I'll be attending...
%br %br
= f.input :social_events, :as => :check_boxes, :label => false = f.input :social_events, :as => :check_boxes, :label => false
- if @conference.use_dietary_choices?
= f.inputs "Food" do
= f.input :dietary_choice, :collection => [["None", nil]] + @conference.dietary_choices.map {|x| [x.title, x.id]},
:include_blank => false, :label => "Special Dietary Restriction"
= f.input :other_dietary_choice, :input_html => {:rows => "2"}, :label => "Other Dietary Restictions (please describe)"
.tabbable .tabbable
%ul.nav.nav-tabs %ul.nav.nav-tabs
%li.active %li.active

View file

@ -19,13 +19,16 @@
<br> <br>
<span class="muted"><%= conference.date_range_string %></span> <span class="muted"><%= conference.date_range_string %></span>
</h3> </h3>
<% if conference.venue.name and conference.venue.website and conference.venue.address %>
<p> <p>
<small> <small>
<%= link_to conference.venue.name, conference.venue.website, :target => "_new" %> <%= link_to conference.venue.name, conference.venue.website %>,
, <%= link_to conference.venue.address, "http://maps.google.com/maps?q=#{conference.venue.address}" %>
<%= link_to conference.venue.address, "http://maps.google.com/maps?q=#{conference.venue.address}", :target => "_new" %>
</small> </small>
<% end -%>
<% if conference.venue.description %>
<%= simple_format(conference.venue.description, class: 'lead') %> <%= simple_format(conference.venue.description, class: 'lead') %>
<% end -%>
</div> </div>
<div class="span2"> <div class="span2">
<ul class="nav nav-tabs nav-stacked"> <ul class="nav nav-tabs nav-stacked">

View file

@ -9,70 +9,35 @@
- if user_signed_in? - if user_signed_in?
- if has_role?(current_user, "admin") || has_role?(current_user, "organizer") - if has_role?(current_user, "admin") || has_role?(current_user, "organizer")
- if controller.class.name.split("::").first=="Admin" - if controller.class.name.split("::").first=="Admin"
- if @conference && !@conference.short_title.nil? - if @conference and !@conference.short_title.nil?
%ul.nav %ul.nav
%li.nav-header.hidden-desktop %li.nav-header.hidden-desktop
= @conference.short_title = @conference.short_title
- if current_page?(admin_conference_path(@conference.short_title)) %li{:class=> active_nav_li(admin_conference_path(@conference.short_title))}
%li.active = link_to(admin_conference_path(@conference.short_title)) do
= link_to('#') do %i.icon-wrench
%i.icon-wrench Settings
Settings %li{:class=> active_nav_li(admin_conference_registrations_path(@conference.short_title))}
- else = link_to(admin_conference_registrations_path(@conference.short_title)) do
%li %i.icon-user
= link_to(admin_conference_path(@conference.short_title)) do Registrations
%i.icon-wrench - if @conference.use_supporter_levels? and @conference.supporter_levels.length > 0
Settings %li{:class=> active_nav_li(admin_conference_supporters_path(@conference.short_title))}
- if current_page?(admin_conference_registrations_path(@conference.short_title))
%li.active
= link_to('#') do
%i.icon-user
Registrations
- else
%li
= link_to(admin_conference_registrations_path(@conference.short_title)) do
%i.icon-user
Registrations
- if current_page?(admin_conference_supporters_path(@conference.short_title))
%li.active
= link_to('#') do
%i.icon-star
Supporters
- else
%li
= link_to(admin_conference_supporters_path(@conference.short_title)) do = link_to(admin_conference_supporters_path(@conference.short_title)) do
%i.icon-star %i.icon-star
Supporters Supporters
- if current_page?(admin_conference_events_path(@conference.short_title)) %li{:class=> active_nav_li(admin_conference_events_path(@conference.short_title))}
%li.active = link_to(admin_conference_events_path(@conference.short_title)) do
= link_to('#') do %i.icon-comment
%i.icon-comment Events
Events %li{:class=> active_nav_li(admin_conference_stats_path(@conference.short_title))}
- else = link_to(admin_conference_stats_path(@conference.short_title)) do
%li %i.icon-tasks
= link_to(admin_conference_events_path(@conference.short_title)) do Statistics
%i.icon-comment %li{:class=> active_nav_li(admin_conference_volunteers_list_path(@conference.short_title))}
Events = link_to(admin_conference_volunteers_list_path(@conference.short_title)) do
- if current_page?(admin_conference_stats_path(@conference.short_title)) %i.icon-user
%li.active Volunteers
= link_to('#') do
%i.icon-tasks
Statistics
- else
%li
= link_to(admin_conference_stats_path(@conference.short_title)) do
%i.icon-tasks
Statistics
- if current_page?(admin_conference_volunteers_list_path(@conference.short_title))
%li.active
= link_to('#') do
%i.icon-user
Volunteers
- else
%li
= link_to(admin_conference_volunteers_list_path(@conference.short_title)) do
%i.icon-user
Volunteers
%li %li
= link_to(admin_conference_schedule_path(@conference.short_title), :target => "_blank") do = link_to(admin_conference_schedule_path(@conference.short_title), :target => "_blank") do
%i.icon-calendar %i.icon-calendar

View file

@ -4,7 +4,7 @@
%br %br
= f.fields_for :person do |p| = f.fields_for :person do |p|
= p.text_field :public_name, :for => :person = p.text_field :public_name, :for => :person
- if @conference.use_supporter_levels? - if @conference.use_supporter_levels? and @conference.supporter_levels.length > 0
= f.semantic_fields_for :supporter_registration do |reg| = f.semantic_fields_for :supporter_registration do |reg|
= reg.input :supporter_level, :as => :select, :collection => @conference.supporter_levels = reg.input :supporter_level, :as => :select, :collection => @conference.supporter_levels
= reg.input :code, :label => "Confirmation or registration code (if applicable)" = reg.input :code, :label => "Confirmation or registration code (if applicable)"
@ -22,11 +22,6 @@
%br Yes, I'll be attending... %br Yes, I'll be attending...
%br %br
= f.input :social_events, :as => :check_boxes, :label => false, :collection => @conference.social_events = f.input :social_events, :as => :check_boxes, :label => false, :collection => @conference.social_events
- if @conference.use_dietary_choices?
= f.inputs "Food" do
= f.input :dietary_choice, :collection => [["None", nil]] + @conference.dietary_choices.map {|x| [x.title, x.id]},
:include_blank => false, :label => "Special Dietary Restriction"
= f.input :other_dietary_choice, :input_html => {:rows => "2", :class => "span6"}, :label => "Other Dietary Restictions (please describe)"
:javascript :javascript
$("#registration_supporter_registration_attributes_supporter_level_id").change(function () { $("#registration_supporter_registration_attributes_supporter_level_id").change(function () {
@ -56,4 +51,4 @@
onSelect: function(selected) { onSelect: function(selected) {
$("#registration-arrival-datepicker").datepicker("option","maxDate", selected) $("#registration-arrival-datepicker").datepicker("option","maxDate", selected)
} }
}); });