forked from saurabh/personal-conference
Add hide time fields setting file for create_link.
This commit is contained in:
parent
8754efc4c1
commit
37f1669e7b
|
@ -6,7 +6,7 @@ class WritingConference
|
||||||
include OrbitTag::Taggable
|
include OrbitTag::Taggable
|
||||||
include MemberHelper
|
include MemberHelper
|
||||||
include Slug
|
include Slug
|
||||||
|
HideTimeInLinK = (File.exist?("#{Rails.root}/hide_time_fields_for_plugins.txt") rescue false)
|
||||||
field :paper_title, as: :slug_title, localize: true
|
field :paper_title, as: :slug_title, localize: true
|
||||||
field :conference_title, localize: true
|
field :conference_title, localize: true
|
||||||
field :authors, localize: true
|
field :authors, localize: true
|
||||||
|
@ -63,6 +63,7 @@ class WritingConference
|
||||||
title << "vol. " + self.vol_no.strip if (self.vol_no.present? && self.vol_no != "0")
|
title << "vol. " + self.vol_no.strip if (self.vol_no.present? && self.vol_no != "0")
|
||||||
title << self.issue_no if (self.issue_no.present? && self.issue_no != "0")
|
title << self.issue_no if (self.issue_no.present? && self.issue_no != "0")
|
||||||
title << "pp." + self.form_to_start.to_s+"-"+self.form_to_end.to_s if (self.form_to_start.present? && self.form_to_start != "0")
|
title << "pp." + self.form_to_start.to_s+"-"+self.form_to_end.to_s if (self.form_to_start.present? && self.form_to_start != "0")
|
||||||
|
unless HideTimeInLinK
|
||||||
if self.period_start_date.present? && self.period_end_date.present?
|
if self.period_start_date.present? && self.period_end_date.present?
|
||||||
title << self.duration
|
title << self.duration
|
||||||
elsif !self.publication_date.nil?
|
elsif !self.publication_date.nil?
|
||||||
|
@ -70,6 +71,7 @@ class WritingConference
|
||||||
elsif self.year.present?
|
elsif self.year.present?
|
||||||
title << self.year
|
title << self.year
|
||||||
end
|
end
|
||||||
|
end
|
||||||
if self.location.present?
|
if self.location.present?
|
||||||
title << self.location
|
title << self.location
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue