diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 0d9588d24..273d48ccf 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -1910,6 +1910,14 @@ class UsersController < ApplicationController
end
end
+ def user_organizations
+ @user = User.current
+ @orgs = @user.organizations
+ respond_to do |format|
+ format.html {render :layout => 'static_base'}
+ end
+ end
+
private
def find_user
diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb
index ffda9c559..6e62e2d5e 100644
--- a/app/views/layouts/_logined_header.html.erb
+++ b/app/views/layouts/_logined_header.html.erb
@@ -86,6 +86,9 @@
- 发帖时间:<%= format_activity_day(document.created_at) %> <%= format_time(document.created_at, false) %>
+ 发布时间:<%= format_activity_day(document.created_at) %> <%= format_time(document.created_at, false) %>
<% unless document.content.blank? %>
<%= document.content.html_safe %>
diff --git a/app/views/users/user_organizations.html.erb b/app/views/users/user_organizations.html.erb
new file mode 100644
index 000000000..855dc9c95
--- /dev/null
+++ b/app/views/users/user_organizations.html.erb
@@ -0,0 +1,35 @@
+<%= stylesheet_link_tag 'pleft','header','new_user','repository','org' %>
+<%#= stylesheet_link_tag 'pleft','prettify','jquery/jquery-ui-1.9.2','header','new_user','repository','org' %>
+
+
+
+
+ <% @orgs.each do |org| %>
+
+
+ <%= link_to image_tag(url_to_avatar(org), :width => '78', :height => '78', :alt => '组织logo'), :class => "linkGrey2" %>
+
+
+
+ <%= link_to org.name, organization_path(org), :class => 'f16 linkBlue' %>
+
+
<%= org.description %>
+
创建者:<%= link_to User.find(org.creator_id), user_path(org.creator_id), :class => 'linkGrey2', :target => '_blank' %>
+
创建时间:<%= format_activity_day(org.created_at) %> <%= format_time(org.created_at, false) %>
+
您的身份:<%= User.current.admin_of_org?(org) ? "组织管理员" : "组织成员" %>
+
+
+
+
+ <% end %>
+
+
+
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index b7acc3bfa..1ea62752b 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -439,6 +439,7 @@ RedmineApp::Application.routes.draw do
post 'import_resources_to_homework'
get 'dealwith_apply_request'
get 'store_selected_resource'
+ get 'user_organizations'
# end
end
#resources :blogs
@@ -485,7 +486,7 @@ RedmineApp::Application.routes.draw do
################# added by william
match 'users/tag_save', :via => :post, :as => 'tag'
match 'users/tag_saveEx', :via => [:get, :post]
-
+ #get 'users/:id/user_organizations', :to => 'users#user_organizations', :as => 'user_organizations'
post 'watchers/watch', :to => 'watchers#watch', :as => 'watch'
delete 'watchers/watch', :to => 'watchers#unwatch'
get 'watchers/new', :to => 'watchers#new'
diff --git a/public/stylesheets/org.css b/public/stylesheets/org.css
index 9b44be938..c8116003e 100644
--- a/public/stylesheets/org.css
+++ b/public/stylesheets/org.css
@@ -43,4 +43,10 @@ a.cancelBtn:hover {background-color:#717171; color:#ffffff;}
.relatedList ul li {border-bottom:1px solid #e4e4e4; width:320px; height:22px; vertical-align:middle; line-height:22px;}
.relatedListName {width:240px; text-align:left; max-width:240px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;}
.relatedListOption {width:80px; text-align:center;}
-.relateOrgName {width:240px; max-width:240px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;color:#656565;}
\ No newline at end of file
+.relateOrgName {width:240px; max-width:240px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;color:#656565;}
+
+/*组织列表*/
+.mt28 {margin-top:28px;}
+.orgWrap {width:880px; float:left;}
+.orgTitle {width:880px; max-width:880px; margin-bottom:5px;word-break: break-all; word-wrap:break-word; }
+.orgIntro {width:880px; max-width:880px; margin-bottom:6px; color:#484848;}
\ No newline at end of file