]> cat aescling's git repositories - mastodon.git/commitdiff
Don't show skins selector when there's only one (#256)
authorkibigo! <marrus-sh@users.noreply.github.com>
Tue, 9 Jan 2018 00:45:32 +0000 (16:45 -0800)
committerkibigo! <marrus-sh@users.noreply.github.com>
Tue, 9 Jan 2018 00:45:32 +0000 (16:45 -0800)
app/views/settings/flavours/show.html.haml

index 43c0377370929ba2239ede0f4e9659b3717f992c..a5126d9c52949fd79f462d10d0e771d83c836f39 100644 (file)
@@ -12,8 +12,9 @@
 
   %hr/
 
-  .fields-group
-    = f.input :setting_skin, collection: Themes.instance.skins_for(@selected), label_method: lambda { |skin| I18n.t("skins.#{@selected}.#{skin}", default: skin) }, wrapper: :with_label, include_blank: false
+  - if Themes.instance.skins_for(@selected).length > 1
+    .fields-group
+      = f.input :setting_skin, collection: Themes.instance.skins_for(@selected), label_method: lambda { |skin| I18n.t("skins.#{@selected}.#{skin}", default: skin) }, wrapper: :with_label, include_blank: false
 
   .actions
     = f.button :button, t('generic.use_this'), type: :submit