From 9320cd18d3bca6e093c27f124016cf7e8cb9b1f1 Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 25 Aug 2015 09:50:36 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E7=9A=84=E9=A1=B9=E7=9B=AE=E8=AE=A8=E8=AE=BA=E5=8A=A8=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_course_homework.html.erb | 6 +- app/views/users/_course_message.html.erb | 8 +-- app/views/users/_course_news.html.erb | 36 +++++++--- app/views/users/_project_message.html.erb | 82 +++++++++++++---------- 4 files changed, 83 insertions(+), 49 deletions(-) diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb index 6eeae66f9..d0b830740 100644 --- a/app/views/users/_course_homework.html.erb +++ b/app/views/users/_course_homework.html.erb @@ -10,10 +10,10 @@ <% 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" %> + <%= 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" %> + <%= link_to activity.name.to_s+"(作业名称)", student_work_index_path(:homework => activity.id), :class => "postGrey", :style=>"word-break:break-all" %>
@@ -21,7 +21,7 @@
截止时间:<%= format_date(activity.end_time) %>
-
(作业描述)<%= activity.description.html_safe %>
+
(作业描述)<%= activity.description.html_safe %>
<% if activity.parent_id.nil? %> - <%= link_to activity.subject.to_s.html_safe+"(讨论区内容)", course_boards_path(Board.where('id=?',activity.board_id).first.course_id), :class=> "postGrey" %> + <%= link_to activity.subject.to_s.html_safe+"(讨论区内容)", course_boards_path(Board.where('id=?',activity.board_id).first.course_id), :class=> "postGrey", :style=>"word-break:break-all" %> <% else %> - <%= link_to activity.parent.subject.to_s.html_safe+"(讨论区内容)", course_boards_path(Board.where('id=?',activity.board_id).first.course_id), :class=> "postGrey" %> + <%= link_to activity.parent.subject.to_s.html_safe+"(讨论区内容)", course_boards_path(Board.where('id=?',activity.board_id).first.course_id), :class=> "postGrey", :style=>"word-break:break-all"%> <% end %>
@@ -85,7 +85,7 @@ ) if reply.course_destroyable_by?(User.current) %>
-
<%= reply.content.html_safe %>
+
<%= reply.content.html_safe %>
diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb index 8bef18c59..0e82d7622 100644 --- a/app/views/users/_course_news.html.erb +++ b/app/views/users/_course_news.html.erb @@ -2,25 +2,23 @@
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %> -
-
+
<% if @ctivity.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 - <%= link_to activity.course.name.to_s+"(课程名称)", course_path(activity.course), :class => "newsBlue ml15" %> - + <%= 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" %> -
+ <%=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 %>
- + <% 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/_project_message.html.erb b/app/views/users/_project_message.html.erb index dff8d85b7..a2b97d2da 100644 --- a/app/views/users/_project_message.html.erb +++ b/app/views/users/_project_message.html.erb @@ -1,21 +1,27 @@ -<% if activity.parent_id.nil? %> +
- 用户头像 + <%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
-
+
<% 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 - <%= activity.project.name %>(项目讨论区) + <%= 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(Board.where('id=?',activity.board_id).first.project_id), :class=> "postGrey", :style=>"word-break:break-all" %> + <% else %> + <%= link_to activity.parent.subject.to_s.html_safe+"(讨论区内容)", project_boards_path(Board.where('id=?',activity.board_id).first.project_id), :class=> "postGrey", :style=>"word-break:break-all"%> + <% end %> +
时间:<%= format_date(activity.created_on) %>
@@ -35,8 +41,13 @@
-
回复(<%=activity.replies_count %>)
-
2015-07-31
+
回复( + <% if activity.parent_id.nil? %> + <%=activity.replies_count %> + <% else %> + <%=activity.parent.replies_count %> + <% end %>)
+
<%=format_date(activity.updated_on)%>
@@ -51,32 +62,35 @@
-
-
- 用户头像 -
-
-
- 黄井泉 学生 - 2015-08-01删除 -
-
很开心!
-
-
-
-
-
- 用户头像 -
-
-
- 陈正东 学生 - 2015-08-02删除 -
-
假期好热,没出去。
-
-
-
+ <% activity= activity.parent_id.nil? ? activity:activity.parent%> + <% activity.children.reorder("created_on desc").each do |reply| unless activity.children.nil?%> +
+
+ <%= 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 %> + <% end %>
-<% end %> \ No newline at end of file From d25971f546b4a2c7b731d9d0bc71b929f2a15aa6 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 25 Aug 2015 14:24:20 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=99=BB=E9=99=86=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/account_controller.rb | 9 +- app/views/account/login.html.erb | 319 +++++++++++++++++++------- app/views/layouts/login.html.erb | 151 ++---------- public/stylesheets/new_public.css | 5 +- 4 files changed, 267 insertions(+), 217 deletions(-) diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 0e2f9569c..02736346c 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -27,8 +27,9 @@ class AccountController < ApplicationController if request.get? if User.current.logged? redirect_to home_url + else + render :layout => 'login' end - # render :layout => 'login' else authenticate_user end @@ -129,10 +130,12 @@ class AccountController < ApplicationController end when '3' #register_automatically(@user) - unless @user.new_record? + if !@user.new_record? self.logged_user = @user flash[:notice] = l(:notice_account_activated) redirect_to my_account_url + else + redirect_to signin_path end else #register_manually_by_administrator(@user) @@ -355,11 +358,13 @@ class AccountController < ApplicationController def invalid_credentials logger.warn "Failed login for '#{params[:username]}' from #{request.remote_ip} at #{Time.now.utc}" flash.now[:error] = l(:notice_account_invalid_creditentials) + render :layout => 'login' end def invalid_credentials_new logger.warn "Failed login for '#{params[:username]}' from #{request.remote_ip} at #{Time.now.utc}" flash.now[:error] = l(:notice_account_invalid_creditentials_new) + render :layout => 'login' end # Register a user for email activation. diff --git a/app/views/account/login.html.erb b/app/views/account/login.html.erb index bb289eb03..93ac9fba7 100644 --- a/app/views/account/login.html.erb +++ b/app/views/account/login.html.erb @@ -1,17 +1,49 @@ -<% @nav_dispaly_home_path_label = 1 - @nav_dispaly_main_course_label = 1 - @nav_dispaly_main_project_label = 1 - @nav_dispaly_main_contest_label = 1 %> -<% @nav_dispaly_forum_label = 1%> -<%= call_hook :view_account_login_top %> - - - - - - -
-<%= form_tag(signin_path) do %> -<%= back_url_hidden_field_tag %> - - - - - - - - - -<% if Setting.openid? %> - - - - -<% end %> - - - - - - - -
- - - <%= text_field_tag 'username', params[:username], :tabindex => '1' , :value => "#{l(:label_login_prompt)}", - :onfocus => "clearInfo('username','#{l(:label_login_prompt)}')", - :onblur => "showInfo('username','#{l(:label_login_prompt)}')", - :style => "resize: none;font-size: 12px;color: #818283;"%> -
- - - <%= password_field_tag 'password', nil, :tabindex => '2' %> -
- - - <%= text_field_tag "openid_url", nil, :tabindex => '3' %> -
- <% if Setting.autologin? %> - +
+
+
+ +
欢迎加入Trustie高校创新实践社区,老师、学生和科研人员可以在此开展各种在线协同学习、协同作业、协同开发等活动。Trustie是在中国推行大规模开放在线研究模式(MOORE)的支撑平台。
+
+
+
+
+
    +
  • 登陆
  • +
  • +
+
+ +
+ <%= form_tag(signin_path,:id=>'main_login_form',:method=>'post') do %> + <%= back_url_hidden_field_tag %> +
+ <%= text_field_tag 'username', params[:username], :tabindex => '1' , + :class=>'loginSignBox',:placeholder=>'请输入邮箱地址或昵称'%> + +
+ <% if Setting.openid? %> +
+ <%= text_field_tag "openid_url", nil, :tabindex => '3',:placeholder=>'请输入OpenId URL' %> +
+ <% end %> +
+ + <%= password_field_tag 'password', nil, :tabindex => '2',:class=>'loginSignBox' ,:placeholder=>'请输密码'%> +
+
+ <% if Setting.autologin? %> +
+ <%= check_box_tag 'autologin', 1, true, :tabindex => 4 %> +
+ <%= l(:label_stay_logged_in) %> + <% end %> + + <% if Setting.lost_password? %> + 忘记密码? + <% end %> +
<% end %> -
- - - <% if Setting.lost_password? %> - <%= link_to l(:label_password_lost), lost_password_path %> - <% end %> - - - -
-<% end %> -
-<%= call_hook :view_account_login_bottom %> +
+ 登陆 +
-<% if params[:username].present? %> -<%= javascript_tag "$('#password').focus();" %> -<% else %> -<%= javascript_tag "$('#username').focus();" %> -<% end %> + + + +
+
+
    +
  • 注册<%= link_to l(:label_login_with_open_id_option), signin_url if Setting.openid? %> +
  • +
+
+
+ <%= form_for :user, :url => register_path,:method=>'post',:html=>{:id=>'main_reg_form'} do |f| %> + <%= error_messages_for 'user' %> +
+ + <%= f.text_field :mail,:size => 25, :class=>'loginSignBox' ,:placeholder=>"请输入邮箱地址"%> + +
+
+ + <%= f.password_field :password, :size => 25,:placeholder=>"请输入密码",:class=>'loginSignBox' %> + +
+
+ + <%= f.password_field :password_confirmation, :size => 25,:placeholder=>"请再次输入密码",:class=>'loginSignBox' %> + +
+
+ + <%= f.text_field :login, :size => 25,:placeholder=>"请输入用户昵称",:class=>'loginSignBox'%> + +
+
+ 注册 + +
+ <% end %> +
+
+ +
+ + diff --git a/app/views/layouts/login.html.erb b/app/views/layouts/login.html.erb index a0e7f909c..e766b27d0 100644 --- a/app/views/layouts/login.html.erb +++ b/app/views/layouts/login.html.erb @@ -1,131 +1,28 @@ - <%= stylesheet_link_tag 'new_public'%> - <%= stylesheet_link_tag 'leftside'%> + + + + + <%= h html_title %> + + + <%= csrf_meta_tag %> + <%= favicon %> + <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'new_public', 'user_leftside', :media => 'all' %> + <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %> <%= javascript_heads %> - <%= javascript_include_tag 'javascripts/jquery-1.3.2' %> - <%= javascript_include_tag 'bootstrap' %> - + <%= javascript_include_tag "bootstrap","avatars","new_user"%> + <%= heads_for_theme %> + <%= call_hook :view_layouts_base_html_head %> + <%= yield :header_tags -%> + -
-
-
- -
欢迎加入Trustie高校创新实践社区,老师、学生和科研人员可以在此开展各种在线协同学习、协同作业、协同开发等活动。Trustie是在中国推行大规模开放在线研究模式(MOORE)的支撑平台。
-
-
-
-
-
    -
  • 登陆
  • -
  • -
-
-
-
- -
-
- -
- - -
-
-
-
-
    -
  • 注册 -
  • -
-
-
-
- -
请输入有效邮箱地址
-
-
- -
至少需要 6 个字符
-
-
- -
-
- -
用户昵称为2-18个中英文,数字或下划线
-
- -
-
-
-
-
+ <% is_current_user = User.current.logged? && User.current == @user%> + <% if User.current.logged? %> + <%= render :partial => 'layouts/logined_header' %> + <% else%> + <%= render :partial => 'layouts/unlogin_header' %> + <% end%>
+<%= render_flash_messages %> +<%= yield %> diff --git a/public/stylesheets/new_public.css b/public/stylesheets/new_public.css index c2cc7d719..7878f5bb0 100644 --- a/public/stylesheets/new_public.css +++ b/public/stylesheets/new_public.css @@ -124,6 +124,7 @@ a.c_blue{ color:#15bccf;} a.c_dblue{ color:#09658c;} a:hover.c_dblue{ color:#15bccf;} a.c_white{ color:#fff;} +input.c_white { color:#fff} a.c_dorange{ color:#fd6e2a;} a.c_dark{color: #3e4040;} a:hover.c_dark{color: #3ca5c6;} @@ -612,7 +613,9 @@ a.loginChooseTab {color:#484848; height:30px; display:block;} .loginSignBox {width:308px; height:38px; margin-left:46px; border:1px solid #98a1a6; outline:none;} .loginSignOption {margin-left:46px; margin-top:15px;} .loginIn {width:405px; background-color:#ffffff; padding-bottom:30px;} -.loginSignAlert {font-size:12px; color:#fc0000; margin-left:60px;} +.loginSignAlert {font-size:12px; margin-left:60px;} +.loginSignRow {height:60px; min-height:60px;} + From 725143b89455678845e9f7c7e9dc87ab780f9431 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 25 Aug 2015 14:51:07 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E7=99=BB=E9=99=86=E7=95=8C=E9=9D=A2=20?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/account/login.html.erb | 5 ++++- app/views/layouts/login.html.erb | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/views/account/login.html.erb b/app/views/account/login.html.erb index 93ac9fba7..4b822a616 100644 --- a/app/views/account/login.html.erb +++ b/app/views/account/login.html.erb @@ -157,13 +157,16 @@
+
  • 登陆
- +
<%= flash.empty? ? "" : flash[:error].html_safe %>
+
+ <%= form_tag(signin_path,:id=>'main_login_form',:method=>'post') do %> <%= back_url_hidden_field_tag %>
diff --git a/app/views/layouts/login.html.erb b/app/views/layouts/login.html.erb index e766b27d0..0349caf13 100644 --- a/app/views/layouts/login.html.erb +++ b/app/views/layouts/login.html.erb @@ -24,5 +24,5 @@ <%= render :partial => 'layouts/unlogin_header' %> <% end%>
-<%= render_flash_messages %> + <%= yield %> From 4915f7977e6460ad2fcef740b7a2c47a5b1aee41 Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 25 Aug 2015 15:08:35 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E5=8A=A8=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 1 + app/views/users/_project_issue.html.erb | 113 ++++++++++++---------- app/views/users/_project_message.html.erb | 54 +++++------ 3 files changed, 89 insertions(+), 79 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index ca897fc3d..5ba0b6e4a 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -75,6 +75,7 @@ class UsersController < ApplicationController include GitlabHelper include UserScoreHelper helper :user_score + helper :journals # added by liuping 关注 diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb index 3b0087bb4..925625c28 100644 --- a/app/views/users/_project_issue.html.erb +++ b/app/views/users/_project_issue.html.erb @@ -1,48 +1,53 @@ +<% reply_links = authorize_for('issues', 'edit') -%>
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %> -
-
+
<% 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 - <%=activity.project.name %>(项目名称)
+ <%= link_to activity.project.name.to_s+"(项目名称)", project_path(activity.project), :class => "newsBlue ml15", :style=>"word-break:break-all" %> +
- <%=activity.subject %>(缺陷标题)<%=activity.status.name %> + <%= link_to activity.subject.to_s+"(缺陷标题)", issue_path(activity), :class => "postGrey", :style=>"word-break:break-all" %> + <%=activity.status.name %>
-
指派给  <% if activity.try(:assigned_to).try(:realname) == ' '%><%= activity.try(:assigned_to)%><% else %><%=activity.try(:assigned_to).try(:realname) %><% end %> +
指派给   + <% 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 %>
时间:<%=format_date(activity.created_on) %>
(缺陷描述)<%=activity.description.html_safe %>
-
+
<% if activity.attachments.any? %> <% activity.attachments.each do |attachment| %> -
-

-

- - <%= link_to_short_attachment attachment, :class => 'homepagePostFileAtt newsBlue', :download => true -%> - -
- <% if attachment.is_text? %> - <%= link_to image_tag('magnifier.png'), - :controller => 'attachments', - :action => 'show', - :id => attachment, - :filename => attachment.filename %> - <% end %> - - <%= number_to_human_size attachment.filesize %> +
+ + <%= link_to_short_attachment attachment, :class => 'homepagePostFileAtt newsBlue', :download => true -%> -

-
+ <% if attachment.is_text? %> + <%= link_to image_tag('magnifier.png'), + :controller => 'attachments', + :action => 'show', + :id => attachment, + :filename => attachment.filename %> + <% end %> + ( + <%= number_to_human_size attachment.filesize %>) + +
<% end %> <% end %>
@@ -67,9 +72,10 @@
+
-
回复(5)
-
2015-07-26
+
回复(<%=activity.journals.count %>)
+
<%=format_date(activity.updated_on)%>
@@ -82,31 +88,34 @@
-
-
- 用户头像 -
-
-
- 尹教授 - 2015-08-01删除 -
-
请大家说下软件工程是什么!
-
-
-
-
-
- 用户头像 -
-
-
- Tang 学生 - 2015-08-01删除 -
-
软件工程是一门研究用工程化方法构建和维护有效的、实用的和高质量的软件的学科。它涉及程序设计语言、数据库、软件开发工具、系统平台、标准、设计模式等方面。
-
-
-
+ + <% 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 %>
\ 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 a2b97d2da..248be6143 100644 --- a/app/views/users/_project_message.html.erb +++ b/app/views/users/_project_message.html.erb @@ -64,33 +64,33 @@
<% activity= activity.parent_id.nil? ? activity:activity.parent%> <% activity.children.reorder("created_on desc").each do |reply| unless activity.children.nil?%> -
-
- <%= 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 %> +
+
+ <%= 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 %> <% end %>