Sha256: 58e08068258177631a6935e9fe75f99c45d0aec263e88757a333e8545d1443a9

Contents?: true

Size: 740 Bytes

Versions: 6

Compression:

Stored size: 740 Bytes

Contents

<div class="group-input-fields-content">
  <select name="<%= field_name %>[<%= field.slug %>][values][]" class="form-control input-value <%= "required" if field.options[:required].to_s.to_bool %>" >
    <option value=""></option>
    <% if field.options[:post_types].present? %>
    <% (field.options[:post_types].include?("all") ? current_site.post_types : current_site.post_types.where(id: field.options[:post_types])).each do |pt| %>
        <optgroup label="<%= pt.name %>">
        <%
        pt.posts.public_posts.each do |post|
            post = post.decorate
        %>
            <option value="<%= post.id %>"><%= post.the_title %></option>
        <%  end %>
        </optgroup>
    <%  end %>
    <% end %>
  </select>
</div>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
camaleon_cms-2.3.3 app/views/camaleon_cms/admin/settings/custom_fields/fields/_posts.html.erb
camaleon_cms-2.3.2 app/views/camaleon_cms/admin/settings/custom_fields/fields/_posts.html.erb
camaleon_cms-2.3.1 app/views/camaleon_cms/admin/settings/custom_fields/fields/_posts.html.erb
camaleon_cms-2.3.0 app/views/camaleon_cms/admin/settings/custom_fields/fields/_posts.html.erb
camaleon_cms-2.2.1 app/views/camaleon_cms/admin/settings/custom_fields/fields/_posts.html.erb
camaleon_cms-2.2.0 app/views/camaleon_cms/admin/settings/custom_fields/fields/_posts.html.erb