<% custom_options = [OpenStruct.new(id: 0, value: "", default_value: false)] if custom_options.empty? %> <% custom_options.each_with_index do |custom_option, i| %> <% end %>
<%= t('activerecord.attributes.custom_value.value') %>
<%= t(:label_default) %>
<%= t(:button_sort) %>
name="custom_field[custom_options][<%= custom_option.id %>][default_value]" > <%= op_icon('icon-context icon-sort-up icon-small') %> <%= op_icon('icon-context icon-arrow-up2 icon-small') %> <%= op_icon('icon-context icon-arrow-down2 icon-small') %> <%= op_icon('icon-context icon-sort-down icon-small') %> <%= link_to t(:button_delete), delete_option_of_custom_field_path(id: @custom_field.id || 0, option_id: custom_option.id), method: :delete, data: { confirm: "Deleting an option will delete oll of its occurrences (e.g. in work packages). Are you sure you want to delete it? " }, class: 'icon icon-delete delete-custom-option' %>