Minor adjustments
This commit is contained in:
parent
14792c14f3
commit
62b0bea131
2
Gemfile
2
Gemfile
@ -19,7 +19,7 @@ gem 'oauth2', '~> 0.8.0'
|
|||||||
gem 'carrierwave'
|
gem 'carrierwave'
|
||||||
gem 'carrierwave-imageoptimizer'
|
gem 'carrierwave-imageoptimizer'
|
||||||
gem 'mini_magick'
|
gem 'mini_magick'
|
||||||
#gem 'carmen', :path => '../carmen/' if File.directory?('../carmen/') && RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwin/i
|
gem 'carmen', :path => '../carmen/' if File.directory?('../carmen/') && RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwin/i
|
||||||
gem 'carmen-rails'
|
gem 'carmen-rails'
|
||||||
gem 'nested_form'
|
gem 'nested_form'
|
||||||
gem 'acts_as_list'
|
gem 'acts_as_list'
|
||||||
|
10
Gemfile.lock
10
Gemfile.lock
@ -12,6 +12,11 @@ GIT
|
|||||||
i18n-active_record (0.0.2)
|
i18n-active_record (0.0.2)
|
||||||
i18n (>= 0.5.0)
|
i18n (>= 0.5.0)
|
||||||
|
|
||||||
|
PATH
|
||||||
|
remote: ../carmen/
|
||||||
|
specs:
|
||||||
|
carmen (1.0.1)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
remote: http://rubygems.org/
|
remote: http://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
@ -64,8 +69,6 @@ GEM
|
|||||||
rack (>= 1.0.0)
|
rack (>= 1.0.0)
|
||||||
rack-test (>= 0.5.4)
|
rack-test (>= 0.5.4)
|
||||||
xpath (~> 2.0)
|
xpath (~> 2.0)
|
||||||
carmen (1.0.1)
|
|
||||||
unicode_utils (~> 1.4.0)
|
|
||||||
carmen-rails (1.0.1)
|
carmen-rails (1.0.1)
|
||||||
carmen (~> 1.0.0)
|
carmen (~> 1.0.0)
|
||||||
rails
|
rails
|
||||||
@ -310,13 +313,11 @@ GEM
|
|||||||
uglifier (2.5.1)
|
uglifier (2.5.1)
|
||||||
execjs (>= 0.3.0)
|
execjs (>= 0.3.0)
|
||||||
json (>= 1.8.0)
|
json (>= 1.8.0)
|
||||||
unicode_utils (1.4.0)
|
|
||||||
wdm (0.1.0)
|
wdm (0.1.0)
|
||||||
webmock (1.18.0)
|
webmock (1.18.0)
|
||||||
addressable (>= 2.3.6)
|
addressable (>= 2.3.6)
|
||||||
crack (>= 0.3.2)
|
crack (>= 0.3.2)
|
||||||
websocket (1.0.7)
|
websocket (1.0.7)
|
||||||
win32console (1.3.2)
|
|
||||||
win32console (1.3.2-x86-mingw32)
|
win32console (1.3.2-x86-mingw32)
|
||||||
wysiwyg-rails (1.1.5)
|
wysiwyg-rails (1.1.5)
|
||||||
font-awesome-rails (= 4.1.0.0)
|
font-awesome-rails (= 4.1.0.0)
|
||||||
@ -334,6 +335,7 @@ DEPENDENCIES
|
|||||||
binding_of_caller
|
binding_of_caller
|
||||||
capistrano
|
capistrano
|
||||||
capybara
|
capybara
|
||||||
|
carmen!
|
||||||
carmen-rails
|
carmen-rails
|
||||||
carrierwave
|
carrierwave
|
||||||
carrierwave-imageoptimizer
|
carrierwave-imageoptimizer
|
||||||
|
Binary file not shown.
@ -255,6 +255,11 @@ body {
|
|||||||
+ #content {
|
+ #content {
|
||||||
padding-top: 4em;
|
padding-top: 4em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.conferences.page-style-article & {
|
||||||
|
min-height: 40em;
|
||||||
|
min-height: 50vh;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -293,7 +298,7 @@ main {
|
|||||||
padding: 4em;
|
padding: 4em;
|
||||||
clear: right;
|
clear: right;
|
||||||
|
|
||||||
.organizations-show & {
|
.organizations.page-style-article & {
|
||||||
min-height: 25em;
|
min-height: 25em;
|
||||||
min-height: 50vh;
|
min-height: 50vh;
|
||||||
}
|
}
|
||||||
@ -311,6 +316,10 @@ main {
|
|||||||
|
|
||||||
h1, h2 {
|
h1, h2 {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.row {
|
.row {
|
||||||
@ -400,7 +409,7 @@ main {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.organizations-show & {
|
.organizations.page-style-article & {
|
||||||
h1 {
|
h1 {
|
||||||
line-height: 0.9em;
|
line-height: 0.9em;
|
||||||
margin-bottom: 0.5em;
|
margin-bottom: 0.5em;
|
||||||
@ -411,13 +420,17 @@ main {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.conferences-show & {
|
.conferences.page-style-article & {
|
||||||
.columns.banner {
|
.columns.banner {
|
||||||
//height: 75%;
|
//height: 75%;
|
||||||
padding-bottom: 1em;
|
padding-bottom: 1em;
|
||||||
|
|
||||||
figure {
|
figure {
|
||||||
margin-left: 0;
|
margin: 2em 0 0;
|
||||||
|
|
||||||
|
img {
|
||||||
|
box-shadow: 0 0 2em $black;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -440,7 +453,7 @@ main {
|
|||||||
.has-banner-image & {
|
.has-banner-image & {
|
||||||
min-height: 40em;
|
min-height: 40em;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-style-article & {
|
.page-style-article & {
|
||||||
@ -524,15 +537,27 @@ main {
|
|||||||
height: 50vh;
|
height: 50vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.conferences-show & {
|
|
||||||
.columns.banner {
|
|
||||||
height: 75%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.row .align-bottom {
|
.row .align-bottom {
|
||||||
height: 50%;
|
height: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.conferences.page-style-article & {
|
||||||
|
height: auto;
|
||||||
|
padding-bottom: 2em;
|
||||||
|
|
||||||
|
.align-bottom > div {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.columns.banner {
|
||||||
|
//height: 75%;
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row .align-bottom {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,11 +19,19 @@ class ApplicationController < ActionController::Base
|
|||||||
$page_info = {:path => request.env['PATH_INFO'], :controller => params['controller'], :action => params['action']}
|
$page_info = {:path => request.env['PATH_INFO'], :controller => params['controller'], :action => params['action']}
|
||||||
end
|
end
|
||||||
|
|
||||||
rescue_from ActiveRecord::RecordNotFound do |exception|
|
def do_404
|
||||||
render 'pages/404', status: 404
|
render 'pages/404', status: 404
|
||||||
end
|
end
|
||||||
|
|
||||||
rescue_from ActiveRecord::PremissionDenied do |exception|
|
def do_403
|
||||||
render 'permission_denied', status: 403
|
render 'permission_denied', status: 403
|
||||||
end
|
end
|
||||||
|
|
||||||
|
rescue_from ActiveRecord::RecordNotFound do |exception|
|
||||||
|
do_404
|
||||||
|
end
|
||||||
|
|
||||||
|
rescue_from ActiveRecord::PremissionDenied do |exception|
|
||||||
|
do_403
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -112,9 +112,28 @@ class ConferencesController < ApplicationController
|
|||||||
|
|
||||||
def register
|
def register
|
||||||
set_conference
|
set_conference
|
||||||
@user = User.new
|
#@user = User.new
|
||||||
@sub_action = 'registration_register'
|
#@sub_action = 'registration_register'
|
||||||
render :registration
|
#render :registration
|
||||||
|
if params['step']
|
||||||
|
begin
|
||||||
|
template = "register_#{params['step']}"
|
||||||
|
if request.xhr?
|
||||||
|
render :partial => template
|
||||||
|
else
|
||||||
|
render template
|
||||||
|
end
|
||||||
|
rescue
|
||||||
|
do_404
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if request.xhr?
|
||||||
|
render :partial => 'register'
|
||||||
|
else
|
||||||
|
@register_step = true
|
||||||
|
render 'show'
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def register_step
|
def register_step
|
||||||
|
@ -39,22 +39,22 @@ class PosterUploader < CarrierWave::Uploader::Base
|
|||||||
image['width'] > image['height']
|
image['width'] > image['height']
|
||||||
end
|
end
|
||||||
|
|
||||||
# def manipulate!
|
def manipulate!
|
||||||
# cache_stored_file! if !cached?
|
cache_stored_file! if !cached?
|
||||||
# image = ::MiniMagick::Image.open(current_path)
|
image = ::MiniMagick::Image.open(current_path)
|
||||||
#
|
|
||||||
# begin
|
begin
|
||||||
# image.format(@format.to_s.downcase) if @format
|
image.format(@format.to_s.downcase) if @format
|
||||||
# image = yield(image)
|
image = yield(image)
|
||||||
# image.write(current_path)
|
image.write(current_path)
|
||||||
# image.run_command("identify", '"' + current_path + '"')
|
image.run_command("identify", Gem.win_platform? ? '"' + current_path + '"' : current_path)
|
||||||
# ensure
|
ensure
|
||||||
# image.destroy!
|
image.destroy!
|
||||||
# end
|
end
|
||||||
# rescue ::MiniMagick::Error, ::MiniMagick::Invalid => e
|
rescue ::MiniMagick::Error, ::MiniMagick::Invalid => e
|
||||||
# default = I18n.translate(:"errors.messages.mini_magick_processing_error", :e => e, :locale => :en)
|
default = I18n.translate(:"errors.messages.mini_magick_processing_error", :e => e, :locale => :en)
|
||||||
# message = I18n.translate(:"errors.messages.mini_magick_processing_error", :e => e, :default => default)
|
message = I18n.translate(:"errors.messages.mini_magick_processing_error", :e => e, :default => default)
|
||||||
# raise CarrierWave::ProcessingError, message
|
raise CarrierWave::ProcessingError, message
|
||||||
# end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -5,10 +5,16 @@
|
|||||||
.row
|
.row
|
||||||
.columns.small-12.banner
|
.columns.small-12.banner
|
||||||
%figure
|
%figure
|
||||||
%img{src: @conference.poster_url}
|
%img{src: @conference.poster.full.url}
|
||||||
.columns.medium-8.align-bottom
|
.columns.medium-8.align-bottom
|
||||||
|
- title = @conference.conference_type.slug == 'bikebike' ? 'Bike!Bike! '+@conference.start_date.year.to_s : @conference.title
|
||||||
%div
|
%div
|
||||||
%h1='Bike!Bike! '+@conference.start_date.year.to_s
|
%h1
|
||||||
|
- if params['controller'] == 'conferences' && params['action'] == 'show'
|
||||||
|
= title
|
||||||
|
- else
|
||||||
|
%a{href: @conference.url}
|
||||||
|
= title
|
||||||
%h2
|
%h2
|
||||||
- location = @conference.organizations.first.locations.first
|
- location = @conference.organizations.first.locations.first
|
||||||
= location.city + ', ' + (location.territory ? Carmen::Country.coded(location.country).subregions.coded(location.territory).name : location.country)
|
= location.city + ', ' + (location.territory ? Carmen::Country.coded(location.country).subregions.coded(location.territory).name : location.country)
|
||||||
|
@ -9,8 +9,11 @@
|
|||||||
|
|
||||||
%article.row
|
%article.row
|
||||||
.columns.large-10
|
.columns.large-10
|
||||||
%h2=('About '+@conference.title)
|
- if @register_step
|
||||||
%p=@conference.info.html_safe
|
%h2='Register!'
|
||||||
|
- else
|
||||||
|
%h2=('About '+@conference.title)
|
||||||
|
=p @conference, :info
|
||||||
|
|
||||||
- content_for :side_bar do
|
- content_for :side_bar do
|
||||||
%h5= @conference.title+' is hosted by:'
|
%h5= @conference.title+' is hosted by:'
|
||||||
|
@ -8,22 +8,25 @@ BikeBike::Application.routes.draw do
|
|||||||
|
|
||||||
resources :conference_types, :param => :type, :path => '/conferences', :as => :conference, :except => :index do
|
resources :conference_types, :param => :type, :path => '/conferences', :as => :conference, :except => :index do
|
||||||
resources :conferences, :param => :slug, :path => '/' do
|
resources :conferences, :param => :slug, :path => '/' do
|
||||||
get :hosts
|
#get :hosts
|
||||||
get :registration
|
#get :registration
|
||||||
resources :workshops, :param => 'slug'
|
#get :registration
|
||||||
get :registration
|
#resources :workshops, :param => 'slug'
|
||||||
get :register
|
#get :register, :param => 'step'
|
||||||
patch 'register/step/:step' => 'conferences#register_step'
|
##get 'register(/:step)' => 'conferences#register'
|
||||||
|
#patch 'register/step/:step' => 'conferences#register_step'
|
||||||
#resources :registrations, :path => 'registration' do
|
#resources :registrations, :path => 'registration' do
|
||||||
# get :form, on: :collection
|
# get :form, on: :collection
|
||||||
#end
|
#end
|
||||||
get 'registration/form' => 'conferences#registration', :sub_action => "form", as: 'registration_form'
|
#get 'registration/form' => 'conferences#registration', :sub_action => "form", as: 'registration_form'
|
||||||
get 'registration/form/register' => 'conferences#registration', :sub_action => "register", as: 'registration_register'
|
#get 'registration/form/register' => 'conferences#registration', :sub_action => "register", as: 'registration_register'
|
||||||
get 'registration/form/stats' => 'conferences#registration', :sub_action => "stats", as: 'registration_stats'
|
#get 'registration/form/stats' => 'conferences#registration', :sub_action => "stats", as: 'registration_stats'
|
||||||
post :nonhosts
|
#post :nonhosts
|
||||||
post 'registration/form/add-field' => 'conferences#add_field', as: 'registration_add_field'
|
#post 'registration/form/add-field' => 'conferences#add_field', as: 'registration_add_field'
|
||||||
post 'registration/form/remove-field' => 'conferences#remove_field', as: 'registration_remove_field'
|
#post 'registration/form/remove-field' => 'conferences#remove_field', as: 'registration_remove_field'
|
||||||
post 'registration/form/reorder' => 'conferences#reorder', as: 'registration_reorder'
|
#post 'registration/form/reorder' => 'conferences#reorder', as: 'registration_reorder'
|
||||||
|
|
||||||
|
#post 'registration/form/reorder' => 'conferences#reorder', as: 'registration_reorder'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
class AddIsConfirmedToConferenceRegistraions < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :conference_registrations, :is_confirmed, :boolean
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,5 @@
|
|||||||
|
class AddIsParticipantToConferenceRegistraions < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :conference_registrations, :is_participant, :boolean
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,5 @@
|
|||||||
|
class AddIsVolunteerToConferenceRegistraions < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :conference_registrations, :is_volunteer, :boolean
|
||||||
|
end
|
||||||
|
end
|
@ -11,7 +11,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20140712190815) do
|
ActiveRecord::Schema.define(version: 20140713213534) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
@ -61,6 +61,9 @@ ActiveRecord::Schema.define(version: 20140712190815) do
|
|||||||
t.string "is_attending"
|
t.string "is_attending"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
|
t.boolean "is_confirmed"
|
||||||
|
t.boolean "is_participant"
|
||||||
|
t.boolean "is_volunteer"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "conference_types", force: true do |t|
|
create_table "conference_types", force: true do |t|
|
||||||
|
@ -2,7 +2,11 @@ namespace :regenerate do
|
|||||||
desc "Regenerates images"
|
desc "Regenerates images"
|
||||||
|
|
||||||
task conference_posters: :environment do
|
task conference_posters: :environment do
|
||||||
Conference.all.each {|m| m.poster.recreate_versions!}
|
Conference.all.each { |m|
|
||||||
|
#puts m.title
|
||||||
|
#puts m.poster
|
||||||
|
m.poster.recreate_versions!
|
||||||
|
}
|
||||||
#puts Conference.all.to_json.to_s
|
#puts Conference.all.to_json.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user