组织下的链接问题

ouyang
ouyangxuhua 10 years ago
parent 098844a910
commit b716e593b5

@ -3014,6 +3014,13 @@ def logout_url_without_domain
Setting.host_name + "/logout" Setting.host_name + "/logout"
end end
def signin_url_without_domain
Setting.host_name + "/login?login=true"
end
def register_url_without_domain
Setting.host_name + "/login?login=false"
end
#判断是否为默认的组织栏目 #判断是否为默认的组织栏目
def is_default_field? field def is_default_field? field
(field.name == 'activity' || field.name == 'course' || field.name == 'project') && field.field_type == 'default' (field.name == 'activity' || field.name == 'course' || field.name == 'project') && field.field_type == 'default'

@ -44,14 +44,14 @@
</li> </li>
<% if User.current.logged? %> <% if User.current.logged? %>
<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'), user_url_in_org(User.current.id),: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, user_url_in_org(User.current.id),:id => "orgUserName",:class => 'fontGrey2 f14 mr5',:target => '_blank' %>
<%= link_to "退出",logout_url_without_domain, :class =>"menuGrey", :method => 'post', :rel => "nofollow" %> <%= link_to "退出",logout_url_without_domain, :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.blank?) ? signin_path(:login=>true):'https://www.trustie.net/login?login=true' %>" class="linkGrey8 f14">登录</a></li> <li class="navOrgMenu fr"><a href="<%= signin_url_without_domain %>" class="linkGrey8 f14">登录</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> <li class="navOrgMenu fr"><a href="<%= register_url_without_domain %>" class="linkGrey8 f14 mr15">注册</a></li>
<% end %> <% end %>
</ul> </ul>
<!--<div class="navHomepageProfile"> <!--<div class="navHomepageProfile">

Loading…
Cancel
Save