Add paper_trail
This commit is contained in:
parent
f7c0b64eb5
commit
d9b2ebfc36
4 changed files with 11 additions and 3 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
class Booth < ActiveRecord::Base
|
class Booth < ActiveRecord::Base
|
||||||
include ActiveRecord::Transitions
|
include ActiveRecord::Transitions
|
||||||
|
has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id }
|
||||||
|
|
||||||
belongs_to :conference
|
belongs_to :conference
|
||||||
has_many :booth_requests, dependent: :destroy
|
has_many :booth_requests, dependent: :destroy
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,8 @@
|
||||||
= f.input :reasoning, input_html: { rows: 5, data: { provide: 'markdown-editable' } }, required: true,
|
= f.input :reasoning, input_html: { rows: 5, data: { provide: 'markdown-editable' } }, required: true,
|
||||||
label: 'How it fits the conference'
|
label: 'How it fits the conference'
|
||||||
= f.input :submitter_relationship, input_html: { rows: 5, data: { provide: 'markdown-editable' } }, required: true,
|
= f.input :submitter_relationship, input_html: { rows: 5, data: { provide: 'markdown-editable' } }, required: true,
|
||||||
label: 'Your personal relationship with the organization you are applying for',
|
label: 'Submitter\'s relation',
|
||||||
hint: 'e.g. employee, member of the open source community etc'
|
hint: 'e.g. employee, comunity manager, etc'
|
||||||
= f.input :website_url
|
= f.input :website_url
|
||||||
= responsibles_selector_input f
|
= responsibles_selector_input f
|
||||||
= image_tag f.object.picture.thumb.url if f.object.picture?
|
= image_tag f.object.picture.thumb.url if f.object.picture?
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,8 @@
|
||||||
%td
|
%td
|
||||||
= booth.id
|
= booth.id
|
||||||
%td
|
%td
|
||||||
= image_tag(booth.picture.thumb.url, width: '20%')
|
- if booth.logo_link
|
||||||
|
= image_tag(booth.picture.thumb.url, width: '20%')
|
||||||
%td
|
%td
|
||||||
= link_to booth.title, admin_conference_booth_path(@conference.short_title, booth)
|
= link_to booth.title, admin_conference_booth_path(@conference.short_title, booth)
|
||||||
%td
|
%td
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,12 @@
|
||||||
= link_if_alive version, 'contact details',
|
= link_if_alive version, 'contact details',
|
||||||
edit_admin_conference_contact_path(conference_id: Conference.find(version.conference_id).short_title)
|
edit_admin_conference_contact_path(conference_id: Conference.find(version.conference_id).short_title)
|
||||||
|
|
||||||
|
- when 'Booth'
|
||||||
|
= 'booth'
|
||||||
|
- booth = current_or_last_object_state(version.item_type, version.item_id)
|
||||||
|
= link_if_alive version, booth.title,
|
||||||
|
admin_conference_booth_path(conference_id: Conference.find(version.conference_id).short_title, id: version.item_id )
|
||||||
|
|
||||||
- when 'Program'
|
- when 'Program'
|
||||||
= link_if_alive version, 'program',
|
= link_if_alive version, 'program',
|
||||||
admin_conference_program_path(conference_id: Conference.find(version.conference_id).short_title)
|
admin_conference_program_path(conference_id: Conference.find(version.conference_id).short_title)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue