small indentation
This commit is contained in:
parent
b53e1797e7
commit
eb8037a99b
|
@ -129,20 +129,21 @@ module Admin::PersonalConferencesHelper
|
||||||
conference.member_profile = mp
|
conference.member_profile = mp
|
||||||
conference.save
|
conference.save
|
||||||
end
|
end
|
||||||
def get_data_for_excel(year_start,year_end)
|
|
||||||
data = []
|
def get_data_for_excel(year_start,year_end)
|
||||||
roles = Role.where(:disabled => false, :title.ne => "", :title.ne => nil).asc(:key)
|
data = []
|
||||||
roles.each do |role|
|
roles = Role.where(:disabled => false, :title.ne => "", :title.ne => nil).asc(:key)
|
||||||
d = {}
|
roles.each do |role|
|
||||||
d["name"] = role.title
|
d = {}
|
||||||
mps = role.member_profile_ids
|
d["name"] = role.title
|
||||||
d1 = DateTime.new(year_start,1,1,0,0)
|
mps = role.member_profile_ids
|
||||||
d2 = DateTime.new(year_end,12,31,23,59)
|
d1 = DateTime.new(year_start,1,1,0,0)
|
||||||
d["data"] = WritingConference.where(:publication_date.gte => d1, :publication_date.lte => d2, :member_profile_id.in => mps) rescue []
|
d2 = DateTime.new(year_end,12,31,23,59)
|
||||||
data << d
|
d["data"] = WritingConference.where(:publication_date.gte => d1, :publication_date.lte => d2, :member_profile_id.in => mps) rescue []
|
||||||
end
|
data << d
|
||||||
return data
|
end
|
||||||
end
|
return data
|
||||||
|
end
|
||||||
|
|
||||||
def get_chart_data(year_start,year_end,role,type)
|
def get_chart_data(year_start,year_end,role,type)
|
||||||
case type
|
case type
|
||||||
|
|
Loading…
Reference in New Issue