Use PictureUploader on Conference

This commit is contained in:
Henne Vogelsang 2016-04-27 15:17:12 +02:00
parent cea9081347
commit 40023044af
8 changed files with 24 additions and 14 deletions

View file

@ -11,9 +11,12 @@
= f.input :short_title, :hint => "A short title, e.g. 'oSC14', to be used in URLs"
= f.input :description, hint: markdown_hint('A description of the conference.'), input_html: { rows: 5, data: { provide: 'markdown-editable' } }
= f.input :color, :hint => "The color will be used eg for the dashboard.", :input_html => {:size => 6, :type => "color"}
- 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.label 'Conference Logo'
%br
- if @conference.picture?
= image_tag @conference.picture.thumb.url
= f.input :picture, :label => false, :hint => "This will be displayed on the front page."
= f.hidden_field :picture_cache
= f.inputs :name => "Scheduling" do
= f.input :timezone, :as => :time_zone, :hint => "The conference time zone"
= f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" }

View file

@ -3,7 +3,7 @@
.well
.row
.col-md-4.text-center
= image_tag(conference.logo(:original), class: 'img-responsive') if conference.logo?
= image_tag(conference.picture_url, class: 'img-responsive') if conference.picture?
.col-md-6
%h3
= conference.title

View file

@ -9,7 +9,7 @@
.col-md-8.col-md-offset-2#header
.row
.col-md-4
= image_tag(@conference.logo(:original), class: 'img-responsive img-center', id: 'splash-logo') if @conference.logo?
= image_tag(@conference.picture_url, class: 'img-responsive img-center', id: 'splash-logo') if @conference.picture?
.col-md-8
%h1
= @conference.title