|
<div class="user-filter">
|
|
<%= field_set_tag _("Owned hosts") do %>
|
|
<div class="form-group">
|
|
<%= _('Select') %> <%= f.check_box :filter_on_owner %>
|
|
<%= contracted_host_list @user %>
|
|
<%= expanded_host_list @user %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<%= field_set_tag _("Domain hosts") do %>
|
|
<div class="form-group col-md-2">
|
|
<%= f.select :domains_andor, [[_("in domain"), "and"], [_("plus all"), "or"]], {}, :class => "form-control" %>
|
|
</div>
|
|
<%= multiple_checkboxes f, :domain, @user, Domain, :label=>'' %>
|
|
<% end %>
|
|
|
|
<%= field_set_tag _("Compute resources") do %>
|
|
<div class="form-group col-md-2">
|
|
<%= f.select :compute_resources_andor, [[_("must be"), "and"], [_("plus all"), "or"]], {}, :class => "form-control" %>
|
|
</div>
|
|
<%= multiple_checkboxes f, :compute_resources, @user, ComputeResource, :label=>'' %>
|
|
<% end %>
|
|
|
|
<%= field_set_tag _("Host group hosts") do %>
|
|
<%= checkbox_f f, :subscribe_to_all_hostgroups, :help_text => _("Automatically add new host groups to this user") %>
|
|
<div class="form-group col-md-2">
|
|
<%= f.select :hostgroups_andor, [[_("must be"), "and"], [_("plus all"), "or"]], {}, :class => "form-control" %>
|
|
</div>
|
|
<%= multiple_checkboxes f, :hostgroups, @user, Hostgroup, :label=>'' %>
|
|
<% end %>
|
|
|
|
<%= field_set_tag _("Fact filters") do %>
|
|
<div class="form-group col-md-2">
|
|
<%= f.select :facts_andor, [[_("must match"), "and"], [_("plus all"), "or"]], {} ,:class => "form-control" %>
|
|
</div>
|
|
<div class="col-md-offset-2">
|
|
<%= f.fields_for :user_facts do |builder| %>
|
|
<%= render "user_fact", :f => builder %>
|
|
<% end %>
|
|
<% if authorized_for(:controller => params[:controller], :action => params[:action]) %>
|
|
<%= link_to_add_fields('+ ' + _("Add Filter"), f, :user_facts, "user_fact", :title => _("Add a fact filter")) %>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|