parent
67d1798163
commit
756a2db4aa
|
@ -71,7 +71,7 @@ class OrganizationsController < ApplicationController
|
|||
|
||||
def show
|
||||
# 组织新类型 show_mode:判断标准 1为新类型,0为旧
|
||||
if @organization.show_mode == 1 && params[:org_subfield_id].nil? && params[:type] .nil?
|
||||
if @organization.show_mode == 1 && params[:org_subfield_id].nil? && params[:list] .nil?
|
||||
if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization)
|
||||
@subfield_content = @organization.org_subfields.order("priority")
|
||||
# 项目两种动态
|
||||
|
@ -108,7 +108,7 @@ class OrganizationsController < ApplicationController
|
|||
@org_activities = OrgActivity.where("(container_id =? and container_type =?) " +
|
||||
"or (container_type ='Project' and org_act_type in ('Issue','Message','ProjectCreateInfo') and container_id in (#{project_ids.join(',')})) "+
|
||||
"or (container_type ='Course' and org_act_type in #{course_types} and container_id in (#{course_ids.join(',')}))",
|
||||
@organization.id, 'Organization').order('updated_at desc').page(params[:page] || 1).per(10)
|
||||
@organization.id, 'Organization').order('updated_at desc').page(params[:page] || 1).per(10)
|
||||
when 'project_issue'
|
||||
@org_activities = OrgActivity.where("container_type = 'Project' and org_act_type = 'Issue' and container_id in (#{project_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10)
|
||||
when 'project_message'
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<% else %>
|
||||
<% if field.field_type == "Post" && field.hide == 0 %>
|
||||
<a href="#message_<%= field.id %>" class="fl"><%= field.name %></a>
|
||||
<% elsif field.field_type == "Resource" && field.hide == 0%>
|
||||
<% elsif field.field_type == "Resource" && field.hide == 0 %>
|
||||
<a href="#resource_<%= field.id %>" class="fl"><%= field.name %></a>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -100,7 +100,6 @@
|
|||
|
||||
<div class="banner">
|
||||
<h2><%= @organization.name %></h2>
|
||||
<p><span><%= @organization.description %></span></p>
|
||||
</div>
|
||||
|
||||
<div class="cl"></div>
|
||||
|
@ -144,7 +143,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
|
||||
|
@ -161,7 +160,7 @@
|
|||
<!--row-ziyuan end-->
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
|
||||
|
@ -183,7 +182,7 @@
|
|||
<%= render :partial => 'organizations/org_new_project_pic', :locals => {:activities => @project_acts.first(3)} %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -201,7 +200,7 @@
|
|||
<!--row-ziyuan end-->
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -24,12 +24,12 @@
|
|||
<li class="orgListStatus">默认</li>
|
||||
<li class="orgListStatusList">
|
||||
<%= form_tag({:controller => 'org_subfields', :action => 'update_status', :id => field.id,},:remote=>'true', :method => 'post', :id=>"update_status_form_#{field.id}", :class => 'query_form') do %>
|
||||
<div class="update_status_class"><span style="width: 35px; text-align: center; float: left;" class="hidden"><%=field.status== 1 ? "列表" : "图片" %></span>
|
||||
<div class="update_status_class"><span class="hidden"><%=field.status== 1 ? "列表" : "图片" %></span>
|
||||
<a style="display: inline-block;" href="javascript:void(0)" class="pic_edit2"></a>
|
||||
</div>
|
||||
<%= select( :name,:group_id, subfield_status_option,
|
||||
{ :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:30px;"}) %>
|
||||
{:onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:52px;"}) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="orgListStatus">默认</li>
|
||||
|
@ -58,12 +58,12 @@
|
|||
列表
|
||||
<% else %>
|
||||
<%= form_tag({:controller => 'org_subfields', :action => 'update_status', :id => field.id,},:remote=>'true', :method => 'post', :id=>"update_status_form_#{field.id}", :class => 'query_form') do %>
|
||||
<div class="update_status_class"><span style="width: 35px; text-align: center; float: left;" class="hidden"><%=field.status== 1 ? "列表" : "图片" %></span>
|
||||
<div class="update_status_class"><span class="hidden"><%=field.status== 1 ? "列表" : "图片" %></span>
|
||||
<a style="display: inline-block;" href="javascript:void(0)" class="pic_edit2"></a>
|
||||
</div>
|
||||
<%= select( :name,:group_id, subfield_status_option,
|
||||
{ :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:40px;"}) %>
|
||||
{:onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:52px;"}) %>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue