<%= index_field_wrapper field: @field do %> <% if @parent_model.present? path = helpers.resource_path(@resource.model, via_resource_class: @parent_model.class, via_resource_id: @parent_model.id) else path = helpers.resource_path(@resource.model) end %> <% link_to_if (@field.link_to_resource or Avo.configuration.id_links_to_resource), @field.value, path, title: t('avo.view_item', { item: @resource.name}).humanize %> <% end %>