AutoCommit Mon Jun 8 17:03:02 CEST 2015
This commit is contained in:
@@ -89,12 +89,16 @@ end
|
||||
ApplicationController.helpers.fa_icon("calendar 2x") + self.text
|
||||
end
|
||||
def text
|
||||
if (self.start.to_date - self.ende.to_date) < 1.day
|
||||
format=:timeonly
|
||||
if self.start.nil? || self.ende.nil?
|
||||
"error"
|
||||
else
|
||||
format =:default
|
||||
if (self.start.to_date - self.ende.to_date) < 1.day
|
||||
format=:timeonly
|
||||
else
|
||||
format =:default
|
||||
end
|
||||
I18n.l(self.start) +" "+ I18n.t("cal.bis")+" "+ I18n.l(self.ende, :format=>format)
|
||||
end
|
||||
I18n.l(self.start) +" "+ I18n.t("cal.bis")+" "+ I18n.l(self.ende, :format=>format)
|
||||
end
|
||||
scope :public, -> { where(:public => :true) }
|
||||
# scope :upcoming, -> { where("start >= ?" , Time.now).where("start <= ?", 28.days.from_now) }
|
||||
|
||||
Reference in New Issue
Block a user