组织还原
This commit is contained in:
parent
54a8e6871c
commit
2cb9f0cd05
|
@ -113,7 +113,7 @@ class OrganizationsController < ApplicationController
|
|||
#@project_acts_issues = get_project_activities_org @organization
|
||||
#@course_acts = get_course_activities_org @organization
|
||||
|
||||
render :layout => 'base_org2'
|
||||
render :layout => 'base_org_newstyle'
|
||||
else
|
||||
render_403
|
||||
end
|
||||
|
|
|
@ -63,67 +63,14 @@ module OrganizationsHelper
|
|||
def subfield_status_option
|
||||
type = []
|
||||
option1 = []
|
||||
option1 << "左上"
|
||||
option1 << "列表"
|
||||
option1 << "1"
|
||||
type << option1
|
||||
option2 = []
|
||||
option2 << "中一"
|
||||
option2 << "2"
|
||||
option2 << "图片"
|
||||
option2 << "0"
|
||||
type << option2
|
||||
option3 = []
|
||||
option3 << "中二"
|
||||
option3 << "3"
|
||||
type << option3
|
||||
option4 = []
|
||||
option4 << "中下"
|
||||
option4 << "4"
|
||||
type << option4
|
||||
option5 = []
|
||||
option5 << "左下"
|
||||
option5 << "5"
|
||||
type << option5
|
||||
option6 = []
|
||||
option6 << "右上"
|
||||
option6 << "6"
|
||||
type << option6
|
||||
option7 = []
|
||||
option7 << "右中"
|
||||
option7 << "7"
|
||||
type << option7
|
||||
option8 = []
|
||||
option8 << "右下"
|
||||
option8 << "8"
|
||||
type << option8
|
||||
type
|
||||
end
|
||||
|
||||
def subfield_list_type subfield
|
||||
case subfield.to_i
|
||||
when 1
|
||||
resulet = "左上"
|
||||
when 2
|
||||
resulet = "中一"
|
||||
when 3
|
||||
resulet = "中二"
|
||||
when 4
|
||||
resulet = "中下"
|
||||
when 5
|
||||
resulet = "左下"
|
||||
when 6
|
||||
resulet = "右上"
|
||||
when 7
|
||||
resulet = "右中"
|
||||
when 8
|
||||
resulet = "右下"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def get_subfield_acts field
|
||||
org_subfield = OrgSubfield.find(field.id)
|
||||
org_subfield_ids = org_subfield.org_document_comments.map(&:id) << 0
|
||||
org_acts = OrgActivity.where("(org_act_type='OrgDocumentComment'and org_act_id in (#{org_subfield_ids.join(",")})) || (container_type='OrgSubfield' and container_id=#{org_subfield.id})").order('updated_at desc')
|
||||
org_acts
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
默认
|
||||
<% 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 class="hidden"><%= subfield_list_type(field.status) %></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,
|
||||
|
@ -63,7 +63,7 @@
|
|||
列表
|
||||
<% 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 class="hidden"><%= subfield_list_type(field.status) %></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,
|
||||
|
|
Loading…
Reference in New Issue