2016-09-02 16:00:54 +08:00
|
|
|
<% if ma.class == ForgeMessage %>
|
2015-09-28 16:14:53 +08:00
|
|
|
<!--申请加入项目-->
|
|
|
|
<% if ma.forge_message_type == "AppliedProject" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<li class="homepageNewsPortrait fl">
|
2016-05-16 16:16:24 +08:00
|
|
|
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user), :target => '_blank' %></a>
|
2015-09-28 16:14:53 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsPubType fl">
|
2016-05-16 16:16:24 +08:00
|
|
|
<%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
2015-09-28 16:14:53 +08:00
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">申请加入项目:</span>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2016-05-16 16:16:24 +08:00
|
|
|
<%= link_to ma.project, settings_project_path(:id => ma.project, :tab => "members"), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
2016-03-17 15:09:08 +08:00
|
|
|
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
|
|
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
|
|
|
</a>
|
2015-09-28 16:14:53 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
2015-10-16 09:30:44 +08:00
|
|
|
<!--被管理员拉入项目-->
|
|
|
|
<% if ma.forge_message_type == "JoinProject" %>
|
2015-12-11 13:46:23 +08:00
|
|
|
<% unless ma.project.nil? %>
|
2015-10-16 09:30:44 +08:00
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<li class="homepageNewsPortrait fl">
|
2016-05-16 16:16:24 +08:00
|
|
|
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.forge_message_id)), :width => "30", :height => "30"), user_path(ma.forge_message_id), :target => '_blank' %></a>
|
2015-10-16 09:30:44 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsPubType fl">
|
2016-05-16 16:16:24 +08:00
|
|
|
<%=link_to User.find(ma.forge_message_id), user_path(User.find(ma.forge_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
2015-10-16 09:30:44 +08:00
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">将您加入了项目:</span>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2016-05-16 16:16:24 +08:00
|
|
|
<%= link_to ma.project, project_member_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
2016-03-17 15:09:08 +08:00
|
|
|
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
|
|
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
|
|
|
</a>
|
2015-10-16 09:30:44 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
2015-12-11 13:46:23 +08:00
|
|
|
<% end %>
|
2015-10-16 09:30:44 +08:00
|
|
|
<% end %>
|
2015-12-11 13:46:23 +08:00
|
|
|
<!--被管理员移出项目-->
|
2015-10-16 09:30:44 +08:00
|
|
|
<% if ma.forge_message_type == "RemoveFromProject" %>
|
2015-12-11 13:48:52 +08:00
|
|
|
<% unless ma.project.nil? %>
|
2015-10-16 09:30:44 +08:00
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<li class="homepageNewsPortrait fl">
|
2016-05-16 16:16:24 +08:00
|
|
|
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(User.find(ma.forge_message_id)), :width => "30", :height => "30"), user_path(ma.forge_message_id), :target => '_blank' %></a>
|
2015-10-16 09:30:44 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsPubType fl">
|
2016-05-16 16:16:24 +08:00
|
|
|
<%=link_to User.find(ma.forge_message_id), user_path(User.find(ma.forge_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
2015-10-16 09:30:44 +08:00
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">将您移出了项目:</span>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2016-05-16 16:16:24 +08:00
|
|
|
<%= link_to ma.project, member_project_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
2016-03-17 15:09:08 +08:00
|
|
|
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
|
|
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
|
|
|
</a>
|
2015-10-16 09:30:44 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
2015-12-11 13:48:52 +08:00
|
|
|
<% end %>
|
2015-10-16 09:30:44 +08:00
|
|
|
<% end %>
|
2015-09-28 16:14:53 +08:00
|
|
|
<!--邀请加入项目-->
|
|
|
|
<% if ma.forge_message_type == "ProjectInvite" %>
|
|
|
|
<% inviter = User.find(ma.forge_message_id) %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<li class="homepageNewsPortrait fl">
|
2016-05-16 16:16:24 +08:00
|
|
|
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(inviter), :width => "30", :height => "30"), user_path(inviter), :target => '_blank' %></a>
|
2015-09-28 16:14:53 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsPubType fl">
|
2016-05-16 16:16:24 +08:00
|
|
|
<%=link_to inviter, user_path(inviter), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
2015-10-16 10:31:10 +08:00
|
|
|
<span class='<%= ma.viewed == 0 ? 'homepageNewsTypeNotRead fl' : 'homepageNewsType fl' %>'>邀请你加入项目:</span>
|
2015-09-28 16:14:53 +08:00
|
|
|
</li>
|
|
|
|
<% if ma.user.member_of?(ma.project) %>
|
|
|
|
<li class="homepageNewsContent fl">
|
|
|
|
<% else %>
|
|
|
|
<li class="homepageHomeworkContent fl">
|
|
|
|
<% end %>
|
|
|
|
<%= link_to ma.project, project_path(ma.project),
|
2016-05-16 16:16:24 +08:00
|
|
|
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
2016-03-17 15:09:08 +08:00
|
|
|
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
|
|
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
2015-09-28 16:14:53 +08:00
|
|
|
</li>
|
|
|
|
<% unless User.current.member_of?(ma.project) %>
|
|
|
|
<li class="homepageHomeworkContentWarn fl">
|
|
|
|
<%=link_to "同意加入", {:controller => 'projects', :action => 'member', :id => ma.project_id, :message_id =>ma.id, :key => ma.secret_key},
|
|
|
|
:value => ma.secret_key,
|
|
|
|
:class => "green_btn_cir ml10",
|
2016-05-16 16:16:24 +08:00
|
|
|
:style => "color:#fff", :target => '_blank' %>
|
2015-09-28 16:14:53 +08:00
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% if ma.forge_message_type == "Issue" %>
|
2015-09-29 10:15:35 +08:00
|
|
|
<% if ma.status == 1%>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<li class="homepageNewsPortrait fl">
|
2016-05-16 16:16:24 +08:00
|
|
|
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %></a>
|
2015-09-29 10:15:35 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsPubType fl">
|
2016-05-16 16:16:24 +08:00
|
|
|
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
2015-09-29 10:15:35 +08:00
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>"><%= ma.forge_message.tracker_id == 5 ? "发布的周报:":"指派给你的问题:"%></span>
|
|
|
|
</li>
|
|
|
|
<li class="homepageHomeworkContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2016-05-16 16:16:24 +08:00
|
|
|
<%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
2016-03-17 15:09:08 +08:00
|
|
|
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
|
|
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
|
|
|
</a>
|
2015-09-29 10:15:35 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageHomeworkContentWarn fl"> 截止时间快到了!</li>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% else %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<li class="homepageNewsPortrait fl">
|
2016-05-16 16:16:24 +08:00
|
|
|
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %></a>
|
2015-09-29 10:15:35 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsPubType fl">
|
2016-05-16 16:16:24 +08:00
|
|
|
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
2015-09-29 10:15:35 +08:00
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>"><%= ma.forge_message.tracker_id == 5 ? "发布了周报:":"指派了问题给你:"%></span>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2016-05-16 16:16:24 +08:00
|
|
|
<%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
2016-03-17 15:09:08 +08:00
|
|
|
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
|
|
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
|
|
|
</a>
|
2015-09-29 10:15:35 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
2015-09-28 16:14:53 +08:00
|
|
|
<% end %>
|
2016-09-02 16:00:54 +08:00
|
|
|
<% if ma.forge_message_type == "Journal" && ma.forge_message %>
|
2015-09-28 16:14:53 +08:00
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<li class="homepageNewsPortrait fl">
|
2016-05-16 16:16:24 +08:00
|
|
|
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user), :target => '_blank' %></a>
|
2015-09-28 16:14:53 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsPubType fl">
|
2016-05-16 16:16:24 +08:00
|
|
|
<%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
2015-09-28 16:14:53 +08:00
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
|
|
|
|
更新了问题状态:</span>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
|
|
<%= link_to ma.forge_message.journalized.subject,
|
2016-05-16 16:16:24 +08:00
|
|
|
issue_path(:id => ma.forge_message.journalized_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
2016-03-17 15:09:08 +08:00
|
|
|
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
|
|
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
|
|
|
</a>
|
2015-09-28 16:14:53 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% if ma.forge_message_type == "Message" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
2016-05-16 16:16:24 +08:00
|
|
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %></a></li>
|
|
|
|
<li class="homepageNewsPubType fl"><%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
2015-09-28 16:14:53 +08:00
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %></span></li>
|
2016-03-21 18:16:50 +08:00
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
2016-07-05 15:00:41 +08:00
|
|
|
<%= link_to ma.forge_message.subject, board_message_path(ma.forge_message.board_id, ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
2016-03-21 18:16:50 +08:00
|
|
|
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
|
|
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
|
|
|
</a>
|
|
|
|
</li>
|
2015-09-28 16:14:53 +08:00
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% if ma.forge_message_type == "News" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
|
|
|
<li class="homepageNewsPortrait fl">
|
2016-05-16 16:16:24 +08:00
|
|
|
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %></a>
|
2015-09-28 16:14:53 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsPubType fl">
|
2016-05-16 16:16:24 +08:00
|
|
|
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
2015-09-28 16:14:53 +08:00
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了新闻:</span>
|
|
|
|
</li>
|
|
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
|
|
<%= link_to ("#{ma.forge_message.title.html_safe}"), {:controller => 'news', :action => 'show', :id => ma.forge_message.id},
|
2016-05-16 16:16:24 +08:00
|
|
|
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
2016-03-17 15:09:08 +08:00
|
|
|
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
|
|
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
|
|
|
</a>
|
2015-09-28 16:14:53 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% if ma.forge_message_type == "Comment" %>
|
|
|
|
<ul class="homepageNewsList fl">
|
2016-05-16 16:16:24 +08:00
|
|
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %></a></li>
|
|
|
|
<li class="homepageNewsPubType fl"><%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
2015-09-28 16:14:53 +08:00
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了新闻:</span></li>
|
|
|
|
<li class="homepageNewsContent fl">
|
2015-09-29 15:45:52 +08:00
|
|
|
<%= link_to "#{ma.forge_message.commented.title}",
|
2016-05-16 16:16:24 +08:00
|
|
|
{:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
2016-03-17 15:09:08 +08:00
|
|
|
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
|
|
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
2015-09-28 16:14:53 +08:00
|
|
|
</li>
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|