mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
22 lines
539 B
Ruby
22 lines
539 B
Ruby
module Admin
|
|
module ImageSettingsHelper
|
|
def admin_image_settings_format_options
|
|
[['Unchanged', ''], ['PNG', 'png'], ['JPEG', 'jpg']]
|
|
end
|
|
|
|
def admin_image_settings_geometry_from_style(style)
|
|
geometry, _format = admin_image_settings_split_style style
|
|
geometry
|
|
end
|
|
|
|
def admin_image_settings_format_from_style(style)
|
|
_geometry, format = admin_image_settings_split_style style
|
|
format
|
|
end
|
|
|
|
def admin_image_settings_split_style(style)
|
|
[style, nil].flatten[0..1]
|
|
end
|
|
end
|
|
end
|