%# Usage: render partial: 'content/list/list', locals: { content_list: @content, content_type: @content_type_class, show_add_another_form: true } %> <% category_ids_for_this_content_type = AttributeCategory.where(entity_type: content_type.name.downcase, user_id: current_user).pluck(:id) name_field = AttributeField.find_by(field_type: 'name', attribute_category_id: category_ids_for_this_content_type) # todo description field content_ids = content_list.pluck(:id) if name_field list_name_lookup_cache = Hash[ name_field.attribute_values.where( entity_type: content_type.name ).pluck(:entity_type, :entity_id, :value).map { |page_type, page_id, value| ["#{page_type}_#{page_id}", value]} ] else list_name_lookup_cache = {} end %>
<% if user_signed_in? %>
<% end %>