<% if ma.class == ContestMessage %> <% if ma.contest_message_type == "ContestRequestDealResult" %> <% elsif ma.contest_message_type == "JoinContest" and ma.status == 0 %> <% elsif ma.contest_message_type == "JoinContest" and ma.status == 1 %> <% elsif ma.contest_message_type == "RemoveFromContest" %> <% elsif ma.contest_message_type == "Work" && ma.status.nil? && ma.contest_message %> <% elsif ma.contest_message_type == "Work" && ma.status == 1 && ma.contest_message %> <% elsif ma.contest_message_type == "Work" && ma.status == 2 && ma.contest_message %> <% elsif ma.contest_message_type == "Work" && ma.status == 4 && ma.contest_message %> <% elsif ma.contest_message_type == "Work" && ma.status == 5 && ma.contest_message %> <% elsif ma.contest_message_type == "News" && ma.contest_message %> <% elsif ma.contest_message_type == "Comment" && ma.contest_message %> <% elsif ma.contest_message_type == "Message" && !ma.nil? && !ma.contest_message.nil? %> <% elsif ma.contest_message_type == "JournalsForMessage" && ma.contest_message && ma.contest_message.jour_type == 'Contest' %> <% end %> <% end %>