Add logo for booths
This commit is contained in:
parent
5734c90d1e
commit
3e97200a29
5 changed files with 7 additions and 5 deletions
|
|
@ -84,7 +84,7 @@ module Admin
|
|||
end
|
||||
|
||||
def booth_params
|
||||
params.require(:booth).permit(:title, :description, :reasoning, :state, :logo_link, :conference_id)
|
||||
params.require(:booth).permit(:title, :description, :reasoning, :state, :picture, :conference_id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ module Admin
|
|||
def show
|
||||
end
|
||||
|
||||
|
||||
def new
|
||||
@call_for_booths = CallForBooth.new(conference: @conference)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ class Booth < ActiveRecord::Base
|
|||
presence: true
|
||||
|
||||
|
||||
mount_uploader :picture, PictureUploader, mount_on: :logo_link
|
||||
|
||||
state_machine initial: :submitted do
|
||||
state :submitted
|
||||
state :withdrawn
|
||||
|
|
|
|||
|
|
@ -9,8 +9,9 @@
|
|||
= f.input :description, input_html: { rows: 5, data: { provide: 'markdown-editable' } }, required: true
|
||||
= f.input :reasoning, input_html: { rows: 5, data: { provide: 'markdown-editable' } }, required: true
|
||||
= responsibles_selector_input f
|
||||
= f.input :logo_link, as: :string, required: true
|
||||
|
||||
= image_tag f.object.picture.thumb.url if f.object.picture?
|
||||
= f.input :picture
|
||||
|
||||
%p.text-right
|
||||
- if @booth.new_record?
|
||||
= f.submit 'Create Booth Request', class: 'btn btn-success'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
.row
|
||||
.col-md-12
|
||||
%h3
|
||||
= image_tag(@booth.gravatar_url(size: '48'))
|
||||
= image_tag(@booth.picture.thumb.url, size: '20%', alt: '')
|
||||
= @booth.title
|
||||
.btn-group.pull-right
|
||||
= link_to 'Edit', edit_admin_conference_booth_path(@conference.short_title, @booth), class: 'btn btn-mini btn-primary'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue