202 lines
14 KiB
Plaintext
202 lines
14 KiB
Plaintext
<% if ma.class == ForgeMessage %>
|
|
<!--申请加入项目-->
|
|
<% if ma.forge_message_type == "AppliedProject" %>
|
|
<ul class="homepageNewsList fl">
|
|
<li class="homepageNewsPortrait fl">
|
|
<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>
|
|
</li>
|
|
<li class="homepageNewsPubType fl">
|
|
<%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
|
<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.project, settings_project_path(:id => ma.project, :tab => "members"), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
|
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
|
</a>
|
|
</li>
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
</ul>
|
|
<% end %>
|
|
<!--被管理员拉入项目-->
|
|
<% if ma.forge_message_type == "JoinProject" %>
|
|
<% unless ma.project.nil? %>
|
|
<ul class="homepageNewsList fl">
|
|
<li class="homepageNewsPortrait fl">
|
|
<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>
|
|
</li>
|
|
<li class="homepageNewsPubType fl">
|
|
<%=link_to User.find(ma.forge_message_id), user_path(User.find(ma.forge_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
|
<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.project, project_member_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
|
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
|
</a>
|
|
</li>
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
</ul>
|
|
<% end %>
|
|
<% end %>
|
|
<!--被管理员移出项目-->
|
|
<% if ma.forge_message_type == "RemoveFromProject" %>
|
|
<% unless ma.project.nil? %>
|
|
<ul class="homepageNewsList fl">
|
|
<li class="homepageNewsPortrait fl">
|
|
<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>
|
|
</li>
|
|
<li class="homepageNewsPubType fl">
|
|
<%=link_to User.find(ma.forge_message_id), user_path(User.find(ma.forge_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
|
<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.project, member_project_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
|
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
|
</a>
|
|
</li>
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
</ul>
|
|
<% end %>
|
|
<% end %>
|
|
<!--邀请加入项目-->
|
|
<% if ma.forge_message_type == "ProjectInvite" %>
|
|
<% inviter = User.find(ma.forge_message_id) %>
|
|
<ul class="homepageNewsList fl">
|
|
<li class="homepageNewsPortrait fl">
|
|
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(inviter), :width => "30", :height => "30"), user_path(inviter), :target => '_blank' %></a>
|
|
</li>
|
|
<li class="homepageNewsPubType fl">
|
|
<%=link_to inviter, user_path(inviter), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
|
<span class='<%= ma.viewed == 0 ? 'homepageNewsTypeNotRead fl' : 'homepageNewsType fl' %>'>邀请你加入项目:</span>
|
|
</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),
|
|
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
|
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
|
</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",
|
|
:style => "color:#fff", :target => '_blank' %>
|
|
</li>
|
|
<% end %>
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
</ul>
|
|
<% end %>
|
|
<% if ma.forge_message_type == "Issue" %>
|
|
<% if ma.status == 1%>
|
|
<ul class="homepageNewsList fl">
|
|
<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' %>
|
|
<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">
|
|
<%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
|
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
|
</a>
|
|
</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">
|
|
<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' %>
|
|
<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">
|
|
<%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
|
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
|
</a>
|
|
</li>
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
</ul>
|
|
<% end %>
|
|
<% end %>
|
|
<% if ma.forge_message_type == "Journal" %>
|
|
<ul class="homepageNewsList fl">
|
|
<li class="homepageNewsPortrait fl">
|
|
<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>
|
|
</li>
|
|
<li class="homepageNewsPubType fl">
|
|
<%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
|
<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,
|
|
issue_path(:id => ma.forge_message.journalized_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
|
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
|
</a>
|
|
</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">
|
|
<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' %>
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %></span></li>
|
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
|
<%= link_to ma.forge_message.subject, project_boards_path(ma.forge_message.project,
|
|
:parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,
|
|
:topic_id => ma.forge_message.id), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
|
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
|
</a>
|
|
</li>
|
|
<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">
|
|
<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' %>
|
|
<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},
|
|
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
|
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
|
</a>
|
|
</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">
|
|
<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' %>
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了新闻:</span></li>
|
|
<li class="homepageNewsContent fl">
|
|
<%= link_to "#{ma.forge_message.commented.title}",
|
|
{:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
|
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
|
</li>
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
</ul>
|
|
<% end %>
|
|
<% end %> |