app/views/refinery/teams/admin/categories/_category.html.erb
<% # setup params for various action links
new_child_add_url = refinery.new_teams_admin_category_path(:parent_id => category.id)
edit_url = refinery.edit_teams_admin_category_path(category)
delete_url = refinery.teams_admin_category_path(category)
delete_options = {
class: "cancel confirm-delete",
data: {confirm: t('message', scope: 'refinery.admin.delete', title: category.title)}
}
%>
<li class='clearfix record icons <%= cycle("on", "on-hover") %>' id="<%= dom_id(category) -%>">
<div class='clearfix'>
<span class="icon" %></span>
<span class='title'>
<%= title_with_translations category %>
<span class="preview">
<% if Refinery::I18n.frontend_locales.many? %>
<span class='locales'>
<% category.translations.sort_by{ |t| Refinery::I18n.frontend_locales.index(t.locale)}.each do |translation| %>
<% if translation.title.present? %>
<%= link_to refinery.edit_teams_admin_category_path(category, :switch_locale => translation.locale), :class => 'locale', title: translation.locale.upcase do %>
<div class="<%=translation.locale %> locale_marker">
<%= locale_text_icon(translation.locale.upcase) %>
</div>
<% end %>
<% end %>
<% end %>
</span>
<% end %>
</span>
</span>
<span class='actions'>
<%= action_icon(:add, new_child_add_url, t('.new_child' ) ) %>
<%= action_icon(:edit, edit_url, t('.edit' ) ) %>
<%= action_icon(:delete, delete_url, t('.delete' ), delete_options ) %>
</span>
</div>
<ul class='nested' data-ajax-content="<%= refinery.children_teams_admin_category_path(category.id) %>">
<%= render(:partial => 'category', :collection => category.children) %>
</ul>
</li>