<ul class="sn-nav">
  <% subfield_content.each do |field| %>
      <% if is_default_field?(field) %>
          <% case field.name %>
  <% when 'activity' %>
              <li class="nav-element-default" style="display:<%= field.hide == 0?'block':'none' %>;">
                <%= link_to "首页", organization_path(@organization), :class => "sn-link-white" %>
              </li>
          <% when 'course' %>
              <li class="nav-element-default" style="display:<%= field.hide == 0?'block':'none' %>;">
                <a href="#course_<%= field.id %>" class="sn-link-white"> 课程动态</a>
              </li>
          <% when 'project' %>
              <li class="nav-element-default" style="display:<%= field.hide == 0?'block':'none' %>;">
                <a href="#project_<%= field.id %>" class="sn-link-white">项目动态</a>
              </li>
          <% end %>
      <% else %>
          <% if field.field_type == "Post" && field.hide == 0 %>
              <li class="nav-element">
                <a href="#message_<%= field.id %>" class="sn-link-white"><%= field.name %></a>
              </li>
              <!--二级目录-->
              <div class="sn-row sn-subnav-position sn-grey-opacity" style="display:none;">
                <ul class="sn-sub-nav" style="display:<%= if_hidden_subdomain( field) ? 'block':'none' %>;">
                  <% field.sub_domains.each do |subdomain| %>
                      <li><%=link_to subdomain.name, org_subfield_sub_domain_sub_document_comments_path(subdomain, :org_subfield_id => field.id), :class => "sn-link-grey" %></li>
                      <li class="sn-subnav-slice">|</li>
                  <% end %>
                </ul>
              </div>
          <% elsif field.field_type == "Resource" && field.hide == 0 %>
              <li class="nav-element">
                <a href="#resource_<%= field.id %>" class="sn-link-white"><%= field.name %></a>
              </li>
          <% end %>
      <% end %>
  <% end %>
  <% if User.current.admin_of_org?(@organization) %>
      <li class="nav-element">
        <a href="<%= setting_organization_path(@organization) %>" class="sn-link-white">配置</a>
      </li>
  <% end %>
</ul>