Sha256: 6d1eda420df18ce2f261900b65cda8938439c007b1de87084c247e30b876fad7

Contents?: true

Size: 1.35 KB

Versions: 6

Compression:

Stored size: 1.35 KB

Contents

<%= f.input :caption, as: ingredient.settings[:caption_as_textarea] ? 'text' : 'string' %>
<%= f.input :title %>
<%= f.input :alt_tag, as: :text, placeholder: ingredient.alt_text(language: @language) %>
<%- if ingredient.settings[:sizes].present? && ingredient.settings[:srcset].blank? -%>
  <%= f.input :render_size,
    collection: [
      [Alchemy.t('Layout default'), ""]
    ] + ingredient.settings[:sizes].to_a,
    include_blank: false %>
<%- end -%>
<%- if ingredient.settings[:css_classes].present? -%>
  <% css_classes = ingredient.settings[:css_classes] %>
  <% css_classes_collection = case css_classes.first
    when Array
      then css_classes
    else
      css_classes.map do |klass|
        [Alchemy.t(klass, scope: "picture_ingredients.css_classes", default: picture_editor.css_class.camelcase), klass]
      end
    end %>
  <%= f.input :css_class, collection: css_classes_collection, include_blank: false %>
<%- else -%>
  <% Alchemy::Deprecation.warn %(Float positioning in Picture ingredients is deprecated. If you rely on them, please use `css_classes` in your "#{ingredient.role}" settings instead.) %>
  <%= f.input :css_class,
    label: Alchemy.t(:position_in_text),
    collection: [
      [Alchemy.t(:above), "no_float"],
      [Alchemy.t(:left), "left"],
      [Alchemy.t(:right), "right"]
    ], include_blank: Alchemy.t("Layout default") %>
<%- end -%>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
alchemy_cms-7.3.5 app/views/alchemy/admin/ingredients/_picture_fields.html.erb
alchemy_cms-7.3.4 app/views/alchemy/admin/ingredients/_picture_fields.html.erb
alchemy_cms-7.3.3 app/views/alchemy/admin/ingredients/_picture_fields.html.erb
alchemy_cms-7.3.2 app/views/alchemy/admin/ingredients/_picture_fields.html.erb
alchemy_cms-7.3.1 app/views/alchemy/admin/ingredients/_picture_fields.html.erb
alchemy_cms-7.3.0 app/views/alchemy/admin/ingredients/_picture_fields.html.erb