- <%= image_tag(url_to_avatar(@user),width:"206", height: "206", :id=>'nh_user_tx') %>
+
+ <%= image_tag(url_to_avatar(@user),width:"78", height: "78", :id=>'nh_user_tx') %>
<% if User.current.logged?%>
<% if is_current_user%>
@@ -46,16 +46,18 @@
<% end %>
<% end%>
-
-
+
+
<% if (@user.user_extensions && (@user.user_extensions.identity != 2) ) %>
-
+
<% end %>
- <%= link_to("编辑资料", my_account_path, :class => "fr gz_btn mr10") if is_current_user%>
+
教授
+ <%= link_to("编辑资料", my_account_path, :class => "fl gz_btn mr10") if is_current_user%>
+
-
diff --git a/app/views/mailer/send_for_user_activities.html.erb b/app/views/mailer/send_for_user_activities.html.erb
index 0233f7a42..6fc742c99 100644
--- a/app/views/mailer/send_for_user_activities.html.erb
+++ b/app/views/mailer/send_for_user_activities.html.erb
@@ -187,7 +187,7 @@
<% if @issues.first || @project_messages.first || @issues_journals.first || @wiki_contents.first || @project_news.first || @project_news_comments.first || @project_journal_messages.first ||
- @project_news_comments.first %>
+ @project_attachments.first %>
<%= l(:label_project_overview_new)%>
<% unless @issues.first.nil? || @issues_journals.first.nil? %>
diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb
index c25363323..688d7e2ac 100644
--- a/app/views/my/account.html.erb
+++ b/app/views/my/account.html.erb
@@ -1,5 +1,5 @@
-
+
- 基本资料
diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb
index 0cb3aa25e..88a00e8ab 100644
--- a/app/views/users/_course_homework.html.erb
+++ b/app/views/users/_course_homework.html.erb
@@ -4,16 +4,16 @@
<%= link_to image_tag(url_to_avatar(activity.user), :width => "90", :height => "90"), user_path(activity.user_id), :alt => "用户头像" %>
-
+
<% if activity.try(:user).try(:realname) == ' ' %>
<%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %>
<% else %>
<%= link_to activity.try(:user).try(:realname), user_path(activity.user_id), :class => "newsBlue mr15" %>
- <% end %> TO
- <%= link_to activity.course.name.to_s+"(课程名称)", course_path(activity.course_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
+ <% end %> TO
+ <%= link_to activity.course.name.to_s+" | 课程作业", course_path(activity.course_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
-
- <%= link_to activity.name.to_s+"(作业名称)", student_work_index_path(:homework => activity.id), :class => "postGrey", :style=>"word-break:break-all" %>
+
+ <%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id), :class => "postGrey", :style=>"word-break:break-all" %>
@@ -21,7 +21,16 @@
截止时间:<%= format_date(activity.end_time) %>
-
(作业描述)<%= activity.description.html_safe %>
+
+ 作业描述:<%= activity.description.html_safe %>
+
+
-
diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb
index e84e6a316..ff7e43105 100644
--- a/app/views/users/_course_message.html.erb
+++ b/app/views/users/_course_message.html.erb
@@ -11,19 +11,22 @@
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %>
TO
- <%= link_to activity.course.name.to_s+"(课程讨论区)", course_path(activity.course), :class => "newsBlue ml15 mr5", :style=>"word-break:break-all"%>
+ <%= link_to activity.course.name.to_s+" | 课程讨论区", course_path(activity.course), :class => "newsBlue ml15 mr5", :style=>"word-break:break-all"%>
+ <%#= link_to activity.course.name.to_s+"(课程讨论区)", course_path(activity.course), :class => "newsBlue ml15 mr5", :style=>"word-break:break-all"%>
- <% if activity.parent_id.nil? %>
- <%= link_to activity.subject.to_s.html_safe+"(帖子标题)", course_boards_path(activity.course,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all" %>
+ <% if activity.parent_id.nil? %>
+ <%= link_to activity.subject.to_s.html_safe, course_boards_path(activity.course,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all" %>
<% else %>
- <%= link_to activity.parent.subject.to_s.html_safe+"(帖子标题)", course_boards_path(activity.course,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all"%>
+ <%= link_to activity.parent.subject.to_s.html_safe, course_boards_path(activity.course,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all"%>
<% end %>
-
时间:<%= format_date(activity.created_on) %>
+
发帖时间:<%= format_date(activity.created_on) %>
-
(描述)
+
+
+
帖子描述:
<% if activity.parent_id.nil? %>
<%= activity.content.to_s.html_safe%>
<% else %>
@@ -44,20 +47,26 @@
-
-
+
+ <% activity= activity.parent_id.nil? ? activity:activity.parent%>
+ <% replies_all_i = 0 %>
+ <% unless activity.children.empty? %>
+
+
+ <% activity.children.reorder("created_on desc").each do |reply|%>
+ <% replies_all_i=replies_all_i+1 %>
+ -
+
+ <%= link_to image_tag(url_to_avatar(reply.author), :width => "45", :height => "45"), user_path(reply.author_id), :alt => "用户头像" %>
+
+
+
+ <% 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) %>
+
+
+
<%= reply.content.html_safe %>
+
+
+
+ <% end %>
+
-
<%#= reply.content.html_safe %>
-
-
-
- <%# end %>
- <%# end %>
-
-->
+ <% end %>
+
diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb
index ce85e0cad..603901ae4 100644
--- a/app/views/users/_course_news.html.erb
+++ b/app/views/users/_course_news.html.erb
@@ -1,5 +1,5 @@
-
+
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
@@ -9,17 +9,18 @@
<%= 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
- <%= link_to activity.course.name.to_s+"(课程名称)", course_path(activity.course), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
+ <% end %> TO
+ <%= link_to activity.course.name.to_s+" | 课程通知", course_path(activity.course), :class => "newsBlue ml15", :style => "word-break:break-all" %>
-
- <%=link_to activity.title.to_s+"(通知标题)", news_path(activity), :class=> "postGrey", :style=>"word-break:break-all" %>
+
+ <%= link_to activity.title.to_s, news_path(activity), :class => "postGrey", :style => "word-break:break-all" %>
发布时间:<%= format_date(activity.created_on) %>
-
(通知描述)<%= activity.description.html_safe %>
-
+
通知描述:<%= activity.description.html_safe %>
+
+
-
<%#= render :partial => 'course_news_reply',:locals => { :contest => @contest, :journals => @jour, :state => false}%>
-
- <%#= form_tag({:controller => 'comments', :action => 'create', :id => activity}, :id => "add_reply_form") do %>
-
-
-
取消
+
+ <% replies_all_i = 0 %>
+ <% unless activity.comments.empty? %>
+
+
+ <% activity.comments.reorder("created_on desc").each do |comment| %>
+ <% replies_all_i=replies_all_i+1 %>
+ -
+
+ <%= link_to image_tag(url_to_avatar(comment.author), :width => "45", :height => "45"), user_path(comment.author_id), :alt => "用户头像" %>
+
+
+
+ <% if comment.try(:author).try(:realname) == ' ' %>
+ <%= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
+ <% else %>
+ <%= link_to comment.try(:author).try(:realname), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
+ <% end %>
+ <%= format_date(comment.created_on) %>
+ <%= link_to_if_authorized_course l(:button_delete), {:controller => 'comments', :action => 'destroy', :id => activity, :comment_id => comment},
+ :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %>
+
+
+
<%= comment.comments.html_safe %>
+
+
+
+ <% end %>
+
-
-
- <%# end %>
+ <% end %>
- <%# activity.comments.reorder("created_on desc").each do |comment| unless activity.comments.nil?%>
-
-
- <%#= link_to image_tag(url_to_avatar(comment.author), :width => "45", :height => "45"), user_path(comment.author_id), :alt => "用户头像" %>
-
-
-
- <%# if comment.try(:author).try(:realname) == ' ' %>
- <%#= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
- <%# else %>
- <%#= link_to comment.try(:author).try(:realname), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
- <%# end %>
- <%#=format_date(comment.created_on)%>
- <%#= link_to_if_authorized_course l(:button_delete), {:controller => 'comments', :action => 'destroy', :id => activity, :comment_id => comment},
- :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %>
- <!–
删除–>
-
-
<%#= comment.comments.html_safe %>
-
-
-
- <%# end %>
- <%# end %>
-
-->
\ No newline at end of file
diff --git a/app/views/users/_course_poll.html.erb b/app/views/users/_course_poll.html.erb
index 0c93e7627..f0a2a8aba 100644
--- a/app/views/users/_course_poll.html.erb
+++ b/app/views/users/_course_poll.html.erb
@@ -1,4 +1,4 @@
-<%# has_commit = has_commit_poll?(activity.id ,User.current)%>
+<% has_commit = has_commit_poll?(activity.id ,User.current)%>
<% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%>
@@ -14,21 +14,21 @@
<%= link_to activity.try(:user).try(:realname), user_path(activity.user_id), :class => "newsBlue mr15" %>
<% end %>
TO
- <%= link_to Course.find(activity.polls_group_id).name.to_s+"(课程名称)", course_path(activity.polls_group_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
+ <%= link_to Course.find(activity.polls_group_id).name.to_s+" | 问卷", course_path(activity.polls_group_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
- <%#= link_to activity.polls_name.to_s+"(问卷名称)", %>
- <%# if has_commit %>
- <%#= link_to poll_name, poll_result_poll_path(activity.id), :class => "polls_title polls_title_w fl c_dblue"%>
- <%# else %>
- <%= link_to poll_name+"(问卷名称)", poll_path(activity.id), :class => "postGrey"%>
- <%# end %>
+ <%#= link_to activity.polls_name.to_s/*+"(问卷名称)"*/, %>
+ <% if has_commit %>
+ <%= link_to poll_name, poll_result_poll_path(activity.id), :class => "postGrey"%>
+ <% else %>
+ <%= link_to poll_name, poll_path(activity.id), :class => "postGrey"%>
+ <% end %>
-
时间:<%= format_date(activity.created_at) %>
+
发布时间:<%= format_date(activity.published_at) %>
-
(问卷描述)<%=activity.polls_description.to_s%>
+
问卷描述:<%=activity.polls_description.html_safe.to_s%>
-
diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb
index c097f6c41..0ee4f30fb 100644
--- a/app/views/users/_project_issue.html.erb
+++ b/app/views/users/_project_issue.html.erb
@@ -10,11 +10,11 @@
<% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %> TO
- <%= link_to activity.project.name.to_s+"(项目名称)", project_path(activity.project), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
+ <%= link_to activity.project.name.to_s+" | 项目缺陷", project_path(activity.project), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
- <%= link_to activity.subject.to_s+"(缺陷标题)", issue_path(activity), :class => "postGrey", :style=>"word-break:break-all" %>
- <%=activity.status.name %>
+ <%= link_to activity.subject.to_s, issue_path(activity), :class => "postGrey", :style=>"word-break:break-all" %>
+ <%= get_issue_priority(activity.priority_id)[1] %>
指派给
@@ -28,7 +28,7 @@
时间:<%=format_date(activity.created_on) %>
-
(缺陷描述)<%=activity.description.html_safe %>
+
缺陷描述:<%= activity.description.html_safe %>
<% if activity.attachments.any? %>
<% activity.attachments.each do |attachment| %>
@@ -70,15 +70,21 @@
-
-
+
+ <% replies_all_i = 0 %>
+ <% unless activity.journals.empty? %>
+
+
+ <% activity.journals.reorder("created_on desc").each do |reply| %>
+ <% replies_all_i=replies_all_i+1 %>
+ -
+
+ <%= link_to image_tag(url_to_avatar(reply.user), :width => "45", :height => "45"), user_path(reply.user_id), :alt => "用户头像" %>
+
+
+
+ <% 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) %>
- <%# activity.journals.reorder("created_on desc").each do |reply| unless activity.journals.nil?%>
-
-
- <%#= link_to image_tag(url_to_avatar(reply.user), :width => "45", :height => "45"), user_path(reply.user_id), :alt => "用户头像" %>
-
-
-
- <%# 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) %>
-
- #<!–
删除–>
-
- <%# if reply.details.any? %>
- <%# details_to_strings(reply.details).each do |string| %>
-
<%#=string %>
- <%# end %>
- <%# else %>
-
<%#=reply.notes.html_safe %>
- <%# end %>
-
-
-
- <%# end %>
- <%# end %>
-
-->
+
+
+ <% if reply.details.any? %>
+ <% details_to_strings(reply.details).each do |string| %>
+ <%= string %>
+ <% end %>
+ <% else %>
+ <%= reply.notes.html_safe %>
+ <% end %>
+
+
+
+ <% end %>
+
+
+ <% end %>
+
\ No newline at end of file
diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb
index 57b021467..e60676ac6 100644
--- a/app/views/users/_project_message.html.erb
+++ b/app/views/users/_project_message.html.erb
@@ -11,20 +11,26 @@
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %>
TO
- <%= link_to activity.project.name.to_s+"(项目讨论区)", project_path(activity.project), :class => "newsBlue ml15 mr5", :style=>"word-break:break-all"%>
+ <%= link_to activity.project.name.to_s+" | 项目讨论区",project_path(activity.project), :class => "newsBlue ml15 mr5", :style=>"word-break:break-all"%>
<% if activity.parent_id.nil? %>
- <%= link_to activity.subject.to_s.html_safe+"(帖子标题)", project_boards_path(activity.project,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all" %>
+ <%= link_to activity.subject.to_s.html_safe, project_boards_path(activity.project,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all" %>
<% else %>
- <%= link_to activity.parent.subject.to_s.html_safe+"(帖子标题)", project_boards_path(activity.project,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all"%>
+ <%= link_to activity.parent.subject.to_s.html_safe, project_boards_path(activity.project,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all"%>
<% end %>
时间:<%= format_date(activity.created_on) %>
-
(描述)<%= activity.content.html_safe %>
+
帖子描述:
+ <% if activity.parent_id.nil? %>
+ <%= activity.content.to_s.html_safe%>
+ <% else %>
+ <%= activity.parent.content.to_s.html_safe%>
+ <% end %>
+