<%
  unsorted_featured_links = form.featured_links

  featured_links = if unsorted_featured_links.any?
    unsorted_featured_links.sort_by { |tt| tt.created_at || Time.current }
  else
    [featured_link_class.new]
  end
%>

<fieldset class="named <%= type.tr('_', '-') %> form-horizontal js-duplicate-fields">
  <legend>Featured links</legend>
  <p class="alert alert-info">Only the first 5 links will be shown on the public site.</p>

  <%= form.fields_for(:featured_links, featured_links) do |featured_links_form| %>
    <div class="js-duplicate-fields-set well">
      <%= featured_links_form.text_field :title, horizontal: true %>
      <%= featured_links_form.text_field :url, horizontal: true %>
      <%= featured_links_form.hidden_field :_destroy, class: 'js-hidden-destroy' %>
    </div>
  <% end %>
</fieldset>

<%
  unsorted_featured_links = form.object.featured_links

  if form.object.respond_to?(:visible_featured_links_count)
    visible_links = form.object.visible_featured_links_count
  else
    visible_links = FeaturedLink::DEFAULT_SET_SIZE
  end

  featured_links = if unsorted_featured_links.any?
    unsorted_featured_links.sort_by { |tt| tt.created_at || Time.current }
  else
    [FeaturedLink.new]
  end
%>

<fieldset class="named featured-links form-horizontal js-duplicate-fields">
  <legend>Featured links</legend>
  <p class="alert alert-info">Only the first <%= visible_links %> links will be shown on the public site.</p>

  <%= form.fields_for(:featured_links, featured_links) do |featured_links_form| %>
    <div class="js-duplicate-fields-set well">
      <%= featured_links_form.text_field :title, horizontal: true %>
      <%= featured_links_form.text_field :url, horizontal: true %>
      <%= featured_links_form.hidden_field :_destroy, class: 'js-hidden-destroy' %>
    </div>
  <% end %>
</fieldset>

Update admin to show featured links
Update admin to show featured links
