diff --git a/app/helpers/geocoder_helper.rb b/app/helpers/geocoder_helper.rb index ed1507f..60a93e5 100644 --- a/app/helpers/geocoder_helper.rb +++ b/app/helpers/geocoder_helper.rb @@ -84,9 +84,13 @@ module GeocoderHelper return hash.length > 1 ? _("geography.formats.#{hash.keys.join('_')}", locale: locale, vars: hash) : hash.values.first end - def location_link(location) + def location_link(location, text = nil) return '' unless location.present? - address = if location.is_a?(Location) + address = if text is_a?(Symbol) + location.send(text) + elsif location.is_a?(String) + text + elsif location.is_a?(Location) location.street else location.address diff --git a/app/views/conference_administration/_schedule.html.haml b/app/views/conference_administration/_schedule.html.haml index 20e3687..17c9210 100644 --- a/app/views/conference_administration/_schedule.html.haml +++ b/app/views/conference_administration/_schedule.html.haml @@ -15,7 +15,7 @@ %tr %th.corner - data[:locations].each do |id, location| - %th.location-header=location.is_a?(Symbol) ? '' : location_link(location) + %th.location-header=location.is_a?(Symbol) ? '' : location_link(location, :title) %tbody - data[:times].each do |time, time_data| %tr{class: "row-type-#{time_data[:type] || 'nil'}"}