Sha256: ddd50880ea31463c0cb9988a8eb8743ec8de9ac71376cf1a5df96f6674f5a103

Contents?: true

Size: 972 Bytes

Versions: 41

Compression:

Stored size: 972 Bytes

Contents

<%
def _render_category_option_html(item, pos = 0)
  category = item.decorate
  value = "Category_Post,#{category.id}" %>
  <option value="<%= value %>" data-help="<%= "#{t('camaleon_cms.admin.settings.tooltip.add_custom_field_posts')}"+ category.the_title %>"><%=  "#{('—' * pos)} #{category.the_title}" %></option>
<% end

   def _render_categories(categories, _level = 0)
     categories.each do |term|
       _render_category_option_html(term, _level)
        children = term.children
       _render_categories(children, _level + 1) if children.size > 0
     end
   end
%>


  <select id="select_category_simple" name="custom_field_group[assign_group]" class="form-control required" style="display: none" disabled>
    <% current_site.post_types.each do |pt| pt = pt.decorate
        next unless pt.manage_categories?   %>
        <optgroup label="<%= pt.the_title %>">
          <% _render_categories(pt.categories) %>
        </optgroup>
    <% end %>
  </select>

Version data entries

41 entries across 41 versions & 2 rubygems

Version Path
camaleon_cms-2.9.1 app/views/camaleon_cms/admin/settings/custom_fields/_render_category_simple.html.erb
camaleon_cms-2.9.0 app/views/camaleon_cms/admin/settings/custom_fields/_render_category_simple.html.erb
camaleon_cms-2.8.3 app/views/camaleon_cms/admin/settings/custom_fields/_render_category_simple.html.erb
camaleon_cms-2.8.2 app/views/camaleon_cms/admin/settings/custom_fields/_render_category_simple.html.erb
camaleon_cms-2.8.1 app/views/camaleon_cms/admin/settings/custom_fields/_render_category_simple.html.erb
camaleon_cms-2.8.0 app/views/camaleon_cms/admin/settings/custom_fields/_render_category_simple.html.erb
camaleon_cms-2.7.5 app/views/camaleon_cms/admin/settings/custom_fields/_render_category_simple.html.erb
camaleon_cms-2.7.4 app/views/camaleon_cms/admin/settings/custom_fields/_render_category_simple.html.erb
camaleon_cms-2.7.3 app/views/camaleon_cms/admin/settings/custom_fields/_render_category_simple.html.erb
camaleon_cms-2.7.2 app/views/camaleon_cms/admin/settings/custom_fields/_render_category_simple.html.erb
camaleon_cms-2.7.1 app/views/camaleon_cms/admin/settings/custom_fields/_render_category_simple.html.erb
camaleon_cms-2.7.0 app/views/camaleon_cms/admin/settings/custom_fields/_render_category_simple.html.erb
camaleon_cms-2.6.4 app/views/camaleon_cms/admin/settings/custom_fields/_render_category_simple.html.erb
camaleon_cms-2.6.3 app/views/camaleon_cms/admin/settings/custom_fields/_render_category_simple.html.erb
camaleon_cms-2.6.2 app/views/camaleon_cms/admin/settings/custom_fields/_render_category_simple.html.erb
camaleon_cms-2.6.1 app/views/camaleon_cms/admin/settings/custom_fields/_render_category_simple.html.erb
camaleon_cms-2.6.0.1 app/views/camaleon_cms/admin/settings/custom_fields/_render_category_simple.html.erb
camaleon_cms-2.6.0 app/views/camaleon_cms/admin/settings/custom_fields/_render_category_simple.html.erb
camaleon_cms-2.5.3.1 app/views/camaleon_cms/admin/settings/custom_fields/_render_category_simple.html.erb
camaleon_cms-2.5.3 app/views/camaleon_cms/admin/settings/custom_fields/_render_category_simple.html.erb