Merge branch 'hjq_beidou' of https://git.trustie.net/jacknudt/trustieforge into hjq_beidou

This commit is contained in:
Tim 2016-05-06 10:02:43 +08:00
commit e2907565bd
5 changed files with 10 additions and 9 deletions

View File

@ -38,7 +38,7 @@ module ApplicationHelper
end
def if_hidden_subdomain field
domains = field.sub_domains.map{|domain| domain.hide.to_i == 0}
domains = field.sub_domains.select{|domain| domain.hide.to_i == 0}
result = domains.length > 0 ? true : false
return result
end

View File

@ -107,14 +107,14 @@
<%=link_to "", new_organization_org_document_comment_path(organization, :field_id => field.id), :method => "get", :class => "homepageMenuSetting fr", :title => "发布帖子" %>
<% end %>
</div>
<div class="<%= field.sub_domains.count == 0?'homepageLeftMenuCourses':'homepageLeftMenuCourses borderBottomNone' %>" id="PostDomain_<%= field.id %>" style="display:none;">
<div class="<%= (field.sub_domains.count == 0) ? 'homepageLeftMenuCourses':'homepageLeftMenuCourses borderBottomNone' %>" id="PostDomain_<%= field.id %>" style="display:none;">
<ul>
<%= render :partial => 'organizations/org_subdomain',:locals=>{:subdomains => field.sub_domains.reorder('created_at').uniq.limit(5), :org_subfield_id => field.id} %>
</ul>
</div>
<% unless field.sub_domains.count == 0 %>
<li class="homepageLeftMenuMore">
<% unless (field.sub_domains.count == 0 || !if_hidden_subdomain(field)) %>
<li class="homepageLeftMenuMore" id="sub_domain_jiantou_<%= field %>">
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="$('#PostDomain_<%= field.id %>').slideToggle();" style="border-bottom: 1px solid #ddd;"></a>
</li>
<% end %>

View File

@ -31,9 +31,8 @@
<div class="update_status_class"><span class="hidden"><%= subfield_list_type(field.status) %></span>
<a style="display: inline-block;" href="javascript:void(0)" class="pic_edit2"></a>
</div>
<%= select( :name,:group_id, subfield_status_option_default,
{ :include_blank => false,:selected => field.status},
{:onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:56px;"}) %>
<%= select( :name,:group_id, subfield_status_option_default, { :include_blank => false,:selected => field.status},
{ :onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:56px;"}) %>
<% end %>
<% end %>

View File

@ -1,2 +1,3 @@
$("#hide_<%= @subdomain.id %>").text("可见");
$("#sub_domain_hide_<%= @subdomain.id %>").css("display", "none");
$("#sub_domain_hide_<%= @subdomain.id %>").css("display", "none");
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");

View File

@ -1,2 +1,3 @@
$("#hide_<%= @subdomain.id %>").text("隐藏");
$("#sub_domain_hide_<%= @subdomain.id %>").css("display", "block");
$("#sub_domain_hide_<%= @subdomain.id %>").css("display", "block");
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");