个人动态

sw_new_course
cxt 10 years ago
parent 9320cd18d3
commit 4915f7977e

@ -75,6 +75,7 @@ class UsersController < ApplicationController
include GitlabHelper include GitlabHelper
include UserScoreHelper include UserScoreHelper
helper :user_score helper :user_score
helper :journals
# added by liuping 关注 # added by liuping 关注

@ -1,48 +1,53 @@
<% reply_links = authorize_for('issues', 'edit') -%>
<div class="resources mt15"> <div class="resources mt15">
<div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')"> <div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %> <%= 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>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo"><!--<a href="javascript:void(0);" class="newsBlue mr15">尹教授</a>--> <div class="homepagePostTo">
<% if activity.try(:author).try(:realname) == ' ' %> <% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% else %> <% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %> TO <% 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"> <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>
<div class="homepagePostSubmitContainer"> <div class="homepagePostSubmitContainer">
<div class="homepagePostAssignTo">指派给&nbsp;&nbsp;<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">指派给&nbsp;&nbsp;
<% 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>
<div class="homepagePostDeadline">时间:<%=format_date(activity.created_on) %></div> <div class="homepagePostDeadline">时间:<%=format_date(activity.created_on) %></div>
</div> </div>
<div class="homepagePostIntro" style="word-break:break-all;">(缺陷描述)<%=activity.description.html_safe %></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? %> <% if activity.attachments.any? %>
<% activity.attachments.each do |attachment| %> <% activity.attachments.each do |attachment| %>
<div style="float:left;"> <div style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
<p style="height:14px;line-height:12px;width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> <span title="<%= attachment.filename %>" id="attachment_">
<div style="max-width:55%;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;float: left;"> <%= link_to_short_attachment attachment, :class => 'homepagePostFileAtt newsBlue', :download => true -%>
<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 %>
</span> </span>
</p> <% if attachment.is_text? %>
</div> <%= 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 %>
<% end %> <% end %>
</div> </div>
@ -67,9 +72,10 @@
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="homepagePostReply"> <div class="homepagePostReply">
<div class="homepagePostReplyBanner"> <div class="homepagePostReplyBanner">
<div class="homepagePostReplyBannerCount">回复(5</div> <div class="homepagePostReplyBannerCount">回复(<%=activity.journals.count %></div>
<div class="homepagePostReplyBannerTime">2015-07-26</div> <div class="homepagePostReplyBannerTime"><%=format_date(activity.updated_on)%></div>
<div class="homepagePostReplyBannerMore"><a href="javascript:void(0);" class="replyGrey">点击展开更多回复</a> <div class="homepagePostReplyBannerMore"><a href="javascript:void(0);" class="replyGrey">点击展开更多回复</a>
</div> </div>
</div> </div>
@ -82,31 +88,34 @@
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a></div> <div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a></div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="homepagePostReplyContainer">
<div class="homepagePostReplyPortrait"> <% activity.journals.reorder("created_on desc").each do |reply| unless activity.journals.nil?%>
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像"/></a> <div class="homepagePostReplyContainer">
</div> <div class="homepagePostReplyPortrait">
<div class="homepagePostReplyDes"> <%= link_to image_tag(url_to_avatar(reply.user), :width => "45", :height => "45"), user_path(reply.user_id), :alt => "用户头像" %>
<div class="homepagePostReplyPublisher"> </div>
<a href="javascript:void(0);" class="newsBlue mr10 f14">尹教授</a> <div class="homepagePostReplyDes">
2015-08-01<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><!--<a href="javascript:void(0);" class="newsBlue fr">回复</a>--> <div class="homepagePostReplyPublisher">
</div> <% if reply.try(:user).try(:realname) == ' ' %>
<div class="homepagePostReplyContent">请大家说下软件工程是什么!</div> <%= link_to reply.try(:user), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
</div> <% else %>
<div class="cl"></div> <%= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
</div> <% end %>
<div class="homepagePostReplyContainer"> <%= format_date(reply.created_on) %>
<div class="homepagePostReplyPortrait">
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像"/></a> <!--<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a>-->
</div> </div>
<div class="homepagePostReplyDes"> <% if reply.details.any? %>
<div class="homepagePostReplyPublisher"> <% details_to_strings(reply.details).each do |string| %>
<a href="javascript:void(0);" class="newsBlue mr10 f14">Tang 学生</a> <div class="homepagePostReplyContent" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="<%=string %>"><%=string %></div>
2015-08-01<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><!--<a href="javascript:void(0);" class="newsBlue fr">回复</a>--> <% end %>
</div> <% else %>
<div class="homepagePostReplyContent">软件工程是一门研究用工程化方法构建和维护有效的、实用的和高质量的软件的学科。它涉及程序设计语言、数据库、软件开发工具、系统平台、标准、设计模式等方面。</div> <div class="homepagePostReplyContent" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="<%=reply.notes.html_safe %>"><%=reply.notes.html_safe %></div>
</div> <% end %>
<div class="cl"></div> </div>
</div> <div class="cl"></div>
</div>
<% end %>
<% end %>
</div> </div>
</div> </div>

@ -64,33 +64,33 @@
</div> </div>
<% activity= activity.parent_id.nil? ? activity:activity.parent%> <% activity= activity.parent_id.nil? ? activity:activity.parent%>
<% activity.children.reorder("created_on desc").each do |reply| unless activity.children.nil?%> <% activity.children.reorder("created_on desc").each do |reply| unless activity.children.nil?%>
<div class="homepagePostReplyContainer"> <div class="homepagePostReplyContainer">
<div class="homepagePostReplyPortrait"> <div class="homepagePostReplyPortrait">
<%= link_to image_tag(url_to_avatar(reply.author), :width => "45", :height => "45"), user_path(reply.author_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(reply.author), :width => "45", :height => "45"), user_path(reply.author_id), :alt => "用户头像" %>
</div> </div>
<div class="homepagePostReplyDes"> <div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher"> <div class="homepagePostReplyPublisher">
<% if reply.try(:author).try(:realname) == ' ' %> <% if reply.try(:author).try(:realname) == ' ' %>
<%= link_to reply.try(:author), user_path(reply.author_id), :class => "newsBlue mr10 f14" %> <%= link_to reply.try(:author), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
<% else %> <% else %>
<%= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %> <%= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
<% end %> <% end %>
<%=format_date(reply.created_on)%> <%= format_date(reply.created_on) %>
<%= link_to( <%= link_to(
l(:button_delete), l(:button_delete),
{:controller => 'messages', :action => 'destroy', :id => reply.id, :board_id => reply.board_id, :is_board => 'false'}, {:controller => 'messages', :action => 'destroy', :id => reply.id, :board_id => reply.board_id, :is_board => 'false'},
:method => :post, :method => :post,
:data => {:confirm => l(:text_are_you_sure)}, :data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete), :title => l(:button_delete),
:class => 'replyGrey fr ml10' :class => 'replyGrey fr ml10'
) if reply.course_destroyable_by?(User.current) %> ) if reply.course_destroyable_by?(User.current) %>
<!--<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a>--> <!--<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a>-->
</div> </div>
<div class="homepagePostReplyContent" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="<%= reply.content.html_safe %>"><%= reply.content.html_safe %></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>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
</div> </div>

Loading…
Cancel
Save