This commit is contained in:
BoHung Chiu 2023-04-24 10:22:37 +08:00
parent cdab52dba1
commit 20f893e5b9
1 changed files with 8 additions and 1 deletions

View File

@ -135,7 +135,14 @@ input.minicolors-input{
<%= t('gallery.thumb_resize_reference') %>
</label>
<div class="controls">
<%= f.select :resize_gravity, [["---#{t("default")}: #{t("gallery.gravity.#{AlbumSetting::ResizeGravities[0]}")}---",nil]]+AlbumSetting::ResizeGravities.collect{|v| [t("gallery.gravity.#{v}"),v]} %>
<%
default_resize_gravity = AlbumSetting::ResizeGravities[0]
setting = AlbumSetting.first
if setting
default_resize_gravity = setting.resize_gravity
end
%>
<%= f.select :resize_gravity, [["---#{t("default")}: #{t("gallery.gravity.#{default_resize_gravity}")}---",nil]]+AlbumSetting::ResizeGravities.collect{|v| [t("gallery.gravity.#{v}"),v]} %>
</div>
</div>
<div class="control-group" style='display: flex;'>