<%= check_box_tag('show_all', 1, @all, :onchange => defined?(remote_function) ? remote_function(:url => { :action => 'tree' }, :method => :get, :with => "'hook=' + selected_hook + '&by=' + structured_by + '&all=' + ($('show_all').checked ? 1 : 0)") : "updateHooksTree('#{url_for(:action => 'tree', :format => 'js')}', structured_by)") %> <%= l(:label_show_all_hooks) %>

<% @tree.sort.each do |group, items| %> <% close = true %> <% items.each do |item, hooks| %> <% if hooks[@placeholder[:hook]] %> <% close = false %> <% break %> <% end %> <% end %> <% items.sort.each do |item, hooks| %> <% hooks.sort{ |a, b| a[1][:description] <=> b[1][:description] }.each do |hook, placeholder| %> <% end %> <% end %> <% end %>
  <%= group %>
"updateSelectedHook('#{hook}')") : "updateHookForm('#{url_for(:action => 'load', :hook => hook, :format => 'js')}', '#{hook}', '#{l(:text_html_code_not_saved)}')" %>" class="icon icon-file <%= 'text-plain' if @hooks[hook] && @hooks[hook][:html_code] %> <%= 'selected' if @placeholder[:hook] == hook %>"> <%= item %> <% unless placeholder[:description].empty? %> (<%= placeholder[:description] %>) <% end %>