Add logo to conference page

This commit is contained in:
Matt Barringer 2013-01-17 15:56:56 +01:00
parent caa0dec6c4
commit 1d7670d74e
12 changed files with 61 additions and 18 deletions

View file

@ -7,6 +7,10 @@ html, body,.container,.content {
height: 60px;
}
.well {
background-color: white;
border: 1px solid #299A0B;
}
.container, .content {
position: relative;
}

View file

@ -1,7 +1,7 @@
class Conference < ActiveRecord::Base
attr_accessible :title, :short_title, :social_tag, :contact_email, :timezone, :html_export_path,
:start_date, :end_date, :rooms_attributes, :tracks_attributes,
:event_types_attributes, :registration_start_date, :registration_end_date
:event_types_attributes, :registration_start_date, :registration_end_date, :logo
has_paper_trail
@ -21,6 +21,13 @@ class Conference < ActiveRecord::Base
accepts_nested_attributes_for :event_types, :allow_destroy => true
accepts_nested_attributes_for :email_settings
has_attached_file :logo,
:styles => {:thumb => "100x100>", :large => "300x300>" }
validates_attachment_content_type :logo,
:content_type => [/jpg/, /jpeg/, /png/, /gif/],
:size => { :in => 0..500.kilobytes }
validates_presence_of :title,
:short_title,
:social_tag

View file

@ -13,5 +13,8 @@
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
= f.input :registration_start_date, :as => :string, :input_html => { :id => "conference-reg-start-datepicker", :readonly => "readonly" }
= f.input :registration_end_date, :as => :string, :input_html => { :id => "conference-reg-end-datepicker", :readonly => "readonly" }
- if !@conference.logo.blank?
= image_tag @conference.logo(:thumb)
= f.input :logo, :label => "Conference Logo", :hint => "This will be displayed on the front page."
= f.input :html_export_path, :hint => "The path for static HTML exports"
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}

View file

@ -1,9 +1,13 @@
.container-fluid
%h1.center-text
%h1.center-text{:style => "padding-bottom: 30px"}
Upcoming Conferences
- @conferences.each do |conference|
- if conference.cfp_open? || conference.registration_open?
.well
.row-fluid
.span3.offset3
= image_tag conference.logo(:original)
.span3
%h2.center-text
= conference.title
%h4.center-text
@ -13,8 +17,12 @@
%a= link_to conference.venue.name, conference.venue.website
,
= conference.venue.address
.row-fluid
.span12
.center-text
= conference.venue.description
.row-fluid{:style => "padding-top: 30px;"}
.span4
.span3
- if conference.registration_open?
- if conference.user_registered?(current_user)
= link_to "Modify Registration", register_conference_path(conference.short_title), :class => "btn btn-success btn-large"
@ -23,9 +31,9 @@
= link_to "Register", register_conference_path(conference.short_title), :class => "btn btn-success btn-large"
- else
%b Registration is closed.
.span4.offset4.pull-right
.span9
- if conference.cfp_open?
- if !current_user.nil? && current_user.person.proposal_count(conference) > 0
= link_to "View My Proposals", conference_proposal_index_path(conference.short_title), :class => "btn btn-success btn-large"
= link_to "View My Proposals", conference_proposal_index_path(conference.short_title), :class => "btn btn-success btn-large pull-right"
- else
= link_to "Submit Proposal", conference_proposal_index_path(conference.short_title), :class => "btn btn-success btn-large"
= link_to "Submit Proposal", conference_proposal_index_path(conference.short_title), :class => "btn btn-success btn-large pull-right"

View file

@ -0,0 +1,8 @@
class AddLogoToConferencesTable < ActiveRecord::Migration
def change
add_column :conferences, :logo_file_name, :string
add_column :conferences, :logo_content_type, :string
add_column :conferences, :logo_file_size, :integer
add_column :conferences, :logo_updated_at, :datetime
end
end

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

View file

@ -43,8 +43,8 @@ rails.png: rails-a3386665c05a2d82f711a4aaa72d247c.png
rails/index.png: rails-a3386665c05a2d82f711a4aaa72d247c.png
application.js: application-29159c13c2c5ef2fb3368b9d8e2f08a4.js
application/index.js: application-29159c13c2c5ef2fb3368b9d8e2f08a4.js
application.css: application-9ab0f7f46e02dcd8c53c1038b1590fb3.css
application/index.css: application-9ab0f7f46e02dcd8c53c1038b1590fb3.css
application.css: application-a27f5b2eb07c9d527e71e7faa1f98399.css
application/index.css: application-a27f5b2eb07c9d527e71e7faa1f98399.css
loading.gif: loading-b7ff30d20adcf2b850f420d17048930c.gif
loading/index.gif: loading-b7ff30d20adcf2b850f420d17048930c.gif
progressbar.gif: progressbar-bc538af0ba6ff3d792217a96651cd58a.gif