个人动态
This commit is contained in:
parent
9320cd18d3
commit
4915f7977e
|
@ -75,6 +75,7 @@ class UsersController < ApplicationController
|
|||
include GitlabHelper
|
||||
include UserScoreHelper
|
||||
helper :user_score
|
||||
helper :journals
|
||||
|
||||
# added by liuping 关注
|
||||
|
||||
|
|
|
@ -1,48 +1,53 @@
|
|||
<% reply_links = authorize_for('issues', 'edit') -%>
|
||||
<div class="resources mt15">
|
||||
<div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
|
||||
<div class="homepagePostPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
|
||||
<!--<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a>-->
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo"><!--<a href="javascript:void(0);" class="newsBlue mr15">尹教授</a>-->
|
||||
<div class="homepagePostTo">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% end %> TO
|
||||
<a href="javascript:void(0);" class="newsBlue ml15"><%=activity.project.name %>(项目名称)</a></div>
|
||||
<%= link_to activity.project.name.to_s+"(项目名称)", project_path(activity.project), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
|
||||
</div>
|
||||
<div class="homepagePostTitle">
|
||||
<a href="javascript:void(0);" class="postGrey"><%=activity.subject %>(缺陷标题)</a><span class="homepagePostProjectState"><%=activity.status.name %></span>
|
||||
<%= link_to activity.subject.to_s+"(缺陷标题)", issue_path(activity), :class => "postGrey", :style=>"word-break:break-all" %>
|
||||
<span class="homepagePostProjectState"><%=activity.status.name %></span>
|
||||
</div>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
<div class="homepagePostAssignTo">指派给 <a href="javascript:void(0);" class="newsBlue mr15"><% if activity.try(:assigned_to).try(:realname) == ' '%><%= activity.try(:assigned_to)%><% else %><%=activity.try(:assigned_to).try(:realname) %><% end %></a>
|
||||
<div class="homepagePostAssignTo">指派给
|
||||
<% unless activity.assigned_to_id.nil? %>
|
||||
<% if activity.try(:assigned_to).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:assigned_to), user_path(activity.assigned_to_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:assigned_to).try(:realname), user_path(activity.assigned_to_id), :class => "newsBlue mr15" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="homepagePostDeadline">时间:<%=format_date(activity.created_on) %></div>
|
||||
</div>
|
||||
<div class="homepagePostIntro" style="word-break:break-all;">(缺陷描述)<%=activity.description.html_safe %></div>
|
||||
<div class="attachments" style="font-weight:normal;">
|
||||
<div class="mt10" style="font-weight:normal;">
|
||||
<% if activity.attachments.any? %>
|
||||
<% activity.attachments.each do |attachment| %>
|
||||
<div style="float:left;">
|
||||
<p style="height:14px;line-height:12px;width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<div style="max-width:55%;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;float: left;">
|
||||
<span title="<%= attachment.filename %>" id="attachment_">
|
||||
<%= link_to_short_attachment attachment, :class => 'homepagePostFileAtt newsBlue', :download => true -%>
|
||||
</span>
|
||||
</div>
|
||||
<% if attachment.is_text? %>
|
||||
<%= link_to image_tag('magnifier.png'),
|
||||
:controller => 'attachments',
|
||||
:action => 'show',
|
||||
:id => attachment,
|
||||
:filename => attachment.filename %>
|
||||
<% end %>
|
||||
<span class="postAttSize">
|
||||
<%= number_to_human_size attachment.filesize %>
|
||||
<div style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
|
||||
<span title="<%= attachment.filename %>" id="attachment_">
|
||||
<%= link_to_short_attachment attachment, :class => 'homepagePostFileAtt newsBlue', :download => true -%>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<% if attachment.is_text? %>
|
||||
<%= link_to image_tag('magnifier.png'),
|
||||
:controller => 'attachments',
|
||||
:action => 'show',
|
||||
:id => attachment,
|
||||
:filename => attachment.filename %>
|
||||
<% end %>
|
||||
<span class="postAttSize">(
|
||||
<%= number_to_human_size attachment.filesize %>)
|
||||
</span>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
@ -67,9 +72,10 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="homepagePostReply">
|
||||
|
||||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复(5)</div>
|
||||
<div class="homepagePostReplyBannerTime">2015-07-26</div>
|
||||
<div class="homepagePostReplyBannerCount">回复(<%=activity.journals.count %>)</div>
|
||||
<div class="homepagePostReplyBannerTime"><%=format_date(activity.updated_on)%></div>
|
||||
<div class="homepagePostReplyBannerMore"><a href="javascript:void(0);" class="replyGrey">点击展开更多回复</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -82,31 +88,34 @@
|
|||
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="homepagePostReplyContainer">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像"/></a>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<a href="javascript:void(0);" class="newsBlue mr10 f14">尹教授</a>
|
||||
2015-08-01<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><!--<a href="javascript:void(0);" class="newsBlue fr">回复</a>-->
|
||||
</div>
|
||||
<div class="homepagePostReplyContent">请大家说下软件工程是什么!</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="homepagePostReplyContainer">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像"/></a>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<a href="javascript:void(0);" class="newsBlue mr10 f14">Tang 学生</a>
|
||||
2015-08-01<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><!--<a href="javascript:void(0);" class="newsBlue fr">回复</a>-->
|
||||
</div>
|
||||
<div class="homepagePostReplyContent">软件工程是一门研究用工程化方法构建和维护有效的、实用的和高质量的软件的学科。它涉及程序设计语言、数据库、软件开发工具、系统平台、标准、设计模式等方面。</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<% activity.journals.reorder("created_on desc").each do |reply| unless activity.journals.nil?%>
|
||||
<div class="homepagePostReplyContainer">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(reply.user), :width => "45", :height => "45"), user_path(reply.user_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if reply.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to reply.try(:user), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= format_date(reply.created_on) %>
|
||||
|
||||
<!--<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a>-->
|
||||
</div>
|
||||
<% if reply.details.any? %>
|
||||
<% details_to_strings(reply.details).each do |string| %>
|
||||
<div class="homepagePostReplyContent" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="<%=string %>"><%=string %></div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="homepagePostReplyContent" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="<%=reply.notes.html_safe %>"><%=reply.notes.html_safe %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
|
@ -64,33 +64,33 @@
|
|||
</div>
|
||||
<% activity= activity.parent_id.nil? ? activity:activity.parent%>
|
||||
<% activity.children.reorder("created_on desc").each do |reply| unless activity.children.nil?%>
|
||||
<div class="homepagePostReplyContainer">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(reply.author), :width => "45", :height => "45"), user_path(reply.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if reply.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to reply.try(:author), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%=format_date(reply.created_on)%>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
{:controller => 'messages', :action => 'destroy', :id => reply.id, :board_id => reply.board_id, :is_board => 'false'},
|
||||
:method => :post,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete),
|
||||
:class => 'replyGrey fr ml10'
|
||||
) if reply.course_destroyable_by?(User.current) %>
|
||||
<!--<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a>-->
|
||||
</div>
|
||||
<div class="homepagePostReplyContent" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="<%= reply.content.html_safe %>"><%= reply.content.html_safe %></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="homepagePostReplyContainer">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(reply.author), :width => "45", :height => "45"), user_path(reply.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if reply.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to reply.try(:author), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= format_date(reply.created_on) %>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
{:controller => 'messages', :action => 'destroy', :id => reply.id, :board_id => reply.board_id, :is_board => 'false'},
|
||||
:method => :post,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete),
|
||||
:class => 'replyGrey fr ml10'
|
||||
) if reply.course_destroyable_by?(User.current) %>
|
||||
<!--<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a>-->
|
||||
</div>
|
||||
<div class="homepagePostReplyContent" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="<%= reply.content.html_safe %>"><%= reply.content.html_safe %></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue