Browse Source

The working basics

development
Godwin 11 years ago
parent
commit
db60933506
  1. 2
      .travis.yml
  2. 130
      DB specs.txt
  3. 34
      Gemfile
  4. 238
      Gemfile.lock
  5. 2
      README.md
  6. 2
      Rakefile
  7. 10
      app/assets/fonts/README.md
  8. 29
      app/assets/fonts/glyphs/noun_project_592.svg
  9. BIN
      app/assets/images/Columbus-ohio-skyline-panorama.jpg
  10. BIN
      app/assets/images/Nola2013Banner-2.jpg
  11. BIN
      app/assets/images/Nola2013Banner.jpg
  12. BIN
      app/assets/images/Thumbs.db
  13. BIN
      app/assets/images/columbus.jpg
  14. BIN
      app/assets/images/columbus.png
  15. BIN
      app/assets/images/icon_24074.png
  16. BIN
      app/assets/images/poster.jpg
  17. BIN
      app/assets/images/t-dot.jpg
  18. BIN
      app/assets/images/translate_cursor-24.png
  19. BIN
      app/assets/images/translate_cursor-32.png
  20. BIN
      app/assets/images/translate_cursor.png
  21. BIN
      app/assets/images/vancity.jpg
  22. 175
      app/assets/javascripts/application.js.coffee
  23. 3
      app/assets/javascripts/conference_admins.js.coffee
  24. 3
      app/assets/javascripts/conference_host_organizations.js.coffee
  25. 3
      app/assets/javascripts/conference_registration_responses.js.coffee
  26. 3
      app/assets/javascripts/conference_registrations.js.coffee
  27. 3
      app/assets/javascripts/conference_registraton_form_fields.js.coffee
  28. 3
      app/assets/javascripts/conference_types.js.coffee
  29. 3
      app/assets/javascripts/conferences.js.coffee
  30. 3
      app/assets/javascripts/locations.js.coffee
  31. 3
      app/assets/javascripts/organization_statuses.js.coffee
  32. 3
      app/assets/javascripts/organizations.js.coffee
  33. 3
      app/assets/javascripts/registration_form_fields.js.coffee
  34. 121
      app/assets/javascripts/translate.js.coffee
  35. 3
      app/assets/javascripts/user_organization_relationships.js.coffee
  36. 3
      app/assets/javascripts/user_sessions.js.coffee
  37. 3
      app/assets/javascripts/users.js.coffee
  38. 3
      app/assets/javascripts/versions.js.coffee
  39. 3
      app/assets/javascripts/workshop_presentation_styles.js.coffee
  40. 3
      app/assets/javascripts/workshop_resources.js.coffee
  41. 3
      app/assets/javascripts/workshop_streams.js.coffee
  42. 37
      app/assets/javascripts/xapplication.xjs.xcoffee.erb
  43. 3
      app/assets/stylesheets/conference_admins.css.scss
  44. 3
      app/assets/stylesheets/conference_host_organizations.css.scss
  45. 3
      app/assets/stylesheets/conference_registration_responses.css.scss
  46. 3
      app/assets/stylesheets/conference_registrations.css.scss
  47. 3
      app/assets/stylesheets/conference_registraton_form_fields.css.scss
  48. 3
      app/assets/stylesheets/conference_types.css.scss
  49. 3
      app/assets/stylesheets/conferences.css.scss
  50. 1576
      app/assets/stylesheets/foundation_and_overrides.scss
  51. 3
      app/assets/stylesheets/locations.css.scss
  52. 3
      app/assets/stylesheets/organization_statuses.css.scss
  53. 3
      app/assets/stylesheets/organizations.css.scss
  54. 3
      app/assets/stylesheets/registration_form_fields.css.scss
  55. 376
      app/assets/stylesheets/sass/_layout.scss
  56. 529
      app/assets/stylesheets/sass/_typography.scss
  57. 69
      app/assets/stylesheets/scaffolds.css.scss
  58. 3
      app/assets/stylesheets/user_organization_relationships.css.scss
  59. 3
      app/assets/stylesheets/user_sessions.css.scss
  60. 3
      app/assets/stylesheets/users.css.scss
  61. 3
      app/assets/stylesheets/versions.css.scss
  62. 3
      app/assets/stylesheets/workshop_presentation_styles.css.scss
  63. 3
      app/assets/stylesheets/workshop_resources.css.scss
  64. 3
      app/assets/stylesheets/workshop_streams.css.scss
  65. 65
      app/assets/stylesheets/xapplication.css
  66. 58
      app/assets/stylesheets/xfoundation_and_overrides.css
  67. 1327
      app/assets/stylesheets/xfoundation_and_overrides.scss
  68. 37
      app/assets/xapplication.xjs.xcoffee
  69. 58
      app/controllers/conference_admins_controller.rb
  70. 58
      app/controllers/conference_host_organizations_controller.rb
  71. 58
      app/controllers/conference_registration_responses_controller.rb
  72. 58
      app/controllers/conference_registrations_controller.rb
  73. 58
      app/controllers/conference_registraton_form_fields_controller.rb
  74. 58
      app/controllers/conference_types_controller.rb
  75. 140
      app/controllers/conferences_controller.rb
  76. 58
      app/controllers/locations_controller.rb
  77. 58
      app/controllers/organization_statuses_controller.rb
  78. 96
      app/controllers/organizations_controller.rb
  79. 56
      app/controllers/pages_controller.rb
  80. 66
      app/controllers/registration_form_fields_controller.rb
  81. 58
      app/controllers/user_organization_relationships_controller.rb
  82. 21
      app/controllers/user_sessions_controller.rb
  83. 68
      app/controllers/users_controller.rb
  84. 2
      app/controllers/versions_controller.rb
  85. 58
      app/controllers/workshop_presentation_styles_controller.rb
  86. 58
      app/controllers/workshop_resources_controller.rb
  87. 58
      app/controllers/workshop_streams_controller.rb
  88. 483
      app/helpers/application_helper.rb
  89. 2
      app/helpers/conference_admins_helper.rb
  90. 2
      app/helpers/conference_host_organizations_helper.rb
  91. 2
      app/helpers/conference_registration_responses_helper.rb
  92. 2
      app/helpers/conference_registrations_helper.rb
  93. 2
      app/helpers/conference_registraton_form_fields_helper.rb
  94. 2
      app/helpers/conference_types_helper.rb
  95. 4
      app/helpers/conferences_helper.rb
  96. 2
      app/helpers/locations_helper.rb
  97. 2
      app/helpers/organization_statuses_helper.rb
  98. 3
      app/helpers/organizations_helper.rb
  99. 3
      app/helpers/pages_helper.rb
  100. 2
      app/helpers/registration_form_fields_helper.rb

2
.travis.yml

@ -5,4 +5,4 @@ before_install:
- "export DISPLAY=:99.0" - "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start" - "sh -e /etc/init.d/xvfb start"
before_script: before_script:
- psql -c 'create database starterapp_test;' -U postgres - psql -c 'create database bikebike_test;' -U postgres

130
DB specs.txt

@ -0,0 +1,130 @@
conference
- title : string
- slug : string
- start_date : datetime
- end_date : datetime
- info : text
- poster : *image
- banner : *image
- workshop_schedule_published : boolean
- registration_open : boolean
- meals_provided : boolean
- meal_info : *text
- conference_type : [conference_type]
- host_organizations : NtoN[organization]
- locations : *NtoN[location]
- registration_form_fields : *NtoN[registration_form_field]
- workshop_resources : *NtoN[workshop_resource]
*conference_type
- title : string
- slug : string
- info : text
event
- title : string
- slug : string
- conference : [conference]
- info : text
- location : *[location]
- start_time : *datetime
- end_time : *datetime
*location
- title : *string
- latitude : *float
- longitude : *float
- country : *string
- territory : *string
- city : *string
- street : *string
- postal_code : *string
*organization
- name : string
- slug : string
- email_address : string
- shop_status : list(string)
- year_founded : integer
- info : text
- url : string
- logo : image
- icon : image
- requires_approval : boolean
- secret_question : *string
- secret_answer : *string(hashed)
- location : [location]
- members : NtoN[user_organization_replationship]
registration_form_field
- title : string
- slug : string
- required : boolean
- field_type : list(string)
- options : *string
- other_option : *boolean
- retired : boolean
request
- comment : text
- object : Nto1[object]
- is_invite : boolean
- state : list(string)
*user_organization_relationship
- user : [user]
- organization : [organization]
- relationship : string
workshop
- title : string
- slug : string
- info : text
- conference : [conference]
- stream : [workshop_stream]
- presentation_style : [presentation_style]
- requested_resources : NtoN[workshop_resource]
- facilitators : NtoN[user]
- min_facilitators : integer
- location : *[location]
- start_time : *datetime
- end_time : *datetime
*workshop_presentation_style
- name : string
- slug : string
- info : text
*workshop_resource
- name : string
- slug : string
- info : text
*workshop_stream
- name : string
- slug : string
- info : text
rails g scaffold organization name:string slug:string email_address:string url:string year_founded:integer info:text logo:string avatar:string requires_approval:boolean secret_question:string secret_answer:string location_id:integer user_organization_replationship_id:integer
organization_status:string
user_organization_replationship_id:integer
conference title:string slug:string start_date:datetime end_date:datetime info:text poster:string banner:string workshop_schedule_published:boolean registration_open:boolean meals_provided:boolean meal_info:text travel_info:text conference_type:conference_type_id
conference_hosts_organizations conference_id:integer organization_id:integer
- host_organizations : NtoN[organization]
- locations : *NtoN[location]
- registration_form_fields : *NtoN[registration_form_field]
- workshop_resources : *NtoN[workshop_resource]
registration_form_field
- title : string
- help : text
- required : boolean
- field_type : list(string)
- options : string
- retired : boolean

34
Gemfile

@ -1,8 +1,10 @@
source 'https://rubygems.org' source 'http://rubygems.org'
ruby '2.0.0' ruby '2.0.0'
gem 'rails', '4.0.0' gem 'rails', '4.0.0'
#gem 'nokogiri', :git => '/nokogiri/'
# Servers # Servers
# gem 'puma' # gem 'puma'
# gem 'unicorn' # gem 'unicorn'
@ -29,6 +31,7 @@ gem 'pg'
gem 'haml' gem 'haml'
# gem 'http_accept_language' # gem 'http_accept_language'
gem 'jquery-rails' gem 'jquery-rails'
gem 'jquery-ui-rails'
# gem 'resque', require: 'resque/server' # Resque web interface # gem 'resque', require: 'resque/server' # Resque web interface
# Assets # Assets
@ -36,14 +39,32 @@ gem 'coffee-rails', '~> 4.0.0'
gem 'haml_assets' gem 'haml_assets'
gem 'handlebars_assets' gem 'handlebars_assets'
gem 'i18n-js' gem 'i18n-js'
gem 'i18n-active_record',
:git => 'git://github.com/svenfuchs/i18n-active_record.git',
:require => 'i18n/active_record'
gem 'jquery-turbolinks' gem 'jquery-turbolinks'
gem 'sass-rails', '~> 4.0.0' gem 'sass-rails', '~> 4.0.0'
gem 'therubyracer' gem "compass-rails", "~> 1.1.3"
gem 'compass-rails', '~> 2.0.alpha.0' gem 'foundation-rails'
gem 'zurb-foundation'
gem 'turbolinks' gem 'turbolinks'
gem 'uglifier', '>= 1.3.0' gem 'uglifier', '>= 1.3.0'
#gem 'rails_12factor', group: :production gem 'bcrypt-ruby', git: 'https://github.com/codahale/bcrypt-ruby.git'
gem 'sorcery', '>= 0.8.1'
gem 'oauth2', '~> 0.8.0'
gem 'ruby-drupal-hash'
gem 'redis'
gem 'carrierwave'
gem 'carrierwave-imageoptimizer'
gem 'mini_magick'
gem 'carmen-rails', '~> 1.0.0', github: 'jim/carmen-rails'
gem 'nested_form'
gem 'acts_as_list'
#gem 'jcrop-rails'
#gem 'rmagick'
gem 'geocoder'
gem 'forgery'
gem 'paper_trail'
group :development, :test do group :development, :test do
gem 'debugger' gem 'debugger'
@ -55,10 +76,13 @@ group :development, :test do
end end
group :development do group :development do
#gem 'perftools.rb'
gem 'bullet' gem 'bullet'
gem 'better_errors' gem 'better_errors'
gem 'binding_of_caller' gem 'binding_of_caller'
gem 'meta_request' gem 'meta_request'
gem 'haml-rails'
gem 'awesome_print'
end end
group :test do group :test do

238
Gemfile.lock

@ -1,5 +1,26 @@
GIT
remote: git://github.com/jim/carmen-rails.git
revision: 076dd251e075d07408e0b5268f886956ef2a347c
specs:
carmen-rails (1.0.0)
carmen (~> 1.0.0)
rails
GIT
remote: git://github.com/svenfuchs/i18n-active_record.git
revision: 55507cf59f8f2173d38e07e18df0e90d25b1f0f6
specs:
i18n-active_record (0.0.2)
i18n (>= 0.5.0)
GIT
remote: https://github.com/codahale/bcrypt-ruby.git
revision: df09e4c73f2f3d9a134b2abf536ca5f159f33075
specs:
bcrypt-ruby (3.1.2)
GEM GEM
remote: https://rubygems.org/ remote: http://rubygems.org/
specs: specs:
actionmailer (4.0.0) actionmailer (4.0.0)
actionpack (= 4.0.0) actionpack (= 4.0.0)
@ -25,98 +46,133 @@ GEM
multi_json (~> 1.3) multi_json (~> 1.3)
thread_safe (~> 0.1) thread_safe (~> 0.1)
tzinfo (~> 0.3.37) tzinfo (~> 0.3.37)
acts_as_list (0.4.0)
activerecord (>= 3.0)
addressable (2.3.5) addressable (2.3.5)
arel (4.0.0) arel (4.0.2)
atomic (1.1.14) atomic (1.1.14)
better_errors (1.0.1) awesome_print (1.2.0)
better_errors (1.1.0)
coderay (>= 1.0.0) coderay (>= 1.0.0)
erubis (>= 2.6.6) erubis (>= 2.6.6)
binding_of_caller (0.7.2) binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1) debug_inspector (>= 0.0.1)
builder (3.1.4) builder (3.1.4)
bullet (4.6.0) bullet (4.8.0)
uniform_notifier activesupport
uniform_notifier (>= 1.4.0)
callsite (0.0.11) callsite (0.0.11)
capybara (2.1.0) capybara (2.2.1)
mime-types (>= 1.16) mime-types (>= 1.16)
nokogiri (>= 1.3.3) nokogiri (>= 1.3.3)
rack (>= 1.0.0) rack (>= 1.0.0)
rack-test (>= 0.5.4) rack-test (>= 0.5.4)
xpath (~> 2.0) xpath (~> 2.0)
childprocess (0.3.9) carmen (1.0.0)
unicode_utils (~> 1.4.0)
carrierwave (0.9.0)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
json (>= 1.7)
carrierwave-imageoptimizer (1.2.1)
carrierwave (~> 0.8)
image_optimizer (~> 1.2)
childprocess (0.5.1)
ffi (~> 1.0, >= 1.0.11) ffi (~> 1.0, >= 1.0.11)
chronic (0.10.2) chronic (0.10.2)
chunky_png (1.2.8) chunky_png (1.3.0)
coderay (1.0.9) coderay (1.1.0)
coffee-rails (4.0.1) coffee-rails (4.0.1)
coffee-script (>= 2.2.0) coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0) railties (>= 4.0.0, < 5.0)
coffee-script (2.2.0) coffee-script (2.2.0)
coffee-script-source coffee-script-source
execjs execjs
coffee-script-source (1.6.3) coffee-script-source (1.7.0)
columnize (0.3.6) columnize (0.3.6)
compass (0.12.2) compass (0.12.2)
chunky_png (~> 1.2) chunky_png (~> 1.2)
fssm (>= 0.2.7) fssm (>= 0.2.7)
sass (~> 3.1) sass (~> 3.1)
compass-rails (2.0.alpha.0) compass-rails (1.1.3)
compass (>= 0.12.2, < 0.14) compass (>= 0.12.2)
coveralls (0.7.0) coveralls (0.7.0)
multi_json (~> 1.3) multi_json (~> 1.3)
rest-client rest-client
simplecov (>= 0.7) simplecov (>= 0.7)
term-ansicolor term-ansicolor
thor thor
crack (0.4.1) crack (0.4.2)
safe_yaml (~> 0.9.0) safe_yaml (~> 1.0.0)
daemons (1.1.9) daemons (1.1.9)
database_cleaner (1.2.0) database_cleaner (1.2.0)
debug_inspector (0.0.2) debug_inspector (0.0.2)
debugger (1.6.2) debugger (1.6.5)
columnize (>= 0.3.1) columnize (>= 0.3.1)
debugger-linecache (~> 1.2.0) debugger-linecache (~> 1.2.0)
debugger-ruby_core_source (~> 1.2.3) debugger-ruby_core_source (~> 1.3.1)
debugger-linecache (1.2.0) debugger-linecache (1.2.0)
debugger-ruby_core_source (1.2.3) debugger-ruby_core_source (1.3.1)
delorean (2.1.0) delorean (2.1.0)
chronic chronic
diff-lcs (1.2.4) diff-lcs (1.2.5)
docile (1.1.3)
email_spec (1.5.0) email_spec (1.5.0)
launchy (~> 2.1) launchy (~> 2.1)
mail (~> 2.2) mail (~> 2.2)
erubis (2.7.0) erubis (2.7.0)
eventmachine (1.0.3)
eventmachine (1.0.3-x86-mingw32) eventmachine (1.0.3-x86-mingw32)
execjs (2.0.2) execjs (2.0.2)
factory_girl (4.2.0) factory_girl (4.4.0)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
factory_girl_rails (4.2.1) factory_girl_rails (4.4.0)
factory_girl (~> 4.2.0) factory_girl (~> 4.4.0)
railties (>= 3.0.0) railties (>= 3.0.0)
faker (1.2.0) faker (1.2.0)
i18n (~> 0.5) i18n (~> 0.5)
ffi (1.9.0-x86-mingw32) faraday (0.9.0)
multipart-post (>= 1.2, < 3)
ffi (1.9.3-x86-mingw32)
forgery (0.5.0)
foundation-rails (5.1.1.0)
railties (>= 3.1.0)
sass (>= 3.2.0)
fssm (0.2.10) fssm (0.2.10)
haml (4.0.3) geocoder (1.1.9)
haml (4.0.5)
tilt tilt
haml-rails (0.5.1)
actionpack (~> 4.0.0)
activesupport (~> 4.0.0)
haml (>= 3.1, < 5.0)
railties (~> 4.0.0)
haml_assets (0.2.2) haml_assets (0.2.2)
haml haml
tilt tilt
handlebars_assets (0.14.1) handlebars_assets (0.15)
execjs (>= 1.2.9) execjs (>= 1.2.9)
multi_json
sprockets (>= 2.0.3) sprockets (>= 2.0.3)
tilt tilt
hike (1.2.3) hike (1.2.3)
i18n (0.6.5) httpauth (0.2.1)
i18n (0.6.9)
i18n-js (2.1.2) i18n-js (2.1.2)
i18n i18n
jquery-rails (3.0.4) image_optimizer (1.2.1)
jquery-rails (3.1.0)
railties (>= 3.0, < 5.0) railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0) thor (>= 0.14, < 2.0)
jquery-turbolinks (2.0.1) jquery-turbolinks (2.0.2)
railties (>= 3.1.0) railties (>= 3.1.0)
turbolinks turbolinks
launchy (2.3.0) jquery-ui-rails (4.2.0)
railties (>= 3.2.16)
json (1.8.1)
jwt (0.1.11)
multi_json (>= 1.5)
launchy (2.4.2)
addressable (~> 2.3) addressable (~> 2.3)
mail (2.5.4) mail (2.5.4)
mime-types (~> 1.16) mime-types (~> 1.16)
@ -126,16 +182,36 @@ GEM
rack-contrib rack-contrib
railties railties
method_source (0.8.2) method_source (0.8.2)
mime-types (1.25) mime-types (1.25.1)
mini_portile (0.5.1) mini_magick (3.7.0)
subexec (~> 0.2.1)
mini_portile (0.5.2)
minitest (4.7.5) minitest (4.7.5)
multi_json (1.8.2) multi_json (1.8.4)
nokogiri (1.6.0-x86-mingw32) multipart-post (2.0.0)
nested_form (0.3.2)
nokogiri (1.6.1)
mini_portile (~> 0.5.0)
nokogiri (1.6.1-x86-mingw32)
mini_portile (~> 0.5.0) mini_portile (~> 0.5.0)
pg (0.17.0-x86-mingw32) oauth (0.4.7)
oauth2 (0.8.1)
faraday (~> 0.8)
httpauth (~> 0.1)
jwt (~> 0.1.4)
multi_json (~> 1.0)
rack (~> 1.2)
paper_trail (3.0.0)
activerecord (>= 3.0, < 5.0)
activesupport (>= 3.0, < 5.0)
pg (0.17.1-x86-mingw32)
polyglot (0.3.3) polyglot (0.3.3)
pry (0.9.12.2-x86-mingw32) pry (0.9.12.6)
coderay (~> 1.0.5) coderay (~> 1.0)
method_source (~> 0.8)
slop (~> 3.4)
pry (0.9.12.6-x86-mingw32)
coderay (~> 1.0)
method_source (~> 0.8) method_source (~> 0.8)
slop (~> 3.4) slop (~> 3.4)
win32console (~> 1.3) win32console (~> 1.3)
@ -157,50 +233,57 @@ GEM
rails_12factor (0.0.2) rails_12factor (0.0.2)
rails_serve_static_assets rails_serve_static_assets
rails_stdout_logging rails_stdout_logging
rails_serve_static_assets (0.0.1) rails_serve_static_assets (0.0.2)
rails_stdout_logging (0.0.3) rails_stdout_logging (0.0.3)
railties (4.0.0) railties (4.0.0)
actionpack (= 4.0.0) actionpack (= 4.0.0)
activesupport (= 4.0.0) activesupport (= 4.0.0)
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
rake (10.1.0) rake (10.1.1)
ref (1.0.5) redis (3.0.7)
rest-client (1.6.7) rest-client (1.6.7)
mime-types (>= 1.16) mime-types (>= 1.16)
rspec (2.14.1) rspec (2.14.1)
rspec-core (~> 2.14.0) rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0) rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0) rspec-mocks (~> 2.14.0)
rspec-core (2.14.6) rspec-core (2.14.7)
rspec-expectations (2.14.3) rspec-expectations (2.14.5)
diff-lcs (>= 1.1.3, < 2.0) diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.4) rspec-mocks (2.14.5)
rspec-rails (2.14.0) rspec-rails (2.14.1)
actionpack (>= 3.0) actionpack (>= 3.0)
activemodel (>= 3.0)
activesupport (>= 3.0) activesupport (>= 3.0)
railties (>= 3.0) railties (>= 3.0)
rspec-core (~> 2.14.0) rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0) rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0) rspec-mocks (~> 2.14.0)
rubyzip (1.0.0) ruby-drupal-hash (0.0.3)
safe_yaml (0.9.7) rubyzip (1.1.0)
sass (3.2.12) safe_yaml (1.0.1)
sass (3.2.14)
sass-rails (4.0.1) sass-rails (4.0.1)
railties (>= 4.0.0, < 5.0) railties (>= 4.0.0, < 5.0)
sass (>= 3.1.10) sass (>= 3.1.10)
sprockets-rails (~> 2.0.0) sprockets-rails (~> 2.0.0)
selenium-webdriver (2.37.0) selenium-webdriver (2.39.0)
childprocess (>= 0.2.5) childprocess (>= 0.2.5)
multi_json (~> 1.0) multi_json (~> 1.0)
rubyzip (~> 1.0.0) rubyzip (~> 1.0)
websocket (~> 1.0.4) websocket (~> 1.0.4)
simplecov (0.7.1) simplecov (0.8.2)
multi_json (~> 1.0) docile (~> 1.1.0)
simplecov-html (~> 0.7.1) multi_json
simplecov-html (0.7.1) simplecov-html (~> 0.8.0)
slop (3.4.6) simplecov-html (0.8.0)
sprockets (2.10.0) slop (3.4.7)
sorcery (0.8.5)
bcrypt-ruby (>= 3.0)
oauth (~> 0.4.4)
oauth2 (>= 0.8.0, < 1.0.0)
sprockets (2.10.1)
hike (~> 1.2) hike (~> 1.2)
multi_json (~> 1.0) multi_json (~> 1.0)
rack (~> 1.0) rack (~> 1.0)
@ -209,49 +292,53 @@ GEM
actionpack (>= 3.0) actionpack (>= 3.0)
activesupport (>= 3.0) activesupport (>= 3.0)
sprockets (~> 2.8) sprockets (~> 2.8)
term-ansicolor (1.2.2) subexec (0.2.3)
tins (~> 0.8) term-ansicolor (1.3.0)
therubyracer (0.11.0beta1-x86-mingw32) tins (~> 1.0)
ref thin (1.6.1)
thin (1.5.1)
daemons (>= 1.0.9) daemons (>= 1.0.9)
eventmachine (>= 0.12.6) eventmachine (>= 1.0.0)
rack (>= 1.0.0) rack (>= 1.0.0)
thor (0.18.1) thor (0.18.1)
thread_safe (0.1.3) thread_safe (0.1.3)
atomic atomic
tilt (1.4.1) tilt (1.4.1)
tins (0.12.0) tins (1.0.0)
treetop (1.4.15) treetop (1.4.15)
polyglot polyglot
polyglot (>= 0.3.1) polyglot (>= 0.3.1)
turbolinks (1.3.0) turbolinks (2.2.1)
coffee-rails coffee-rails
tzinfo (0.3.38) tzinfo (0.3.38)
uglifier (2.2.1) uglifier (2.4.0)
execjs (>= 0.3.0) execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2) json (>= 1.8.0)
uniform_notifier (1.3.0) unicode_utils (1.4.0)
webmock (1.15.0) uniform_notifier (1.4.0)
webmock (1.17.3)
addressable (>= 2.2.7) addressable (>= 2.2.7)
crack (>= 0.3.2) crack (>= 0.3.2)
websocket (1.0.7) websocket (1.0.7)
win32console (1.3.2-x86-mingw32) win32console (1.3.2-x86-mingw32)
xpath (2.0.0) xpath (2.0.0)
nokogiri (~> 1.3) nokogiri (~> 1.3)
zurb-foundation (4.3.2)
sass (>= 3.2.0)
PLATFORMS PLATFORMS
x86-mingw32 x86-mingw32
DEPENDENCIES DEPENDENCIES
acts_as_list
awesome_print
bcrypt-ruby!
better_errors better_errors
binding_of_caller binding_of_caller
bullet bullet
capybara capybara
carmen-rails (~> 1.0.0)!
carrierwave
carrierwave-imageoptimizer
coffee-rails (~> 4.0.0) coffee-rails (~> 4.0.0)
compass-rails (~> 2.0.alpha.0) compass-rails (~> 1.1.3)
coveralls coveralls
database_cleaner database_cleaner
debugger debugger
@ -259,27 +346,38 @@ DEPENDENCIES
email_spec email_spec
factory_girl_rails factory_girl_rails
faker faker
forgery
foundation-rails
geocoder
haml haml
haml-rails
haml_assets haml_assets
handlebars_assets handlebars_assets
i18n-active_record!
i18n-js i18n-js
jquery-rails jquery-rails
jquery-turbolinks jquery-turbolinks
jquery-ui-rails
launchy launchy
meta_request meta_request
mini_magick
nested_form
oauth2 (~> 0.8.0)
paper_trail
pg pg
pry pry
pry-rails pry-rails
rails (= 4.0.0) rails (= 4.0.0)
rails_12factor rails_12factor
redis
rspec rspec
rspec-rails rspec-rails
ruby-drupal-hash
sass-rails (~> 4.0.0) sass-rails (~> 4.0.0)
selenium-webdriver selenium-webdriver
simplecov simplecov
therubyracer sorcery (>= 0.8.1)
thin thin
turbolinks turbolinks
uglifier (>= 1.3.0) uglifier (>= 1.3.0)
webmock webmock
zurb-foundation

2
README.md

@ -1,4 +1,4 @@
Starter App [![Build Status](https://travis-ci.org/diowa/ruby2-rails4-bootstrap-heroku.png?branch=master)](https://travis-ci.org/diowa/ruby2-rails4-bootstrap-heroku) [![Dependency Status](https://gemnasium.com/diowa/ruby2-rails4-bootstrap-heroku.png)](https://gemnasium.com/diowa/ruby2-rails4-bootstrap-heroku) [![Code Climate](https://codeclimate.com/github/diowa/ruby2-rails4-bootstrap-heroku.png)](https://codeclimate.com/github/diowa/ruby2-rails4-bootstrap-heroku) [![Coverage Status](https://coveralls.io/repos/diowa/ruby2-rails4-bootstrap-heroku/badge.png?branch=master)](https://coveralls.io/r/diowa/ruby2-rails4-bootstrap-heroku) Bike!Bike!
=========== ===========
This is a starter web application based on the following technology stack: This is a starter web application based on the following technology stack:

2
Rakefile

@ -3,4 +3,4 @@
require File.expand_path('../config/application', __FILE__) require File.expand_path('../config/application', __FILE__)
Starterapp::Application.load_tasks BikeBike::Application.load_tasks

10
app/assets/fonts/README.md

@ -0,0 +1,10 @@
Bike!Bike! Icon Font
===========
To add to the icon font:
* Go to icomoon.io/app/
* Import the .svg in this folder
* Add you own svg icons
* Genreate and download the font
* Unzip and overwrite the contents into this directory

29
app/assets/fonts/glyphs/noun_project_592.svg

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="100px" height="58.526px" viewBox="0 0 100 58.526" enable-background="new 0 0 100 58.526" xml:space="preserve">
<path d="M98.878,38.354L100,38.296c-0.674-10.46-9.368-18.738-19.999-18.738c-3.3,0-6.409,0.802-9.154,2.214l-4.568-8.047
l1.211-2.686c0.25,0.049,0.469,0.075,0.645,0.075c1.176,0,5.174-3.63,4.408-5.579c-0.33-0.84-2.259-0.038-4.673,0.469
c-0.538,0.113-2.193,0.104-3.152,0c-2.233-0.242-4.194-0.762-4.565,0.259c-0.446,1.233,2.614,3.072,5.181,4.095l-0.654,1.451H32.187
l0.972-2.71l-0.265-0.095l1.489-4.151L34.34,4.838l0-0.001c-0.598-0.206-1.923-0.877-2.208-1.643
c-0.063-0.171-0.119-0.449,0.133-0.878c0.472-0.806,4.493-0.834,8.604-0.06L41.182,0.6c-2.083-0.392-8.988-1.491-10.369,0.863
c-0.448,0.765-0.538,1.566-0.26,2.317c0.314,0.847,1.046,1.482,1.737,1.919l-0.982,2.738l-0.265-0.095L26.489,21.04
c-2.335-0.953-4.889-1.482-7.566-1.482c-1.016,0-2.013,0.077-2.988,0.223l0.184,1.109C6.998,22.245,0,30.106,0,39.604
c0,10.451,8.472,18.923,18.923,18.923c7.83,0,14.548-4.755,17.426-11.535l1.027,0.453c1.025-2.408,1.593-5.058,1.593-7.841
c0-7.59-4.22-14.193-10.44-17.597l0.99-2.76l18.15,20.153c-0.65,0.892-1.043,1.983-1.043,3.172c0,2.989,2.423,5.413,5.413,5.413
c0.22,0,0.437-0.018,0.649-0.043l0.851,3.226h-1.23v2.247h4.795v-2.247h-1.822L54.31,47.48c1.773-0.823,3.017-2.576,3.121-4.635
l3.868-0.41c1.367,9.105,9.215,16.091,18.702,16.091c10.45,0,18.923-8.472,18.923-18.923c0-0.424-0.02-0.843-0.047-1.261
C98.878,38.347,98.878,38.35,98.878,38.354z M34.476,39.604c0,8.59-6.963,15.554-15.553,15.554S3.37,48.193,3.37,39.604
c0-8.589,6.963-15.553,15.553-15.553c2.274,0,4.433,0.493,6.38,1.37l-2.558,7.132l-3.009,4.622c-0.25-0.081-0.512-0.136-0.789-0.136
c-1.417,0-2.565,1.148-2.565,2.564c0,1.417,1.148,2.565,2.565,2.565c1.417,0,2.565-1.148,2.565-2.565
c0-0.522-0.158-1.008-0.427-1.414l3.125-4.8l2.6-7.189C31.396,28.905,34.476,33.894,34.476,39.604z M53.19,37.285
c-0.372-0.081-0.756-0.126-1.151-0.126c-0.186,0-0.368,0.01-0.548,0.027l-0.953-3.613h1.371v-2.246h-4.795v2.246h1.682l1.066,4.045
c-0.182,0.08-0.353,0.178-0.524,0.276L30.38,16.846l1-2.789h32.283L53.19,37.285z M60.004,40.879l-2.742,0.291
c-0.324-1.202-1.048-2.239-2.025-2.957l10.185-22.586l3.961,6.977c-5.66,3.543-9.427,9.831-9.427,17
C59.955,40.033,59.976,40.457,60.004,40.879z M64.448,39.604c0-5.495,2.853-10.321,7.154-13.087l6.264,11.033
c-0.396,0.411-0.672,0.934-0.78,1.517l-12.618,1.34C64.455,40.14,64.448,39.873,64.448,39.604z M80.001,55.157
c-7.747,0-14.168-5.665-15.354-13.077l12.614-1.339c0.446,1.074,1.505,1.83,2.74,1.83c1.64,0,2.969-1.328,2.969-2.968
c0-1.639-1.329-2.968-2.969-2.968c-0.23,0-0.453,0.032-0.669,0.082l-6.265-11.035c2.087-1.042,4.441-1.632,6.934-1.632
c8.59,0,15.553,6.964,15.553,15.553C95.554,48.193,88.591,55.157,80.001,55.157z"/>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
app/assets/images/Columbus-ohio-skyline-panorama.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
app/assets/images/Nola2013Banner-2.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

BIN
app/assets/images/Nola2013Banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 693 KiB

BIN
app/assets/images/Thumbs.db

Binary file not shown.

BIN
app/assets/images/columbus.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
app/assets/images/columbus.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

BIN
app/assets/images/icon_24074.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
app/assets/images/poster.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 KiB

BIN
app/assets/images/t-dot.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

BIN
app/assets/images/translate_cursor-24.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
app/assets/images/translate_cursor-32.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
app/assets/images/translate_cursor.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
app/assets/images/vancity.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 KiB

175
app/assets/javascripts/application.js.coffee

@ -0,0 +1,175 @@
#= require jquery
#= require jquery_ujs
#= require jquery.ui.sortable
#= require jquery.turbolinks
#= require turbolinks
#= require foundation
# FRONT END
# JS HANDLEBARS TEMPLATES
# require handlebars.runtime
# require jquery_nested_form
# I18n
#= require i18n
#= require i18n/translations
# ALL THE REST
#= require_tree .
'use strict'
I18n.defaultLocale = '<%= I18n.default_locale %>'
I18n.locale = $('html').attr 'lang'
try Typekit.load() catch
startSpinner = ->
$('#loading-spinner').show()
stopSpinner = ->
$('#loading-spinner').fadeOut()
# Turbolinks Spinner
document.addEventListener 'page:fetch', startSpinner
document.addEventListener 'page:receive', stopSpinner
readURL = (input) ->
reader = null
if input.files && input.files[0]
reader = new FileReader()
reader.readAsDataURL input.files[0]
reader.onload = (e) ->
$(input).prev().attr('src', e.target.result)
createOverlay = () ->
if $('#overlay').length > 0
$('#overlay').remove()
$('body').append('<div id="overlay" class="loading"><div id="overlay-inner"></div></div>')
$('#overlay-dlg')
setOverlayHTML = (html) ->
$('#overlay-inner').append('<div id="overlay-dlg">' + html + '</div>');
$('#overlay').removeAttr('class').click(destroyOverlay)
destroyOverlay = () ->
$('#overlay').remove()
selectA = (type, event, $emptyObj) ->
event.preventDefault()
# = $(this)
$overlay = createOverlay()
objs = []
$('.' + type + '-select-field.added input.' + type + '-id').each () -> obj.push($(this).val())
$.post $emptyObj.data().url + (if type == 'organization' then '/nonhosts' else '/nonmembers'), {added: objs},
(html) ->
setOverlayHTML(html).addClass('' + type + '-select')
$('#select-' + type + '-list a').click (event) ->
event.preventDefault()
$this = $(this)
$old_field = $emptyObj.closest('.field')
$field = $old_field.clone()
oldID = parseInt($old_field.find('input[type="hidden"]').attr('name').match(/\[(\d+)\]\[id\]/)[1])
newID = oldID + 1
$field.find('input.' + type + '-id').val($this.data().id)
$field.find('.' + type + 'name').html($this.find('.' + type + 'name').html()).before('<img src="' + $this.find('img').attr('src') + '" />')
$field.find('.select-' + type + '').remove()
$field.removeClass('new').addClass('added')
$old_field.html (i, html) ->
pregex = new RegExp('\\[' + oldID + '\\]', 'g');
aregex = new RegExp('_' + oldID + '_', 'g');
html.replace(pregex, '[' + newID + ']').replace(aregex, '_' + newID + '_')
$field.insertBefore($old_field)
$('a.select-' + type + '').click (event) -> selectA(type, event, $(this))
destroyOverlay()
return
, 'html'
updateFormField = () ->
$form = $('form#new_registration_form_field')
$field_type = $form.find('#registration_form_field_field_type')
field_type = $field_type.val()
$form.find('.registration-form-field-field').hide()
$form.find('.registration-form-field-field.field-type-' + field_type).show()
updateFormFieldForm = () ->
$('form #registration_form_field_field_type').change updateFormField
updateFormField()
$('form#new_registration_form_field').submit (event) ->
event.preventDefault()
$form = $(this)
serialized = $form.serialize()
$.post $form.attr('action'), serialized,
(json) ->
$form.replaceWith(json.form)
$('#registration-form-field-list').html(json.list)
updateFormFieldForm()
, 'json'
updateFormFieldList = () ->
$('#registration-form-field-list .add-form-field').click () ->
$.post 'form/add-field', {field: $(this).data().id},
(json) ->
$('#conference-form').html(json.form)
$('#registration-form-field-list').html(json.list)
#console.log json
updateFormFieldList()
return
$('#conference-form .remove-form-field').click () ->
$.post 'form/remove-field', {field: $(this).data().id},
(json) ->
$('#conference-form').html(json.form)
$('#registration-form-field-list').html(json.list)
updateFormFieldList()
return
$ ->
$(document).foundation();
$('.field.country-select select').change () ->
$country = $(this)
country = $country.val()
$territory = $('.field.subregion-select select')
if $territory.data().country == country
$territory.removeClass('can cant').addClass('can')
return
$.post '/location/territories', {country: country},
(json) ->
$territory.html('')
if json && Object.keys(json).length
$.each json, (code, name) ->
$territory.append($('<option>').text(name).attr('value', code))
return
$territory.removeClass('can cant').addClass('can')
$territory.data().country = country
else
$territory.removeClass('can cant').addClass('cant')
return
, 'json'
return
$('img + input[type="file"]').change () ->
readURL(this);
$('a.select-user, a.select-organization').click (event) -> selectA($(this).attr('class').match(/(^|\s)select\-([^\s]+)/)[2], event, $(this))
updateFormFieldForm()
updateFormFieldList()
$('ul.sortable').sortable
handle: '.drag-sort',
items: 'li',
update: (event, props) ->
$(this).children().each (index, child) ->
$(child).find('.sortable-position').val(index + 1)
url = $(this).data().url
if url
data = $(this).find('input, select, textarea').serialize()
$.post url, data#,
# (json) ->
# console.log json
#, 'json'

3
app/assets/javascripts/conference_admins.js.coffee

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

3
app/assets/javascripts/conference_host_organizations.js.coffee

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

3
app/assets/javascripts/conference_registration_responses.js.coffee

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

3
app/assets/javascripts/conference_registrations.js.coffee

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

3
app/assets/javascripts/conference_registraton_form_fields.js.coffee

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

3
app/assets/javascripts/conference_types.js.coffee

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

3
app/assets/javascripts/conferences.js.coffee

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

3
app/assets/javascripts/locations.js.coffee

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

3
app/assets/javascripts/organization_statuses.js.coffee

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

3
app/assets/javascripts/organizations.js.coffee

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

3
app/assets/javascripts/registration_form_fields.js.coffee

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

121
app/assets/javascripts/translate.js.coffee

@ -0,0 +1,121 @@
# I18n
#= require i18n
#= require i18n/translations
'use strict'
$(document).ready ->
$('#translation-control form').unbind('submit').bind('submit', (event)->
event.preventDefault()
event.stopPropagation()
$form = $(this)
serialized = $form.serialize()
$form.find('select, button, textarea').prop 'disabled', true
$.post $form.attr('action'), serialized,
(json) ->
if json.success
$span = $('.translate-me[data-translate-key="' + json.key + '"]')
$span.html(json.translation)
$span.attr('data-translate-untranslated', json.translation)
$span.removeClass 'untranslated'
else if json.test
console.log json.test
$form.find('select, button, textarea').prop 'disabled', false
return
, 'json'
return
)
$('.translate-me').click (event)->
if event.altKey
event.preventDefault()
key = $(this).attr('data-translate-key')
$('#translationkey').val key
resetTranslation key
$('#translationvalue').focus()
return
#$('#translationvalue, #translationkey').focus ->
$('#translation-control *').focus ->
key = $('#translationkey').val()
selectTranslation key
updateTranslation key
return
$('#translationkey').change (event)->
#$('#translationvalue').val('')
key = $('#translationkey').val()
selectTranslation key
resetTranslation key
#$('#translation').focus()
#console.log event
return
# $('#translationvalue, #translationkey').blur ->
$('#translation-control *').blur ->
selectTranslation()
return
$('#translationvalue').bind 'input propertychange', ()->
updateTranslation $('#translationkey').val()
return
return
selectTranslation = (key)->
$span = $('.translate-me.selected');
$span.removeClass 'selected'
$span.removeClass 'preview'
$('#translatevars').hide()
$('#translatepluralizations').hide()
$('#translatevars ul').html ''
$('#translationhascount').val('0')
if key
$target = $('.translate-me[data-translate-key="' + key + '"]')
if !$target || !$target.length
return
vars = $target.addClass('selected').data().vars
if vars
keys = Object.keys(vars)
if keys.length
for i in [0...keys.length]
$('#translatevars ul').append ('<li class="var-' + keys[i] + '" title="Value: ' + vars[keys[i]] + '">' + keys[i] + '</li>')
if keys[i] == 'count'
$('#translatepluralizations').show()
$('#translationhascount').val('1')
$('#translatevars').show()
else
$span.html ()->
$(this).attr('data-translate-untranslated')
return
updateTranslation = (key)->
$span = $('.translate-me[data-translate-key="' + key + '"]')
val = $('#translationvalue').val()
is_preview = ($span.hasClass 'preview')
$('#translatevars li').removeClass('used')
if val
if !is_preview
$span.addClass 'preview'
if !$span || !$span.length
return
vars = $span.data().vars
keys = Object.keys(vars)
for i in [0...keys.length]
_var = new RegExp('%{' + keys[i] + '}')
if val.match _var
# console.log 'Match!'
$('#translatevars li.var-' + keys[i]).addClass('used')
val = val.replace _var, vars[keys[i]]
else
if is_preview
$span.removeClass 'preview'
$span.html (val || $span.attr('data-translate-untranslated'))
return
resetTranslation = (key)->
$target = $('.translate-me[data-translate-key="' + key + '"]')
if $target && $target.length
translated = $target.data().translateTranslated
counts = ['zero', 'one', 'two', 'few', 'many']
for i in counts
val = translated[key + '.' + i]
$('#translationvalue_' + i).val(val || '')
$('#translationpluralization_' + i).prop('checked', !!val)
val = (translated[key] || translated[key + '.other'])
$('#translationvalue').val(val || '')
return

3
app/assets/javascripts/user_organization_relationships.js.coffee

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

3
app/assets/javascripts/user_sessions.js.coffee

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

3
app/assets/javascripts/users.js.coffee

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

3
app/assets/javascripts/versions.js.coffee

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

3
app/assets/javascripts/workshop_presentation_styles.js.coffee

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

3
app/assets/javascripts/workshop_resources.js.coffee

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

3
app/assets/javascripts/workshop_streams.js.coffee

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

37
app/assets/javascripts/xapplication.xjs.xcoffee.erb

@ -0,0 +1,37 @@
#= require jquery
#= require jquery_ujs
#= require jquery.turbolinks
#= require turbolinks
#= require foundation
# FRONT END
# JS HANDLEBARS TEMPLATES
# require handlebars.runtime
# I18n
#= require i18n
#= require i18n/translations
# ALL THE REST
#= require_tree .
'use strict'
I18n.defaultLocale = '<%= I18n.default_locale %>'
I18n.locale = $('html').attr 'lang'
startSpinner = ->
$('#loading-spinner').show()
stopSpinner = ->
$('#loading-spinner').fadeOut()
# Turbolinks Spinner
document.addEventListener 'page:fetch', startSpinner
document.addEventListener 'page:receive', stopSpinner
alert('123');
$ ->
$(document).foundation();

3
app/assets/stylesheets/conference_admins.css.scss

@ -0,0 +1,3 @@
// Place all the styles related to the conference_admins controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

3
app/assets/stylesheets/conference_host_organizations.css.scss

@ -0,0 +1,3 @@
// Place all the styles related to the conference_host_organizations controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

3
app/assets/stylesheets/conference_registration_responses.css.scss

@ -0,0 +1,3 @@
// Place all the styles related to the conference_registration_responses controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

3
app/assets/stylesheets/conference_registrations.css.scss

@ -0,0 +1,3 @@
// Place all the styles related to the conference_registrations controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

3
app/assets/stylesheets/conference_registraton_form_fields.css.scss

@ -0,0 +1,3 @@
// Place all the styles related to the conference_registraton_form_fields controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

3
app/assets/stylesheets/conference_types.css.scss

@ -0,0 +1,3 @@
// Place all the styles related to the conference_types controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

3
app/assets/stylesheets/conferences.css.scss

@ -0,0 +1,3 @@
// Place all the styles related to the conferences controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

1576
app/assets/stylesheets/foundation_and_overrides.scss

File diff suppressed because it is too large

3
app/assets/stylesheets/locations.css.scss

@ -0,0 +1,3 @@
// Place all the styles related to the Locations controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

3
app/assets/stylesheets/organization_statuses.css.scss

@ -0,0 +1,3 @@
// Place all the styles related to the organization_statuses controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

3
app/assets/stylesheets/organizations.css.scss

@ -0,0 +1,3 @@
// Place all the styles related to the organizations controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

3
app/assets/stylesheets/registration_form_fields.css.scss

@ -0,0 +1,3 @@
// Place all the styles related to the registration_form_fields controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

376
app/assets/stylesheets/sass/_layout.scss

@ -4,38 +4,370 @@
*/ */
#main-container, #footer, #nav-inner { html, #footer .container {
max-width: $large-screen; background-color: $primary-color
margin: 0 auto;
} }
$body-background-color: #EEE;
$main-container-background-color: #F4F4F4;
$content-background-color: #FFF;
$layout-border-color: #DDD;
body { body {
background-color: $body-background-color; height: auto;
}
#footer {
//margin-top: 5em;
}
main {
padding-bottom: 5em;
background-color: $white;
body.page-style-form & {
//background-color: $color-5;
}
.no-banner & {
//border-top: 0.25em solid $primary-color;
}
/*.no-banner &:before {
content: '///////////////';
color: #CCC;
font-weight: 100;
font-family: $header-font-family;
letter-spacing: 0.33333em;
font-size: 1em;
text-align: center;
display: block;
font-style: italic;
}*/
}
$body-background-color: $white;
//$main-container-background-color: #F4F4F4;
//$content-background-color: #FFF;
//$layout-border-color: #DDD;
$translation-control-background-color: $black !default;
$translation-control-text-color: $black !default;
#translation-control {
position: fixed;
padding: 0.75em;
background-color: $translation-control-background-color;
height: 3.75em;
overflow: visible;
z-index: 2;
width: 100%;
top: 0;
.row {
max-width: none;
}
select, button {
height: 2.66667em;
margin: 0;
}
select {
}
textarea {
margin: 0 0 0.5em;
min-height: 2.66667em;
}
button {
line-height: 0em;
font-size: 0.875em;
}
input, label {
margin: 0.75em 0 0 0.5em;
}
+ .top-bar {
margin-top: 3.75em;
}
}
#translatepluralizations {
display: none;
background-color: $translation-control-background-color;
color: $translation-control-text-color;
padding: 0.5em;
label {
color: inherit;
}
}
#translatevars {
display: none;
//position: absolute;
background-color: $translation-control-background-color;
color: $translation-control-text-color;
z-index: 1;
padding: 0.5em;
//margin-top: 0.5em;
ul {
list-style: none;
margin: 0;
display: inline-block;
}
li {
font-family: monospace;
font-size: 0.9em;
display: inline-block;
margin-right: 0.5em;
&:before {
content: '%{';
}
&:after {
content: '}';
}
&.used {
text-decoration: line-through;
}
}
}
#banner {
//min-height: 5em;
//background-color: rgba($black, 0.125);
position: relative;
color: $black;
//border-top: 0.25em solid $primary-color;
padding: 1em 0;
margin-bottom: 2.5em;
text-align: center;
&.has-image {
padding: 0;
margin-bottom: 5em;
color: #FFF;
background-size: cover;
background-position: center 75%;
min-height: 25em;
box-shadow: inset 0 10em 50em -5em #000;
text-shadow: 0 0.1em 0.75em #000;
text-align: left;
&:before {
content: '';
position: absolute;
top: 0;
right: 0;
width: 100%;
height: 100%;
background-color: $primary-color;
opacity: 0.5;
}
&:after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 1.1em;
background-image: linear-gradient(45deg, $white 25%, transparent 25%), linear-gradient(-45deg, transparent 75%, $white 75%);
background-image: -ms-linear-gradient(45deg, $white 25%, transparent 25%), -ms-linear-gradient(-45deg, transparent 75%, $white 75%);
background-image: -moz-linear-gradient(56deg, $white 25%, transparent 25%), -moz-linear-gradient(-56deg, transparent 75%, $white 75%);
background-image: -ms-linear-gradient(56deg, $white 25%, transparent 25%), -ms-linear-gradient(-56deg, transparent 75%, $white 75%);
background-image: -webkit-linear-gradient(56deg, $white 20%, transparent 25%), -webkit-linear-gradient(-56deg, transparent 75%, $white 80%);
background-repeat: repeat-x;
background-size: 1.25em 1.1em;
background-position: 0 bottom;
//padding-top: 0.6em;
//margin-top: 5em;
}
body.organizations & {
border-color: $organization-color;
&:before {
background-color: $organization-color;
}
&.has-image {
h1 {
color: #FFF;
}
h2 {
color: #CCC;
}
}
}
.page-style-emphasize-banner & {
padding-top: $topbar-height;
}
h1 {
color: $color-3;
}
h2, em {
color: $color-2;
}
}
figure img {
margin-bottom: -2.5em;
box-shadow: 0 0.1em 0.75em #000;
position: relative;
z-index: 1;
}
h1, h2 {
line-height: 1em;
}
.info {
padding-top: 5%;
}
p {
line-height: 1.3333em;
margin-top: 1.5em;
//box-shadow: 0 0 5em 1em #000;
//background-color: rgba(#000, 0.7);
//border-radius: 1em;
}
.button {
color: inherit;
background-color: $primary-color;// rgba(0, 0, 0, 0.75);
}
} }
#main-container { .top-bar {
background-color: $main-container-background-color; .name h1 a {
border: 1px solid $layout-border-color; text-shadow:
border-top: 0; 0 -3px $black, 0 1px $black,
0 3px $color-1, 0 4px $black,
0 6px $color-2, 0 7px $black,
0 9px $color-3, 0 10px $black,
0 12px $color-4, 0 13px $black,
0 15px $color-5, 0 16px $black;
-webkit-transition: text-shadow 333ms ease-in-out;
-moz-transition: text-shadow 333ms ease-in-out;
-ms-transition: text-shadow 333ms ease-in-out;
transition: text-shadow 333ms ease-in-out;
line-height: 2em;
padding-left: 0;
&:hover {
text-shadow:
0 0 $black, 0 0 $black,
0 0 $color-1, 0 0 $black,
0 0 $color-2, 0 0 $black,
0 0 $color-3, 0 0 $black,
0 0 $color-4, 0 0 $black,
0 0 $color-5, 0 0 $black;
}
}
.top-bar-section ul li > a {
text-transform: uppercase;
font-weight: 800;
font-size: 1em;
&.button {
background-color: transparent;
margin: 1em 0;
color: $white;
border: 1px solid;
}
}
.user-profile {
padding: 0;
a {
padding: 0em 0.75em;
}
img {
width: 2.25em;
border-radius: 33%;
}
}
.has-form {
padding: 0;
&.sign-out a.button {
font-size: 0.6em;
margin-top: 2.25em;
}
}
.page-style-emphasize-banner & {
position: absolute;
left: 0;
right: 0;
z-index: 1;
text-shadow: 0 0.1em 0.75em #000;
}
}
.centered {
text-align: center;
} }
#main { select.cant {
border-right: 1px solid $layout-border-color; display: none;
padding: 0;
} }
article.content { body.organizations-show {
background-color: $content-background-color; main > nav .tabs {
border-left: 1px solid $layout-border-color; position: relative;
top: -2em;
}
} }
#overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.75);
text-align: center;
#article-header { #overlay-inner {
border-bottom: 1px solid $layout-border-color; text-align: center;
padding: 0; display: inline-block;
background-color: $black;
padding: 2em;
margin: 5% 0 0 0;
padding-top: 0;
box-shadow: 0 0 1em #000;
}
&.user-select {
#overlay-inner {
min-width: 50%;
}
}
} }
.user-preview {
display: inline-block;
margin: 0.5em;
position: relative;
label {
position: absolute;
bottom: 0;
left: 0;
right: 0;
color: #FFF;
background-color: rgba(#000, 0.5);
}
}

529
app/assets/stylesheets/sass/_typography.scss

@ -4,3 +4,532 @@
*/ */
$translate-me-bgcolor: rgba(255, 0, 0, 0.25) !default;
$translate-me-outline-color: rgba(255, 0, 0, 0.5) !default;
.translate-me {
cursor: url(translate_cursor-32.png) 8 31, auto;
&.untranslated {
background-color: $translate-me-bgcolor;
@include opacity(0.5);
}
&:hover,
&.selected {
@include opacity(1);
outline: 2px solid $translate-me-outline-color;
outline-offset: 0;
outline-style: dashed;
}
&.preview {
background-color: inherit;
outline-style: solid;
-webkit-animation: preview-translation 2s infinite;
}
}
@-webkit-keyframes preview-translation {
0% {
outline-color: rgba(0, 255, 0, 1);
}
50% {
outline-color: rgba(0, 255, 0, 0);
}
100% {
outline-color: rgba(0, 255, 0, 1);
}
}
.button, button, input[type="file"] {
background-color: rgba($white, 0.5);
border-radius: 1.5em;
color: $primary-color;
border: 1px solid;
padding: 0.75em 1.5em;
text-transform: uppercase;
text-shadow: none;
&:hover {
color: #FFF;
}
}
input[type="file"] {
display: none;/*inline-block;
width: auto;
text-align: center;
-webkit-appearance: none;
background-color: #FFF;
border-radius: 1.5em;
padding: 0.6em 0;
cursor: pointer;
font-family: $button-font-family;
outline: none;
&:hover {
background-color: $primary-color;
}
&::-webkit-file-upload-button {
visibility: none;
opacity: 0;
width: 0;
}*/
}
input[type="date"] {
&:invalid {
color: #CCC;
}
}
h2 {
line-height: 1em;
margin-bottom: 0.5em;
}
select {
border: 1px solid #CCC;
border-radius: 0.2em;
font-size: 1.25em;
font-family: $body-font-family;
color: rgba($black, 0.75);
padding: 0 0.5em;
height: 2em;
box-shadow: 0 2px #CCC;
outline: 0;
background-color: #FFF;
&.small {
font-size: 0.8em;
margin: 0 0 0.25em;
box-shadow: none;
}
}
fieldset {
background-color: #FFF;
legend {
margin-left: -2em;
font-family: $header-font-family;
}
}
.field {
margin-bottom: 1em;
position: relative;
//border: 1px solid #CCC;
//border-radius: 1.25em 0 0 1.25em;
//overflow: hidden;
label {
//float: left;
font-family: $header-font-family;
line-height: 2.5em;
//margin-right: 1em;
//background-color: rgba(#FFF, 0.2);
//color: $white;
display: inline-block;
position: absolute;
top: 100%;
margin: -1.333em 1.75em 0;
span {
padding: 0 1em;
font-size: 0.9em;
}
}
div {
//border: 1px solid #EEE;
//border-width: 1px 0 0 1px;
}
input, select, button {
//margin: 0;
height: auto;
line-height: 1em;
padding: 0.333em 0.5em;
}
input:not([type="file"]) {
border-bottom: 1px dashed #CCC;
line-height: 1.25em;
}
textarea {
border: 1px dashed #CCC;
height: 10em;
font-size: 1.25em;
}
&.text-area {
label {
top: 1px;
right: 1px;
bottom: 1px;
left: 1px;
display: block;
width: 100%;
height: 100%;
margin: 0;
padding: 0;
background-color: rgba(255, 255, 255, 0.5);
text-align: center;
width: calc(100% - 2px);
height: calc(100% - 2px);
span {
position: relative;
top: 50%;
text-align: center;
font-size: 1.25em;
font-weight: 600;
margin: -1em 0 0;
padding: 0 0.5em;
display: inline-block;
border-radius: 0.5em;
box-shadow: 0 0 1em;
}
}
textarea:focus + label {
display: none;
}
.medium-8 > & {
font-size: 0.75em;
}
}
input, select, button, label span {
background-color: $white;
color: #333;
}
&.field-slug {
position: absolute;
top: 100%;
right: 0;
left: 50%;
margin-top: -0.875em;
margin-right: 0.9em;
margin-left: 10em;
z-index: 1;
input {
font-size: 1em;
padding-bottom: 0;
background-color: $gray;
}
label {
margin-top: -3em;
right: 100%;
margin-right: 0;
}
}
&.image-field {
label {
position: relative;
margin: 0;
border-bottom: 1px dotted #CCC;
padding-bottom: 1.3em;
text-align: center;
> span {
position: absolute;
background-color: transparent;
left: 0;
right: 0;
}
&:hover {
img {
@include opacity(0.75);
}
}
}
}
&.check-box {
div {
float: left;
font-size: 1.75em;
//display: none;
/*input {
-webkit-appearance: none;
}
&:before {
content: '';
width: 1em;
height: 1em;
display: inline-block;
border: 1px solid #CCC;
line-height: 0.75em;
text-align: center;
font-size: 1.6667em;
border-radius: 0.2em;
box-shadow: 0 1.9px #CCC;
content: '';
}*/
}
label {
position: relative;
margin: 0;
display: inline-block;
}
}
&.select {
overflow: auto;
label {
position: static;
margin: 0;
float: left;
& + div {
float: left;
}
}
}
&.user-select-field,
&.organization-select-field {
display: inline-block;
position: relative;
border: 1px solid #CCC;
padding: 0.25em;
margin: 1em 1em 0;
border-radius: 0.25em;
float: left;
box-shadow: 0 2px #CCC;
overflow: hidden;
label {
display: block;
position: relative;
margin: 0 auto;
}
input[type="checkbox"] {
position: absolute;
-webkit-appearance: none;
-moz-appearance: none;
-ms-appearance: none;
-o-appearance: none;
appearance: none;
width: 100%;
width: calc(100% - 0.6em);
height: 9em;
border: 0;
background-color: transparent;
cursor: pointer;
outline: none;
+ label {
display: none;
width: 100%;
width: calc(100% - 0.06em);
height: 0.94em;
font-size: 8em;
position: absolute;
top: 0.03em;
left: 0.03em;
color: $white;
line-height: 0.75em;
text-align: center;
text-shadow: 0 2px 0px $black;
}
&:checked {
+ label {
background-color: rgba($warning-color, 0.5);
display: block;
text-shadow: 0 2px 0px $warning-color;
}
}
&:hover {
+ label {
display: block;
color: $warning-color;
}
}
}
&.new {
input[type="checkbox"],
input[type="checkbox"] + label {
display: none;
}
}
img {
display: block;
}
.select-user,
.select-organization {
margin-bottom: 0.5em;
display: block;
}
.remove-item {
position: absolute;
top: 0;
right: 0;
&:before {
content: '';
height: 0;
width: 0;
border-width: 0 2.5em 2.5em 0;
border-color: transparent $black;
border-style: solid;
position: absolute;
right: 0;
top: 0;
}
&:after {
content: '×';
color: $white;
position: absolute;
right: 0;
top: 0;
width: 1.5em;
height: 1.25em;
text-align: center;
line-height: 1.25em;
}
}
}
}
form > div:first-child + .columns:not([class*="medium-"]) {
margin-top: 1em;
margin-bottom: 3em;
> .field:first-child {
text-align: center;
label {
//margin-left: 0;
//margin-right: 0;
left: 0;
right: 0;
}
input {
font-size: 3em;
text-align: center;
}
}
//+ .columns[class*="medium-"] {//+ .columns[class*="medium-"] {
//padding-top: 1em;
//}
}
.actions {
text-align: center;
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
font-style: italic;
color: rgba(0, 0, 0, 0.25);
}
::-moz-placeholder { /* Mozilla Firefox 19+ */
font-style: italic;
color: rgba(0, 0, 0, 0.25);
}
:-ms-input-placeholder { /* Internet Explorer 10+ */
font-style: italic;
color: rgba(0, 0, 0, 0.25);
}
::-webkit-input-placeholder {
font-style: italic;
color: rgba(0, 0, 0, 0.25);
}
input:-webkit-autofill {
-webkit-box-shadow:0 0 0 5em $input-bg-color inset; /* Change the color to your own background color */
-webkit-text-fill-color: $input-font-color;
&:focus {
-webkit-box-shadow: 0 0 0 2em $input-focus-bg-color inset; /* Change the color to your own background color */
}
}
.tabs {
display: inline-block;
border: 1px solid #CCC;
margin: 1em 0;
box-shadow: 0 0.1em 0 #CCC;
border-radius: 0.25em;
overflow: hidden;
font-family: $header-font-family;
.tab {
border-right: 1px solid #CCC;
display: inline-block;
//padding: 0.25em 1em 0.3333em 0.75em;
padding: 0.5em 1.5em 0.5em 1.25em;
background-color: #FFF;
color: $black;
float: left;
&.current {
background-color: #EEE;
background-color: #EEE;
}
&:hover {
background-color: #DDD;
color: $black;
}
&:last-child {
border: 0;
}
}
}
.sub-tabs {
background-color: #E1E1E1;
padding: 1em;
margin-bottom: 2em;
a {
display: block;
position: relative;
padding: 1em;
margin: 1px 0;
height: 3.1em;
font-size: 1.1em;
font-family: $header-font-family;
color: $white;
background-color: $black;
text-transform: uppercase;
&.current {
background-color: $primary-color;
&:after {
content: '';
position: absolute;
top: 0;
left: 100%;
width: 0;
height: 0;
border: 1.55em solid $primary-color;
border-color: transparent transparent transparent $primary-color;
border-width: 1.55em 0 1.55em 1.55em;
}
}
}
}

69
app/assets/stylesheets/scaffolds.css.scss

@ -0,0 +1,69 @@
body {
background-color: #fff;
color: #333;
font-family: verdana, arial, helvetica, sans-serif;
font-size: 13px;
line-height: 18px;
}
p, ol, ul, td {
font-family: verdana, arial, helvetica, sans-serif;
font-size: 13px;
line-height: 18px;
}
pre {
background-color: #eee;
padding: 10px;
font-size: 11px;
}
a {
color: #000;
&:visited {
color: #666;
}
&:hover {
color: #fff;
background-color: #000;
}
}
div {
&.field, &.actions {
margin-bottom: 10px;
}
}
#notice {
color: green;
}
.field_with_errors {
padding: 2px;
background-color: red;
display: table;
}
#error_explanation {
width: 450px;
border: 2px solid red;
padding: 7px;
padding-bottom: 0;
margin-bottom: 20px;
background-color: #f0f0f0;
h2 {
text-align: left;
font-weight: bold;
padding: 5px 5px 5px 15px;
font-size: 12px;
margin: -7px;
margin-bottom: 0px;
background-color: #c00;
color: #fff;
}
ul li {
font-size: 12px;
list-style: square;
}
}

3
app/assets/stylesheets/user_organization_relationships.css.scss

@ -0,0 +1,3 @@
// Place all the styles related to the user_organization_relationships controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

3
app/assets/stylesheets/user_sessions.css.scss

@ -0,0 +1,3 @@
// Place all the styles related to the UserSessions controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

3
app/assets/stylesheets/users.css.scss

@ -0,0 +1,3 @@
// Place all the styles related to the users controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

3
app/assets/stylesheets/versions.css.scss

@ -0,0 +1,3 @@
// Place all the styles related to the versions controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

3
app/assets/stylesheets/workshop_presentation_styles.css.scss

@ -0,0 +1,3 @@
// Place all the styles related to the workshop_presentation_styles controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

3
app/assets/stylesheets/workshop_resources.css.scss

@ -0,0 +1,3 @@
// Place all the styles related to the workshop_resources controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

3
app/assets/stylesheets/workshop_streams.css.scss

@ -0,0 +1,3 @@
// Place all the styles related to the workshop_streams controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

65
app/assets/stylesheets/xapplication.css

@ -0,0 +1,65 @@
/*
Syntax error: File to import not found or unreadable: foundation.
Load paths:
C:/Users/Godwin/My Sites/bikebike/app/assets/stylesheets
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/frameworks/blueprint/stylesheets
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/frameworks/compass/stylesheets
Compass::SpriteImporter
on line 1327 of C:/Users/Godwin/My Sites/bikebike/app/assets/stylesheets/foundation_and_overrides.scss
from line 20 of C:/Users/Godwin/My Sites/bikebike/app/assets/stylesheets/application.css.scss
Backtrace:
C:/Users/Godwin/My Sites/bikebike/app/assets/stylesheets/foundation_and_overrides.scss:1327
C:/Users/Godwin/My Sites/bikebike/app/assets/stylesheets/application.css.scss:20
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/import_node.rb:67:in `rescue in import'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/import_node.rb:45:in `import'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/import_node.rb:28:in `imported_file'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/import_node.rb:37:in `css_import?'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:217:in `visit_import'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in `visit'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:100:in `visit'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:227:in `block in visit_import'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:227:in `map'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:227:in `visit_import'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in `visit'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:100:in `visit'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `map'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `visit_children'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:109:in `block in visit_children'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:121:in `with_environment'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:108:in `visit_children'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in `block in visit'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:128:in `visit_root'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in `visit'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:100:in `visit'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:7:in `visit'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/root_node.rb:20:in `render'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/engine.rb:315:in `_render'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/engine.rb:262:in `render'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:140:in `block (2 levels) in compile'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:126:in `timed'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:139:in `block in compile'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/logger.rb:45:in `red'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:138:in `compile'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:118:in `compile_if_required'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:103:in `block (2 levels) in run'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:101:in `each'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:101:in `block in run'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:126:in `timed'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:100:in `run'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/commands/update_project.rb:45:in `perform'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/commands/base.rb:18:in `execute'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/commands/project_base.rb:19:in `execute'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:43:in `perform!'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:15:in `run!'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/bin/compass:30:in `block in <top (required)>'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/bin/compass:44:in `call'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/bin/compass:44:in `<top (required)>'
C:/RailsInstaller/Ruby2.0.0/bin/compass:23:in `load'
C:/RailsInstaller/Ruby2.0.0/bin/compass:23:in `<main>'
*/
body:before {
white-space: pre;
font-family: monospace;
content: "Syntax error: File to import not found or unreadable: foundation.\A Load paths:\A C:/Users/Godwin/My Sites/bikebike/app/assets/stylesheets\A C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/frameworks/blueprint/stylesheets\A C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/frameworks/compass/stylesheets\A Compass::SpriteImporter\A on line 1327 of C:/Users/Godwin/My Sites/bikebike/app/assets/stylesheets/foundation_and_overrides.scss\A from line 20 of C:/Users/Godwin/My Sites/bikebike/app/assets/stylesheets/application.css.scss"; }

58
app/assets/stylesheets/xfoundation_and_overrides.css

@ -0,0 +1,58 @@
/*
Syntax error: File to import not found or unreadable: foundation.
Load paths:
C:/Users/Godwin/My Sites/bikebike/app/assets/stylesheets
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/frameworks/blueprint/stylesheets
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/frameworks/compass/stylesheets
Compass::SpriteImporter
on line 1327 of C:/Users/Godwin/My Sites/bikebike/app/assets/stylesheets/foundation_and_overrides.scss
Backtrace:
C:/Users/Godwin/My Sites/bikebike/app/assets/stylesheets/foundation_and_overrides.scss:1327
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/import_node.rb:67:in `rescue in import'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/import_node.rb:45:in `import'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/import_node.rb:28:in `imported_file'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/import_node.rb:37:in `css_import?'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:217:in `visit_import'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in `visit'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:100:in `visit'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `map'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `visit_children'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:109:in `block in visit_children'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:121:in `with_environment'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:108:in `visit_children'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in `block in visit'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:128:in `visit_root'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in `visit'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:100:in `visit'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:7:in `visit'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/tree/root_node.rb:20:in `render'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/engine.rb:315:in `_render'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sass-3.2.12/lib/sass/engine.rb:262:in `render'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:140:in `block (2 levels) in compile'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:126:in `timed'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:139:in `block in compile'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/logger.rb:45:in `red'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:138:in `compile'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:118:in `compile_if_required'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:103:in `block (2 levels) in run'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:101:in `each'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:101:in `block in run'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:126:in `timed'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:100:in `run'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/commands/update_project.rb:45:in `perform'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/commands/base.rb:18:in `execute'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/commands/project_base.rb:19:in `execute'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:43:in `perform!'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:15:in `run!'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/bin/compass:30:in `block in <top (required)>'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/bin/compass:44:in `call'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/bin/compass:44:in `<top (required)>'
C:/RailsInstaller/Ruby2.0.0/bin/compass:23:in `load'
C:/RailsInstaller/Ruby2.0.0/bin/compass:23:in `<main>'
*/
body:before {
white-space: pre;
font-family: monospace;
content: "Syntax error: File to import not found or unreadable: foundation.\A Load paths:\A C:/Users/Godwin/My Sites/bikebike/app/assets/stylesheets\A C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/frameworks/blueprint/stylesheets\A C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/compass-0.12.2/frameworks/compass/stylesheets\A Compass::SpriteImporter\A on line 1327 of C:/Users/Godwin/My Sites/bikebike/app/assets/stylesheets/foundation_and_overrides.scss"; }

1327
app/assets/stylesheets/xfoundation_and_overrides.scss

File diff suppressed because it is too large

37
app/assets/xapplication.xjs.xcoffee

@ -0,0 +1,37 @@
#= require jquery
#= require jquery_ujs
#= require jquery.turbolinks
#= require turbolinks
#= require foundation
# FRONT END
# JS HANDLEBARS TEMPLATES
# require handlebars.runtime
# I18n
#= require i18n
#= require i18n/translations
# ALL THE REST
#= require_tree .
'use strict'
I18n.defaultLocale = '<%= I18n.default_locale %>'
I18n.locale = $('html').attr 'lang'
startSpinner = ->
$('#loading-spinner').show()
stopSpinner = ->
$('#loading-spinner').fadeOut()
# Turbolinks Spinner
document.addEventListener 'page:fetch', startSpinner
document.addEventListener 'page:receive', stopSpinner
alert('321');
$ ->
$(document).foundation();

58
app/controllers/conference_admins_controller.rb

@ -0,0 +1,58 @@
class ConferenceAdminsController < ApplicationController
before_action :set_conference_admin, only: [:show, :edit, :update, :destroy]
# GET /conference_admins
def index
@conference_admins = ConferenceAdmin.all
end
# GET /conference_admins/1
def show
end
# GET /conference_admins/new
def new
@conference_admin = ConferenceAdmin.new
end
# GET /conference_admins/1/edit
def edit
end
# POST /conference_admins
def create
@conference_admin = ConferenceAdmin.new(conference_admin_params)
if @conference_admin.save
redirect_to @conference_admin, notice: 'Conference admin was successfully created.'
else
render action: 'new'
end
end
# PATCH/PUT /conference_admins/1
def update
if @conference_admin.update(conference_admin_params)
redirect_to @conference_admin, notice: 'Conference admin was successfully updated.'
else
render action: 'edit'
end
end
# DELETE /conference_admins/1
def destroy
@conference_admin.destroy
redirect_to conference_admins_url, notice: 'Conference admin was successfully destroyed.'
end
private
# Use callbacks to share common setup or constraints between actions.
def set_conference_admin
@conference_admin = ConferenceAdmin.find(params[:id])
end
# Only allow a trusted parameter "white list" through.
def conference_admin_params
params.require(:conference_admin).permit(:conference_id, :user_id)
end
end

58
app/controllers/conference_host_organizations_controller.rb

@ -0,0 +1,58 @@
class ConferenceHostOrganizationsController < ApplicationController
before_action :set_conference_host_organization, only: [:show, :edit, :update, :destroy]
# GET /conference_host_organizations
def index
@conference_host_organizations = ConferenceHostOrganization.all
end
# GET /conference_host_organizations/1
def show
end
# GET /conference_host_organizations/new
def new
@conference_host_organization = ConferenceHostOrganization.new
end
# GET /conference_host_organizations/1/edit
def edit
end
# POST /conference_host_organizations
def create
@conference_host_organization = ConferenceHostOrganization.new(conference_host_organization_params)
if @conference_host_organization.save
redirect_to @conference_host_organization, notice: 'Conference host organization was successfully created.'
else
render action: 'new'
end
end
# PATCH/PUT /conference_host_organizations/1
def update
if @conference_host_organization.update(conference_host_organization_params)
redirect_to @conference_host_organization, notice: 'Conference host organization was successfully updated.'
else
render action: 'edit'
end
end
# DELETE /conference_host_organizations/1
def destroy
@conference_host_organization.destroy
redirect_to conference_host_organizations_url, notice: 'Conference host organization was successfully destroyed.'
end
private
# Use callbacks to share common setup or constraints between actions.
def set_conference_host_organization
@conference_host_organization = ConferenceHostOrganization.find(params[:id])
end
# Only allow a trusted parameter "white list" through.
def conference_host_organization_params
params.require(:conference_host_organization).permit(:conference_id, :organization_id, :order)
end
end

58
app/controllers/conference_registration_responses_controller.rb

@ -0,0 +1,58 @@
class ConferenceRegistrationResponsesController < ApplicationController
before_action :set_conference_registration_response, only: [:show, :edit, :update, :destroy]
# GET /conference_registration_responses
def index
@conference_registration_responses = ConferenceRegistrationResponse.all
end
# GET /conference_registration_responses/1
def show
end
# GET /conference_registration_responses/new
def new
@conference_registration_response = ConferenceRegistrationResponse.new
end
# GET /conference_registration_responses/1/edit
def edit
end
# POST /conference_registration_responses
def create
@conference_registration_response = ConferenceRegistrationResponse.new(conference_registration_response_params)
if @conference_registration_response.save
redirect_to @conference_registration_response, notice: 'Conference registration response was successfully created.'
else
render action: 'new'
end
end
# PATCH/PUT /conference_registration_responses/1
def update
if @conference_registration_response.update(conference_registration_response_params)
redirect_to @conference_registration_response, notice: 'Conference registration response was successfully updated.'
else
render action: 'edit'
end
end
# DELETE /conference_registration_responses/1
def destroy
@conference_registration_response.destroy
redirect_to conference_registration_responses_url, notice: 'Conference registration response was successfully destroyed.'
end
private
# Use callbacks to share common setup or constraints between actions.
def set_conference_registration_response
@conference_registration_response = ConferenceRegistrationResponse.find(params[:id])
end
# Only allow a trusted parameter "white list" through.
def conference_registration_response_params
params.require(:conference_registration_response).permit(:conference_registration_id, :registration_form_field_id, :data)
end
end

58
app/controllers/conference_registrations_controller.rb

@ -0,0 +1,58 @@
class ConferenceRegistrationsController < ApplicationController
before_action :set_conference_registration, only: [:show, :edit, :update, :destroy]
# GET /conference_registrations
def index
@conference_registrations = ConferenceRegistration.all
end
# GET /conference_registrations/1
def show
end
# GET /conference_registrations/new
def new
@conference_registration = ConferenceRegistration.new
end
# GET /conference_registrations/1/edit
def edit
end
# POST /conference_registrations
def create
@conference_registration = ConferenceRegistration.new(conference_registration_params)
if @conference_registration.save
redirect_to @conference_registration, notice: 'Conference registration was successfully created.'
else
render action: 'new'
end
end
# PATCH/PUT /conference_registrations/1
def update
if @conference_registration.update(conference_registration_params)
redirect_to @conference_registration, notice: 'Conference registration was successfully updated.'
else
render action: 'edit'
end
end
# DELETE /conference_registrations/1
def destroy
@conference_registration.destroy
redirect_to conference_registrations_url, notice: 'Conference registration was successfully destroyed.'
end
private
# Use callbacks to share common setup or constraints between actions.
def set_conference_registration
@conference_registration = ConferenceRegistration.find(params[:id])
end
# Only allow a trusted parameter "white list" through.
def conference_registration_params
params.require(:conference_registration).permit(:conference_id, :user_id, :is_attending)
end
end

58
app/controllers/conference_registraton_form_fields_controller.rb

@ -0,0 +1,58 @@
class ConferenceRegistratonFormFieldsController < ApplicationController
before_action :set_conference_registraton_form_field, only: [:show, :edit, :update, :destroy]
# GET /conference_registraton_form_fields
def index
@conference_registraton_form_fields = ConferenceRegistratonFormField.all
end
# GET /conference_registraton_form_fields/1
def show
end
# GET /conference_registraton_form_fields/new
def new
@conference_registraton_form_field = ConferenceRegistratonFormField.new
end
# GET /conference_registraton_form_fields/1/edit
def edit
end
# POST /conference_registraton_form_fields
def create
@conference_registraton_form_field = ConferenceRegistratonFormField.new(conference_registraton_form_field_params)
if @conference_registraton_form_field.save
redirect_to @conference_registraton_form_field, notice: 'Conference registraton form field was successfully created.'
else
render action: 'new'
end
end
# PATCH/PUT /conference_registraton_form_fields/1
def update
if @conference_registraton_form_field.update(conference_registraton_form_field_params)
redirect_to @conference_registraton_form_field, notice: 'Conference registraton form field was successfully updated.'
else
render action: 'edit'
end
end
# DELETE /conference_registraton_form_fields/1
def destroy
@conference_registraton_form_field.destroy
redirect_to conference_registraton_form_fields_url, notice: 'Conference registraton form field was successfully destroyed.'
end
private
# Use callbacks to share common setup or constraints between actions.
def set_conference_registraton_form_field
@conference_registraton_form_field = ConferenceRegistratonFormField.find(params[:id])
end
# Only allow a trusted parameter "white list" through.
def conference_registraton_form_field_params
params.require(:conference_registraton_form_field).permit(:conference_id, :registration_form_field_id, :order)
end
end

58
app/controllers/conference_types_controller.rb

@ -0,0 +1,58 @@
class ConferenceTypesController < ApplicationController
before_action :set_conference_type, only: [:show, :edit, :update, :destroy]
# GET /conference_types
def index
@conference_types = ConferenceType.all
end
# GET /conference_types/1
def show
end
# GET /conference_types/new
def new
@conference_type = ConferenceType.new
end
# GET /conference_types/1/edit
def edit
end
# POST /conference_types
def create
@conference_type = ConferenceType.new(conference_type_params)
if @conference_type.save
redirect_to @conference_type, notice: 'Conference type was successfully created.'
else
render action: 'new'
end
end
# PATCH/PUT /conference_types/1
def update
if @conference_type.update(conference_type_params)
redirect_to @conference_type, notice: 'Conference type was successfully updated.'
else
render action: 'edit'
end
end
# DELETE /conference_types/1
def destroy
@conference_type.destroy
redirect_to conference_types_url, notice: 'Conference type was successfully destroyed.'
end
private
# Use callbacks to share common setup or constraints between actions.
def set_conference_type
@conference_type = ConferenceType.find(params[:id])
end
# Only allow a trusted parameter "white list" through.
def conference_type_params
params.require(:conference_type).permit(:title, :info)
end
end

140
app/controllers/conferences_controller.rb

@ -0,0 +1,140 @@
class ConferencesController < ApplicationController
before_action :set_conference, only: [:show, :edit, :update, :destroy]
# GET /conferences
def index
@conferences = Conference.all
end
# GET /conferences/1
def show
end
# GET /conferences/new
def new
@conference = Conference.new
@conference.build_conference_type
end
# GET /conferences/1/edit
def edit
end
# POST /conferences
def create
@conference = Conference.new(conference_params)
if @conference.save
redirect_to @conference, notice: 'Conference was successfully created.'
else
render action: 'new'
end
end
# PATCH/PUT /conferences/1
def update
if params[:register]
params.each do |key, value|
matches = /^field_(\d+)(_(\d+|other))?/.match(key)
if matches
x
end
end
render action: 'show'
elsif @conference.update(conference_params)
redirect_to @conference, notice: 'Conference was successfully updated.'
else
render action: 'edit'
end
end
def hosts
set_conference
@conference.conference_host_organizations.build
end
def nonhosts
set_conference
@available_orgs = Organization.where(["id NOT IN (?)", @conference.organizations.map(&:id) + (params[:added] || [])])
html = '<h2>Select an Organization</h2><div id="select-organization-list">'
@available_orgs.each do |organization|
html += '<a href="#" class="organization-preview" data-id="' + organization.id.to_s + '"><img src="' + (organization.avatar.url :thumb) + '" /><div class="username">' + (organization.name) + '</div></a>'
end
render :text => (html + '</div>')
end
def registration
set_conference
@sub_action = 'registration' + (params[:sub_action] ? '_' + params[:sub_action] : '')
if params[:sub_action] == 'form'
@registration_form_field = RegistrationFormField.new
@registration_form_fields = RegistrationFormField.where(["id NOT IN (?)", @conference.registration_form_fields.map(&:id)])
end
end
def add_field
set_conference
field = RegistrationFormField.find(params[:field])
@conference.registration_form_fields << field
@registration_form_fields = RegistrationFormField.where(["id NOT IN (?)", @conference.registration_form_fields.map(&:id)])
form = render_to_string :partial => 'registration_form_fields/conference_form'
list = render_to_string :partial => 'registration_form_fields/list'
render json: {form: form, list: list}
end
def remove_field
set_conference
field = RegistrationFormField.find(params[:field])
@conference.registration_form_fields.delete(field)
@registration_form_fields = RegistrationFormField.where(["id NOT IN (?)", @conference.registration_form_fields.map(&:id)])
form = render_to_string :partial => 'registration_form_fields/conference_form'
list = render_to_string :partial => 'registration_form_fields/list'
render json: {form: form, list: list}
end
def reorder
set_conference
params[:registration_form_field_id].each do |key, value|
update_field_position(value.to_i, params[:position][key].to_i)
end
render json: [].to_json
end
def form
set_conference
end
# DELETE /conferences/1
def destroy
@conference.destroy
redirect_to conferences_url, notice: 'Conference was successfully destroyed.'
end
private
# Use callbacks to share common setup or constraints between actions.
def set_conference
@conference = Conference.find_by(slug: params[:slug] || params[:conference_slug])
end
# Only allow a trusted parameter "white list" through.
def conference_params
params.require(:conference).permit(:title, :slug, :start_date, :end_date, :info, :poster, :cover, :workshop_schedule_published, :registration_open, :meals_provided, :meal_info, :travel_info, :conference_type_id, conference_types: [:id])
end
def update_field_position(field_id, position)
#ConferenceRegistrationFormField.where(:conference_id => @conference.id, :registration_form_field_id => field_id).update_all(:position => position)
data = []
for i in 0..@conference.conference_registration_form_fields.length
f = @conference.conference_registration_form_fields[i]
if f.registration_form_field_id == field_id
data << (f.registration_form_field_id.to_s + ' == ' + field_id.to_s + ' [position: ' + position.to_s + ' == ' + f.position.to_s + ']')
f.update_attributes(:position => position)
return
end
end
end
end

58
app/controllers/locations_controller.rb

@ -0,0 +1,58 @@
class LocationsController < ApplicationController
before_action :set_location, only: [:show, :edit, :update, :destroy]
# GET /locations
def index
@locations = Location.all
end
# GET /locations/1
def show
end
# GET /locations/new
def new
@location = Location.new
end
# GET /locations/1/edit
def edit
end
# POST /locations
def create
@location = Location.new(location_params)
if @location.save
redirect_to @location, notice: 'Location was successfully created.'
else
render action: 'new'
end
end
# PATCH/PUT /locations/1
def update
if @location.update(location_params)
redirect_to @location, notice: 'Location was successfully updated.'
else
render action: 'edit'
end
end
# DELETE /locations/1
def destroy
@location.destroy
redirect_to locations_url, notice: 'Location was successfully destroyed.'
end
private
# Use callbacks to share common setup or constraints between actions.
def set_location
@location = Location.find(params[:id])
end
# Only allow a trusted parameter "white list" through.
def location_params
params.require(:location).permit(:title, :address, :latitude, :longitude)
end
end

58
app/controllers/organization_statuses_controller.rb

@ -0,0 +1,58 @@
class OrganizationStatusesController < ApplicationController
before_action :set_organization_status, only: [:show, :edit, :update, :destroy]
# GET /organization_statuses
def index
@organization_statuses = OrganizationStatus.all
end
# GET /organization_statuses/1
def show
end
# GET /organization_statuses/new
def new
@organization_status = OrganizationStatus.new
end
# GET /organization_statuses/1/edit
def edit
end
# POST /organization_statuses
def create
@organization_status = OrganizationStatus.new(organization_status_params)
if @organization_status.save
redirect_to @organization_status, notice: 'Organization status was successfully created.'
else
render action: 'new'
end
end
# PATCH/PUT /organization_statuses/1
def update
if @organization_status.update(organization_status_params)
redirect_to @organization_status, notice: 'Organization status was successfully updated.'
else
render action: 'edit'
end
end
# DELETE /organization_statuses/1
def destroy
@organization_status.destroy
redirect_to organization_statuses_url, notice: 'Organization status was successfully destroyed.'
end
private
# Use callbacks to share common setup or constraints between actions.
def set_organization_status
@organization_status = OrganizationStatus.find(params[:id])
end
# Only allow a trusted parameter "white list" through.
def organization_status_params
params.require(:organization_status).permit(:name, :slug, :info)
end
end

96
app/controllers/organizations_controller.rb

@ -0,0 +1,96 @@
class OrganizationsController < ApplicationController
before_action :set_organization, only: [:show, :edit, :update, :destroy]
before_filter :require_login, :except => [:index, :show]
# GET /organizations
def index
@organizations = Organization.all
end
# GET /organizations/1
def show
end
# GET /organizations/new
def new
@organization = Organization.new
#@organization.location = Location.new
@organization.locations.build
@organization.locations_organization.build
@organization.user_organization_relationships.build
end
# GET /organizations/1/edit
def edit
end
# POST /organizations
def create
@organization = Organization.new(organization_params)
params[:organization][:locations_attributes].each do |k, v|
@organization.locations << Location.new(locations_organization_params(k))
end
@organization.user_organization_relationship << UserOrganizationRelationship.new(:user_id => current_user.id, :relationship => UserOrganizationRelationship::Administrator)
if @organization.save!
redirect_to @organization, notice: 'Organization was successfully created.'
else
render action: 'new'
end
end
# PATCH/PUT /organizations/1
def update
if @organization.update_attributes(organization_params)
redirect_to @organization, notice: 'Organization was successfully updated.'
else
render action: 'edit'
end
end
# DELETE /organizations/1
def destroy
@organization.destroy
redirect_to organizations_url, notice: 'Organization was successfully destroyed.'
end
def members
set_organization
@organization.user_organization_relationships.build
end
def nonmembers
set_organization
#puts "\n\tPARAMS: " + params[:addedUsers].to_json.to_s + "\n"
@available_users = User.where(["id NOT IN (?)", @organization.users.map(&:id) + (params[:added] || [])])
html = '<h2>Select a User</h2><div id="select-user-list">'
@available_users.each do |user|
html += '<a href="#" class="user-preview" data-id="' + user.id.to_s + '"><img src="' + (user.avatar.url :thumb) + '" /><div class="username">' + (user.username) + '</div></a>'
end
render :text => (html + '</div>')
end
def identity
set_organization
end
private
# Use callbacks to share common setup or constraints between actions.
def set_organization
@organization = Organization.find_by(slug: params[:slug] || params[:organization_slug])
end
# Only allow a trusted parameter "white list" through.
def organization_params
params.require(:organization).permit(:name, :slug, :email_address, :url, :year_founded, :info, :logo, :avatar, :cover, :requires_approval, :secret_question, :secret_answer, user_organization_relationships_attributes: [:id, :user_id, :relationship, :_destroy], locations: [:country, :territory, :city, :street, :postal_code])
end
def locations_organization_params(index)
params[:organization][:locations_attributes].require(index.to_s).permit(:country, :territory, :city, :street, :postal_code)
end
def user_organization_params(index)
params[:organization][:user_organization_relationships_attributes].require(index.to_s).permit(:user_id, :relationship)
end
end

56
app/controllers/pages_controller.rb

@ -1,6 +1,60 @@
require 'rubygems'
require 'ruby_drupal_hash'
include ApplicationHelper
class PagesController < ApplicationController class PagesController < ApplicationController
def home def home
@title_img = '/assets/nola.jpg' #password = ""
#hash = ""
#@testResult = RubyDrupalHash::verify(password, hash)
end
def translate
key = params[:translationkey]
value = params[:translationvalue]
if params[:translationhascount] == '1'
['zero', 'one', 'two', 'few', 'many'].each { |c|
if params['translationpluralization_' + c]
if !value.is_a?(Hash)
value = Hash.new
end
value[c] = params['translationvalue_' + c]
else
Translation.destroy_all(:locale => params[:translationlang], :key => (key + '.' + c))
end
}
if value.is_a?(Hash)
value['other'] = params[:translationvalue]
Translation.destroy_all(:locale => params[:translationlang], :key => key)
else
Translation.destroy_all(:locale => params[:translationlang], :key => (key + '.other'))
end
end
store_translations(params[:translationlang], {key => value}, :escape => false)
begin
render json: {success: true, key: key, jkey: key.gsub('.', '--'), translation: I18n.translate!(key, {:raise => false})}
rescue
render json: {error: 'Failed to load translation'}
end
end
def location_territories
#render json: (Carmen:::RegionCollection.new(Carmen::Country.coded(params[:country])) || []).to_json
territories = {}
Carmen::Country.coded(params[:country]).subregions.each { |t| territories[t.code] = t.name }
render json: territories.to_json
end
private
def store_translations(locale, data, options = {})
escape = options.fetch(:escape, true)
I18n.backend.flatten_translations(locale, data, escape, false).each do |key, value|
t = Translation.find_or_create_by!(locale: locale.to_s, key: key.to_s)
t.value = value
t.save
end
I18n.backend.reload!
end end
end end

66
app/controllers/registration_form_fields_controller.rb

@ -0,0 +1,66 @@
class RegistrationFormFieldsController < ApplicationController
before_action :set_registration_form_field, only: [:show, :edit, :update, :destroy]
# GET /registration_form_fields
def index
@registration_form_fields = RegistrationFormField.all
end
# GET /registration_form_fields/1
def show
end
# GET /registration_form_fields/new
def new
@registration_form_field = RegistrationFormField.new
end
# GET /registration_form_fields/1/edit
def edit
end
# POST /registration_form_fields
def create
@registration_form_field = RegistrationFormField.new(registration_form_field_params)
ajax_return(@registration_form_field.save)
end
# PATCH/PUT /registration_form_fields/1
def update
ajax_return(@registration_form_field.update(registration_form_field_params))
end
# DELETE /registration_form_fields/1
def destroy
@registration_form_field.destroy
redirect_to registration_form_fields_url, notice: 'Registration form field was successfully destroyed.'
end
private
def ajax_return(success)
@registration_form_fields = RegistrationFormField.all
if success
@registration_form_field = RegistrationFormField.new
end
form = render_to_string :partial => 'form'
list = render_to_string :partial => 'list'
render json: {form: form, list: list}
end
# Use callbacks to share common setup or constraints between actions.
def set_registration_form_field
@registration_form_field = RegistrationFormField.find(params[:id])
end
# Only allow a trusted parameter "white list" through.
def registration_form_field_params
#type = params[:type]
#allowed = RegistrationFormField::Types[type]
#allowed << 'field_type'
rff_params = params.require(:registration_form_field)
allowed = RegistrationFormField::GetNonOptionKeys(rff_params[:field_type], rff_params)
p = rff_params.send('permit', *allowed)#permit(:title, :help, :required, :field_type, :options, :is_retired)
p[:options] = RegistrationFormField::GetOptions(rff_params[:field_type], rff_params).to_json.to_s
p
end
end

58
app/controllers/user_organization_relationships_controller.rb

@ -0,0 +1,58 @@
class UserOrganizationRelationshipsController < ApplicationController
before_action :set_user_organization_relationship, only: [:show, :edit, :update, :destroy]
# GET /user_organization_relationships
def index
@user_organization_relationships = UserOrganizationRelationship.all
end
# GET /user_organization_relationships/1
def show
end
# GET /user_organization_relationships/new
def new
@user_organization_relationship = UserOrganizationRelationship.new
end
# GET /user_organization_relationships/1/edit
def edit
end
# POST /user_organization_relationships
def create
@user_organization_relationship = UserOrganizationRelationship.new(user_organization_relationship_params)
if @user_organization_relationship.save
redirect_to @user_organization_relationship, notice: 'User organization relationship was successfully created.'
else
render action: 'new'
end
end
# PATCH/PUT /user_organization_relationships/1
def update
if @user_organization_relationship.update(user_organization_relationship_params)
redirect_to @user_organization_relationship, notice: 'User organization relationship was successfully updated.'
else
render action: 'edit'
end
end
# DELETE /user_organization_relationships/1
def destroy
@user_organization_relationship.destroy
redirect_to user_organization_relationships_url, notice: 'User organization relationship was successfully destroyed.'
end
private
# Use callbacks to share common setup or constraints between actions.
def set_user_organization_relationship
@user_organization_relationship = UserOrganizationRelationship.find(params[:id])
end
# Only allow a trusted parameter "white list" through.
def user_organization_relationship_params
params.require(:user_organization_relationship).permit(:user_id, :organization_id, :relationship)
end
end

21
app/controllers/user_sessions_controller.rb

@ -0,0 +1,21 @@
class UserSessionsController < ApplicationController
def new
session[:return_to] ||= request.referer
@user = User.new
end
def create
if @user = login(params[:email], params[:password])
#redirect_back_or_to(:users, notice: 'Login successful')
redirect_to session.delete(:return_to)
else
flash.now[:alert] = "Login failed"
render action: "new"
end
end
def destroy
logout
redirect_to(:users, notice: 'Logged out!')
end
end

68
app/controllers/users_controller.rb

@ -0,0 +1,68 @@
include ApplicationHelper
class UsersController < ApplicationController
before_action :set_user, only: [:show, :edit, :update, :destroy]
# GET /users
def index
@users = User.all
end
# GET /users/1
def show
end
# GET /users/new
def new
@user = User.new
end
# GET /users/1/edit
def edit
end
# POST /users
def create
@user = User.new(user_params)
if @user.save
redirect_to @user, notice: 'User was successfully created.'
else
render action: 'new'
end
end
# PATCH/PUT /users/1
def update
#if !user_params[:password] || user_params[:password].length < 1
# puts "\nNo Password! ( " + @user.to_json.to_s + " \n"
# user_params[:password] = user_params[:password_confirmation] = 'Oha1otbt!@#'
#end
if @user.update(user_params)
redirect_to @user, notice: 'User was successfully updated.'
else
render action: 'edit'
end
end
# DELETE /users/1
def destroy
@user.destroy
redirect_to users_url, notice: 'User was successfully destroyed.'
end
private
# Use callbacks to share common setup or constraints between actions.
def set_user
@user = User.find(params[:id])
end
# Only allow a trusted parameter "white list" through.
def session_params
params.require(:user).permit(:username, :email, :password, :avatar, :avatar_cache)
end
def user_params
params.require(:user).permit(:username, :email, :password, :password_confirmation, :avatar, :avatar_cache, :remove_avatar)
end
end

2
app/controllers/versions_controller.rb

@ -0,0 +1,2 @@
class VersionsController < ApplicationController
end

58
app/controllers/workshop_presentation_styles_controller.rb

@ -0,0 +1,58 @@
class WorkshopPresentationStylesController < ApplicationController
before_action :set_workshop_presentation_style, only: [:show, :edit, :update, :destroy]
# GET /workshop_presentation_styles
def index
@workshop_presentation_styles = WorkshopPresentationStyle.all
end
# GET /workshop_presentation_styles/1
def show
end
# GET /workshop_presentation_styles/new
def new
@workshop_presentation_style = WorkshopPresentationStyle.new
end
# GET /workshop_presentation_styles/1/edit
def edit
end
# POST /workshop_presentation_styles
def create
@workshop_presentation_style = WorkshopPresentationStyle.new(workshop_presentation_style_params)
if @workshop_presentation_style.save
redirect_to @workshop_presentation_style, notice: 'Workshop presentation style was successfully created.'
else
render action: 'new'
end
end
# PATCH/PUT /workshop_presentation_styles/1
def update
if @workshop_presentation_style.update(workshop_presentation_style_params)
redirect_to @workshop_presentation_style, notice: 'Workshop presentation style was successfully updated.'
else
render action: 'edit'
end
end
# DELETE /workshop_presentation_styles/1
def destroy
@workshop_presentation_style.destroy
redirect_to workshop_presentation_styles_url, notice: 'Workshop presentation style was successfully destroyed.'
end
private
# Use callbacks to share common setup or constraints between actions.
def set_workshop_presentation_style
@workshop_presentation_style = WorkshopPresentationStyle.find(params[:id])
end
# Only allow a trusted parameter "white list" through.
def workshop_presentation_style_params
params.require(:workshop_presentation_style).permit(:name, :slug, :info)
end
end

58
app/controllers/workshop_resources_controller.rb

@ -0,0 +1,58 @@
class WorkshopResourcesController < ApplicationController
before_action :set_workshop_resource, only: [:show, :edit, :update, :destroy]
# GET /workshop_resources
def index
@workshop_resources = WorkshopResource.all
end
# GET /workshop_resources/1
def show
end
# GET /workshop_resources/new
def new
@workshop_resource = WorkshopResource.new
end
# GET /workshop_resources/1/edit
def edit
end
# POST /workshop_resources
def create
@workshop_resource = WorkshopResource.new(workshop_resource_params)
if @workshop_resource.save
redirect_to @workshop_resource, notice: 'Workshop resource was successfully created.'
else
render action: 'new'
end
end
# PATCH/PUT /workshop_resources/1
def update
if @workshop_resource.update(workshop_resource_params)
redirect_to @workshop_resource, notice: 'Workshop resource was successfully updated.'
else
render action: 'edit'
end
end
# DELETE /workshop_resources/1
def destroy
@workshop_resource.destroy
redirect_to workshop_resources_url, notice: 'Workshop resource was successfully destroyed.'
end
private
# Use callbacks to share common setup or constraints between actions.
def set_workshop_resource
@workshop_resource = WorkshopResource.find(params[:id])
end
# Only allow a trusted parameter "white list" through.
def workshop_resource_params
params.require(:workshop_resource).permit(:name, :slug, :info)
end
end

58
app/controllers/workshop_streams_controller.rb

@ -0,0 +1,58 @@
class WorkshopStreamsController < ApplicationController
before_action :set_workshop_stream, only: [:show, :edit, :update, :destroy]
# GET /workshop_streams
def index
@workshop_streams = WorkshopStream.all
end
# GET /workshop_streams/1
def show
end
# GET /workshop_streams/new
def new
@workshop_stream = WorkshopStream.new
end
# GET /workshop_streams/1/edit
def edit
end
# POST /workshop_streams
def create
@workshop_stream = WorkshopStream.new(workshop_stream_params)
if @workshop_stream.save
redirect_to @workshop_stream, notice: 'Workshop stream was successfully created.'
else
render action: 'new'
end
end
# PATCH/PUT /workshop_streams/1
def update
if @workshop_stream.update(workshop_stream_params)
redirect_to @workshop_stream, notice: 'Workshop stream was successfully updated.'
else
render action: 'edit'
end
end
# DELETE /workshop_streams/1
def destroy
@workshop_stream.destroy
redirect_to workshop_streams_url, notice: 'Workshop stream was successfully destroyed.'
end
private
# Use callbacks to share common setup or constraints between actions.
def set_workshop_stream
@workshop_stream = WorkshopStream.find(params[:id])
end
# Only allow a trusted parameter "white list" through.
def workshop_stream_params
params.require(:workshop_stream).permit(:name, :slug, :info)
end
end

483
app/helpers/application_helper.rb

@ -1,9 +1,480 @@
module ApplicationHelper module ApplicationHelper
def title(page_title) @@keyQueue = nil
content_for(:title) { page_title.to_s } @@translationsOnThisPage = nil
end @@lastTranslation = nil
@@allTranslations = nil
@@no_banner = true
def ThereAreTranslationsOnThisPage?
@@translationsOnThisPage
end
def get_all_translations
@@allTranslations
end
def title(page_title)
content_for(:title) { page_title.to_s }
end
def banner_image(banner_image)
@@no_banner = false
content_for(:banner_image) { banner_image.to_s }
end
def banner_attrs(banner_image)
if banner_image.length > 0
return {style: 'background-image: url(' + banner_image + ');', class: 'has-image' }
end
{class: 'no-image'}
end
def has_banner?
!@@no_banner
end
def banner_title(banner_title)
@@no_banner = false
content_for(:banner) { ('<div class="row"><h1>' + banner_title.to_s + '</h1></div>').html_safe }
end
def page_style(style)
classes = ['page-style-' + style.to_s]
if @@no_banner
classes << 'no-banner'
end
if ThereAreTranslationsOnThisPage?
classes << 'has-translations'
end
if params[:controller]
classes << params[:controller]
if params[:action]
classes << params[:controller] + '-' + params[:action]
end
end
content_for(:page_style) { classes.join(' ') }
end
def yield_or_default(section, default = '')
content_for?(section) ? content_for(section) : default
end
def _lorem_ipsum(method, size)
options = {:random => true}
case method.to_s
when 'c', 'char', 'character', 'characters'
if size
return Forgery::LoremIpsum.characters size, options
end
return Forgery::LoremIpsum.character, options
when 'w', 'word', 'words'
if size
return Forgery::LoremIpsum.words size, options
end
#return'LOREM'
return Forgery::LoremIpsum.word options
when 's', 'sentence', 'sentences'
if size
return Forgery::LoremIpsum.sentences size, options
end
return Forgery::LoremIpsum.sentence options
when 'p', 'paragraph', 'paragraphs'
if size
return Forgery::LoremIpsum.paragraphs size, options.merge({:sentences => 10})
end
return Forgery::LoremIpsum.sentences 10, options
when 't', 'title'
return Forgery::LoremIpsum.sentences 1, options
end
return nil
end
def _(key, behavior = nil, behavior_size = nil, fake: nil, vars: {}, html: nil, blockData: {}, &block)
queued_keys = nil
result = nil
if key.kind_of?(Hash)
blockData.merge!(key)
key = key.keys
end
if block_given?
@@keyQueue ||= Array.new
if key.kind_of?(Array)
@@keyQueue += key
else
@@keyQueue << key
end
end
if key.kind_of?(Array)
new_key = key.shift
if key.count > 0
queued_keys = key.dup
end
key = new_key
end
if blockData[key]
behavior = blockData[key][:behavior] || nil
behavior_size = blockData[key][:behavior_size] || nil
vars = blockData[key][:vars] || {}
end
@@lastTranslation = nil
generate_control = _can_translate?
translation = _do_translate(key, vars, behavior, behavior_size)
if block_given?
html = capture(&block)
end
if html
translation['html'] = html.gsub('%' + key + '%', translation['untranslated'])
end
if generate_control
@@lastTranslation = translation
@@allTranslations ||= Hash.new
@@allTranslations[key] = key
result = _translate_me(translation)
end
result ||= translation['html'] || translation['untranslated']
if queued_keys
return _ queued_keys, behavior, behavior_size, vars: vars, html: result, blockData: blockData
end
return result
end
def _translate_me(translation)
@@translationsOnThisPage = true
datakeys = ''
translation['vars'].each { |key, value| datakeys += ' data-var-' + key.to_s + '="' + value.to_s.gsub('"', '&quot;') + '"' }
('<span class="translate-me ' + (translation['is_translated'] ? '' : 'un') + 'translated lang-' + (translation['lang']) + ' key--' + translation['key'].gsub('.', '--') + '" data-translate-key="' + translation['key'] + '" data-translate-untranslated="' + translation['untranslated'].gsub('"', '&quot;') + (translation['translated'] ? '" data-translate-translated="' + translation['translated'] : '') + '" data-vars="' + (translation['vars'].length ? translation['vars'].to_json.gsub('"', '&quot;') : '') + '" title="' + ('translate.alt_click') + '">' + (translation['html'] || translation['untranslated']) + '</span>').to_s.html_safe
end
def _do_translate(key, vars, behavior, behavior_size)
translation = {'key' => key, 'lang' => '0', 'vars' => vars}
v = vars.dup
begin
v[:raise] = true
translation['untranslated'] = I18n.translate!(key, v)
translation['lang'] = I18n.locale.to_s
translation['is_translated'] = true
hash = Hash.new
translations = Translation.where(["locale = ? AND key LIKE ?", I18n.locale, key + '%']).take(6).each { |o| hash[o.key] = o.value }
translation['translated'] = hash.to_json.gsub('"', '&quot;')
rescue I18n::MissingTranslationData
begin
translation['untranslated'] = I18n.translate!(config.i18n.default_locale, key, vars)
translation['lang'] = config.i18n.default_locale.to_s
rescue
puts _lorem_ipsum(behavior, behavior_size)
translation['untranslated'] = behavior ? _lorem_ipsum(behavior, behavior_size) || key.gsub(/^.*\.(.+)?$/, '\1') : key.gsub(/^.*\.(.+)?$/, '\1')
end
end
return translation
end
def _can_translate?()
false
end
def _!()
if @@keyQueue
return '%' + @@keyQueue.shift + '%'
end
end
def _?()
if @@keyQueue
return '%' + @@keyQueue[0] + '%'
end
end
def field(form, name, type = nil, param = nil, html: nil, help: false, attrs: [], classes: nil, label: nil, placeholder: nil)
if form.is_a?(Symbol) || form.is_a?(String)
param = type
type = name
name = form
form = nil
end
if attrs && !attrs.is_a?(Array)
attrs = [attrs]
end
attrs_used = 0
root = 'div'
lang_key = "form.#{name.to_s}"
if form
lang_key = form.object.class.name.underscore.pluralize + '.' + lang_key
elsif params[:controller]
lang_key = params[:controller] + '.' + lang_key
end
select_prompt = nil
show_label = true
label_after = true
if /select(_tag)?$/.match(type.to_s)
placeholder = nil
if !label
select_prompt = 'Select a ' + name.to_s
label_html = ''
show_label = false
end
label_after = false
if param && param.is_a?(Array)
param = options_for_select(param)
end
elsif type.to_s == 'image_field' || type.to_s == 'user_select_field' || type.to_s == 'organization_select_field'
placeholder = nil
label_html = ''
show_label = false
else
if /^password/.match(type.to_s)
placeholder = nil
elsif !placeholder
placeholder = 'Type in a ' + name.to_s
end
end
if show_label
label_html = eval("(" + (form ? 'form.label' : 'label_tag') + " name, '<span>#{label ? CGI.escapeHTML(label) : name}</span>'.html_safe)")
end
if label === false
label_html = ''
end
if /text_area(_tag)?$/.match(type.to_s)
root = nil
end
html_options = nil
if html
html_options = ''
html.each do |key, v|
html_options += ', ' + key.to_s + ": html[:" + key.to_s + "]"
end
end
if classes
if classes.is_a?(String)
classes = [classes]
end
else
classes = []
end
if type == :image_field
form_html = form.label name do
('<div>' + image_tag(param || 'http://placehold.it/300x300&text=Click%20to%20upload%20an%20Image') + (form.file_field name) + (form.hidden_field (name.to_s + '_cache')) + '</div><span><span>' + name.to_s + '</span></span>').html_safe
end
elsif type == :user_select_field
form_html = form.hidden_field(:id, { class: 'id' }).html_safe
form_html += form.check_box(:_destroy).html_safe
form_html += form.label(:_destroy, '×').html_safe
form_html += form.hidden_field(:user_id, { class: 'user-id'} ).html_safe
if param && param.id
form_html += image_tag(param.avatar.url :thumb).html_safe + ('<div class="username">' + param.username + '</div>').html_safe
if attrs && attrs.length > 0 && attrs[0].is_a?(UserOrganizationRelationship)
form_html += form.select(:relationship, options_for_select(UserOrganizationRelationship::AllRelationships, attrs[0].relationship), {}, {class: 'small'}).html_safe
attrs_used += 1
end
else
classes << 'new'
if attrs && attrs.length > 0 && attrs[0].is_a?(UserOrganizationRelationship)
form_html += ('<a href="#" class="select-user" data-url="' + url_for(attrs[0].organization) + '">' + image_tag('http://placehold.it/120x120&text=%252B').html_safe + '</a><div class="username"></div>').html_safe
form_html += form.select(:relationship, options_for_select(UserOrganizationRelationship::AllRelationships, UserOrganizationRelationship::DefaultRelationship), {}, {class: 'small'}).html_safe
attrs_used += 1
end
end
elsif type == :organization_select_field
form_html = form.hidden_field(:id, { class: 'id' }).html_safe
form_html += form.check_box(:_destroy).html_safe
form_html += form.label(:_destroy, '×').html_safe
form_html += form.hidden_field(:organization_id, { class: 'organzation-id'} ).html_safe
if param && param.id
form_html += image_tag(param.avatar.url :thumb).html_safe + ('<div class="organizationname">' + param.name + '</div>').html_safe
else
classes << 'new'
form_html += ('<a href="#" class="select-organization" data-url="' + url_for(param) + '">' + image_tag('http://placehold.it/120x120&text=%252B').html_safe + '</a><div class="organizationname"></div>').html_safe
end
else
ph = ''
if placeholder
if form
ph = ", :placeholder => '#{placeholder}'"
else
ph = ", nil, placeholder: '#{placeholder}'"
end
end
form_html = (form ? "form.#{type} :#{name}" : "#{type} :#{name}") + ph + (param ? ', param' : '')
attrs.each_index { |i| form_html += (i >= attrs_used ? ', attrs[' + i.to_s + ']' : '') }
if select_prompt
if form
form_html += ', {prompt: select_prompt}'
else
form_html += ', prompt: select_prompt'
end
end
form_html += (html_options || '')
puts "\n\t" + form_html + "\n"
form_html = eval(form_html)
if root
form_html = "<#{root}>" + form_html + "</#{root}>"
end
end
if help
form_html = ('<p>' + (_ (lang_key + '.help'), :w, 20) + '</p>').html_safe + form_html.html_safe
end
return ("<div class=\"field #{type.to_s.gsub('_', '-').gsub(/\-tag$/, '')} field-#{name.to_s.gsub('_', '-')}#{classes.length > 0 ? ' ' + classes.join(' ') : ''}\">" + (label_after ? '' : label_html) + form_html + (label_after ? label_html : '') + "</div>").html_safe
end
def actions(action)
('<div class="actions"><button name="' + action.to_s + '" type="submit">' + action.to_s + '</button></div>').html_safe
end
def sortable(objects, id = 'id', url: nil, &block)
result = '<ul class="sortable sortable-' + objects[0].class.name.underscore.gsub('_', '-') + (url ? ('" data-url="' + url) : '') + '" data-id="' + id + '">'
objects.each_index do |i|
@this = objects[i]
result += '<li class="sortable-item">'
result += hidden_field_tag (id + "[#{i}]"), objects[i][id]
result += hidden_field_tag ('position' + "[#{i}]"), i, :class => 'sortable-position'
if block_given?
result += capture(objects[i], &block)
end
result += '</li>'
end
result += '</div>'
result.html_safe
end
def tabs object, tabs
type = object.class.name.downcase
tab_list = ''
tabs.each do |tab|
link = nil
if self.respond_to?(type + '_' + tab.to_s + '_path')
link = self.send(type + '_' + tab.to_s + '_path', object)
elsif self.respond_to?(tab.to_s + '_' + type + '_path')
link = self.send(tab.to_s + '_' + type + '_path', object)
end
c = ['tab', 'tab-' + (link ? tab.to_s : 'show')]
if params[:action] == tab.to_s
c << 'current'
end
tab_list += link_to tab, link || object, :class => c
end
('<nav class="row centered">
<div class="tabs">' +
tab_list +
'</div>
</nav>').html_safe
end
def tabs!
object = nil
tabs = nil
case params[:controller]
when 'organizations'
object = @organization
tabs = OrganizationsHelper::TABS
when 'conferences'
object = @conference
tabs = ConferencesHelper::TABS
end
if object && tabs
return tabs object, tabs
end
end
def sub_tabs object, tabs
type = object.class.name.downcase
tab_list = ''
tabs.each do |tab|
link = nil
if self.respond_to?(type + '_' + tab.to_s + '_path')
link = self.send(type + '_' + tab.to_s + '_path', object)
elsif self.respond_to?(tab.to_s + '_' + type + '_path')
link = self.send(tab.to_s + '_' + type + '_path', object)
end
c = ['sub-tab', 'sub-tab-' + (link ? tab.to_s : 'show')]
if current_page?(link)
c << 'current'
end
tab_list += link_to tab, link || object, :class => c
end
('<nav class="sub-tabs">' + tab_list + '</nav>').html_safe
end
def sub_tabs!
object = nil
tabs = nil
case params[:controller]
when 'organizations'
object = @organization
tabs = OrganizationsHelper::SUB_TABS
when 'conferences'
object = @conference
tabs = ConferencesHelper::SUB_TABS
end
if object && tabs
return sub_tabs object, tabs
end
end
def p(object, attribute)
('<p>' + object.send(attribute.to_s).strip.gsub(/\s*\n+\s*/, '</p><p>') + '</p>').html_safe
end
def form_field(f)
id = 'field_' + f.id.to_s
html = p(f, 'title')#'<label for="' + id + '">' + f.title + '</label>'
options = JSON.parse(f.options)
if f.field_type == 'multiple'
if f.help
html += ('<div class="help">' + p(f, 'help') + '</div>').html_safe
end
opts = Hash.new
options['options'].split(/\s*\n\s*/).each do |value|
kv = value.split(/\s*\|\s*/, 2)
opts[kv[0]] = kv[1]
end
opts.each do |key, value|
#html += self.send(options['selection_type'] + '_tag', 'field-' + id)
html += field((id + '_' + key), options['selection_type'] + '_tag', label: value)
end
else
html += field(id.to_sym, options['input_type'] + '_tag', label: false, placeholder: f.help)
end
html.html_safe
end
def yield_or_default(section, default = '')
content_for?(section) ? content_for(section) : default
end
end end

2
app/helpers/conference_admins_helper.rb

@ -0,0 +1,2 @@
module ConferenceAdminsHelper
end

2
app/helpers/conference_host_organizations_helper.rb

@ -0,0 +1,2 @@
module ConferenceHostOrganizationsHelper
end

2
app/helpers/conference_registration_responses_helper.rb

@ -0,0 +1,2 @@
module ConferenceRegistrationResponsesHelper
end

2
app/helpers/conference_registrations_helper.rb

@ -0,0 +1,2 @@
module ConferenceRegistrationsHelper
end

2
app/helpers/conference_registraton_form_fields_helper.rb

@ -0,0 +1,2 @@
module ConferenceRegistratonFormFieldsHelper
end

2
app/helpers/conference_types_helper.rb

@ -0,0 +1,2 @@
module ConferenceTypesHelper
end

4
app/helpers/conferences_helper.rb

@ -0,0 +1,4 @@
module ConferencesHelper
TABS = [:show, :edit, :hosts, :workshops, :schedule, :registration]
SUB_TABS = [:registration, :registration_form, :registration_register, :registration_stats]
end

2
app/helpers/locations_helper.rb

@ -0,0 +1,2 @@
module LocationsHelper
end

2
app/helpers/organization_statuses_helper.rb

@ -0,0 +1,2 @@
module OrganizationStatusesHelper
end

3
app/helpers/organizations_helper.rb

@ -0,0 +1,3 @@
module OrganizationsHelper
TABS = [:show, :edit, :members, :identity, :settings]
end

3
app/helpers/pages_helper.rb

@ -0,0 +1,3 @@
module PagesHelper
end

2
app/helpers/registration_form_fields_helper.rb

@ -0,0 +1,2 @@
module RegistrationFormFieldsHelper
end

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save