竞赛成员申请的审批结果消息通知,与班级、项目的最新处理方式一致,请修正

This commit is contained in:
cxt 2017-01-09 11:10:45 +08:00
parent 65ca0fbcc9
commit d4d8a82e8b
2 changed files with 36 additions and 23 deletions

View File

@ -83,8 +83,7 @@
<% content = User.find(ma.course_message_id).name+"申请成为班级\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content && ma.content.include?('9') ? "教师" : "教辅"}" %> <% content = User.find(ma.course_message_id).name+"申请成为班级\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content && ma.content.include?('9') ? "教师" : "教辅"}" %>
<li><a href="<%=user_path(User.find(ma.course_message_id), :course_id => ma.course_id) %>" target="_blank" title="系统提示 您有了新的班级成员申请:<%=content %>"><span class="shadowbox_news_user">系统提示 </span>您有了新的班级成员申请:<%=content %></a></li> <li><a href="<%=user_path(User.find(ma.course_message_id), :course_id => ma.course_id) %>" target="_blank" title="系统提示 您有了新的班级成员申请:<%=content %>"><span class="shadowbox_news_user">系统提示 </span>您有了新的班级成员申请:<%=content %></a></li>
<% elsif ma.course_message_type == "CourseRequestDealResult" %> <% elsif ma.course_message_type == "CourseRequestDealResult" %>
<% content = ma.status == 1 ? '您申请成为班级"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'申请已通过' : '您申请成为班级"'+Course.find(ma.course_id).name+'"的'+(ma.content && ma.content.include?('9') ? '教师' : '教辅')+'的申请被拒绝' %> <li><a href="<%=course_path(Course.find(ma.course_id)) %>" target="_blank" title="<%= User.find(ma.user_id).show_name%> 申请以“<%= ma.content.include?('9') ? '教师' : '教辅' %>”身份加入:<%=Course.find(ma.course_id).name %> <%=User.find(ma.course_message_id).show_name%><%=ma.status == 1 ? '已通过' : '已拒绝' %>"><span class="shadowbox_news_user"><%= User.find(ma.user_id).show_name%> </span>申请以“<%= ma.content.include?('9') ? '教师' : '教辅' %>”身份加入:<%=Course.find(ma.course_id).name %> <%=User.find(ma.course_message_id).show_name%><%=ma.status == 1 ? '已通过' : '已拒绝' %></a></li>
<li><a href="<%=course_path(Course.find(ma.course_id)) %>" target="_blank" title="系统提示 班级申请进度反馈:<%=content %>"><span class="shadowbox_news_user">系统提示 </span>班级申请进度反馈:<%=content %></a></li>
<% elsif ma.course_message_type == "JoinCourse" and ma.status == 0 %> <% elsif ma.course_message_type == "JoinCourse" and ma.status == 0 %>
<li><a href="<%=course_member_path(ma.course) %>" target="_blank" title="<%=User.find(ma.course_message_id).show_name %> 将您加入了班级:<%=ma.course.name %>"><span class="shadowbox_news_user"><%=User.find(ma.course_message_id).show_name %> </span>将您加入了班级:<%=ma.course.name %></a></li> <li><a href="<%=course_member_path(ma.course) %>" target="_blank" title="<%=User.find(ma.course_message_id).show_name %> 将您加入了班级:<%=ma.course.name %>"><span class="shadowbox_news_user"><%=User.find(ma.course_message_id).show_name %> </span>将您加入了班级:<%=ma.course.name %></a></li>
<% elsif ma.course_message_type == "JoinCourse" and ma.status == 1 %> <% elsif ma.course_message_type == "JoinCourse" and ma.status == 1 %>
@ -120,6 +119,7 @@
<li><a href="<%= contest_feedback_path(ma.contest_id) %>" target="_blank" title="<%=ma.contest_message.user.show_name %> <%= ma.contest_message.m_parent_id.nil? ? "发布了竞赛留言:" : "回复了竞赛留言:"%><%= message_content(ma.contest_message.notes)%>"><span class="shadowbox_news_user"><%=ma.contest_message.user.show_name %> </span><%= ma.contest_message.m_parent_id.nil? ? "发布了竞赛留言:" : "回复了竞赛留言:"%><%= message_content(ma.contest_message.notes)%></a></li> <li><a href="<%= contest_feedback_path(ma.contest_id) %>" target="_blank" title="<%=ma.contest_message.user.show_name %> <%= ma.contest_message.m_parent_id.nil? ? "发布了竞赛留言:" : "回复了竞赛留言:"%><%= message_content(ma.contest_message.notes)%>"><span class="shadowbox_news_user"><%=ma.contest_message.user.show_name %> </span><%= ma.contest_message.m_parent_id.nil? ? "发布了竞赛留言:" : "回复了竞赛留言:"%><%= message_content(ma.contest_message.notes)%></a></li>
<% end %> <% end %>
<% elsif ma.contest_message_type == "ContestRequestDealResult" %> <% elsif ma.contest_message_type == "ContestRequestDealResult" %>
<% user = User.find(ma.user_id) %>
<% if ma.content <% if ma.content
role_str = "" role_str = ""
if ma.content.include?('13') && ma.content.include?('14') if ma.content.include?('13') && ma.content.include?('14')
@ -132,7 +132,7 @@
role_str = "参赛者" role_str = "参赛者"
end end
end %> end %>
<li><a href="<%=contest_path(ma.contest_id) %>" target="_blank" title='系统提示 竞赛申请进度反馈:您申请成为竞赛"<%=Contest.find(ma.contest_id).name %>"的"<%=role_str %>"<%= ma.status == 1 ? "申请已通过" : "的申请被拒绝"%>'><span class="shadowbox_news_user">系统提示 </span>竞赛申请进度反馈:您申请成为竞赛"<%=Contest.find(ma.contest_id).name %>"的"<%=role_str %>"<%= ma.status == 1 ? "申请已通过" : "的申请被拒绝"%></a></li> <li><a href="<%=contest_path(ma.contest_id) %>" target="_blank" title='<%= user.show_name%> <%= user.user_extensions.school_id.blank? ? "" : "来自"+user.user_extensions.school.name+"" %>申请以"<%= role_str%>"的身份加入竞赛:<%=Contest.find(ma.contest_id).name %> <%= User.find(ma.contest_message_id).show_name %><%= ma.status == 1 ? "已同意" : "已拒绝"%>'><span class="shadowbox_news_user"><%= user.show_name%> </span><%= user.user_extensions.school_id.blank? ? "" : "来自"+user.user_extensions.school.name+"" %>申请以"<%= role_str%>"的身份加入竞赛:<%=Contest.find(ma.contest_id).name %> <%= User.find(ma.contest_message_id).show_name %><%= ma.status == 1 ? "已同意" : "已拒绝"%></a></li>
<% elsif ma.contest_message_type == "JoinContest" and ma.status == 0 %> <% elsif ma.contest_message_type == "JoinContest" and ma.status == 0 %>
<li><a href="<%=contest_path(ma.contest) %>" target="_blank" title="<%=User.find(ma.contest_message_id).show_name %> 将您加入了竞赛:<%= ma.contest.name%>"><span class="shadowbox_news_user"><%=User.find(ma.contest_message_id).show_name %> </span>将您加入了竞赛:<%= ma.contest.name%></a></li> <li><a href="<%=contest_path(ma.contest) %>" target="_blank" title="<%=User.find(ma.contest_message_id).show_name %> 将您加入了竞赛:<%= ma.contest.name%>"><span class="shadowbox_news_user"><%=User.find(ma.contest_message_id).show_name %> </span>将您加入了竞赛:<%= ma.contest.name%></a></li>
<% elsif ma.contest_message_type == "JoinContest" and ma.status == 1 %> <% elsif ma.contest_message_type == "JoinContest" and ma.status == 1 %>

View File

@ -1,16 +1,6 @@
<% if ma.class == ContestMessage %> <% if ma.class == ContestMessage %>
<% if ma.contest_message_type == "ContestRequestDealResult" %> <% if ma.contest_message_type == "ContestRequestDealResult" %>
<ul class="homepageNewsList fl"> <% user = User.find(ma.user_id) %>
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div>
</li>
<li class="homepageNewsPubType fl">
<span class="newsBlue homepageNewsPublisher">系统提示</span>
<span class="homepageNewsType fl">
竞赛申请进度反馈:</span>
</li>
<li class="messageInformationContents">
<% if ma.content <% if ma.content
role_str = "" role_str = ""
if ma.content.include?('13') && ma.content.include?('14') if ma.content.include?('13') && ma.content.include?('14')
@ -23,13 +13,36 @@
role_str = "参赛者" role_str = "参赛者"
end end
end %> end %>
<%= link_to ma.status == 1 ? <ul class="homepageNewsList fl">
'您申请成为竞赛"'+Contest.find(ma.contest_id).name+'"的'+ role_str +'申请已通过' <div class="shortMessageWidth">
: <li class="homepageNewsPortrait fl">
'您申请成为竞赛"'+Contest.find(ma.contest_id).name+'"的'+ role_str +'的申请被拒绝', contest_path(Contest.find(ma.contest_id)), <div class="navHomepageLogo fl">
<%= link_to image_tag(url_to_avatar(user), :width => "30", :height => "30"), user_path(user), :target => '_blank' %>
</div>
</li>
<li class="homepageNewsPubType fl">
<span class="newsBlue homepageNewsPublisher">
<%=link_to user.show_name, user_path(user),
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %></span>
<span class="homepageNewsType fl">
<%= user.user_extensions.school_id.blank? ? "" : "来自"+user.user_extensions.school.name+"" %>
申请以"<%= role_str%>"的身份加入竞赛:
</span>
</li>
<li class="messageInformationContents">
<%= link_to Contest.find(ma.contest_id).name, contest_path(ma.contest_id),
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %> :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
</li> </li>
</div> </div>
<li class="messageOperateContents fl">
<span id="deal_info_<%=ma.id%>">
<% if ma.status == 1%> <!-- 同意 -->
<span title="<%= User.find(ma.contest_message_id).show_name %>已同意"><%= User.find(ma.contest_message_id).show_name %>已同意</span>
<% else%> <!-- 拒绝 -->
<span title="<%= User.find(ma.contest_message_id).show_name %>已拒绝"><%= User.find(ma.contest_message_id).show_name %>已拒绝</span>
<%end %>
</span>
</li>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li> <li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul> </ul>