<% title _("Changed environments") %> <%= form_tag controller.send("obsolete_and_new_#{controller_name}_path") do %>

<%= _("Select the changes you want to apply to Foreman") %>

<%= _("Toggle") %>: <%= link_to_function(icon_text("check", _("New")), "toggleCheckboxesBySelector('.env_select_boxes_new')", :title => _("Check/Uncheck new")) %> | <%= link_to_function(icon_text("check", _("Updated")), "toggleCheckboxesBySelector('.env_select_boxes_updated')", :title => _("Check/Uncheck updated")) %> | <%= link_to_function(icon_text("check", _("Obsolete")), "toggleCheckboxesBySelector('.env_select_boxes_obsolete')", :title => _("Check/Uncheck obsolete")) %>
<% for kind in ["new", "obsolete", "updated", "ignored"] %> <% unless (envs = @changed[kind]).empty? %> <% for env in envs.keys.sort %> <% unless kind == 'ignored' %> <% else %> <% end %> <% end %> <% end %> <% end %>
<%= link_to_function(icon_text("check"), "toggleCheckboxesBySelector('.env_select_boxes')", :title => _("Check/Uncheck all")) %> <%= _("Environment") %> <%= _("Operation") %> <%= _("Puppet Modules") %>
<%= check_box_tag "changed[#{kind}][#{env}]", @changed[kind][env].to_json, false, :class => "env_select_boxes env_select_boxes_#{kind} env_select_boxes_env_#{env}" %> <%= link_to_function("#{env}", "toggleCheckboxesBySelector('.env_select_boxes_env_#{env}')", :title => _("Check/Uncheck all %s changes") % env) %>   <%= env %> <%= {"new" => _("Add:"), "obsolete" => _("Remove:"), "updated" => _("Update:"), "ignored" => _("Ignored:")}[kind] %> <% pcs = @changed[kind][env] %> <%= class_update_text pcs, env %>
<%= link_to _("Cancel"), controller.send("#{controller_name}_path"), :class => "btn btn-default" %> <%= submit_tag _("Update"), :class => "btn btn-primary" %>
<% end %>