Sha256: 3f6ba39cb281bdf7f3c2433791b8e20e4119910df7d83f2a660875e65a29f702

Contents?: true

Size: 745 Bytes

Versions: 5

Compression:

Stored size: 745 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

5 entries across 5 versions & 1 rubygems

Version Path
camaleon_cms-1.0.4 app/views/admin/settings/custom_fields/fields/posts.html.erb
camaleon_cms-1.0.3 app/views/admin/settings/custom_fields/fields/posts.html.erb
camaleon_cms-1.0.2 app/views/admin/settings/custom_fields/fields/posts.html.erb
camaleon_cms-1.0.1 app/views/admin/settings/custom_fields/fields/posts.html.erb
camaleon_cms-1.0 app/views/admin/settings/custom_fields/fields/posts.html.erb