osem-fcy/app/views/admin/events/show.html.haml
Ana 7e5d20c89d style: if ! changed by unless
- if ! changed by unless as it is more readable
- !object.blank? is equivalent to object.present?, also more readable
2016-08-06 00:57:07 +02:00

37 lines
1.1 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
%thead
%th
%b Who
%th
%b Timestamp
%th
%b Modification Type
%th
%b Changes
%tbody
- @event.versions.each do |version|
%tr
%td
- unless version.whodunnit.nil?
= User.find(version.whodunnit).name
- else
No user (probably via the console)
%td
= version.created_at
%td
= version.event
%td
- version.changeset.each_key do |key|
= "#{key}: #{version.changeset[key][0]} -> #{version.changeset[key][1]}"
%br