Introduces new audience object

#416
This commit is contained in:
Chrisbr 2014-08-12 17:59:35 +02:00
parent 63d2980fe3
commit 27fc0acbf8
24 changed files with 388 additions and 116 deletions

View file

@ -0,0 +1,4 @@
= f.input :registration_start_date, as: :string, input_html: { id: 'registration-start-datepicker', readonly: 'readonly' }
= f.input :registration_end_date, as: :string, input_html: { id: 'registration-end-datepicker', readonly: 'readonly' }
= f.input :registration_description, hint: markdown_hint('This will appear in the Tickets segment of the splash.'), input_html: { rows: 5, data: { provide: "markdown-editable" } }
= f.submit 'Save Audience', class: 'btn btn-primary'

View file

@ -0,0 +1,5 @@
%h1 Audience
.row
.col-md-8
= semantic_form_for(@audience, url: admin_conference_audience_path(@conference.short_title)) do |f|
= render 'form', f: f

View file

@ -20,9 +20,6 @@
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
= f.inputs name: 'Registration' do
= f.input :include_registrations_in_splash, hint: 'On setting this true you will enable the registrations to be displayed on the splash page'
= f.input :registration_start_date, :as => :string, :input_html => { :id => "conference-reg-start-datepicker", :readonly => "readonly" }
= f.input :registration_end_date, :as => :string, :input_html => { :id => "conference-reg-end-datepicker", :readonly => "readonly" }
= f.input :registration_description, hint: markdown_hint("This description will appear in registration segment of the splash."), input_html: { rows: 5, data: { provide: "markdown-editable" } }
= f.input :ticket_description, hint: markdown_hint("This will appear in the Tickets segment of the splash."), input_html: { rows: 5, data: { provide: "markdown-editable" } }
= f.input :sponsor_description, hint: markdown_hint("This will appear in the sponsor segment of the splash."), input_html: { rows: 5, data: { provide: "markdown-editable" } }
= f.input :sponsor_email, hint: 'This will appear in the sponsor segment of the splash for the sponsors to contact to the organizers'

View file

@ -13,4 +13,4 @@
.tab-pane.active#show
= render partial: 'edit_show'
.tab-pane#edit
= render partial: 'edit_form'
= render partial: 'edit_form'

View file

@ -4,14 +4,14 @@
%div.container.text-center
%div.row
%h1 Registration
- if !@conference.registration_description.blank?
- if !@conference.audience.registration_description.blank?
.lead
= markdown(@conference.registration_description)
= markdown(@conference.audience.registration_description)
- if @conference.registration_dates_given?
-if @conference.registration_end_date >= Date.today
%h4 Registration period #{ date_string(@conference.registration_start_date, @conference.registration_end_date) }
-if @conference.audience.registration_end_date >= Date.today
%h4 Registration period #{ date_string(@conference.audience.registration_start_date, @conference.audience.registration_end_date) }
-else
%h4 Registration is Closed, it was from #{ date_string(@conference.registration_start_date, @conference.registration_end_date) }
%h4 Registration is Closed, it was from #{ date_string(@conference.audience.registration_start_date, @conference.audience.registration_end_date) }
- if @conference.registration_open?
= link_to "Register for #{@conference.short_title}", register_conference_path(@conference.short_title), :class =>"btn btn-success btn-lg", target: '_blank'
- if @conference.use_supporter_levels?

View file

@ -20,7 +20,7 @@
%span.glyphicon.glyphicon-plus
New Conference
%hr
%li{:class=> "#{active_nav_li(admin_conference_path(@conference.short_title))} nav-header nav-header-bigger"}
%li{:class=> "#{active_nav_li(admin_conference_path(@conference.short_title))}"}
= link_to(admin_conference_path(@conference.short_title)) do
%span.fa.fa-tachometer
Dashboard
@ -41,6 +41,11 @@
= link_to(admin_conference_photos_path(@conference.short_title)) do
%span.fa.fa-picture-o
Photos
%li{:class=> active_nav_li(edit_admin_conference_audience_path(@conference.short_title))}
= link_to(edit_admin_conference_audience_path(@conference.short_title)) do
%span.fa.fa-male
Audience
%hr
%li{:class=> active_nav_li(admin_conference_events_path(@conference.short_title))}
= link_to(admin_conference_events_path(@conference.short_title)) do
%span.glyphicon.glyphicon-comment