- if @space && @space.id != nil
  - member_or_superuser = (current_user && (@space.users.include?(current_user) || current_user.superuser?))
  - if @space.public? || member_or_superuser
    = content_for :page_menu do
      %ul
        %li= link_to t('home.one').capitalize, space_path(@space), spaces_menu_select_if(:home)
        %li= link_to t('webconference.one').capitalize, space_webconference_path(@space), spaces_menu_select_if(:webconference)
        %li= link_to t('post.wall').capitalize, space_posts_path(@space), spaces_menu_select_if(:posts)
        %li= link_to t('event.other').capitalize, space_events_path(@space), spaces_menu_select_if(:events)
        %li= link_to t('people').capitalize, space_users_path(@space), spaces_menu_select_if(:users)
        - if @space.repository?
          %li= link_to t('repository.one').capitalize, space_attachments_path(@space), spaces_menu_select_if(:repository)
        - if user_signed_in?
          - if @space.role_for?(current_user, :name => 'Admin') || current_user.superuser?
            %li= link_to t('admin.one').capitalize, edit_space_path(@space), spaces_menu_select_if(:admin, :class => "admin danger-text")

- if @space && @space.id != nil
  - member_or_superuser = (current_user && (@space.users.include?(current_user) || current_user.superuser?))
  - if @space.public? || member_or_superuser
    = content_for :page_menu do
      %ul
        %li{ spaces_menu_select_if(:home) }
          = link_to t('home.one').capitalize, space_path(@space)
        %li{ spaces_menu_select_if(:webconference) }
          = link_to t('webconference.one').capitalize, space_webconference_path(@space)
        %li{ spaces_menu_select_if(:posts) }
          = link_to t('post.wall').capitalize, space_posts_path(@space)
        %li{ spaces_menu_select_if(:events) }
          = link_to t('event.other').capitalize, space_events_path(@space)
        %li{ spaces_menu_select_if(:users) }
          = link_to t('people').capitalize, space_users_path(@space)
        - if @space.repository?
          %li{ spaces_menu_select_if(:repository) }
            = link_to t('repository.one').capitalize, space_attachments_path(@space)
        - if user_signed_in?
          - if @space.role_for?(current_user, :name => 'Admin') || current_user.superuser?
            %li{ spaces_menu_select_if(:admin, :class => "admin danger-text") }
              = link_to t('admin.one').capitalize, edit_space_path(@space)

Fix selection of items in a space's menu
Fix selection of items in a space's menu

Was broken after ece7b8b9254d9.
