app/views/spotlight/resources/new.html.erb in blacklight-spotlight-2.7.2 vs app/views/spotlight/resources/new.html.erb in blacklight-spotlight-2.8.0

- old
+ new

@@ -2,17 +2,23 @@ <div id="content" class="col-md-9"> <%= curation_page_title %> <div role="tabpanel"> <ul class="nav nav-tabs" role="tablist"> <% Spotlight::Engine.config.resource_partials.each_with_index do |p, i| %> - <li role="presentation" class="<%= "active" if i == 0 %>"> - <%= link_to t("#{p.gsub('/', '.')}.title"), "#tab_#{i}", role: 'tab', 'data-toggle' => 'tab', 'aria-controls' => "tab_#{i}" %> + <% tab_name = p.split('/')[2] %> + <li role="presentation" class="<%= "active" if @tab == tab_name %>"> + <%= link_to t("#{p.gsub('/', '.')}.title"), + "##{tab_name}", + role: 'tab', + 'data-toggle' => 'tab', + 'aria-controls' => "#{tab_name}" %> </li> <% end %> </ul> <div class="tab-content"> <% Spotlight::Engine.config.resource_partials.each_with_index do |p, i| %> - <%= content_tag :div, id: "tab_#{i}", role: 'tabpanel', class: "tab-pane #{"active" if i == 0}" do %> + <% tab_name = p.split('/')[2] %> + <%= content_tag :div, id: "#{tab_name}", role: 'tabpanel', class: "tab-pane #{"active" if @tab == tab_name}" do %> <%= render p %> <% end %> <% end %> </div> </div>