Minor adjustments

This commit is contained in:
Godwin
2014-07-13 17:23:28 -06:00
parent 14792c14f3
commit 62b0bea131
15 changed files with 145 additions and 57 deletions
Binary file not shown.
+36 -11
View File
@@ -255,6 +255,11 @@ body {
+ #content {
padding-top: 4em;
}
.conferences.page-style-article & {
min-height: 40em;
min-height: 50vh;
}
}
}
@@ -293,7 +298,7 @@ main {
padding: 4em;
clear: right;
.organizations-show & {
.organizations.page-style-article & {
min-height: 25em;
min-height: 50vh;
}
@@ -311,6 +316,10 @@ main {
h1, h2 {
color: inherit;
a {
color: inherit;
}
}
.row {
@@ -400,7 +409,7 @@ main {
}
}
.organizations-show & {
.organizations.page-style-article & {
h1 {
line-height: 0.9em;
margin-bottom: 0.5em;
@@ -411,13 +420,17 @@ main {
}
}
.conferences-show & {
.conferences.page-style-article & {
.columns.banner {
//height: 75%;
padding-bottom: 1em;
figure {
margin-left: 0;
margin: 2em 0 0;
img {
box-shadow: 0 0 2em $black;
}
}
}
}
@@ -440,7 +453,7 @@ main {
.has-banner-image & {
min-height: 40em;
height: 100%;
height: 100vh;
min-height: 100vh;
}
.page-style-article & {
@@ -524,15 +537,27 @@ main {
height: 50vh;
}
.conferences-show & {
.columns.banner {
height: 75%;
}
}
.row .align-bottom {
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;
}
}
}
}
+10 -2
View File
@@ -19,11 +19,19 @@ class ApplicationController < ActionController::Base
$page_info = {:path => request.env['PATH_INFO'], :controller => params['controller'], :action => params['action']}
end
rescue_from ActiveRecord::RecordNotFound do |exception|
def do_404
render 'pages/404', status: 404
end
rescue_from ActiveRecord::PremissionDenied do |exception|
def do_403
render 'permission_denied', status: 403
end
rescue_from ActiveRecord::RecordNotFound do |exception|
do_404
end
rescue_from ActiveRecord::PremissionDenied do |exception|
do_403
end
end
+22 -3
View File
@@ -112,9 +112,28 @@ class ConferencesController < ApplicationController
def register
set_conference
@user = User.new
@sub_action = 'registration_register'
render :registration
#@user = User.new
#@sub_action = 'registration_register'
#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
def register_step
+17 -17
View File
@@ -39,22 +39,22 @@ class PosterUploader < CarrierWave::Uploader::Base
image['width'] > image['height']
end
# def manipulate!
# cache_stored_file! if !cached?
# image = ::MiniMagick::Image.open(current_path)
#
# begin
# image.format(@format.to_s.downcase) if @format
# image = yield(image)
# image.write(current_path)
# image.run_command("identify", '"' + current_path + '"')
# ensure
# image.destroy!
# end
# rescue ::MiniMagick::Error, ::MiniMagick::Invalid => e
# 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)
# raise CarrierWave::ProcessingError, message
# end
def manipulate!
cache_stored_file! if !cached?
image = ::MiniMagick::Image.open(current_path)
begin
image.format(@format.to_s.downcase) if @format
image = yield(image)
image.write(current_path)
image.run_command("identify", Gem.win_platform? ? '"' + current_path + '"' : current_path)
ensure
image.destroy!
end
rescue ::MiniMagick::Error, ::MiniMagick::Invalid => e
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)
raise CarrierWave::ProcessingError, message
end
end
+8 -2
View File
@@ -5,10 +5,16 @@
.row
.columns.small-12.banner
%figure
%img{src: @conference.poster_url}
%img{src: @conference.poster.full.url}
.columns.medium-8.align-bottom
- title = @conference.conference_type.slug == 'bikebike' ? 'Bike!Bike! '+@conference.start_date.year.to_s : @conference.title
%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
- location = @conference.organizations.first.locations.first
= location.city + ', ' + (location.territory ? Carmen::Country.coded(location.country).subregions.coded(location.territory).name : location.country)
+5 -2
View File
@@ -9,8 +9,11 @@
%article.row
.columns.large-10
%h2=('About '+@conference.title)
%p=@conference.info.html_safe
- if @register_step
%h2='Register!'
- else
%h2=('About '+@conference.title)
=p @conference, :info
- content_for :side_bar do
%h5= @conference.title+' is hosted by:'