申请管理消息通知

This commit is contained in:
daiao 2016-08-05 19:02:05 +08:00
parent ea4f0d7d9d
commit e89d7398aa
1 changed files with 20 additions and 22 deletions

View File

@ -94,6 +94,26 @@
<span><%= applied_project_tip_header(ma) %>以“<%= applied_project_message_type(ma.role) %>”身份加入<% project = Project.find(ma.project_id) %>
<%= link_to project.name, project_path(ma.project_id), :class => "link-blue", :target => '_blank', :title => "#{project.name}" %>
</span>
<% elsif ma.applied_type == "ApplyAddSchools" && ma.status == 0 %>
<li>
<% content = '<span class="shadowbox_news_user">'+User.where("id=?", ma.applied_user_id).first.show_name+' </span>提交了申请:添加新的单位:'+"“"+ma.name+"”" %>
<%= link_to content.html_safe, unapplied_schools_path(:flag => 1, :applied_message_id => ma.id), :title => "#{User.where("id=?", ma.applied_user_id).first.show_name}提交了申请:添加新的单位“#{ma.name}”", :target => '_blank' %>
</li>
<% elsif ma.applied_type == "ApplyAddSchools" && ma.status == 1 %>
<li>
<% content = "<span class='shadowbox_news_user'>系统提示:</span>“#{ma.name}”的申请,已通过审核。谢谢!" %>
<%= link_to content.html_safe, { :controller=> "my",:action => "account",:flag => 1, :applied_message_id => ma.id }, :title => "系统提示:“#{ma.name}”的申请,已通过审核。谢谢!", :target => '_blank'%>
</li>
<% elsif ma.applied_type == "ApplyAddSchools" && ma.status == 2 %>
<li>
<% content = "<span class='shadowbox_news_user'>系统提示:</span>“#{ma.applied.name}”的申请,因名称不符合规范,系统已将其更改为“#{ma.name}”。谢谢!" %>
<%= link_to content.html_safe, { :controller=> "my",:action => "account", :flag => 1, :applied_message_id => ma.id }, :title => "系统提示:“#{ma.applied.name}”的申请,因名称不符合规范,系统已将其更改为“#{ma.name}”。谢谢!", :target => '_blank'%>
</li>
<% elsif ma.applied_type == "ApplyAddSchools" && ma.status == 3 %>
<li>
<% content = "<span class='shadowbox_news_user'>系统提示:</span>“#{ma.name}”的申请,经确认为无效的单位信息,已被删除,请重新编辑您的单位资料。谢谢!" %>
<%= link_to content.html_safe, { :controller=> "my",:action => "account", :flag => 1, :applied_message_id => ma.id }, :title => "系统提示:“#{ma.name}”的申请,经确认为无效的单位信息,已被删除,请重新编辑您的单位资料。谢谢!", :target => '_blank'%>
</li>
<% end %>
<% elsif ma.class == ForgeMessage %>
<% if ma.forge_message_type == "AppliedProject" %>
@ -142,28 +162,6 @@
<% content = '<span class="shadowbox_news_user">'+ma.author.show_name+' </span>提到了你:'+ma.subject.html_safe %>
<li><%=link_to content.html_safe, ma.url, :title => ma.author.show_name+' 提到了你:'+ma.subject.html_safe, :target => '_blank' %></li>
<% end %>
<% elsif ma.class == AppliedMessage %>
<% if ma.applied_type == "ApplyAddSchools" && ma.status == 0 %>
<li>
<% content = '<span class="shadowbox_news_user">'+User.where("id=?", ma.applied_user_id).first.show_name+' </span>提交了申请:添加新的单位:'+"“"+ma.name+"”" %>
<%= link_to content.html_safe, unapplied_schools_path(:flag => 1, :applied_message_id => ma.id), :title => "#{User.where("id=?", ma.applied_user_id).first.show_name}提交了申请:添加新的单位“#{ma.name}”", :target => '_blank' %>
</li>
<% elsif ma.applied_type == "ApplyAddSchools" && ma.status == 1 %>
<li>
<% content = "<span class='shadowbox_news_user'>系统提示:</span>“#{ma.name}”的申请,已通过审核。谢谢!" %>
<%= link_to content.html_safe, { :controller=> "my",:action => "account",:flag => 1, :applied_message_id => ma.id }, :title => "系统提示:“#{ma.name}”的申请,已通过审核。谢谢!", :target => '_blank'%>
</li>
<% elsif ma.applied_type == "ApplyAddSchools" && ma.status == 2 %>
<li>
<% content = "<span class='shadowbox_news_user'>系统提示:</span>“#{ma.applied.name}”的申请,因名称不符合规范,系统已将其更改为“#{ma.name}”。谢谢!" %>
<%= link_to content.html_safe, { :controller=> "my",:action => "account", :flag => 1, :applied_message_id => ma.id }, :title => "系统提示:“#{ma.applied.name}”的申请,因名称不符合规范,系统已将其更改为“#{ma.name}”。谢谢!", :target => '_blank'%>
</li>
<% elsif ma.applied_type == "ApplyAddSchools" && ma.status == 3 %>
<li>
<% content = "<span class='shadowbox_news_user'>系统提示:</span>“#{ma.name}”的申请,经确认为无效的单位信息,已被删除,请重新编辑您的单位资料。谢谢!" %>
<%= link_to content.html_safe, { :controller=> "my",:action => "account", :flag => 1, :applied_message_id => ma.id }, :title => "系统提示:“#{ma.name}”的申请,经确认为无效的单位信息,已被删除,请重新编辑您的单位资料。谢谢!", :target => '_blank'%>
</li>
<% end %>
<% end %>
<% end %>
</ul>