<% title _('Salt States') %> <% title_actions import_from_proxies, button_group(new_link(_('New Salt State'))) %> <% for salt_module in @salt_modules %> <% end %>
<%= sort :name, :as => s_('SaltModule|Name') %> <%= _('Environments') %> <%= sort :host, :as => _('Hosts'), :default => 'DESC' %> <%= sort :hostgroup, :as => _('Host groups'), :default => 'DESC' %>
<%= link_to_if_authorized(colorize(salt_module.name), hash_for_edit_salt_module_path(:id => salt_module)) %> <% salt_module.salt_environments.sort.each do |environment| -%> <%= link_to environment.name, :controller => :'foreman_salt/salt_modules', :action => :index, :search => "environment = #{environment.name}" %> <% end -%> <%= link_to_if_authorized(salt_module.hosts.count, hash_for_hosts_path(:search => "salt_state = #{salt_module}")) %> <%= link_to_if_authorized(salt_module.hostgroups.count, hash_for_hostgroups_path(:search => "salt_state = #{salt_module}")) %> <% links = [ link_to( _('Variables'), salt_variables_path(:search => "salt_module = #{salt_module}")), display_link_if_authorized(_('Edit'), hash_for_edit_salt_module_path(:id => salt_module).merge(:auth_object => salt_module, :authorizer => authorizer)), display_delete_if_authorized(hash_for_salt_module_path(:id => salt_module).merge(:auth_object => salt_module, :authorizer => authorizer), :confirm => _('Delete %s?') % salt_module.name) ] %> <%= action_buttons(*links) %>
<%= will_paginate_with_info @salt_modules %>