Add map settings to backend. Install leaflet assets to render maps.

This commit is contained in:
Senén Rodero Rodríguez
2017-08-03 19:46:23 +02:00
parent ea5a7af5fd
commit 6c1d1c2cde
17 changed files with 202 additions and 4 deletions

View File

@@ -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