Merge d0fd21bfc2 into a33e930111
This commit is contained in:
commit
0043505cd0
18 changed files with 118 additions and 11 deletions
|
|
@ -50,3 +50,8 @@ body > #messages {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*spalsh page css*/
|
||||||
|
.speaker-pic{
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
class ConferenceController < ApplicationController
|
class ConferenceController < ApplicationController
|
||||||
def show
|
def show
|
||||||
@conference = Conference.find_by_short_title(params[:id])
|
@conference = Conference.find_by_short_title(params[:id])
|
||||||
|
@keynote_speakers = @conference.registrations.joins(:person).where('featured=?', true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ class Conference < ActiveRecord::Base
|
||||||
:questions_attributes, :question_ids, :answers_attributes, :answer_ids,
|
:questions_attributes, :question_ids, :answers_attributes, :answer_ids,
|
||||||
:difficulty_levels_attributes, :use_difficulty_levels,
|
:difficulty_levels_attributes, :use_difficulty_levels,
|
||||||
:use_vpositions, :use_vdays, :vdays_attributes, :vpositions_attributes, :use_volunteers,
|
:use_vpositions, :use_vdays, :vdays_attributes, :vpositions_attributes, :use_volunteers,
|
||||||
:media_id, :media_type
|
:media_id, :media_type, :description
|
||||||
|
|
||||||
has_paper_trail
|
has_paper_trail
|
||||||
|
|
||||||
|
|
@ -57,7 +57,8 @@ class Conference < ActiveRecord::Base
|
||||||
:short_title,
|
:short_title,
|
||||||
:social_tag,
|
:social_tag,
|
||||||
:start_date,
|
:start_date,
|
||||||
:end_date
|
:end_date,
|
||||||
|
:description
|
||||||
validates_uniqueness_of :short_title
|
validates_uniqueness_of :short_title
|
||||||
validates_format_of :short_title, :with => /\A[a-zA-Z0-9_-]*\z/
|
validates_format_of :short_title, :with => /\A[a-zA-Z0-9_-]*\z/
|
||||||
before_create :generate_guid
|
before_create :generate_guid
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,9 @@ class Person < ActiveRecord::Base
|
||||||
include Gravtastic
|
include Gravtastic
|
||||||
gravtastic :size => 32
|
gravtastic :size => 32
|
||||||
|
|
||||||
attr_accessible :email, :first_name, :last_name, :public_name, :biography, :company, :avatar, :irc_nickname, :mobile, :tshirt, :languages, :volunteer_experience
|
attr_accessible :email, :first_name, :last_name, :public_name, :biography,
|
||||||
|
:company, :avatar, :irc_nickname, :mobile, :tshirt,
|
||||||
|
:languages, :volunteer_experience, :featured
|
||||||
|
|
||||||
belongs_to :user, :inverse_of => :person
|
belongs_to :user, :inverse_of => :person
|
||||||
has_many :event_people, :dependent => :destroy
|
has_many :event_people, :dependent => :destroy
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
class Track < ActiveRecord::Base
|
class Track < ActiveRecord::Base
|
||||||
attr_accessible :name, :description, :color
|
attr_accessible :name, :description, :color
|
||||||
|
validates :description, presence: true
|
||||||
belongs_to :conference
|
belongs_to :conference
|
||||||
|
|
||||||
before_create :generate_guid
|
before_create :generate_guid
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
= f.inputs 'Basic Information' do
|
= f.inputs 'Basic Information' do
|
||||||
= f.input :title, hint: "The name of your conference as it shall appear throughout the site. Example: 'OpenSUSE Conference 2013'",
|
= f.input :title, hint: "The name of your conference as it shall appear throughout the site. Example: 'OpenSUSE Conference 2013'",
|
||||||
input_html: { required: 'required' }
|
input_html: { required: 'required' }
|
||||||
|
= f.input :description, hint: 'Required for program section in the splash page'
|
||||||
= f.input :short_title, hint: "A short and unique handle for your conference, using only lower-case letters, numbers and underscores. This will be used to identify your conference in URLs etc. Example: 'froscon2011'",
|
= f.input :short_title, hint: "A short and unique handle for your conference, using only lower-case letters, numbers and underscores. This will be used to identify your conference in URLs etc. Example: 'froscon2011'",
|
||||||
input_html: { required: 'required' }
|
input_html: { required: 'required' }
|
||||||
= f.input :social_tag, hint: "The hashtag you'll use on Twitter and Google+. Don't include the '#' sign!'",
|
= f.input :social_tag, hint: "The hashtag you'll use on Twitter and Google+. Don't include the '#' sign!'",
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,31 @@
|
||||||
.row
|
.row
|
||||||
.col-md-8
|
.col-md-8
|
||||||
%h1 Dashboard for #{@conference.title}
|
%h1 Dashboard for #{@conference.title}
|
||||||
|
.col-md-9
|
||||||
|
= 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 :description, hint: 'Required for program section in the splash page'
|
||||||
|
= f.input :short_title, :hint => "A short title, such as 'osc2013', to be used in URLs"
|
||||||
|
= f.input :social_tag, :hint => "The hashtag you'll use on Twitter and Google+. Don't include the '#' sign!'"
|
||||||
|
= f.input :contact_email, :hint => "Contact email address for your conference. Will be used as reply-to address in emails sent out by the system."
|
||||||
|
|
||||||
|
= f.inputs :name => "Scheduling" do
|
||||||
|
= f.input :timezone, :as => :time_zone, :hint => "The conference time zone"
|
||||||
|
= f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" }
|
||||||
|
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
|
||||||
|
= 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.inputs :name => "Media" do
|
||||||
|
- if !@conference.logo.blank?
|
||||||
|
= image_tag @conference.logo(:thumb)
|
||||||
|
= f.input :logo, :label => "Conference Logo", :hint => "This will be displayed on the front page."
|
||||||
|
= f.input :media_type, :as => :select, :label => "Conference Promo Media Type", :class=>"form-control", :collection => Conference.media_types.values, :include_blank => false, :hint => "This media-item will be used to represent this conference at various places in OSEM."
|
||||||
|
= f.input :media_id, :label => "Conference Promo Media ID", :as => :string
|
||||||
|
%p{:class => "help-block media-type", :id => "youtube-help"} Go to your YouTube video, click on "share" and copy everything behind http://youtu.be/"
|
||||||
|
%p{:class => "help-block media-type", :id => "slideshare-help", :style => "display:none"} Go to your SlideShare, click on "share" -> "embed" and copy the id
|
||||||
|
%p{:class => "help-block media-type", :id => "flickr-help", :style => "display:none"} Go to your flickr image, click on "Grab the link" -> "Show short url" and copy everything behind https://flic.kr/p/
|
||||||
|
%p{:class => "help-block media-type", :id => "vimeo-help", :style => "display:none"} Go to your vimeo video, click on "share" and copy everything behind http://vimeo.com/
|
||||||
|
%p{:class => "help-block media-type", :id => "speakerdeck-help", :style => "display:none"} Go to your SpeakerDeck, click on "share" -> "embed" and copy the data-id
|
||||||
|
%p{:class => "help-block media-type", :id => "instagram-help", :style => "display:none"} Go to your Instagram photo page and copy everything behind instagram.com/p/ (without trailing /# hash symbol)
|
||||||
|
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
= semantic_form_for [:admin, @person] do |f|
|
= semantic_form_for [:admin, @person] do |f|
|
||||||
= f.inputs "Basic Information" do
|
= f.inputs "Basic Information" do
|
||||||
|
= f.input :featured, label: "Keynote Speaker"
|
||||||
= f.input :first_name, :as => :string
|
= f.input :first_name, :as => :string
|
||||||
= f.input :last_name, :as => :string
|
= f.input :last_name, :as => :string
|
||||||
= f.input :public_name, :as => :string
|
= f.input :public_name, :as => :string
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,34 @@
|
||||||
= content_for :splash_logo do
|
= content_for :splash_logo do
|
||||||
= link_to @conference.title, "#", :class => 'navbar-brand'
|
= link_to @conference.title, "#", :class => 'navbar-brand'
|
||||||
= render :partial => "home/conference_details", :locals => {:conference => @conference}
|
= content_for :splash_header do
|
||||||
|
%ul.nav.navbar-nav
|
||||||
|
%li
|
||||||
|
%a{ href: '#program' } Program
|
||||||
|
%div.container#program.text-center
|
||||||
|
%div.row
|
||||||
|
%div.col-md-12
|
||||||
|
%h1 Program
|
||||||
|
%p
|
||||||
|
= @conference.description
|
||||||
|
%span You can find the complete schedule in our
|
||||||
|
%span
|
||||||
|
= link_to 'Master Schedule', conference_schedule_path(@conference.short_title)
|
||||||
|
- if !@keynote_speakers.blank?
|
||||||
|
%div.row
|
||||||
|
%h2 Keynote Speakers
|
||||||
|
- @keynote_speakers.each do |k|
|
||||||
|
%div.col-lg-3.text-center
|
||||||
|
= image_tag(k.person.gravatar_url(size: '140'), class: 'img-responsive img-circle speaker-pic')
|
||||||
|
%h4
|
||||||
|
= k.person.first_name
|
||||||
|
= k.person.last_name
|
||||||
|
-if !@conference.tracks.blank?
|
||||||
|
%div.row
|
||||||
|
%div.col-md-12
|
||||||
|
%h2 Tracks
|
||||||
|
- @conference.tracks.each do |t|
|
||||||
|
%div.col-md-4
|
||||||
|
%h4
|
||||||
|
= t.name
|
||||||
|
%p
|
||||||
|
= t.description
|
||||||
|
|
|
||||||
5
db/migrate/20140521073920_add_featured_to_people.rb
Normal file
5
db/migrate/20140521073920_add_featured_to_people.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddFeaturedToPeople < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :people, :featured, :boolean, default: false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddDescriptionToConference < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :conferences, :description, :string
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe ConferenceController do
|
describe ConferenceController do
|
||||||
|
let(:conference) { create(:conference_with_registration) }
|
||||||
describe 'GET #show' do
|
describe 'GET #show' do
|
||||||
it 'returns http success' do
|
it 'returns http success' do
|
||||||
get :show, id: 'sample'
|
get :show, id: conference.short_title
|
||||||
expect(response).to be_success
|
expect(response).to be_success
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,19 @@ FactoryGirl.define do
|
||||||
sequence(:short_title) { |n| "dps#{n}14" }
|
sequence(:short_title) { |n| "dps#{n}14" }
|
||||||
social_tag 'dps14'
|
social_tag 'dps14'
|
||||||
timezone 'Amsterdam'
|
timezone 'Amsterdam'
|
||||||
|
description 'Lorem Ipsum dolsum'
|
||||||
contact_email 'admin@example.com'
|
contact_email 'admin@example.com'
|
||||||
start_date Date.today
|
start_date Date.today
|
||||||
end_date Date.tomorrow
|
end_date Date.tomorrow
|
||||||
|
factory :conference_with_registration do
|
||||||
|
after(:build) do |conference|
|
||||||
|
create(:participant_role)
|
||||||
|
create(:admin_role)
|
||||||
|
user = build(:user)
|
||||||
|
conference.registrations << build(:registration,
|
||||||
|
conference: conference,
|
||||||
|
person: user.person)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
9
spec/factories/person.rb
Normal file
9
spec/factories/person.rb
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
FactoryGirl.define do
|
||||||
|
factory :person do
|
||||||
|
first_name 'Example first_name'
|
||||||
|
last_name 'Example last_name'
|
||||||
|
sequence(:email) { |n| "example#{n}@example.com" }
|
||||||
|
featured true
|
||||||
|
user
|
||||||
|
end
|
||||||
|
end
|
||||||
6
spec/factories/registrations.rb
Normal file
6
spec/factories/registrations.rb
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
FactoryGirl.define do
|
||||||
|
factory :registration do
|
||||||
|
person
|
||||||
|
conference
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
FactoryGirl.define do
|
FactoryGirl.define do
|
||||||
factory :user do
|
factory :user do
|
||||||
email 'example@example.com'
|
sequence(:email) { |n| "example#{n}@example.com" }
|
||||||
password 'changeme'
|
password 'changeme'
|
||||||
password_confirmation 'changeme'
|
password_confirmation 'changeme'
|
||||||
confirmed_at Time.now
|
confirmed_at Time.now
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ feature Conference do
|
||||||
fill_in 'conference_title', with: 'Example Con'
|
fill_in 'conference_title', with: 'Example Con'
|
||||||
fill_in 'conference_short_title', with: 'ExCon'
|
fill_in 'conference_short_title', with: 'ExCon'
|
||||||
fill_in 'conference_social_tag', with: 'ExCon'
|
fill_in 'conference_social_tag', with: 'ExCon'
|
||||||
|
fill_in 'conference_description', with: 'ExCon description'
|
||||||
select('(GMT+01:00) Berlin', from: 'conference[timezone]')
|
select('(GMT+01:00) Berlin', from: 'conference[timezone]')
|
||||||
|
|
||||||
today = Date.today - 1
|
today = Date.today - 1
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
describe 'conference/show.html.haml' do
|
describe 'conference/show.html.haml' do
|
||||||
it 'renders conference details' do
|
it 'renders conference details' do
|
||||||
@conference = create(:conference)
|
@conference = create(:conference, description: 'Lorem Ipsum dolsum')
|
||||||
assign :conference, @conference
|
assign :conference, @conference
|
||||||
render
|
render
|
||||||
expect(render).to include("#{@conference.title}")
|
expect(render).to include("#{@conference.description}")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue