base中添加二级目录

This commit is contained in:
huang 2016-04-29 17:13:09 +08:00
parent 84ae444880
commit 90a285b35e
2 changed files with 26 additions and 2 deletions

View File

@ -83,8 +83,32 @@
</div>
<% end %>
<% else %>
<div class="homepageLeftMenuBlock" style="display:<%= field.hide == 0?'block':'none' %>;" id="org_subfield_<%= field.id %>">
<div style="display:<%= field.hide == 0?'block':'none' %>;" id="org_subfield_<%= field.id %>">
<% if field.field_type == "Post" %> <!--讨论帖子-->
<div class="homepageLeftMenuBlock">
<!--<a href="javascript:void(0);" class="homepageMenuText" onclick="$('#homepageLeftMenuProjects').slideToggle();">项目</a>-->
<% if !field.subfield_subdomain_dir.nil? %> <!--讨论帖子-->
<% if !request.local? and Secdomain.where("sub_type=2 and pid=?", organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", organization.id).map(&:subname).include?(request.subdomain) %>
<a href="javascript:void(0);" class="homepageMenuText" onclick="$('#homepageLeftMenuPost').slideToggle();"><%= field.name %></a>
<%#= link_to "#{field.name}", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
<% else %>
<a href="javascript:void(0);" class="homepageMenuText" onclick="$('#homepageLeftMenuPost').slideToggle();"><%= field.name %></a>
<%#= link_to "#{field.name}", show_org_subfield_organization_path(:id => organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
<% end %>
<% else %>
<%= link_to "#{field.name}", organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
<% end %>
<% if User.current.logged? and User.current.admin_of_org?(organization) %>
<%=link_to "", new_organization_org_document_comment_path(organization, :field_id => field.id), :method => "get", :class => "homepageMenuSetting fr", :title => "发布帖子" %>
<% end %>
</div>
<div class="homepageLeftMenuCourses" id="homepageLeftMenuPost" style="display:<%= organization.projects.count == 0?'none':'' %>">
<ul>
<%= render :partial => 'layouts/org_projects',:locals=>{:projects=>organization.projects.where("status=1").reorder('created_at').uniq.limit(5),:org_id=>organization.id,:page=>1}%>
</ul>
</div>
<% if !field.subfield_subdomain_dir.nil? %> <!--讨论帖子-->
<% if !request.local? and Secdomain.where("sub_type=2 and pid=?", organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", organization.id).map(&:subname).include?(request.subdomain) %>
<%= link_to "#{field.name}", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText" %>

View File

@ -8,7 +8,7 @@
<ul>
<% documents.each do |document| %>
<li>
<div class="sn-circle fl"></div><a href="javascript:void()" target="_blank" class="sn-newslist-titile fl"><%=link_to document.title, org_subfield_sub_domain_sub_document_comment_path(document, :org_subfield_id => @org_subfield, :sub_domain_id => @subdomain) %></a>
<div class="sn-circle fl"></div><%=link_to document.title, org_subfield_sub_domain_sub_document_comment_path(document, :org_subfield_id => @org_subfield, :sub_domain_id => @subdomain), :class => "sn-newslist-titile fl", :target => "_blank" %>
<span class=" txt-grey fr"><%= format_date(document.created_at) %>></span><a href="javascript:void()" target="_blank" class="sn-newslist-reply fr mr10">回复100</a><a href="javascript:void(0)" target="_blank" class="sn-newslist-zan fr mr10">100</a>
<div class="cl"></div>
</li>