osem-fcy/app/views/admin/events/show.html.haml
Nishanth Vijayan 48828f8930 Display who added commercial for event
Activate versioning for tests

The tests were failing because of the lack of versioning.By default, versioning is off for tests.
As a result, here (app/views/proposal/_form.html.haml L43) commercial,versions.last returns nil as there are no versions.
2016-08-20 14:21:21 +05:30

44 lines
1.6 KiB
Text

.tabbable
%ul.nav.nav-tabs
%li.active
= link_to "Proposal", "#proposal-content", "data-toggle"=>"tab"
%li
= link_to "History", "#history-content", "data-toggle"=>"tab"
.tab-content
#proposal-content.tab-pane.active
= render 'proposal'
#history-content.tab-pane
.col-md-12
%table.table.table-striped.table-bordered.table-hover.datatable
%thead
%th ID
%th Description
%th Actions
%tbody
- @versions.each do |version|
%tr
%td
= version.id
%td
%p
= link_to_user(version.whodunnit)
- if version.item_type == 'Event'
= event_change_description(version)
= "event #{@event.title}"
- else
= general_change_description(version)
= link_to 'commercial',
edit_admin_conference_program_event_path(conference_id: @conference.short_title,
id: @event.id, anchor: 'commercials-content')
%small.text-muted
= distance_of_time_in_words(Time.now,version.created_at) + ' ago'
%br
= "(#{version.created_at.strftime('%B %-d, %Y %H:%M')})"
%br
= render partial: 'shared/object_changes', locals: { version: version }
%td
= render partial: 'shared/changelog_actions', locals: { version: version }