修改组织子域名的问题
This commit is contained in:
parent
c83562bfd7
commit
2a26fd4e75
|
@ -46,12 +46,12 @@
|
||||||
<li class="navOrgMenu fr" id="orgUser" style="cursor:pointer;">
|
<li class="navOrgMenu fr" id="orgUser" style="cursor:pointer;">
|
||||||
<%= link_to image_tag(url_to_avatar(User.current),:width => '23',:height => '23'), request.local? ? user_path(User.current):("https://www.trustie.net/users/" + User.current.id.to_s),:alt => '用户头像', :target => '_blank',:style=>'border-radius:3px; vertical-align:top; margin-top:3px; display:inline-block; margin-right:3px;' %>
|
<%= link_to image_tag(url_to_avatar(User.current),:width => '23',:height => '23'), request.local? ? user_path(User.current):("https://www.trustie.net/users/" + User.current.id.to_s),:alt => '用户头像', :target => '_blank',:style=>'border-radius:3px; vertical-align:top; margin-top:3px; display:inline-block; margin-right:3px;' %>
|
||||||
<%= link_to User.current, (request.local? || request.subdomain.blank?) ? user_path(User.current):("https://www.trustie.net/users/" + User.current.id.to_s),:id => "orgUserName",:class => 'fontGrey2 f14 mr5',:target => '_blank' %>
|
<%= link_to User.current, (request.local? || request.subdomain.blank?) ? user_path(User.current):("https://www.trustie.net/users/" + User.current.id.to_s),:id => "orgUserName",:class => 'fontGrey2 f14 mr5',:target => '_blank' %>
|
||||||
<%= link_to "退出",(request.local? || request.subdomain.nil?) ? signout_path():"https://www.trustie.net/logout", :class =>"menuGrey", :method => 'post', :rel => "nofollow" %>
|
<%= link_to "退出",(request.local? || request.subdomain.blank?) ? signout_path():"https://www.trustie.net/logout", :class =>"menuGrey", :method => 'post', :rel => "nofollow" %>
|
||||||
</li>
|
</li>
|
||||||
<!--<li class="navOrgMenu fr"><%#=link_to User.current, user_path(User.current), :class => "linkGrey8 f14" %></li>-->
|
<!--<li class="navOrgMenu fr"><%#=link_to User.current, user_path(User.current), :class => "linkGrey8 f14" %></li>-->
|
||||||
<% else %>
|
<% else %>
|
||||||
<li class="navOrgMenu fr"><a href="<%= (request.local? || request.subdomain.nil?) ? signin_path(:login=>true):'https://www.trustie.net/login?login=true' %>" class="linkGrey8 f14">登录</a></li>
|
<li class="navOrgMenu fr"><a href="<%= (request.local? || request.subdomain.blank?) ? signin_path(:login=>true):'https://www.trustie.net/login?login=true' %>" class="linkGrey8 f14">登录</a></li>
|
||||||
<li class="navOrgMenu fr"><a href="<%= (request.local? || request.subdomain.nil?) ? signin_path(:login=>false):'https://www.trustie.net/login?login=false' %>" class="linkGrey8 f14 mr15">注册</a></li>
|
<li class="navOrgMenu fr"><a href="<%= (request.local? || request.subdomain.blank?) ? signin_path(:login=>false):'https://www.trustie.net/login?login=false' %>" class="linkGrey8 f14 mr15">注册</a></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
<!--<div class="navHomepageProfile">
|
<!--<div class="navHomepageProfile">
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
<div class="homepageLeftMenuBlock" style="display:<%= field.hide == 0?'block':'none' %>;" id="org_subfield_<%= field.id %>">
|
<div class="homepageLeftMenuBlock" style="display:<%= field.hide == 0?'block':'none' %>;" id="org_subfield_<%= field.id %>">
|
||||||
<% if field.field_type == "Post" %>
|
<% if field.field_type == "Post" %>
|
||||||
<% if !field.subfield_subdomain_dir.nil? %>
|
<% if !field.subfield_subdomain_dir.nil? %>
|
||||||
<% if !request.local? and !organization.domain.nil? and Organization.where("domain is not null").map(&:domain).include?(request.subdomain) %>
|
<% if !request.local? and Secdomain.where("sub_type=2 and pid=?", organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", organization.id).map(&:subname).include?(request.subdomain) %>
|
||||||
<%= link_to "#{field.name}", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText" %>
|
<%= link_to "#{field.name}", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to "#{field.name}", show_org_subfield_organization_path(:id => organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText" %>
|
<%= link_to "#{field.name}", show_org_subfield_organization_path(:id => organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText" %>
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if !field.subfield_subdomain_dir.nil? %>
|
<% if !field.subfield_subdomain_dir.nil? %>
|
||||||
<% if !request.local? and !organization.domain.nil? and Organization.where("domain is not null").map(&:domain).include?(request.subdomain) %>
|
<% if !request.local? and Secdomain.where("sub_type=2 and pid=?", organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", organization.id).map(&:subname).include?(request.subdomain) %>
|
||||||
<%= link_to "#{field.name}", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText" %>
|
<%= link_to "#{field.name}", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to "#{field.name}", show_org_subfield_organization_path(:id => organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText" %>
|
<%= link_to "#{field.name}", show_org_subfield_organization_path(:id => organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText" %>
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
class AddIndexToSecdomain < ActiveRecord::Migration
|
|
||||||
def change
|
|
||||||
add_index(:secdomains, :subname, unique: true)
|
|
||||||
end
|
|
||||||
end
|
|
Loading…
Reference in New Issue