- if User.current && !User.current.is_nobody?
  %ul.global-navigation-menu.global-navigation-menu-favorites#menu-favorites
    %li
      %span.desc
        List of projects you are watching
    - if params[:project]
      %li
        %a#toggle-watch{ href: project_toggle_watch_path(params[:project]) }
          - if User.current.watches? params[:project]
            %span
              Remove this project from Watchlist
            %span.desc
              Do not watch this project anymore
          - else
            %span
              Add this project to Watchlist
            %span.desc
              Watch this project
    - User.current.watched_project_names.each do |project|
      %li
        = link_to(content_tag(:span, content_tag(:span, '', class: 'icons-project') + raw(project.gsub(':', ':<wbr>')),
          class: 'project-link'), project_show_path(project))
= form_tag(search_path, { id: 'global-search-form', class: 'label-overlay' }) do
  %div{ style: 'display: inline' }
    %label.hidden{ for: 'search' } Search
    = text_field_tag 'search_text', '', id: 'search'
    %input.hidden{ type: 'submit', value: 'Search' }
