Create setting to enable/disable attached documents

Add setting to both seed and dev_seeds as well as a rake task to make it
easier to set.
This commit is contained in:
Bertocq
2018-04-06 11:41:04 +02:00
committed by María Checa
parent 01f421717d
commit 35c156ba7a
5 changed files with 9 additions and 0 deletions

View File

@@ -45,6 +45,7 @@ en:
community: Community on proposals and investments community: Community on proposals and investments
map: Proposals and budget investments geolocation map: Proposals and budget investments geolocation
allow_images: Allow upload and show images allow_images: Allow upload and show images
allow_attached_documents: Allow upload and show of attached documents
map_latitude: Latitude map_latitude: Latitude
map_longitude: Longitude map_longitude: Longitude
map_zoom: Zoom map_zoom: Zoom

View File

@@ -45,6 +45,7 @@ es:
community: Comunidad en propuestas y proyectos de gasto community: Comunidad en propuestas y proyectos de gasto
map: Geolocalización de propuestas y proyectos de gasto map: Geolocalización de propuestas y proyectos de gasto
allow_images: Permitir subir y mostrar imágenes allow_images: Permitir subir y mostrar imágenes
allow_attached_documents: Permitir creación de documentos adjuntos
map_latitude: Latitud map_latitude: Latitud
map_longitude: Longitud map_longitude: Longitud
map_zoom: Zoom map_zoom: Zoom

View File

@@ -43,6 +43,7 @@ section "Creating Settings" do
Setting.create(key: 'feature.community', value: "true") Setting.create(key: 'feature.community', value: "true")
Setting.create(key: 'feature.map', value: "true") Setting.create(key: 'feature.map', value: "true")
Setting.create(key: 'feature.allow_images', value: "true") Setting.create(key: 'feature.allow_images', value: "true")
Setting.create(key: 'feature.allow_attached_documents', value: "true")
Setting.create(key: 'feature.public_stats', value: "true") Setting.create(key: 'feature.public_stats', value: "true")
Setting.create(key: 'feature.guides', value: nil) Setting.create(key: 'feature.guides', value: nil)

View File

@@ -85,6 +85,7 @@ Setting['feature.user.recommendations'] = true
Setting['feature.community'] = true Setting['feature.community'] = true
Setting['feature.map'] = nil Setting['feature.map'] = nil
Setting['feature.allow_images'] = true Setting['feature.allow_images'] = true
Setting['feature.allow_attached_documents'] = true
Setting['feature.guides'] = nil Setting['feature.guides'] = nil
# Spending proposals feature flags # Spending proposals feature flags

View File

@@ -8,4 +8,9 @@ namespace :settings do
per_page_code_setting.destroy if per_page_code_setting.present? per_page_code_setting.destroy if per_page_code_setting.present?
end end
desc "Create new Attached Documents feature setting"
task create_attached_documents_setting: :environment do
Setting['feature.allow_attached_documents'] = true
end
end end