diff --git a/Gemfile b/Gemfile index 54f32939..08fec358 100644 --- a/Gemfile +++ b/Gemfile @@ -19,6 +19,7 @@ gem 'time_difference' gem "acts_as_unvlogable" gem 'youtube_it' gem 'gotcha' +gem "geocoder" # gem "memcached", "~> 1.4.3" # gem "memcache-client" diff --git a/app/assets/javascripts/back_end.js b/app/assets/javascripts/back_end.js index 0b2af80e..0cc02e49 100644 --- a/app/assets/javascripts/back_end.js +++ b/app/assets/javascripts/back_end.js @@ -3,4 +3,5 @@ //= require lib/all-list //= require lib/jquery.fastLiveFilter.js //= require lib/checkbox.card.js -//= require lib/jquery.form.js \ No newline at end of file +//= require lib/jquery.form.js +//= require jquery_nested_form \ No newline at end of file diff --git a/app/controllers/mobile_controller.rb b/app/controllers/mobile_controller.rb index 163f3143..39aeab10 100644 --- a/app/controllers/mobile_controller.rb +++ b/app/controllers/mobile_controller.rb @@ -27,6 +27,7 @@ class MobileController < ApplicationController end def dialog_contact + @site = Site.first @no_menu = @no_footer = true @page_title = t('mobile.contact') end @@ -42,6 +43,8 @@ class MobileController < ApplicationController end def map + site = Site.first + @coordinates = Geocoder.coordinates("#{site.address}") @no_menu = @no_footer = true @page_title = t('mobile.location') end diff --git a/app/models/site.rb b/app/models/site.rb index 81006454..95ba2d98 100644 --- a/app/models/site.rb +++ b/app/models/site.rb @@ -42,6 +42,8 @@ class Site field :sub_menu, localize: true field :terms_of_use, localize: true field :google_analytics + field :address + field :phone_number, :type => Hash,:default=>{} field :mobile_on, :type => Boolean, :default => false diff --git a/app/views/admin/sites/responsive_setting.html.erb b/app/views/admin/sites/responsive_setting.html.erb index 14e70822..6e424f22 100644 --- a/app/views/admin/sites/responsive_setting.html.erb +++ b/app/views/admin/sites/responsive_setting.html.erb @@ -35,6 +35,26 @@ +