Add map settings to backend. Install leaflet assets to render maps.
This commit is contained in:
@@ -14,6 +14,13 @@ class Admin::SettingsController < Admin::BaseController
|
||||
redirect_to admin_settings_path, notice: t("admin.settings.flash.updated")
|
||||
end
|
||||
|
||||
def update_map
|
||||
Setting["map.latitude"] = params[:latitude].to_f
|
||||
Setting["map.longitude"] = params[:longitude].to_f
|
||||
Setting["map.zoom"] = params[:zoom].to_i
|
||||
redirect_to admin_settings_path, notice: t("admin.settings.index.map.flash.update")
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def settings_params
|
||||
|
||||
Reference in New Issue
Block a user