Skip to content

Commit

Permalink
simplify: event_type is not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
mccalluc committed Jan 13, 2023
1 parent 468fc56 commit 9669f2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
8 changes: 0 additions & 8 deletions app/models/work_activity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,6 @@ def log_event_type?
CHANGE_LOG_ACTIVITY_TYPES.include? activity_type
end

def event_type
if message_event_type?
"message"
else
"log"
end
end

def to_html
(if changes_event_type?
MetadataChanges
Expand Down
10 changes: 2 additions & 8 deletions app/views/works/_work_activity_history.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
<% end %>
<ul class="no-beads work-messages">
<% @messages.each do |activity| %>
<%= render partial: 'work_activity', locals: {
activity: activity,
event_type: activity.event_type
} %>
<%= render partial: 'work_activity', locals: {activity: activity} %>
<% end %>
<% if @work.submission_notes.present? %>
<li class="activity-history-item">
Expand Down Expand Up @@ -41,10 +38,7 @@
<% end %>
<ul class="beads">
<% @changes.sort_by(&:created_at).reverse.each do |activity| %>
<%= render partial: 'work_activity', locals: {
activity: activity,
event_type: activity.event_type
} %>
<%= render partial: 'work_activity', locals: {activity: activity} %>
<% end %>
</ul>

Expand Down

0 comments on commit 9669f2b

Please sign in to comment.