添加我的组织页面及修改bug
This commit is contained in:
parent
866c2feaa1
commit
3451ced888
|
@ -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
|
||||
|
|
|
@ -86,6 +86,9 @@
|
|||
<li>
|
||||
<%= link_to "修改资料", my_account_path, :class => "menuGrey"%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "我的组织", user_organizations_user_path(:id => User.current.id), :class => "menuGrey"%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "新建组织", new_organization_path, :class => "menuGrey"%>
|
||||
</li>
|
||||
|
|
|
@ -76,17 +76,17 @@
|
|||
<div class="homepageLeftMenuBlock">
|
||||
<%= link_to "动态",organization_path(@organization), :class => "homepageMenuText" %>
|
||||
</div>
|
||||
<div class="homepageLeftMenuBlock"><a href="javascript:void(0);" class="homepageMenuText">项目</a><a href="javascript:void(0);" class="homepageMenuSetting fr" title="关联您的已有项目"></a></div>
|
||||
<div class="homepageLeftMenuCourses borderBottomNone">
|
||||
<ul style="display:none;">
|
||||
<li class="homepageLeftMenuCoursesLine"><a href="javascript:void(0);" class="coursesLineGrey">项目名称一</a></li>
|
||||
<li class="homepageLeftMenuCoursesLine"><a href="javascript:void(0);" class="coursesLineGrey">项目名称二</a></li>
|
||||
<li class="homepageLeftMenuCoursesLine"><a href="javascript:void(0);" class="coursesLineGrey">项目名称三</a></li>
|
||||
<li class="homepageLeftMenuCoursesLine"><a href="javascript:void(0);" class="coursesLineGrey">项目名称四</a></li>
|
||||
<li class="homepageLeftMenuCoursesLine"><a href="javascript:void(0);" class="coursesLineGrey">项目名称五</a></li>
|
||||
<li class="homepageLeftMenuMore"><a href="javascript:void(0);" class="homepageLeftMenuMoreIcon"></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!--<div class="homepageLeftMenuBlock"><a href="javascript:void(0);" class="homepageMenuText">项目</a><a href="javascript:void(0);" class="homepageMenuSetting fr" title="关联您的已有项目"></a></div>-->
|
||||
<!--<div class="homepageLeftMenuCourses borderBottomNone">-->
|
||||
<!--<ul style="display:none;">-->
|
||||
<!--<li class="homepageLeftMenuCoursesLine"><a href="javascript:void(0);" class="coursesLineGrey">项目名称一</a></li>-->
|
||||
<!--<li class="homepageLeftMenuCoursesLine"><a href="javascript:void(0);" class="coursesLineGrey">项目名称二</a></li>-->
|
||||
<!--<li class="homepageLeftMenuCoursesLine"><a href="javascript:void(0);" class="coursesLineGrey">项目名称三</a></li>-->
|
||||
<!--<li class="homepageLeftMenuCoursesLine"><a href="javascript:void(0);" class="coursesLineGrey">项目名称四</a></li>-->
|
||||
<!--<li class="homepageLeftMenuCoursesLine"><a href="javascript:void(0);" class="coursesLineGrey">项目名称五</a></li>-->
|
||||
<!--<li class="homepageLeftMenuMore"><a href="javascript:void(0);" class="homepageLeftMenuMoreIcon"></a></li>-->
|
||||
<!--</ul>-->
|
||||
<!--</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="homepageRight">
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
</div>
|
||||
<div class="homepagePostTitle postGrey"><%= document.title %></div>
|
||||
<div class="homepagePostDate">
|
||||
发帖时间:<%= format_activity_day(document.created_at) %> <%= format_time(document.created_at, false) %></div>
|
||||
发布时间:<%= format_activity_day(document.created_at) %> <%= format_time(document.created_at, false) %></div>
|
||||
<% unless document.content.blank? %>
|
||||
<div class="homepagePostIntro">
|
||||
<%= document.content.html_safe %>
|
||||
|
|
|
@ -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' %>
|
||||
<div class="homepageContentContainer">
|
||||
<div class="homepageContent">
|
||||
<div class="postContainer">
|
||||
<div class="postBanner" style="padding-bottom:5px;">
|
||||
<span class="linkGrey2 f16">组织列表</span>
|
||||
|
||||
<form class="resourcesSearchloadBox" style="float:right; margin-top:-5px;">
|
||||
<input type="text" name="serach" placeholder="输入关键词进行搜索" class="searchResource"/>
|
||||
<a href="javascript:void(0);" class="homepageSearchIcon"></a>
|
||||
</form>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% @orgs.each do |org| %>
|
||||
<div class="postRow">
|
||||
<div class="postPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(org), :width => '78', :height => '78', :alt => '组织logo'), :class => "linkGrey2" %>
|
||||
</div>
|
||||
<div class="orgWrap">
|
||||
<div class="orgTitle">
|
||||
<%= link_to org.name, organization_path(org), :class => 'f16 linkBlue' %>
|
||||
</div>
|
||||
<div class="orgIntro"><%= org.description %></div>
|
||||
<div class="postCreater">创建者:<%= link_to User.find(org.creator_id), user_path(org.creator_id), :class => 'linkGrey2', :target => '_blank' %></div>
|
||||
<div class="postDate fl mr40">创建时间:<%= format_activity_day(org.created_at) %> <%= format_time(org.created_at, false) %></div>
|
||||
<div class="postCreater">您的身份:<%= User.current.admin_of_org?(org) ? "组织管理员" : "组织成员" %></div>
|
||||
</div>
|
||||
<!--<div class="mt28 fr"><a href="javascript:void(0);" class="linkGrey5">申请加入</a></div>-->
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -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'
|
||||
|
|
|
@ -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;}
|
||||
.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;}
|
Loading…
Reference in New Issue