消息通知页面的完成
This commit is contained in:
parent
0da8977115
commit
6d6445465b
|
@ -247,7 +247,7 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
<!--<a onclick = "show_more();" id = "show_more_messages" style="display: none; cursor: pointer;" class = "shadowbox_news_all">展开更多</a>-->
|
||||
<%= link_to '查看全部', user_path(User.current), :id =>'show_all_messages', :class => "shadowbox_news_all", :target =>"_Blank" %>
|
||||
<%= link_to '查看全部', user_message_path(User.current), :id =>'show_all_messages', :class => "shadowbox_news_all", :target =>"_Blank" %>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<%=link_to ma.applied.name, organization_path(ma.applied_id), :target => '_blank' %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_at) %></span>
|
||||
<span><%= render :partial => "users/user_message_organization_applied_action", :locals => {:ma => ma} %></span>
|
||||
<span class="ml20"><%= render :partial => "users/user_message_organization_applied_action", :locals => {:ma => ma} %></span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
|
|
|
@ -1,35 +1,33 @@
|
|||
<div class="shortMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<div class="navHomepageLogo fl">
|
||||
<%= link_to image_tag(url_to_avatar(User.find(ma.apply_user_id)), :width => "30", :height => "30"), user_path(User.find(ma.apply_user_id)), :target => '_blank' %>
|
||||
</div>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to User.find(ma.apply_user_id).show_name, user_path(User.find(ma.apply_user_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">申请引用作业:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<% user = User.find(ma.apply_user_id) %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to "#{user.try(:show_name)}", user_path(user), :target => "_blank", :title => "#{user.try(:show_name)}" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_at) %></span>
|
||||
<span id="deal_info_<%= ma.id %>" class="ml20">
|
||||
<% if ma.apply_result == 0 || ma.apply_result.nil? %>
|
||||
<%= link_to '同意', dealwith_apply_homework_user_path(User.current, :agree=>'Y', :msg_id=>ma.id), :remote=>'true'%>
|
||||
|
|
||||
<%= link_to '拒绝', dealwith_apply_homework_user_path(User.current, :agree=>'N', :msg_id=>ma.id), :remote=>'true'%>
|
||||
<% elsif ma.apply_result == 1 %> <!-- 同意 -->
|
||||
<span class="fs12 infoTips bg-green">您已同意申请</span>
|
||||
<% elsif ma.apply_result == 2 %> <!-- 拒绝 -->
|
||||
<span class="fs12 infoTips bg-refuse">您已拒绝申请</span>
|
||||
<% end %>
|
||||
</span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
申请引用作业:
|
||||
</span>
|
||||
<% content = ma.content.nil? ? '' : ':'+ ma.content.to_s %>
|
||||
<%= link_to User.find(ma.apply_user_id).show_name+"申请引用作业\""+"#{HomeworkCommon.find(ma.course_message_id).name}"+"\"#{content}",
|
||||
student_work_index_path(:homework => ma.course_message.id),
|
||||
:title => User.find(ma.apply_user_id).show_name+"申请引用作业\""+"#{HomeworkCommon.find(ma.course_message_id).name}"+"\"#{content}",
|
||||
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey "}",
|
||||
:target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
</p>
|
||||
</div>
|
||||
<li class="messageApplyContents fl">
|
||||
<span id="deal_info_<%= ma.id %>">
|
||||
<% if ma.apply_result == 0 || ma.apply_result.nil? %>
|
||||
<%= link_to '同意', dealwith_apply_homework_user_path(User.current, :agree=>'Y', :msg_id=>ma.id), :remote=>'true'%>
|
||||
|
|
||||
<%= link_to '拒绝', dealwith_apply_homework_user_path(User.current, :agree=>'N', :msg_id=>ma.id), :remote=>'true'%>
|
||||
<% elsif ma.apply_result == 1 %> <!-- 同意 -->
|
||||
您已同意申请
|
||||
<% elsif ma.apply_result == 2 %> <!-- 拒绝 -->
|
||||
您已拒绝申请
|
||||
<% end %>
|
||||
</span>
|
||||
</li>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
@ -1,14 +1,26 @@
|
|||
<div class="shortMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<div class="navHomepageLogo fl">
|
||||
<%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
|
||||
</div>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to ma.course_message.user.show_name, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<span class="homepageNewsType fl">申请引用资源:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<% user = User.find(ma.apply_user_id) %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to "#{user.try(:show_name)}", user_path(user), :target => "_blank", :title => "#{user.try(:show_name)}" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_at) %></span>
|
||||
<span id="deal_info_<%= ma.id %>" class="ml20">
|
||||
<% if ma.apply_result == 0 || ma.apply_result.nil? %>
|
||||
<%= link_to '同意', deal_with_apply_resource_user_path(User.current, :agree => 'Y', :msg_id => ma.id, :apply_user_id => ma.course_message.apply_user_id), :remote => 'true' %> |
|
||||
<%= link_to '拒绝', deal_with_apply_resource_user_path(User.current, :agree => 'N', :msg_id => ma.id, :apply_user_id => ma.course_message.apply_user_id), :remote => 'true' %>
|
||||
<% elsif ma.apply_result == 1 %>
|
||||
<span class="fs12 infoTips bg-green">您已同意申请</span>
|
||||
<% elsif ma.apply_result == 2 %>
|
||||
<span class="fs12 infoTips bg-refuse">您已拒绝申请</span>
|
||||
<%end %>
|
||||
</span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
申请引用资源:
|
||||
</span>
|
||||
<% content = ma.course_message.content.nil? ? '' : ':'+ ma.course_message.content.to_s %>
|
||||
<% show_content = ma.course_message.user.show_name + "申请引用资源\""+"#{ma.course_message.find_attachment(ma.course_message.attachment_id).try(:filename)}"+"\"#{content}" %>
|
||||
<% if ma.course_message.container_type == "Course" %>
|
||||
|
@ -22,18 +34,5 @@
|
|||
<%= show_content %>
|
||||
</a>
|
||||
<% end %>
|
||||
</li>
|
||||
</p>
|
||||
</div>
|
||||
<li class="messageApplyContents fl">
|
||||
<span id="deal_info_<%= ma.id %>">
|
||||
<% if ma.apply_result == 0 || ma.apply_result.nil? %>
|
||||
<%= link_to '同意', deal_with_apply_resource_user_path(User.current, :agree => 'Y', :msg_id => ma.id, :apply_user_id => ma.course_message.apply_user_id), :remote => 'true' %> |
|
||||
<%= link_to '拒绝', deal_with_apply_resource_user_path(User.current, :agree => 'N', :msg_id => ma.id, :apply_user_id => ma.course_message.apply_user_id), :remote => 'true' %>
|
||||
<% elsif ma.apply_result == 1 %>
|
||||
您已同意申请
|
||||
<% elsif ma.apply_result == 2 %>
|
||||
您已拒绝申请
|
||||
<%end %>
|
||||
</span>
|
||||
</li>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
@ -1,15 +1,20 @@
|
|||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<% owner = User.find(ma.course_message.apply_user_id) %>
|
||||
<div class="navHomepageLogo fl">
|
||||
<%= link_to image_tag(url_to_avatar(owner), :width => "30", :height => "30", class: "mt3"), user_path(owner) %>
|
||||
</div>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to owner.show_name, user_path(owner), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<span class="homepageNewsType fl"><%= ma.apply_result == 2 ? '同意' : '拒绝'%>引用资源:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<% user = User.find(ma.course_message.apply_user_id) %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to "#{user.try(:show_name)}", user_path(user), :target => "_blank", :title => "#{user.try(:show_name)}" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_at) %></span>
|
||||
<span id="deal_info_<%= ma.id %>" class="ml20">
|
||||
<% if ma.apply_result == 2 %>
|
||||
<span class="fs12 infoTips bg-green">同意引用资源</span>
|
||||
<% else %>
|
||||
<span class="fs12 infoTips bg-refuse">拒绝引用资源</span>
|
||||
<%end %>
|
||||
</span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<% link_str = ma.apply_result == 2 ?
|
||||
'您申请引用资源"'+ ma.course_message.find_attachment(ma.course_message.attachment_id).try(:filename) + '"的申请已通过'
|
||||
:
|
||||
|
@ -25,7 +30,5 @@
|
|||
<%= link_str %>
|
||||
</a>
|
||||
<% end %>
|
||||
<%= link_to link_str, user_resource_user_path(User.current, :type => 2), :title => link_str,:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %>
|
||||
</li>
|
||||
</p>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
@ -1,26 +1,31 @@
|
|||
<div class="shortMessageWidth">
|
||||
<% message_user = User.find(ma.course_message_id) %>
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<div class="navHomepageLogo fl">
|
||||
<%= link_to image_tag(url_to_avatar(message_user), :width => "30", :height => "30"), user_path(message_user), :target => '_blank' %>
|
||||
</div>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<span class="newsBlue homepageNewsPublisher">
|
||||
<%=link_to message_user.show_name, user_path(ma.course_message_id),
|
||||
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: message_user} %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to message_user.try(:show_name), user_path(message_user), :target => "_blank", :title => "#{message_user.try(:show_name)}" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_at) %></span>
|
||||
<span id="deal_info_<%=ma.id%>" class="ml20">
|
||||
<% if ma.status == 0 || ma.status.nil?%>
|
||||
<%= link_to '同意',dealwith_apply_request_user_path(User.current,:agree=>'Y',:msg_id=>ma.id),:remote=>'true',:class=>'linkBlue'%>
|
||||
|
|
||||
<%= link_to '拒绝',dealwith_apply_request_user_path(User.current,:agree=>'N',:msg_id=>ma.id),:remote=>'true',:class=>'linkBlue'%>
|
||||
<% elsif ma.status == 1%> <!-- 同意 -->
|
||||
<span class="infoTips bg-green"><%= Course.find(ma.course_id).teacher.show_name %>已同意</span>
|
||||
<% elsif ma.status == 2%> <!-- 拒绝 -->
|
||||
<span class="infoTips bg-refuse"><%= Course.find(ma.course_id).teacher.show_name %>已拒绝</span>
|
||||
<% end %>
|
||||
</span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
申请以<%= ma.content && ma.content.include?('9') ? "“教师”" : "“助教”" %>的身份加入班级:
|
||||
</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<% content = User.find(ma.course_message_id).name+"申请成为班级\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content && ma.content.include?('9') ? "教师" : "助教"}" %>
|
||||
<%= link_to Course.find(ma.course_id).name, course_path(Course.find(ma.course_id)),
|
||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank', :title => "#{content}" %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
</p>
|
||||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<p>
|
||||
<%= User.current.lastname + User.current.firstname %>老师您好!您有了新的班级成员申请,信息如下:
|
||||
|
@ -32,18 +37,5 @@
|
|||
<p>申请职位:<%=ma.content && ma.content.include?('9') ? "教师" : "助教"%></p>
|
||||
</div>
|
||||
</div>
|
||||
<li class="messageOperateContents fl">
|
||||
<span id="deal_info_<%=ma.id%>">
|
||||
<% if ma.status == 0 || ma.status.nil?%>
|
||||
<%= link_to '同意',dealwith_apply_request_user_path(User.current,:agree=>'Y',:msg_id=>ma.id),:remote=>'true',:class=>'linkBlue'%>
|
||||
|
|
||||
<%= link_to '拒绝',dealwith_apply_request_user_path(User.current,:agree=>'N',:msg_id=>ma.id),:remote=>'true',:class=>'linkBlue'%>
|
||||
<% elsif ma.status == 1%> <!-- 同意 -->
|
||||
<span title="<%= Course.find(ma.course_id).teacher.show_name %>已同意"><%= Course.find(ma.course_id).teacher.show_name %>已同意</span>
|
||||
<% elsif ma.status == 2%> <!-- 拒绝 -->
|
||||
<span title="<%= Course.find(ma.course_id).teacher.show_name %>已拒绝"><%= Course.find(ma.course_id).teacher.show_name %>已拒绝</span>
|
||||
<% end %>
|
||||
</span>
|
||||
</li>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
|
||||
|
||||
|
|
|
@ -11,49 +11,52 @@
|
|||
<% end %>
|
||||
|
||||
<%# 课程消息 %>
|
||||
<% if ma.class == CourseMessage %>
|
||||
<% if ma.class == CourseMessage && ma.present? %>
|
||||
<li>
|
||||
<%= render :partial => 'users/user_message_course', :locals => {:ma => ma} %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<!--项目消息-->
|
||||
<% if ma.class == ForgeMessage %>
|
||||
<% if ma.class == ForgeMessage && ma.present? %>
|
||||
<li>
|
||||
<%= render :partial => 'users/user_message_forge', :locals => {:ma => ma} %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<%# 竞赛消息 %>
|
||||
<% if ma.class == ContestMessage %>
|
||||
<% if ma.class == ContestMessage && ma.present? %>
|
||||
<li>
|
||||
<%= render :partial => 'users/user_message_contest', :locals => {:ma => ma} %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<%# 博客消息 %>
|
||||
<% if ma.class == BlogMessage %>
|
||||
<% if ma.class == BlogMessage && ma.present? %>
|
||||
<%= render :partial => 'users/user_message_blog', :locals => {:ma => ma} %>
|
||||
<% end %>
|
||||
|
||||
<!--公共贴吧-->
|
||||
<% if ma.class == MemoMessage %>
|
||||
<% if ma.class == MemoMessage && ma.present? %>
|
||||
<%= render :partial => 'users/user_message_forum', :locals => {:ma => ma} %>
|
||||
<% end %>
|
||||
|
||||
<!--用户留言-->
|
||||
<% if ma.class == UserFeedbackMessage %>
|
||||
<% if ma.class == UserFeedbackMessage && ma.present? %>
|
||||
<li>
|
||||
<%= render :partial => 'users/user_message_userfeedaback', :locals => {:ma => ma} %>
|
||||
</li>
|
||||
|
||||
<% end %>
|
||||
|
||||
<!--子域名申请通知-->
|
||||
<% if ma.class == OrgMessage %>
|
||||
<% if ma.class == OrgMessage && ma.present? %>
|
||||
<li>
|
||||
<%= render :partial => 'users/user_message_org', :locals => {:ma => ma} %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<%# 申请类消息 %>
|
||||
<% if ma.class == AppliedMessage %>
|
||||
<% if ma.class == AppliedMessage && ma.present? %>
|
||||
<li>
|
||||
<%= render :partial => 'users/user_message_applied', :locals => {:ma => ma} %>
|
||||
</li>
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<%= link_to image_tag(url_to_avatar(user), class:"r_list_img"), user_path(user), :target => '_blank' %>
|
|
@ -0,0 +1,6 @@
|
|||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to user.try(:show_name), user_path(user), :target => "_blank", :title => "#{user.try(:show_name)}" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(target_time) %></span>
|
||||
</p>
|
|
@ -40,37 +40,32 @@
|
|||
<% elsif ma && ma.applied_type == "AppliedProject" %>
|
||||
<%= render :partial => "users/applied_project_content", :locals =>{:ma => ma} %>
|
||||
|
||||
<ul class="homepageNewsList fl" id="applied_project_<%= ma.id %>">
|
||||
<%= render :partial => "users/applied_project_content", :locals =>{:ma => ma} %>
|
||||
</ul>
|
||||
<!-- <ul class="homepageNewsList fl" id="applied_project_<%#= ma.id %>">-->
|
||||
<%#= render :partial => "users/applied_project_content", :locals =>{:ma => ma} %>
|
||||
<!-- </ul>-->
|
||||
<% elsif ma && ma.applied_type == "Organization" %>
|
||||
<ul class="homepageNewsList fl" id="applied_project_<%= ma.id %>">
|
||||
<%= render :partial => "users/applied_organization_sundomain", :locals =>{:ma => ma} %>
|
||||
</ul>
|
||||
匿评成绩申诉
|
||||
|
||||
<% elsif ma && ma.applied_type == "StudentWorksScoresAppeal" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<% applied_user = User.find(ma.applied_user_id) %>
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%= link_to image_tag(url_to_avatar(applied_user), :width => "30", :height => "30"), user_path(applied_user), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to applied_user.show_name, user_path(applied_user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">申诉匿评成绩:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents fl">
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: applied_user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: applied_user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
申诉匿评成绩:
|
||||
</span>
|
||||
<% homework = ma.applied.student_works_score.student_work.homework_common %>
|
||||
<%= link_to homework.name, student_work_index_path(:homework => homework.id, :show_work_id => ma.applied.student_works_score.student_work_id, :tab => 2), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</li>
|
||||
</p>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<% elsif ma && ma.applied_type == "AppliedContest" %>
|
||||
<%= render :partial => 'join_contest_applied_message', :locals => {:ma => ma} %>
|
||||
|
||||
<ul class="homepageNewsList fl" id="contest_message_join_<%=ma.id %>">
|
||||
<%= render :partial => 'join_contest_applied_message', :locals => {:ma => ma} %>
|
||||
</ul>
|
||||
<!-- <ul class="homepageNewsList fl" id="contest_message_join_<%#=ma.id %>">-->
|
||||
<%#= render :partial => 'join_contest_applied_message', :locals => {:ma => ma} %>
|
||||
<!-- </ul>-->
|
||||
<% else %>
|
||||
<span class="c_grey02">内容已删除</span>
|
||||
<% end %>
|
||||
|
|
|
@ -1,23 +1,19 @@
|
|||
<% ma.nil? ? local_assigns[:ma] : ma %>
|
||||
<% if ma.class == BlogMessage %>
|
||||
<% if ma.blog_message_type == "BlogComment" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%= link_to image_tag(url_to_avatar(User.find(ma.user_operator_id)), :width => "30", :height => "30"), user_path(ma.user_operator_id), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to User.find(ma.user_operator_id).show_name, user_path(ma.user_operator_id), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">回复了博客:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<% user = User.find(ma.user_operator_id) %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
回复了博客:
|
||||
</span>
|
||||
<% user_id = User.find(BlogComment.find(ma.blog_message_id).blog.author_id) %>
|
||||
<% blog_id = BlogComment.find(ma.blog_message_id).root_id %>
|
||||
<%= link_to message_content(ma.content), user_blog_blog_comment_path(:user_id => user_id, :blog_id => ma.blog_id, :id => blog_id),
|
||||
:class => "#{ma.viewed == false ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</li>
|
||||
</p>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% end %>
|
|
@ -13,337 +13,290 @@
|
|||
role_str = "参赛者"
|
||||
end
|
||||
end %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="shortMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<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>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to user.try(:show_name), user_path(user), :target => "_blank", :title => "#{user.try(:show_name)}" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_at) %></span>
|
||||
<span id="deal_info_<%=ma.id%>" class="ml20">
|
||||
<% if ma.status == 1%> <!-- 同意 -->
|
||||
<span class="infoTips bg-green"><%= User.find(ma.contest_message_id).show_name %>已同意</span>
|
||||
<% else%> <!-- 拒绝 -->
|
||||
<span class="infoTips bg-refuse"><%= User.find(ma.contest_message_id).show_name %>已拒绝</span>
|
||||
<%end %>
|
||||
</span>
|
||||
</p>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
<%= user.user_extensions.school_id.blank? || user.user_extensions.school.nil? ? "" : "来自"+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 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</li>
|
||||
</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>
|
||||
</p>
|
||||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<% if ma.course.is_public? || User.current.member_of_course?(ma.course) || User.current.admin? %>
|
||||
<% teacher = User.find(ma.course_message_id) %>
|
||||
<p><%= teacher.show_name %>(<%= teacher %>)老师把您加入了班级,详情如下:</p>
|
||||
<p>班级名称:<%= ma.course.name %></p>
|
||||
<p>开课学期:<%= ma.course.time.to_s + '年'+ ma.course.term %></p>
|
||||
<p>班级ID:<%= ma.course.id %></p>
|
||||
<p>课时总数:<%= ma.course.class_period %></p>
|
||||
<% else %>
|
||||
<p>
|
||||
您已经被移出该私有班级,非班级成员没有权限访问私有班级
|
||||
</p>
|
||||
<% end %>
|
||||
</span>
|
||||
</li>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--被管理员拉入竞赛:学生身份-->
|
||||
<% elsif ma.contest_message_type == "JoinContest" and ma.status == 0 %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%= 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' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to User.find(ma.contest_message_id).show_name, user_path(User.find(ma.contest_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">将您加入了竞赛:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<% user = User.find(ma.contest_message_id) %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
将您加入了竞赛:
|
||||
</span>
|
||||
<%= link_to ma.contest.name, contest_path(ma.contest), :class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</li>
|
||||
</p>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
|
||||
<!--被管理员拉入竞赛:老师身份-->
|
||||
<% elsif ma.contest_message_type == "JoinContest" and ma.status == 1 %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<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">
|
||||
|
||||
<%= link_to image_tag(url_to_avatar(""), class:"r_list_img"),"javascript:void(0)" %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to "系统提示","javascript:void(0)" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_at) %></span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
您增加了新的竞赛成员:
|
||||
</span>
|
||||
<%= 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 ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank' %>
|
||||
</li>
|
||||
</p>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
|
||||
<!--主动加入竞赛-->
|
||||
<% elsif ma.contest_message_type == "JoinContest" and ma.status == 2 %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<% user = User.find(ma.contest_message_id) %>
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<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>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
<%= user.user_extensions.school_id.blank? || user.user_extensions.school.nil? ? "" : "来自"+user.user_extensions.school.name+"," %>
|
||||
以"参赛者"的身份加入了竞赛:
|
||||
</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.contest.name, contest_path(ma.contest), :class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</li>
|
||||
</p>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
|
||||
<!--被老师移出课程-->
|
||||
<% elsif ma.contest_message_type == "RemoveFromContest" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=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' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to User.find(ma.contest_message_id).show_name, user_path(User.find(ma.contest_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">将您移出了竞赛:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<% user = User.find(ma.contest_message_id) %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
将您移出了竞赛:
|
||||
</span>
|
||||
<%= link_to ma.contest.name, contest_path(ma.contest), :class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</li>
|
||||
</p>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
|
||||
<!--发布竞赛题目-->
|
||||
<% elsif ma.contest_message_type == "Work" && ma.status.nil? && ma.contest_message %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(ma.contest_message.user), :width => "30", :height => "30"), user_path(ma.contest_message.user), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.contest_message.user.show_name, user_path(ma.contest_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">发布了竞赛题:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<% user = ma.contest_message.user %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
发布了竞赛题:
|
||||
</span>
|
||||
<%= link_to ma.contest_message.name, contestant_works_path(:work => ma.contest_message.id),
|
||||
:class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank',
|
||||
:title => "竞赛题:#{ma.contest_message.name}"
|
||||
%>
|
||||
</li>
|
||||
</p>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
|
||||
<!--竞赛截止时间快到了-->
|
||||
<% elsif ma.contest_message_type == "Work" && ma.status == 1 && ma.contest_message %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="shortMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(ma.contest_message.user), :width => "30", :height => "30"), user_path(ma.contest_message.user), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=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' %>
|
||||
<span class="homepageNewsType fl">发布的竞赛题:</span></li>
|
||||
<li class="messageInformationContents">
|
||||
<% user = ma.contest_message.user %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to user.try(:show_name), user_path(user), :target => "_blank", :title => "#{user.try(:show_name)}" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_at) %></span>
|
||||
<span class="ml20 fs12 infoTips bg-refuse">截止时间快到啦</span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
发布的竞赛题:
|
||||
</span>
|
||||
<%= link_to ma.contest_message.name, contestant_works_path(:work => ma.contest_message.id),
|
||||
:class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank',
|
||||
:title => "竞赛题:#{ma.contest_message.name}"
|
||||
%>
|
||||
</li>
|
||||
</p>
|
||||
</div>
|
||||
<li class="messageOperateContents fl" title="截止时间快到啦">截止时间快到啦</li>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
|
||||
<!--竞赛启动在线评审-->
|
||||
<% elsif ma.contest_message_type == "Work" && ma.status == 2 && ma.contest_message %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%= link_to image_tag(url_to_avatar(ma.contest_message.user), :width => "30", :height => "30"), user_path(ma.contest_message.user), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to ma.contest_message.user.show_name, user_path(ma.contest_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">启动了在线评审:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<% user = ma.contest_message.user %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
启动了在线评审:
|
||||
</span>
|
||||
<%= link_to ma.contest_message.name, contestant_works_path(:work => ma.contest_message.id), :class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}"%>
|
||||
</li>
|
||||
</p>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
|
||||
<!--关闭在线评审-->
|
||||
<% elsif ma.contest_message_type == "Work" && ma.status == 3 && ma.contest_message %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%= link_to image_tag(url_to_avatar(ma.contest_message.user), :width => "30", :height => "30"), user_path(ma.contest_message.user), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to ma.contest_message.user.show_name, user_path(ma.contest_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">关闭了在线评审:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<% user = ma.contest_message.user %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
关闭了在线评审:
|
||||
</span>
|
||||
<%= link_to ma.contest_message.name, contestant_works_path(:work => ma.contest_message.id), :class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}", :target => "_blank"%>
|
||||
</li>
|
||||
</p>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
|
||||
<!--在线评审启动失败-->
|
||||
<% elsif ma.contest_message_type == "Work" && ma.status == 4 && ma.contest_message %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%= link_to image_tag(url_to_avatar(ma.contest_message.user), :width => "30", :height => "30"), user_path(ma.contest_message.user), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to ma.contest_message.user.show_name, user_path(ma.contest_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">在线评审启动失败<font class="c_red">(评委数为0或作品数为0):</font></span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<% user = ma.contest_message.user %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
在线评审启动失败<font class="c_red">(评委数为0或作品数为0):</font>
|
||||
</span>
|
||||
<%= link_to ma.contest_message.name, contestant_works_path(:work => ma.contest_message.id), :class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}", :target => "_blank" %>
|
||||
</li>
|
||||
</p>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
|
||||
<!--在线评审时间快到了-->
|
||||
<% elsif ma.contest_message_type == "Work" && ma.status == 5 && ma.contest_message %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="shortMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(ma.contest_message.user), :width => "30", :height => "30"), user_path(ma.contest_message.user), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=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' %>
|
||||
<span class="homepageNewsType fl">启动的在线评审:</span></li>
|
||||
<li class="messageInformationContents">
|
||||
<% user = ma.contest_message.user %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to user.try(:show_name), user_path(user), :target => "_blank", :title => "#{user.try(:show_name)}" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_at) %></span>
|
||||
<span class="ml20 fs12 infoTips bg-refuse">截止时间快到啦</span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
启动的在线评审:
|
||||
</span>
|
||||
<%= link_to ma.contest_message.name, contestant_works_path(:work => ma.contest_message.id),
|
||||
:class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank',
|
||||
:title => "竞赛题:#{ma.contest_message.name}"
|
||||
%>
|
||||
</li>
|
||||
</p>
|
||||
</div>
|
||||
<li class="messageOperateContents fl" title="截止时间快到啦">截止时间快到啦</li>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
|
||||
<!--发布竞赛通知-->
|
||||
<% elsif ma.contest_message_type == "News" && ma.contest_message %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(ma.contest_message.author), :width => "30", :height => "30"),user_path(ma.contest_message.author), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.contest_message.author.try(:show_name), user_path(ma.contest_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">发布了竞赛通知:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<% user = ma.contest_message.author %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
发布了竞赛通知:
|
||||
</span>
|
||||
<%= link_to ma.contest_message.title, {:controller => 'news', :action => 'show', :id => ma.contest_message.id },
|
||||
:class =>"#{!ma.viewed ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank',
|
||||
:title => "#{ma.contest_message.title}"
|
||||
%>
|
||||
</li>
|
||||
</p>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
|
||||
<!--回复了竞赛通知-->
|
||||
<% elsif ma.contest_message_type == "Comment" && ma.contest_message %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(ma.contest_message.author), :width => "30", :height => "30"), user_path(ma.contest_message.author), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to User.find(ma.contest_message.author_id).show_name, user_path(ma.contest_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">回复了竞赛通知:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<% user = ma.contest_message.author %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
回复了竞赛通知:
|
||||
</span>
|
||||
<%= link_to ma.contest_message.commented.title, {:controller => 'news', :action => 'show', :id => ma.contest_message.commented.id },
|
||||
:class =>"#{!ma.viewed ? "newsBlack" : "newsGrey"}" ,
|
||||
:target => '_blank',
|
||||
:title => "#{ma.contest_message.commented.title}"
|
||||
%>
|
||||
</li>
|
||||
</p>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
|
||||
<!--发布/回复了竞赛帖子-->
|
||||
<% elsif ma.contest_message_type == "Message" && !ma.nil? && !ma.contest_message.nil? %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(ma.contest_message.author), :width => "30", :height => "30"), user_path(ma.contest_message.author), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.contest_message.author.try(:show_name), user_path(ma.contest_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<% user = ma.contest_message.author %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
<%= ma.contest_message.parent_id.nil? ? "发布了竞赛帖子:" : "回复了竞赛帖子:" %></span></li>
|
||||
<%= ma.contest_message.parent_id.nil? ? "发布了竞赛帖子:" : "回复了竞赛帖子:" %>
|
||||
</span>
|
||||
<% if ma.contest_message.parent_id.nil? %>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.contest_message.subject, board_message_path(ma.contest_message.board_id, ma.contest_message.id),
|
||||
:class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank',
|
||||
:title => "#{ma.contest_message.subject}"
|
||||
%>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to message_content(ma.contest_message.content), board_message_path(ma.contest_message.board_id, ma.contest_message.parent_id),
|
||||
:class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</li>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
|
||||
<!--发布/回复了竞赛留言-->
|
||||
<% elsif ma.contest_message_type == "JournalsForMessage" && ma.contest_message && ma.contest_message.jour_type == 'Contest' %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%= link_to image_tag(url_to_avatar(ma.contest_message.user), :width => "30", :height => "30"), user_path(ma.contest_message.user), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to ma.contest_message.user.try(:show_name), user_path(ma.contest_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl"><%= ma.contest_message.m_parent_id.nil? ? "发布了竞赛留言:" : "回复了竞赛留言:" %></span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<% user = ma.contest_message.author %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
<%= ma.contest_message.m_parent_id.nil? ? "发布了竞赛留言:" : "回复了竞赛留言:" %>
|
||||
</span>
|
||||
<%= link_to message_content(ma.contest_message.notes), feedback_contest_path(:id => ma.contest_id),
|
||||
:class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</li>
|
||||
</p>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% end %>
|
File diff suppressed because it is too large
Load Diff
|
@ -1,28 +1,19 @@
|
|||
|
||||
<% if ma.memo_type == "Memo" && !ma.memo.nil? && !ma.memo.author.nil? %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(ma.memo.author), :width => "30", :height => "30"), user_path(ma.memo.author), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to User.find(ma.memo.author_id).show_name, user_path(ma.memo.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl" ><%= ma.memo.parent_id.nil? ? "在贴吧发布帖子:" : "回复了贴吧帖子:" %></span>
|
||||
</li>
|
||||
|
||||
<% user = ma.memo.author %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
<%= ma.memo.parent_id.nil? ? "在贴吧发布帖子:" : "回复了贴吧帖子:" %>
|
||||
</span>
|
||||
<% if ma.memo.parent_id.nil? %>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.memo.subject, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to message_content(ma.memo.content), forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.memo.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= link_to "拒绝", refused_apply_subdomain_organizations_path(:organization_id => ma.applied_id, :org_domain => ma.name, :user_id => ma.applied_user_id, :ma_id => ma.id),
|
||||
:remote => true, :method => :post, :class => "link-blue",:style => "font-size: 14px;" %>
|
||||
<% elsif ma.status == 2 %>
|
||||
<span style="font-size:14px;">已同意</span>
|
||||
<span class="fs12 infoTips bg-green">已同意</span>
|
||||
<% elsif ma.status == 4 %>
|
||||
<span style="font-size:14px;">已拒绝</span>
|
||||
<span class="fs12 infoTips bg-refuse">已拒绝</span>
|
||||
<% end %>
|
Loading…
Reference in New Issue