From 7e76a32480ddd8f50bb6d0be27d1af37e5b7fd99 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 31 Dec 2015 15:36:42 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE/=E8=AF=BE=E7=A8=8B=E8=AE=A8?= =?UTF-8?q?=E8=AE=BA=E5=8C=BA=E7=9A=84=E5=8A=A8=E6=80=81=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_course_message.html.erb | 39 ++++++++++++++++------- app/views/users/_project_message.html.erb | 29 ++++++++++++++++- config/routes.rb | 4 +-- 3 files changed, 58 insertions(+), 14 deletions(-) diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb index 4996f7730..3633b2134 100644 --- a/app/views/users/_course_message.html.erb +++ b/app/views/users/_course_message.html.erb @@ -1,4 +1,4 @@ -
+
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id,:host=>Setting.host_user), :alt => "用户头像" %> @@ -43,17 +43,34 @@
- +
+ <% end %>
diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb index b9ebc2135..c31e4ac2e 100644 --- a/app/views/users/_project_message.html.erb +++ b/app/views/users/_project_message.html.erb @@ -1,4 +1,4 @@ -
+
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %> @@ -44,6 +44,33 @@
+ <% if activity.author.id == User.current.id%> + + <% end %>
diff --git a/config/routes.rb b/config/routes.rb index 9326ac61e..e64670ff2 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -413,12 +413,12 @@ RedmineApp::Application.routes.draw do match 'boards/:id/join_to_org_subfields', :to => 'boards#join_to_org_subfields' get 'boards/:board_id/topics/:id', :to => 'messages#show', :as => 'board_message' match 'boards/:board_id/topics/quote/:id', :to => 'messages#quote', :via => [:get, :post] - get 'boards/:board_id/topics/:id/edit', :to => 'messages#edit' + get 'boards/:board_id/topics/:id/edit', :to => 'messages#edit',:as=>'edit_board_message' post 'boards/:board_id/topics/preview', :to => 'messages#preview', :as => 'preview_board_message' post 'boards/:board_id/topics/:id/replies', :to => 'messages#reply' post 'boards/:board_id/topics/:id/edit', :to => 'messages#edit' - post 'boards/:board_id/topics/:id/destroy', :to => 'messages#destroy' + post 'boards/:board_id/topics/:id/destroy', :to => 'messages#destroy',:as=>'delete_board_message' match 'messages/join_org_subfield', :to => 'messages#join_org_subfield' match 'messages/get_subfield_on_click_org', :to => 'messages#get_subfield_on_click_org' match 'messages/join_org_subfields', :to => 'messages#join_org_subfields'