% if ma.class == ContestMessage %>
<% if ma.contest_message_type == "ContestRequestDealResult" %>
-
<%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %>
-
系统提示
竞赛申请进度反馈:
-
<% if ma.content
role_str = ""
if ma.content.include?('13') && ma.content.include?('14')
role_str = "管理员、评委"
elsif ma.content.include?('13')
role_str = "管理员"
elsif ma.content.include?('14')
role_str = "评委"
elsif ma.content.include?('15')
role_str = "参赛者"
end
end %>
<%= link_to ma.status == 1 ?
'您申请成为竞赛"'+Contest.find(ma.contest_id).name+'"的'+ role_str +'申请已通过'
:
'您申请成为竞赛"'+Contest.find(ma.contest_id).name+'"的'+ role_str +'的申请被拒绝', contest_path(Contest.find(ma.contest_id)),
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
- <%= time_tag(ma.created_at).html_safe %>
<% elsif ma.contest_message_type == "JoinContest" and ma.status == 0 %>
-
<%= link_to image_tag(url_to_avatar(User.find(ma.contest_message_id)), :width => "30", :height => "30"), user_path(ma.contest_message_id), :target => '_blank' %>
-
<%=link_to User.find(ma.contest_message_id).show_name, user_path(User.find(ma.contest_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
将您加入了竞赛:
-
<%= link_to ma.contest.name, contest_path(ma.contest), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
- <%= time_tag(ma.created_at).html_safe %>
<% elsif ma.contest_message_type == "JoinContest" and ma.status == 1 %>
-
<%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %>
-
系统提示
您增加了新的竞赛成员:
-
<%= link_to User.find(ma.contest_message_id).login+"("+(User.find(ma.contest_message_id).realname ? User.find(ma.contest_message_id).realname : User.find(ma.contest_message_id).login) +")",
{:controller => 'contests', :action => 'settings', :id => ma.contest_id, :tab=>'member'},
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:target => '_blank' %>
- <%= time_tag(ma.created_at).html_safe %>
<% elsif ma.contest_message_type == "RemoveFromContest" %>
-
<%=link_to image_tag(url_to_avatar(User.find(ma.contest_message_id)), :width => "30", :height => "30"), user_path(ma.contest_message_id), :target => '_blank' %>
-
<%=link_to User.find(ma.contest_message_id).show_name, user_path(User.find(ma.contest_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
将您移出了竞赛:
-
<%= link_to ma.contest.name, contest_path(ma.contest), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
- <%= time_tag(ma.created_at).html_safe %>
<% elsif ma.contest_message_type == "Work" && ma.status.nil? && ma.contest_message %>
-
<%=link_to image_tag(url_to_avatar(ma.contest_message.user), :width => "30", :height => "30"), user_path(ma.contest_message.user), :target => '_blank' %>
-
<%=link_to ma.contest_message.user.show_name, user_path(ma.contest_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
发布了竞赛题:
-
<% if User.current.contestant_of_contest?(ma.contest_message.contest) && cur_user_works_for_work(ma.contest_message).nil? && ma.contest_message.work_status == 1 %>
<%= link_to ma.contest_message.name, new_contestant_work_path(:work => ma.contest_message.id),
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:target => '_blank',
:title => "竞赛题:#{ma.contest_message.name}"
%>
<% else %>
<%= link_to ma.contest_message.name, contestant_works_path(:work => ma.contest_message.id),
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:target => '_blank',
:title => "竞赛题:#{ma.contest_message.name}"
%>
<% end %>
- <%= time_tag(ma.created_at).html_safe %>
<% elsif ma.contest_message_type == "Work" && ma.status == 1 && ma.contest_message %>
-
<%=link_to image_tag(url_to_avatar(ma.contest_message.user), :width => "30", :height => "30"), user_path(ma.contest_message.user), :target => '_blank' %>
-
<%=link_to ma.contest_message.user.show_name, user_path(ma.contest_message.user),
:class => "newsBlue homepageNewsPublisher",
:title => "#{ma.contest_message.user.show_name}",
:target => '_blank' %>
发布的竞赛题:
-
<%= link_to ma.contest_message.name, contestant_works_path(:work => ma.contest_message.id),
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:target => '_blank',
:title => "竞赛题:#{ma.contest_message.name}"
%>
- 截止时间快到啦
- <%= time_tag(ma.created_at).html_safe %>
<% elsif ma.contest_message_type == "Work" && ma.status == 2 && ma.contest_message %>
-
<%= link_to image_tag(url_to_avatar(ma.contest_message.user), :width => "30", :height => "30"), user_path(ma.contest_message.user), :target => '_blank' %>
-
<%= link_to ma.contest_message.user.show_name, user_path(ma.contest_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
启动了在线评审:
-
<%= link_to ma.contest_message.name, contestant_works_path(:work => ma.contest_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}"%>
- <%= time_tag(ma.created_at).html_safe %>
<% elsif ma.contest_message_type == "Work" && ma.status == 4 && ma.contest_message %>
-
<%= link_to image_tag(url_to_avatar(ma.contest_message.user), :width => "30", :height => "30"), user_path(ma.contest_message.user), :target => '_blank' %>
-
<%= link_to ma.contest_message.user.show_name, user_path(ma.contest_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
在线评审启动失败(评委数为0或作品数为0):
-
<%= link_to ma.contest_message.name, contestant_works_path(:work => ma.contest_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}"%>
- <%= time_tag(ma.created_at).html_safe %>
<% elsif ma.contest_message_type == "Work" && ma.status == 5 && ma.contest_message %>
-
<%=link_to image_tag(url_to_avatar(ma.contest_message.user), :width => "30", :height => "30"), user_path(ma.contest_message.user), :target => '_blank' %>
-
<%=link_to ma.contest_message.user.show_name, user_path(ma.contest_message.user),
:class => "newsBlue homepageNewsPublisher",
:title => "#{ma.contest_message.user.show_name}",
:target => '_blank' %>
启动的在线评审:
-
<%= link_to ma.contest_message.name, contestant_works_path(:work => ma.contest_message.id),
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:target => '_blank',
:title => "竞赛题:#{ma.contest_message.name}"
%>
- 截止时间快到啦
- <%= time_tag(ma.created_at).html_safe %>
<% elsif ma.contest_message_type == "News" && ma.contest_message %>
-
<%=link_to image_tag(url_to_avatar(ma.contest_message.author), :width => "30", :height => "30"),user_path(ma.contest_message.author), :target => '_blank' %>
-
<%=link_to ma.contest_message.author.try(:show_name), user_path(ma.contest_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
发布了竞赛通知:
-
<%= link_to ma.contest_message.title, {:controller => 'news', :action => 'show', :id => ma.contest_message.id },
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:target => '_blank',
:title => "#{ma.contest_message.title}"
%>
- <%= time_tag(ma.created_at).html_safe %>
<% elsif ma.contest_message_type == "Comment" && ma.contest_message %>
-
<%=link_to image_tag(url_to_avatar(ma.contest_message.author), :width => "30", :height => "30"), user_path(ma.contest_message.author), :target => '_blank' %>
-
<%=link_to User.find(ma.contest_message.author_id).show_name, user_path(ma.contest_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
回复了竞赛通知:
-
<%= link_to ma.contest_message.commented.title, {:controller => 'news', :action => 'show', :id => ma.contest_message.commented.id },
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" ,
:target => '_blank',
:title => "#{ma.contest_message.commented.title}"
%>
- <%= time_tag(ma.created_at).html_safe %>
<% elsif ma.contest_message_type == "Message" && !ma.nil? && !ma.contest_message.nil? %>
-
<%=link_to image_tag(url_to_avatar(ma.contest_message.author), :width => "30", :height => "30"), user_path(ma.contest_message.author), :target => '_blank' %>
-
<%=link_to ma.contest_message.author.try(:show_name), user_path(ma.contest_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<%= ma.contest_message.parent_id.nil? ? "发布了竞赛帖子:" : "回复了竞赛帖子:" %>
<% if ma.contest_message.parent_id.nil? %>
-
<%= link_to ma.contest_message.subject, board_message_path(ma.contest_message.board_id, ma.contest_message.id),
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
:target => '_blank',
:title => "#{ma.contest_message.subject}"
%>
<% else %>
-
<%= link_to message_content(ma.contest_message.content), board_message_path(ma.contest_message.board_id, ma.contest_message.parent_id),
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
<% end %>
- <%= time_tag(ma.created_at).html_safe %>
<% elsif ma.contest_message_type == "JournalsForMessage" && ma.contest_message && ma.contest_message.jour_type == 'Contest' %>
-
<%= link_to image_tag(url_to_avatar(ma.contest_message.user), :width => "30", :height => "30"), user_path(ma.contest_message.user), :target => '_blank' %>
-
<%= link_to ma.contest_message.user.try(:show_name), user_path(ma.contest_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<%= ma.contest_message.m_parent_id.nil? ? "发布了竞赛留言:" : "回复了竞赛留言:" %>
-
<%= link_to message_content(ma.contest_message.notes), contest_feedback_path(:id => ma.contest_id),
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
- <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% end %>