Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: d16eac5e0d
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 203 lines (202 sloc) 11.125 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202
<div class="clearfix" id="main-menu" data-controller="<%= controller.controller_name %>">
  <% local_cache [:menu, @current_user.id, @current_user.level] do %>
    <ul>
      <li class="user"><%= link_to t('.account._'), { :controller => :user, :action => :home } %>
        <%= link_to '■', '#', :class => 'submenu-button' %>
        <ul class="submenu">
          <% if @current_user.is_anonymous? %>
            <li><%= link_to t('.account.login'), { :controller => :user, :action => :login }, { :id => 'login-link', :class => 'login-button' } %></li>
            <li><%= link_to t('.account.register'), :controller => :user, :action => :signup %></li>
            <li><%= link_to t('.account.reset'), :controller => :user, :action => :reset_password %></li>
          <% else %>
            <li><%= link_to t('.account.profile'), :controller => :user, :action => :show, :id => @current_user.id %></li>
            <li><%= link_to t('.account.mail'), :controller => :dmail, :action => :inbox %></li>
            <li><%= link_to t('.account.favorites'), :controller => :post, :action => :index, :tags => "order:vote vote:3:#{@current_user.name}" %></li>
            <li><%= link_to t('.account.settings'), :controller => :user, :action => :edit %></li>
            <li><%= link_to t('.account.change_password'), :controller => :user, :action => :change_password %></li>
            <li><%= link_to t('.account.logout'), { :controller => :user, :action => :logout }, :from => request.url %></li>
          <% end %>
        </ul>
      </li>
      <li class="post"><%= link_to t('.posts._'), { :controller => :post, :action => :index } %>
        <%= link_to '■', '#', :class => 'submenu-button' %>
        <ul class="search-box">
          <li>
            <div>
              <%= form_tag url_for(:controller => :post, :action => :index), :method => :get do %>
                <%= generic_text_field_tag :tags %><br />
                <%= get_submit_tag t('.posts.search') %>
              <% end %>
            </div>
          </li>
        </ul>
        <ul class="submenu">
          <li><%= link_to t('.posts.view'), :controller => :post, :action => :index %></li>
          <li><%= link_to t('.posts.search'), { :controller => :post, :action => :index }, :class => 'search-link' %></li>
          <li><%= link_to t('.posts.upload'), :controller => :post, :action => :upload %></li>
          <li><%= link_to t('.posts.random'), :controller => :post, :tags => 'order:random' %></li>
          <li><%= link_to t('.posts.popular'), :controller => :post, :action => 'popular_recent' %></li>
          <li><%= link_to t('.posts.image_search'), :controller => :post, :action => :similar %></li>
          <li><%= link_to t('.posts.history'), :controller => :history, :action => :index %></li>
          <% if @current_user.is_contributor_or_higher? %>
            <li><%= link_to t('.posts.batch'), :controller => :batch, :action => :index %></li>
          <% end %>
          <% if @current_user.is_janitor_or_higher? %>
            <li><%= link_to t('.posts.moderate'), { :controller => :post, :action => :moderate }, :class => 'moderate' %></li>
          <% end %>
        </ul>
      </li>
      <li class="comment"><%= link_to t('.comments._'), { :controller => :comment, :action => :index }, { :id => 'comments-link' } %>
        <%= link_to '■', '#', :class => 'submenu-button' %>
        <ul class="search-box">
          <li>
            <div>
              <%= form_tag url_for(:controller => :comment , :action => :search), :method => :get do %>
                <%= generic_text_field_tag :query %><br />
                <%= get_submit_tag t('.comments.search') %>
              <% end %>
            </div>
          </li>
        </ul>
        <ul class="submenu">
          <li><%= link_to t('.comments.view'), :controller => :comment, :action => :index %></li>
          <li><%= link_to t('.comments.search'), { :controller => :comment, :action => :search }, :class => 'search-link' %></li>
          <% if @current_user.is_janitor_or_higher? %>
            <li><%= link_to t('.comments.moderate'), :controller => :comment, :action => :moderate %></li>
          <% end %>
        </ul>
      </li>
      <li class="note"><%= link_to t('.notes._'), { :controller => :note, :action => :index } %>
        <%= link_to '■', '#', :class => 'submenu-button' %>
        <ul class="search-box">
          <li>
            <div>
              <%= form_tag url_for(:controller => :note, :action => :search), :method => :get do %>
                <%= generic_text_field_tag :query %><br />
                <%= get_submit_tag t('.notes.search') %>
              <% end %>
            </div>
          </li>
        </ul>
        <ul class="submenu">
          <li><%= link_to t('.notes.view'), :controller => :note, :action => :index %></li>
          <li><%= link_to t('.notes.search'), { :controller => :note, :action => :search }, :class => 'search-link' %></li>
          <li><%= link_to t('.notes.requests'), :controller => :post, :action => :index, :tags => 'translation_request' %></li>
        </ul>
      </li>
      <li class="artist"><%= link_to t('.artists._'), { :controller => :artist, :action => :index, :order => 'date' } %>
        <%= link_to '■', '#', :class => 'submenu-button' %>
        <ul class="search-box">
          <li>
            <div>
              <%= form_tag url_for(:controller => :artist, :action => :index), :method => :get do %>
                <%= generic_text_field_tag :name %><br />
                <%= get_submit_tag t('.artists.search') %>
              <% end %>
            </div>
          </li>
        </ul>
        <ul class="submenu">
          <li><%= link_to t('.artists.view'), :controller => :artist, :action => :index %></li>
          <li><%= link_to t('.artists.search'), { :controller => :artist, :action => :index }, :class => 'search-link' %></li>
          <li><%= link_to t('.artists.create'), :controller => :artist, :action => :create %></li>
        </ul>
      </li>
      <li class="tag"><%= link_to t('.tags._'), { :controller => :tag, :action => :index, :order => 'date' } %>
        <%= link_to '■', '#', :class => 'submenu-button' %>
        <ul class="search-box">
          <li>
            <div>
              <%= form_tag url_for(:controller => :tag, :action => :index), :method => :get do %>
                <%= generic_text_field_tag :name %><br />
                <%= get_submit_tag t('.tags.search') %>
              <% end %>
            </div>
          </li>
        </ul>
        <ul class="submenu">
          <li><%= link_to t('.tags.view'), :controller => '/tag', :action => :index %></li>
          <li><%= link_to t('.tags.search'), { :controller => :tag, :action => :index }, :class => 'search-link' %></li>
          <li><%= link_to t('.tags.popular'), :controller => :tag, :action => :popular_by_day %></li>
          <li><%= link_to t('.tags.aliases'), :controller => :tag_alias, :action => :index %></li>
          <li><%= link_to t('.tags.implications'), :controller => :tag_implication, :action => :index %></li>
          <% if @current_user.is_janitor_or_higher? %>
            <li><%= link_to t('.tags.mass_edit'), :controller => :tag, :action => :mass_edit %></li>
          <% end %>
        </ul>
      </li>
      <li class="pool"><%= link_to t('.pools._'), { :controller => :pool, :action => :index } %>
        <%= link_to '■', '#', :class => 'submenu-button' %>
        <ul class="search-box">
          <li>
            <div>
              <%= form_tag url_for(:controller => :pool, :action => :index), :method => :get do %>
                <%= generic_text_field_tag :query %><br />
                <%= get_submit_tag t('.pools.search') %>
              <% end %>
            </div>
          </li>
        </ul>
        <ul class="submenu">
          <li><%= link_to t('.pools.view'), :controller => :pool, :action => :index %></li>
          <li><%= link_to t('.pools.search'), { :controller => :pool, :action => :index }, :class => 'search-link' %></li>
          <li><%= link_to t('.pools.create'), :controller => :pool, :action => :create %></li>
        </ul>
      </li>
      <li class="wiki"><%= link_to t('.wiki._'), { :controller => :wiki, :action => :show, :title => 'help:home' } %>
        <%= link_to '■', '#', :class => 'submenu-button' %>
        <ul class="search-box">
          <li>
            <div>
              <%= form_tag url_for(:controller => :wiki, :action => :index), :method => :get do %>
                <%= generic_text_field_tag :query %><br />
                <%= get_submit_tag t('.wiki.search') %>
              <% end %>
            </div>
          </li>
        </ul>
        <ul class="submenu">
          <li><%= link_to t('.wiki.index'), :controller => :wiki, :action => :index %></li>
          <li><%= link_to t('.wiki.search'), { :controller => :wiki, :action => :index }, :class => 'search-link' %></li>
          <li><%= link_to t('.wiki.create'), :controller => :wiki, :action => :add %></li>
        </ul>
      </li>
      <li class="forum"><%= link_to t('.forum._'), { :controller => :forum, :action => :index }, { :id => 'forum-link' } %>
        <%= link_to '■', '#', :class => 'submenu-button' %>
        <ul class="search-box">
          <li>
            <div>
              <%= form_tag url_for(:controller => :forum, :action => :search), :method => :get do %>
                <%= generic_text_field_tag :query %><br />
                <%= get_submit_tag t('.forum.search') %>
              <% end %>
            </div>
          </li>
        </ul>
        <ul class="submenu">
          <li><%= link_to t('.forum.view'), :controller => :forum, :action => :index %></li>
          <li><%= link_to t('.forum.search'), { :controller => :forum, :action => :index }, :class => 'search-link' %></li>
          <li><%= link_to t('.forum.new'), :controller => :forum, :action => :new %></li>
          <li><%= link_to t('.forum.mark_all_read'), { :controller => :forum, :action => :mark_all_read }, :id => 'forum-mark-all-read', :style => 'display: none;' %></li>
          <li class="forum-items-start"><span class="separator"></span></li>
        </ul>
      </li>
      <li class="help"><%= link_to t('.help._'), { :controller => :help, :action => :index } %>
        <%= link_to '■', '#', :class => 'submenu-button' %>
        <ul class="submenu">
          <% %w(post comment note artist tag wiki pool forum).each do |item| %>
            <li><%= link_to t(".help.#{item}"), { :controller => :help, :action => item }, :class => ['help-item', item] %>
          <% end %>
          <li><%= link_to t('.help.site'), :controller => :help, :action => :index %></li>
        </ul>
      </li>
      <li class="static"><%= link_to t('.more'), { :controller => :static, :action => :more } %>
      </li>
      <li class="has-mail">
        <%= link_to t('.new_mail'), { :controller => '/dmail', :action => :inbox }, :id => 'has-mail-notice' %>
      </li>
    </ul>
    <span id='cn' style="display: none;">
    </span>
  <% end %>
</div>
Something went wrong with that request. Please try again.