Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
This commit is contained in:
commit
70ff3e2c19
|
@ -27,8 +27,10 @@ class SsosController < ApplicationController
|
|||
## 加入组织
|
||||
@organization = Organization.find(82)
|
||||
unless @organization.org_members.exists?(user_id: sso.user_id)
|
||||
member = OrgMember.new(:user_id => sso.user_id)
|
||||
member = OrgMember.create(:user_id => sso.user_id, :created_at => Time.now)
|
||||
# member = OrgMember.new(:user_id => sso.user_id)
|
||||
@organization.org_members << member
|
||||
OrgMemberRole.create(:org_member_id => member.id, :role_id => 12)
|
||||
end
|
||||
|
||||
## 选择性跳转
|
||||
|
|
|
@ -88,6 +88,7 @@ module ApplicationHelper
|
|||
|
||||
# 获取组织成员中文名字
|
||||
def get_org_member_role_name member
|
||||
unless member.roles[0].nil?
|
||||
case member.roles[0].name
|
||||
when 'orgManager'
|
||||
'管理人员'
|
||||
|
@ -95,6 +96,7 @@ module ApplicationHelper
|
|||
'组织成员'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# 判断组织左侧展开或者隐藏
|
||||
def is_hide_org_left obj
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
<div class="sn-header">
|
||||
<div class="sn-row sn-bg-white">
|
||||
<div class="sn-logo">
|
||||
<% if @org_logo_attchment.blank? %>
|
||||
<% if @org_logo_attchment.blank? || !User.current.logged? %>
|
||||
<img src="/images/org_new_style/logo.jpg" width="367" height="63" class="sn-mt13 sn-fl" alt=""/>
|
||||
<% else %>
|
||||
<img src="/attachments/<%= @org_logo_attchment.id %>/<%= @org_logo_attchment.filename %>" width="367" height="63" class="sn-mt13 sn-fl" alt="">
|
||||
|
|
|
@ -111,11 +111,11 @@
|
|||
<p class="fontBlue fb mb5">添加成员</p>
|
||||
<%= form_tag url_for(:controller => 'org_member', :action => 'create', :org => @organization),:id=>'org_member_add_form',:remote=>true do |f|%>
|
||||
<input type="text" id="not_org_member_search" name="orgAddSearch" placeholder="支持姓名、邮箱、登录名搜索" class="orgAddSearch mb20" />
|
||||
<% if @organization.secdomain_name.nil? %>
|
||||
<%# if @organization.secdomain_name.nil? %>
|
||||
<%= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript host_with_protocol + "/org_member/org_member_autocomplete?" + {:org=> @organization.id}.to_query }')" %>
|
||||
<% else %>
|
||||
<%= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript secdomain_with_protocol(@organization.secdomain_name) + "/org_member/org_member_autocomplete?" + {:org=> @organization.id}.to_query }')" %>
|
||||
<% end %>
|
||||
<%# else %>
|
||||
<%#= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript secdomain_with_protocol(@organization.secdomain_name) + "/org_member/org_member_autocomplete?" + {:org=> @organization.id}.to_query }')" %>
|
||||
<%# end %>
|
||||
|
||||
<div id="principals_for_new_member">
|
||||
<%= find_user_not_in_current_org_by_name(@project) %>
|
||||
|
|
Loading…
Reference in New Issue