模式二导航栏

This commit is contained in:
huang 2016-06-07 16:42:33 +08:00
parent 3e2810129b
commit c3db6afd75
2 changed files with 21 additions and 5 deletions

View File

@ -63,8 +63,28 @@
<% end %> <% end %>
</ul> </ul>
</div> </div>
<% elsif field.field_type == "Comptec" %>
<li>
<%= link_to "#{field.name}", teachers_organization_path(@organization, :org_subfield_id => field.id, :type => "famous"), :class => "sn-link-white", :target => "_blank" %>
</li>
<% elsif field.field_type == "Compstu" %>
<li>
<%= link_to "#{field.name}", students_organization_path(@organization, :org_subfield_id => field.id, :type => "famous"), :class => "sn-link-white", :target => "_blank" %>
</li>
<% elsif field.field_type == "Comppro" %>
<li>
<%= link_to "#{field.name}", projects_organization_path(@organization, :org_subfield_id => field.id, :type => "famous"), :class => "sn-link-white", :target => "_blank" %>
</li>
<% elsif field.field_type == "Compcou" %>
<li>
<%= link_to "#{field.name}", courses_organization_path(@organization, :org_subfield_id => field.id, :type => "famous"), :class => "sn-link-white", :target => "_blank" %>
</li>
<% elsif field.field_type == "Compact" %>
<li>
<%= link_to "#{field.name}", acts_organization_path(@organization, :org_subfield_id => field.id), :class => "sn-link-white", :target => "_blank" %>
</li>
<% elsif field.field_type == "Resource" && field.hide == 0 %> <% elsif field.field_type == "Resource" && field.hide == 0 %>
<li class="nav-element"> <li>
<%= link_to field.name, org_subfield_files_path(field), :class => "sn-link-white", :target => "_blank" %> <%= link_to field.name, org_subfield_files_path(field), :class => "sn-link-white", :target => "_blank" %>
</li> </li>
<% end %> <% end %>

View File

@ -125,10 +125,6 @@
<div class="homepageLeftMenuBlock"> <div class="homepageLeftMenuBlock">
<%= link_to "#{field.name}", students_organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %> <%= link_to "#{field.name}", students_organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
</div> </div>
<% elsif field.field_type == "Compstu" && User.current.admin? %>
<div class="homepageLeftMenuBlock">
<%= link_to "#{field.name}", students_organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
</div>
<% elsif field.field_type == "Comppro" && User.current.admin? %> <% elsif field.field_type == "Comppro" && User.current.admin? %>
<div class="homepageLeftMenuBlock"> <div class="homepageLeftMenuBlock">
<%= link_to "#{field.name}", projects_organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %> <%= link_to "#{field.name}", projects_organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>