A lot of updates so far today...

This commit is contained in:
Godwin 2014-07-06 19:02:23 -06:00
parent 546f1d4cbd
commit 1907122880
36 changed files with 4157 additions and 236 deletions

View File

@ -1,3 +1,10 @@
GIT
remote: git://github.com/josevalim/rails-footnotes.git
revision: 087914beabb56c2e9979f63eeb0183591065dde3
specs:
rails-footnotes (4.0.2)
rails (>= 3.2)
GIT GIT
remote: git://github.com/svenfuchs/i18n-active_record.git remote: git://github.com/svenfuchs/i18n-active_record.git
revision: 2d9a22b6a4e5d809782cdbfa65b14d9e47aa27fc revision: 2d9a22b6a4e5d809782cdbfa65b14d9e47aa27fc
@ -193,6 +200,10 @@ GEM
activesupport (>= 3.0, < 5.0) activesupport (>= 3.0, < 5.0)
pg (0.17.1-x86-mingw32) pg (0.17.1-x86-mingw32)
polyglot (0.3.4) polyglot (0.3.4)
pry (0.9.12.6)
coderay (~> 1.0)
method_source (~> 0.8)
slop (~> 3.4)
pry (0.9.12.6-x86-mingw32) pry (0.9.12.6-x86-mingw32)
coderay (~> 1.0) coderay (~> 1.0)
method_source (~> 0.8) method_source (~> 0.8)
@ -293,6 +304,7 @@ GEM
execjs (>= 0.3.0) execjs (>= 0.3.0)
json (>= 1.8.0) json (>= 1.8.0)
unicode_utils (1.4.0) unicode_utils (1.4.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)
@ -335,6 +347,7 @@ DEPENDENCIES
paper_trail paper_trail
pg pg
rails (= 4.0.0) rails (= 4.0.0)
rails-footnotes!
rails_12factor rails_12factor
rspec rspec
rspec-rails rspec-rails
@ -344,4 +357,5 @@ DEPENDENCIES
simplecov simplecov
sorcery (>= 0.8.1) sorcery (>= 0.8.1)
uglifier (>= 1.3.0) uglifier (>= 1.3.0)
wdm (>= 0.1.0)
webmock webmock

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 726 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

BIN
app/assets/images/orgs.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 769 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 759 KiB

View File

@ -11,14 +11,14 @@
*/ */
@font-face { @font-face {
font-family: 'alte_haas_groteskbold'; font-family: 'AlteHaasGroteskBold';
src: url('/assets/ahg.eot'); src: url('/assets/AlteHaasGroteskBold.eot');
src: url('/assets/ahg.eot?#iefix') format('embedded-opentype'), src: url('/assets/AlteHaasGroteskBold.eot?#iefix') format('embedded-opentype'),
url('/assets/ahg.woff') format('woff'), url('/assets/AlteHaasGroteskBold.woff') format('woff'),
url('/assets/ahg.ttf') format('truetype'), url('/assets/AlteHaasGroteskBold.ttf') format('truetype'),
url('/assets/ahg.svg#alte_haas_groteskbold') format('svg'); url('/assets/AlteHaasGroteskBold.svg#alte_haas_groteskbold') format('svg');
font-weight: normal; font-weight: bold;
font-style: normal; font-style: bold;
} }
// Libraries // Libraries

View File

@ -37,7 +37,8 @@
// We use these to control header font styles // We use these to control header font styles
//$header-font-family: 'ff-ernestine-web-pro', sans-serif;//join("Open Sans", $body-font-family); //$header-font-family: 'ff-ernestine-web-pro', sans-serif;//join("Open Sans", $body-font-family);
$header-font-family: 'Alte Haas Grotesk', sans-serif;//join("Open Sans", $body-font-family); //$header-font-family: 'alte_haas_groteskbold', 'Alte Haas Grotesk', sans-serif;//join("Open Sans", $body-font-family);
$header-font-family: 'AlteHaasGroteskBold', sans-serif;//join("Open Sans", $body-font-family);
$header-font-weight: bold; $header-font-weight: bold;
// $header-font-style: normal; // $header-font-style: normal;
// $header-font-color: #222; // $header-font-color: #222;

View File

@ -99,3 +99,190 @@ ul.tags,
color: lighten($body-font-color, 10); color: lighten($body-font-color, 10);
} }
} }
.org-preview {
/*display: block;
position: relative;
margin: 3em 0 0;
background-color: $organization-color;
background-size: cover;
background-position: center;
/*&:before {
content: '';
display: block;
padding-top: 50%;
}*/
/*figcaption {
display: block;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
a {
display: block;
height: 100%;
}
h3 {
position: absolute;
bottom: 100%;
height: 2em;
width: 100%;
background-color: $organization-color;
margin: 0;
font-size: 1em;
padding: 0.25em 0.5em;
}
img {
background-color: $white;
margin: auto;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}*/
}
.preview-list {
li {
position: relative;
margin-bottom: 1em;
&:before {
content: '';
display: block;
padding-top: 50%;
}
h4, h5 {
position: absolute;
top: 0;
min-height: 2em;
margin: 0;
font-size: 1em;
padding: 0.25em 0.5em;
color: $white;
width: 100%;
z-index: 1;
}
figure {
position: absolute;
width: 100%;
height: 100%;
margin: 0;
bottom: 0;
text-align: center;
background-size: cover;
background-position: center;
background-blend-mode: luminosity;
@include single-transition(all, 100ms, ease-in);
&:after {
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: $white;
opacity: 0.5;
@include single-transition(all, 100ms, ease-in);
}
img {
margin: auto;
position: absolute;
left: 0;
right: 0;
top: 2em;
bottom: 0;
max-width: 90%;
max-height: 66.667%;
z-index: 1;
}
}
a {
&:hover {
figure {
background-color: transparent;
&:after {
opacity: 0.25;
}
}
}
}
&.city figure {
background-color: rgba($primary-color, 0.75);
&:after {
display: none;
}
}
}
&.org-list li {
h4 {
background-color: $primary-color;
}
h5 {
background-color: $organization-color;
}
figure {
background-color: $organization-color;
}
}
&.conference-list li {
h4 {
background-color: $secondary-color;
}
h5 {
background-color: $conference-color;
}
figure {
background-color: $conference-color;
}
}
li.city figure {
background-color: rgba($primary-color, 0.75);
&:after {
display: none;
}
}
@include breakpoint(medium) {
margin-left: 3em;
}
}
@include breakpoint(medium) {
.organizations-index,
.conferences-index {
#content {
h2 {
margin-top: 1em;
}
h3 {
margin-left: 1em;
}
}
}
}

View File

@ -57,6 +57,7 @@ body {
width: 25%; width: 25%;
padding: 2.5%; padding: 2.5%;
font-size: 1em; font-size: 1em;
min-height: 100vh;
.button, p { .button, p {
display: block; display: block;
@ -93,7 +94,32 @@ body {
main { main {
min-height: 100%; min-height: 100%;
//overflow: auto; //overflow: auto;
background-color: $primary-color; background-color: $white;
}
#content {
padding: 1em;
overflow: auto;
background-color: lighten($color-5, 20);
.organizations & {
background-color: lighten(desaturate($organization-color, 25), 50);
min-height: 100vh;
}
.conferences & {
background-color: lighten(desaturate($conference-color, 25), 50);
min-height: 100vh;
}
@include breakpoint(medium) {
padding: 4em;
.organizations-show & {
min-height: 25em;
min-height: 50vh;
}
}
} }
#banner { #banner {
@ -135,14 +161,22 @@ main {
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 1; z-index: 1;
@include background-image(linear-gradient(top, rgba(0,0,0,0) 50%, darken($primary-color, 25) 100%)); @include background-image(linear-gradient(top, rgba(0,0,0,0) 50%, darken($conference-color, 25) 100%));
mix-blend-mode: multiply; mix-blend-mode: multiply;
} }
.row { .row {
height: 50%; height: 100%;
z-index: 2; z-index: 2;
position: relative; position: relative;
.align-bottom {
height: 50%;
}
}
.align-bottom > div {
margin-bottom: 3em;
} }
.button { .button {
@ -159,11 +193,110 @@ main {
border-color: transparent; border-color: transparent;
} }
} }
.organizations & {
background-color: rgba($organization-color, 0.33);
&:after {
@include background-image(linear-gradient(top, rgba(0,0,0,0) 50%, darken($organization-color, 25) 100%));
}
}
h2 {
color: $color-4;
margin-bottom: 0.25em;
+ em {
display: block;
color: $color-5;
margin-bottom: 1em;
}
}
.organizations-show & {
h1 {
line-height: 0.9em;
margin-bottom: 0.5em;
}
figure {
text-align: center;
}
}
.conferences-show & {
.columns.banner {
height: 75%;
padding-bottom: 1em;
figure {
margin-left: 0;
}
}
}
.organizations-index &,
.conferences-index & {
height: 13vw;
min-height: 0;
background-position: center 25%;
h1 {
font-size: 8vw;
margin-top: 1vw;
}
}
@include breakpoint(medium) { @include breakpoint(medium) {
min-height: 40em; min-height: 40em;
height: 100%; height: 100%;
height: 100vh; height: 100vh;
.organizations-show &,
.conferences-show & {
min-height: 30em;
height: 50%;
height: 50vh;
.row {
height: 100%;
}
h1 {
font-size: 3.5em;
margin-top: 0.5em;
}
figure {
img {
max-height: 100%;
}
}
.portrait {
h1 {
margin-top: 20%;
}
figure img {
width: 100%;
}
}
.landscape {
.columns {
max-height: 70%;
}
}
}
.organizations-index &,
.conferences-index & {
h1 {
font-size: 3.75vw;
margin-top: 6vw;
}
}
} }
} }
@ -176,6 +309,10 @@ main {
-ms-flex-align: flex-end; -ms-flex-align: flex-end;
-webkit-align-items: flex-end; -webkit-align-items: flex-end;
align-items: flex-end; align-items: flex-end;
> div {
width: 100%;
}
} }
.centered { .centered {

View File

@ -11,6 +11,7 @@ class ApplicationController < ActionController::Base
before_filter :capture_page_info before_filter :capture_page_info
def capture_page_info def capture_page_info
init_vars
$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
@ -19,6 +20,6 @@ class ApplicationController < ActionController::Base
end end
rescue_from ActiveRecord::PremissionDenied do |exception| rescue_from ActiveRecord::PremissionDenied do |exception|
render 'permission_denied', status: 404 render 'permission_denied', status: 403
end end
end end

View File

@ -6,12 +6,16 @@ class ConferencesController < ApplicationController
# GET /conferences # GET /conferences
def index def index
#Conference.all.each {|m| m.poster.recreate_versions!}
puts " ------------- CONFERENCE INDEX -------------- "
puts params
@conferences = Conference.all @conferences = Conference.all
end end
# GET /conferences/1 # GET /conferences/1
def show def show
#puts params[:slug] puts " --------------------------- "
puts params[:slug]
end end
# GET /conferences/new # GET /conferences/new

View File

@ -8,7 +8,30 @@ class OrganizationsController < ApplicationController
# GET /organizations # GET /organizations
def index def index
@organizations = Organization.all #Organization.all.each {|m| m.avatar.recreate_versions!}
#Conferences.all.each {|m| m.poster.recreate_versions!}
organizations = Organization.all
@organizations = Hash.new
countries = Hash.new
organizations.each { |organization|
location = organization.locations.first
if !countries.has_key?(location.country)
countries[location.country] = Carmen::Country.coded(location.country)
end
country = countries[location.country]
if !@organizations.has_key?(country.name)
@organizations[country.name] = Hash.new
end
territory = country.subregions.coded(location.territory)
territory_name = territory ? territory.name : 0
if !@organizations[country.name].has_key?(territory_name)
@organizations[country.name][territory_name] = Hash.new
end
if !@organizations[country.name][territory_name].has_key?(location.city)
@organizations[country.name][territory_name][location.city] = Array.new
end
@organizations[country.name][territory_name][location.city] << organization
}
end end
# GET /organizations/1 # GET /organizations/1
@ -101,7 +124,7 @@ class OrganizationsController < ApplicationController
countries[location.country.downcase][:territories][location.territory.downcase] = country.subregions.coded(location.territory) countries[location.country.downcase][:territories][location.territory.downcase] = country.subregions.coded(location.territory)
end end
territory = countries[location.country.downcase][:territories][location.territory.downcase] territory = countries[location.country.downcase][:territories][location.territory.downcase]
city = URI.encode(location.city.downcase.gsub(/\s/, '-')) city = URI.encode(location.city.downcase.gsub(/\s/, '-'))
if !orgs[location.country.downcase][location.territory.downcase].has_key?(city) if !orgs[location.country.downcase][location.territory.downcase].has_key?(city)
orgs[location.country.downcase][location.territory.downcase][city] = Hash.new orgs[location.country.downcase][location.territory.downcase][city] = Hash.new
orgs[location.country.downcase][location.territory.downcase][city][:latitude] = location.latitude orgs[location.country.downcase][location.territory.downcase][city][:latitude] = location.latitude
@ -137,9 +160,9 @@ class OrganizationsController < ApplicationController
private private
# Use callbacks to share common setup or constraints between actions. # Use callbacks to share common setup or constraints between actions.
def set_organization def set_organization
if params[:slug] != 'json' if params[:slug] != 'json'
@organization = Organization.find_by!(slug: params[:slug] || params[:organization_slug]) @organization = Organization.find_by!(slug: params[:slug] || params[:organization_slug])
end end
end end
# Only allow a trusted parameter "white list" through. # Only allow a trusted parameter "white list" through.

View File

@ -5,7 +5,29 @@ module ApplicationHelper
@@allTranslations = nil @@allTranslations = nil
@@no_banner = true @@no_banner = true
@@banner_attribution_details = nil @@banner_attribution_details = nil
@@banner_image = nil @@banner_image = nil
@@has_content = true
@@front_page = false
def init_vars
@@keyQueue = nil
@@translationsOnThisPage = nil
@@lastTranslation = nil
@@allTranslations = nil
@@no_banner = true
@@banner_attribution_details = nil
@@banner_image = nil
@@has_content = true
@@front_page = false
end
def this_is_the_front_page
@@front_page = true
end
def is_this_the_front_page?
return @@front_page
end
def ThereAreTranslationsOnThisPage? def ThereAreTranslationsOnThisPage?
@@translationsOnThisPage @@translationsOnThisPage
@ -29,7 +51,7 @@ module ApplicationHelper
def banner_attrs(banner_image) def banner_attrs(banner_image)
if banner_image.length > 0 if banner_image.length > 0
@@banner_image = banner_image @@banner_image = banner_image
return {style: 'background-image: url(' + banner_image + ');', class: 'has-image' } return {style: 'background-image: url(' + banner_image + ');', class: 'has-image' }
end end
{class: 'no-image'} {class: 'no-image'}
@ -38,7 +60,15 @@ module ApplicationHelper
def has_banner? def has_banner?
!@@no_banner !@@no_banner
end end
def has_content?
@@has_content
end
def has_no_content
@@has_content = false
end
def banner_title(banner_title) def banner_title(banner_title)
@@no_banner = false @@no_banner = false
content_for(:banner) { ('<div class="row"><h1>' + banner_title.to_s + '</h1></div>').html_safe } content_for(:banner) { ('<div class="row"><h1>' + banner_title.to_s + '</h1></div>').html_safe }
@ -59,9 +89,9 @@ module ApplicationHelper
end end
end end
def dom_ready(&block) def dom_ready(&block)
content_for(:dom_ready, &block) content_for(:dom_ready, &block)
end end
def page_style(style) def page_style(style)
classes = ['page-style-' + style.to_s] classes = ['page-style-' + style.to_s]

View File

@ -15,7 +15,7 @@ class AvatarUploader < CarrierWave::Uploader::Base
storage :file storage :file
process :optimize process :optimize
@@sizes = {:thumb => [120, 120], :icon => [48, 48]} @@sizes = {:thumb => [120, 120], :icon => [48, 48], :preview => [360, 120]}
# storage :fog # storage :fog
# Override the directory where uploaded files will be stored. # Override the directory where uploaded files will be stored.
@ -48,6 +48,10 @@ class AvatarUploader < CarrierWave::Uploader::Base
process :resize_to_fill => @@sizes[:icon] process :resize_to_fill => @@sizes[:icon]
end end
version :preview do
process :resize_to_fit => @@sizes[:preview]
end
# Add a white list of extensions which are allowed to be uploaded. # Add a white list of extensions which are allowed to be uploaded.
# For images you might use something like this: # For images you might use something like this:
# def extension_white_list # def extension_white_list
@ -60,4 +64,37 @@ class AvatarUploader < CarrierWave::Uploader::Base
# "something.jpg" if original_filename # "something.jpg" if original_filename
# end # end
def image
@image ||= MiniMagick::Image.open(file.path)
end
def is_landscape?
image['width'] > (image['height'] * 1.25)
end
#def recreate_versions!(*versions)
# if !current_path.nil?
# current_path = "'" + (current_path || '') + "'"
# end
# super(*versions)
#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
end end

View File

@ -13,4 +13,20 @@ class CoverUploader < CarrierWave::Uploader::Base
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end end
version :preview do
process :resize_to_fit => [480, 240]
end
version :full do
process :resize_to_fit => [1200, 800]
end
def image
@image ||= MiniMagick::Image.open(file.path)
end
def is_landscape?
image['width'] > image['height']
end
end end

View File

@ -1,51 +1,60 @@
# encoding: utf-8 # encoding: utf-8
require 'carrierwave/processing/mini_magick'
class PosterUploader < CarrierWave::Uploader::Base class PosterUploader < CarrierWave::Uploader::Base
# Include RMagick or MiniMagick support: include CarrierWave::ImageOptimizer
# include CarrierWave::RMagick include CarrierWave::MiniMagick
# include CarrierWave::MiniMagick
# Choose what kind of storage to use for this uploader: storage :file
storage :file process :optimize
# storage :fog
# Override the directory where uploaded files will be stored. @@sizes = {:thumb => [120, 120], :icon => [48, 48], :preview => [360, 120], :full => [1024, 1024]}
# This is a sensible default for uploaders that are meant to be mounted:
def store_dir
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end
# Provide a default URL as a default if there hasn't been a file uploaded: def store_dir
# def default_url "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
# # For Rails 3.1+ asset pipeline compatibility: end
# # ActionController::Base.helpers.asset_path("fallback/" + [version_name, "default.png"].compact.join('_'))
#
# "/images/fallback/" + [version_name, "default.png"].compact.join('_')
# end
# Process files as they are uploaded: version :thumb do
# process :scale => [200, 300] process :resize_to_fill => @@sizes[:thumb]
# end
# def scale(width, height)
# # do something
# end
# Create different versions of your uploaded files: version :icon do
# version :thumb do process :resize_to_fill => @@sizes[:icon]
# process :scale => [50, 50] end
# end
# Add a white list of extensions which are allowed to be uploaded. version :preview do
# For images you might use something like this: process :resize_to_fit => @@sizes[:preview]
# def extension_white_list end
# %w(jpg jpeg gif png)
# end
# Override the filename of the uploaded files: version :full do
# Avoid using model.id or version_name here, see uploader/store.rb for details. process :resize_to_fit => @@sizes[:full]
# def filename end
# "something.jpg" if original_filename
# end def image
@image ||= MiniMagick::Image.open(file.path)
end
def is_landscape?
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
end end

View File

@ -3,23 +3,25 @@
- content_for :banner do - content_for :banner do
.row .row
.columns.small-12 .columns.small-12.banner
%figure %figure
%img{src: @conference.poster_url} %img{src: @conference.poster_url}
.row.align-bottom .columns.medium-6.align-bottom
.columns.medium-6 %div
%h1='Bike!Bike! '+@conference.start_date.year.to_s %h1='Bike!Bike! '+@conference.start_date.year.to_s
%h2 %h2
- location = @conference.organizations.first.locations.first - location = @conference.organizations.first.locations.first
= location.city + ', ' + (location.territory || location.country) = location.city + ', ' + (location.territory || location.country)
%em %em
= (l @conference.start_date, format: :date) + ' - ' + (l @conference.end_date, format: :date) = (l @conference.start_date, format: :date) + ' - ' + (l @conference.end_date, format: :date)
%p - if params['controller'] != 'conferences'
= @conference.info %p= ActionView::Base.full_sanitizer.sanitize(@conference.info).gsub(/^(.{300,350}\.)(.*)$/m, '\1...')
.columns.medium-6.centered .columns.medium-6.centered.align-bottom
- if @conference.registration_open %div
%a.button{href: @conference.url(:register)} - if @conference.registration_open
=_'conference.Register_Now' %a.button{href: @conference.url(:register)}
- if params['controller'] != 'conferences' =_'conference.Register_Now'
%a.button.more{href: @conference.url} - if params['controller'] != 'conferences'
=_'conference.More_Info' %a.button.more{href: @conference.url}
=_'conference.More_Info'
= banner_attribution

View File

@ -0,0 +1,5 @@
= link_to ('/conferences/' + conference.conference_type.slug + '/' + conference.slug) do
%h5
= conference.title
%figure.conference-preview.preview-tile{:style => (conference.cover? ? ('background-image: url(' + conference.cover.preview.url + ')') : nil)}
= image_tag conference.poster.preview.url

View File

@ -1,43 +1,11 @@
%h1 Listing conferences - page_style :list
- title _'page.Conferences'
- banner_image '/assets/conference.jpg'
- content_for :banner do
.row
.columns
%h1=_'page.Conferences'
%table %ul.small-block-grid-1.medium-block-grid-2.large-block-grid-3.conference-list.preview-list
%tr - @conferences.each do |conference|
%th Title %li=render 'preview', :conference => conference
%th Slug
%th Start date
%th End date
%th Info
%th Poster
%th Cover
%th Workshop schedule published
%th Registration open
%th Meals provided
%th Meal info
%th Travel info
%th Conference type
%th
%th
%th
- @conferences.each do |conference|
%tr
%td= conference.title
%td= conference.slug
%td= conference.start_date
%td= conference.end_date
%td= conference.info
%td= conference.poster
%td= conference.cover
%td= conference.workshop_schedule_published
%td= conference.registration_open
%td= conference.meals_provided
%td= conference.meal_info
%td= conference.travel_info
%td= conference.conference_type
%td= link_to 'Show', conference
%td= link_to 'Edit', edit_conference_path(conference)
%td= link_to 'Destroy', conference, :method => :delete, :data => { :confirm => 'Are you sure?' }
%br
= link_to 'New Conference', new_conference_path

View File

@ -3,56 +3,5 @@
= tabs! = tabs!
%section %h2=('About '+@conference.title)
.row %p=@conference.info
.columns.medium-6
%h1=@conference.title
%p=@conference.info.gsub(/\s*\n+\s*/, '</p><p>').html_safe
.columns.medium-6
.row
%p#notice= notice
%p
%b Conference type:
= @conference.conference_type.title
%p
%b Title:
= @conference.title
%p
%b Slug:
= @conference.slug
%p
%b Start date:
= @conference.start_date
%p
%b End date:
= @conference.end_date
%p
%b Info:
= @conference.info
%p
%b Poster:
= @conference.poster
%p
%b Banner:
= @conference.cover
%p
%b Workshop schedule published:
= @conference.workshop_schedule_published
%p
%b Registration open:
= @conference.registration_open
%p
%b Meals provided:
= @conference.meals_provided
%p
%b Meal info:
= @conference.meal_info
%p
%b Travel info:
= @conference.travel_info
= link_to 'Edit', @conference.path(:edit) #edit_conference_path(@conference.conference_type.slug, @conference)
\|
= link_to 'Back', 'conferences'

View File

@ -32,16 +32,18 @@
%body{ class: (yield_or_default :page_style) } %body{ class: (yield_or_default :page_style) }
:javascript :javascript
var b=document.getElementsByTagName('HTML')[0];b.className+=' '+(window.getComputedStyle(document.body).backgroundBlendMode?'':'no-')+'blend-modes';</script> var b=document.getElementsByTagName('HTML')[0];b.className+=' '+(window.getComputedStyle(document.body).backgroundBlendMode?'':'no-')+'blend-modes';</script>
= render 'shared/translation_control' -#= render 'shared/translation_control'
= render 'shared/navbar'
%main %main
= render 'shared/navbar'
- flash.each do |key, msg| - flash.each do |key, msg|
= content_tag :div, msg, :id => key = content_tag :div, msg, :id => key
- if has_banner? - if has_banner?
%header#banner{banner_attrs(yield_or_default :banner_image)} %header#banner{banner_attrs(yield_or_default :banner_image)}
= yield :banner = yield :banner
= banner_attribution - if has_content?
= yield #content=yield
- else
= yield
#footer #footer
.container= render 'shared/footer' .container= render 'shared/footer'

View File

@ -0,0 +1,5 @@
= link_to organization do
%h5
= organization.name
%figure.org-preview.preview-tile{:style => (organization.cover? ? ('background-image: url(' + organization.cover.preview.url + ')') : nil)}
= image_tag organization.avatar.preview.url

View File

@ -1,41 +1,21 @@
%h1 Listing organizations - page_style :list
- title _'page.Organizations'
- banner_image '/assets/orgs.jpg'
- content_for :banner do
.row
.columns
%h1=_'page.Organizations'
%table - @organizations.sort_by{|k,v|k}.each do |country,territories|
%tr %h2=country
%th Name - territories.sort_by{|k,v|k}.each do |territory,cities|
%th Slug - if territory != 0
%th Email address %h3=territory
%th Url - cities.sort_by{|k,v|k}.each do |city,organizations|
%th Year founded %ul.small-block-grid-1.medium-block-grid-2.large-block-grid-3.org-list.preview-list
%th Info - uri = CGI::escape(city+' '+country)
%th Logo %li.city
%th Avatar %figure{:style => "background-image: url('http://maps.googleapis.com/maps/api/staticmap?center=#{uri}&zoom=4&size=600x300&maptype=roadmap&markers=size:small%7C#{uri}&key=AIzaSyDhfT68lGTwJHoUfC02fmA1SYNexO19J3M');"}
%th Requires approval %h4=city
%th Secret question - organizations.each do |organization|
%th Secret answer %li=render 'preview', :organization => organization
%th User organization replationship
%th
%th
%th
- @organizations.each do |organization|
%tr
%td= organization.name
%td= organization.slug
%td= organization.email_address
%td= organization.url
%td= organization.year_founded
%td= organization.info
%td= organization.logo
%td= organization.avatar
%td= organization.requires_approval
%td= organization.secret_question
%td= organization.secret_answer
%td= organization.user_organization_replationship_id
%td= link_to 'Show', organization
%td= link_to 'Edit', edit_organization_path(organization)
%td= link_to 'Destroy', organization, :method => :delete, :data => { :confirm => 'Are you sure?' }
%br
= link_to 'New Organization', new_organization_path

View File

@ -1,13 +1,13 @@
- page_style 'organization' - page_style 'organization'
- banner_image @organization.cover_url - banner_image @organization.cover_url
- content_for :banner do - content_for :banner do
.row .row{:class => (@organization.avatar.is_landscape? ? 'landscape' : 'portrait')}
.columns.medium-6.info .columns{:class => (@organization.avatar.is_landscape? ? nil : ['medium-6', 'medium-push-6'])}
%figure
= image_tag(@organization.avatar.url)
.columns.info{:class => (@organization.avatar.is_landscape? ? nil : ['medium-6', 'medium-pull-6'])}
%h1=@organization.name %h1=@organization.name
%h2=@organization.locations[0].city + (@organization.locations[0].territory ? ' ' + @organization.locations[0].territory : '') + ', ' + Carmen::Country.coded(@organization.locations[0].country).name %h2=@organization.locations[0].city + (@organization.locations[0].territory ? ' ' + @organization.locations[0].territory : '') + ', ' + Carmen::Country.coded(@organization.locations[0].country).name
.columns.medium-6
%figure
= image_tag(@organization.avatar_url)
%p#notice= notice %p#notice= notice
@ -15,4 +15,5 @@
.row .row
.columns .columns
%h2=('About '+@organization.name)
=p @organization, :info =p @organization, :info

View File

@ -1,6 +1,8 @@
- title 'Bike!Bike!' - title 'Bike!Bike!'
- has_no_content
- this_is_the_front_page
- if @conference - if @conference
-#= render 'conferences/header' = render 'conferences/header'
-#%section -#%section
-# .row -# .row

View File

@ -1,3 +1,5 @@
- page_style :form
.row .row
%h1 %h1
= _ 'language_translations', vars: {:language => (_ ('languages.' + @lang))} = _ 'language_translations', vars: {:language => (_ ('languages.' + @lang))}

View File

@ -1,12 +1,14 @@
%nav#main-nav %nav#main-nav
= link_to '/resources', :class => ['button', 'logo'] do = link_to '/', :class => ['button', 'logo'] do
= image_tag('logo.png', class: 'logo') = image_tag('logo.png', class: 'logo')
= image_tag('logo-text.png', class: 'logo-text') = image_tag('logo-text.png', class: 'logo-text')
= link_to (_'Conferences'), {:controller => :conferences}, {:class => ['button', 'conference']} = link_to (_'Conferences'), :conferences, {:class => ['button', 'conference']}
= link_to (_'Organizations'), {:controller => :organizations}, {:class => ['button', 'organization']} = link_to (_'Organizations'), {:controller => :organizations}, {:class => ['button', 'organization']}
= link_to (_'Zine'), 'http://zinezine.bikebike.org', :class => ['button', 'article'] = link_to (_'Zine'), 'http://zinezine.bikebike.org', :class => ['button', 'article']
%p - if is_this_the_front_page?
Bike!Bike! is an international annual gathering organized by and for community bicycle projects. The conference is a space for participants from shops and related advocacy groups to converge in a different city each year over a 4 day period to have workshops and strengthen our social network. %p
Bike!Bike! is an international annual gathering organized by and for community bicycle projects. The conference is a space for participants from shops and related advocacy groups to converge in a different city each year over a 4 day period to have workshops and strengthen our social network.
-#%iframe{:src => "//player.vimeo.com/video/76149097", :width => "500", :height => "281", :frameborder => "0", :webkitallowfullscreen => true, :mozallowfullscreen => true, :allowfullscreen => true}
-#- if current_user -#- if current_user
-# %li.has-form.sign-out.hide-for-small -# %li.has-form.sign-out.hide-for-small
-# = link_to (_"Sign_Out"), :logout, method: :post, :class => 'button' -# = link_to (_"Sign_Out"), :logout, method: :post, :class => 'button'

View File

@ -51,6 +51,6 @@ BikeBike::Application.configure do
#puts "CARMEN\t" + Carmen.i18n_backend.locale_paths #puts "CARMEN\t" + Carmen.i18n_backend.locale_paths
#PerfTools::CpuProfiler.start('/tmp/dev_prof') #PerfTools::CpuProfiler.start('/tmp/dev_prof')
#config.serve_static_assets = true config.serve_static_assets = true
#config.assets.precompile = false #config.assets.precompile = false
end end

View File

@ -6,7 +6,7 @@ BikeBike::Application.routes.draw do
#resources :workshop_facilitators #resources :workshop_facilitators
#resources :registration_form_fields #resources :registration_form_fields
resources :conference_types, :param => :slug , :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

View File

@ -309,9 +309,9 @@ namespace :migrate do
if params if params
new_object = model.class.create(params) new_object = model.class.create(params)
post_save = (type.singularize + '_post_save') post_save = (type.singularize + '_post_save')
self.send(post_save, object, new_object) begin
#begin self.send(post_save, object, new_object)
#rescue; end rescue; end
end end
} }
else else