<% if logged_in? %>
    <% if current_user.superuser?%>
  • <%=link_to t('manage'), site_path%>
  • <% end %>
  • <%= link_to t('home.my'), home_path, menu_options(:home)%>
  • <%= link_to t('inbox.one', :checked => PrivateMessage.inbox(current_user).select{|msg| !msg.checked}.size), user_messages_path(current_user), menu_options(:inbox, :id => "user_inbox_link")%>
  • <%= link_to t('profile', :count => 1), user_path(current_user), menu_options(:profile)%>
  • <%= link_to t('account'), edit_user_path(current_user), menu_options(:preferences) %>
  • <%= link_to t('logout', :user => current_user.name), logout_path %>
  • <% else %>
    <%= t('mconf') %><%= t('beta') %>
    <%= form_tag session_url(:protocol => current_site.protocol), :class => "login_form" do -%> <%= text_field_tag 'login', params[:login], :class=>"input_username" %> <%= password_field_tag 'password', nil, :class=>"input_username" %> <% end -%>
    <%= link_to t('user.lost_password'), lost_password_path, :class => "register_link" %>
    <% if current_site.shib_enabled? %>
    <%= t("login.one") %>
    <%= image_tag("logos/cafe-logo-transp.png", :size => '174x30') %>
    <%= t('cafe.login_page.description').html_safe %> <% link_to(image_tag("icons/help.png",:title=>"",:size=>"16x16",:class=>"icon",:style=>"cursor:pointer").html_safe, login_path) %>
    <% end %>
    <% end %>
<%if logged_in?%> <%= form_tag(spaces_path, :method => 'get', :id=>"form_space_select") do %> <%if logged_in? && current_user.spaces.any?%> <%if @space%> <%= select_tag "space_id", options_for_select_with_class_selected([[t('space.my_spaces'), "my"], [t('space.all'), "all"]] + current_user.spaces.map{|sp| [truncate(sp.name, { :length => 16 }), sp.permalink]}, [@space.name, @space.permalink]), :onchange => "this.form.submit()"%> <%elsif params[:space_id]=="all"%> <%= select_tag "space_id", options_for_select_with_class_selected([[t('space.my_spaces'), "my"], [t('space.all'), "all"]] + current_user.spaces.map{|sp| [truncate(sp.name, { :length => 16 }), sp.permalink]}, [t('space.all'), "all"]), :onchange => "this.form.submit()"%> <%else%> <%= select_tag "space_id", options_for_select_with_class_selected([[t('space.select'),""], [t('space.my_spaces'), "my"], [t('space.all'), "all"]] + current_user.spaces.map{|sp| [truncate(sp.name, { :length => 16 }), sp.permalink]}, [t('space.select'),""]), :onchange => "this.form.submit()"%> <%end%> <%else%> <%if @space%> <%= select_tag "space_id", options_for_select_with_class_selected( [[t('space.all'), "all"]] + Space.public.all.map{|sp| [truncate(sp.name, { :length => 16 }), sp.permalink]}, [@space.name, @space.permalink]), :onchange => "this.form.submit()"%> <%elsif params[:space_id]=="all"%> <%= select_tag "space_id", options_for_select_with_class_selected( [[t('space.select'),""],[t('space.all'), "all"]] + Space.public.all.map{|sp| [truncate(sp.name, { :length => 16 }), sp.permalink]}, [t('space.all'), "all"]), :onchange => "this.form.submit()"%> <%else%> <%= select_tag "space_id", options_for_select_with_class_selected( [[t('space.select'),""],[t('space.all'), "all"]] + Space.public.all.map{|sp| [truncate(sp.name, { :length => 16 }), sp.permalink]}), :onchange => "this.form.submit()"%> <%end%> <%end%> <%end%>
<%= t('mconf') %><%= t('beta') %>
<%end%>