For non-login user,show no drop down menu and return to home after press orbit button.

This commit is contained in:
Matthew K. Fu JuYuan 2012-05-29 16:33:38 +08:00
parent 4f484599b7
commit 2f500ff460
3 changed files with 7 additions and 0 deletions

View File

@ -26,6 +26,7 @@ gem 'rake'
gem 'resque' # background jobs
gem 'resque-scheduler' # job scheduling
gem 'resque-restriction'
gem 'rb-readline'
gem 'ruby-debug19'
gem 'rubyzip'
gem 'therubyracer'

View File

@ -131,8 +131,10 @@ GEM
mongoid (~> 2.0)
multi_json (1.1.0)
mysql2 (0.3.11)
mysql2 (0.3.11-x86-mingw32)
net-ldap (0.3.1)
nokogiri (1.5.2)
nokogiri (1.5.2-x86-mingw32)
orm_adapter (0.0.6)
pdf-writer (1.1.8)
color (>= 1.4.0)

View File

@ -2,6 +2,7 @@
<div class="navbar-inner">
<div class="container clear">
<div class="dropdown orbit-logo pull-left">
<% if !current_user.nil? %>
<a class="brand dropdown-toggle" data-toggle="dropdown" href="#">Orbit</a>
<ul class="dropdown-menu">
<li><%= link_to content_tag(:i, nil, :class => 'icons-dashboard') + t('admin.dashboard'), admin_dashboards_path %></li>
@ -13,6 +14,9 @@
<li><%= link_to content_tag(:i, nil, :class => 'icons-cog') + t('admin.site_settings'), admin_site_site_info_path(@site) %></li>
<li><%#= link_to content_tag(:i, nil, :class => 'icons-plus-cube') + t('admin.add_item') %></li>
</ul>
<% else %>
<a class="brand dropdown-toggle" data-toggle="dropdown" href="/">Orbit</a>
<% end -%>
</div>
<ul class="nav">
<li><%= link_to t(:homepage), root_path, :class => 'orbit-bar-home' %></li>