show period fix
This commit is contained in:
parent
6916341f5d
commit
cd20c50152
|
@ -37,7 +37,11 @@ class Project
|
|||
scope :sort_for_frontend, ->{ where(:is_hidden=>false).order_by(:year=>'desc', :period_start_date=>'desc') }
|
||||
|
||||
def duration
|
||||
"#{self.period_start_date.strftime("%Y.%m") rescue ""} ~ #{self.period_end_date.strftime("%Y.%m") rescue ""}"
|
||||
if !self.send('period_start_date').nil? or !self.send('period_end_date').nil?
|
||||
date = (self.send('period_start_date').strftime('%Y.%m') rescue "")+' ~ '+(self.send('period_end_date').strftime('%Y.%m') rescue I18n.t('personal_project.up_to_today'))
|
||||
else
|
||||
date = ""
|
||||
end
|
||||
end
|
||||
|
||||
def self.get_plugin_datas_to_member(datas)
|
||||
|
|
Loading…
Reference in New Issue