diff --git a/app/controllers/editor_controller.rb b/app/controllers/editor_controller.rb index 33bfcf468c..182391a537 100644 --- a/app/controllers/editor_controller.rb +++ b/app/controllers/editor_controller.rb @@ -34,6 +34,14 @@ def rich if params[:main_image] && Image.find_by(id: params[:main_image]) @main_image = Image.find_by(id: params[:main_image]).path end + + if params[:tags]&.include? "lat:" and params[:tags]&.include? "lon:" + tags = params[:tags].split(',') + tags.each do |x| + x.include? "lat:" and (@lat = x.split(':')[1]) + x.include? "lon:" and (@lon = x.split(':')[1]) + end + end template if params[:n] && !params[:body] # use another node body as a template image if params[:i] end diff --git a/app/views/editor/rich.html.erb b/app/views/editor/rich.html.erb index 3d8b8deab9..b485c039dc 100644 --- a/app/views/editor/rich.html.erb +++ b/app/views/editor/rich.html.erb @@ -304,14 +304,8 @@