|
<%= javascript "lookup_keys" %>
|
|
<% title _("Smart variables") %>
|
|
<% title_actions documentation_button('4.2.4SmartVariables') %>
|
|
<table class="table table-bordered table-striped table-two-pane">
|
|
<thead>
|
|
<tr>
|
|
<th><%= sort :key, :as => _("Variable") %></th>
|
|
<th><%= sort :puppetclass, :as => _("Puppetclass") %></th>
|
|
<th><%= sort :values_count, :as => _('Number of values'), :default => "DESC" %></th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @lookup_keys.each do |lookup_key| %>
|
|
<tr>
|
|
<td class="display-two-pane"><%= link_to_if_authorized trunc_with_tooltip(lookup_key.key), hash_for_edit_variable_lookup_key_path(:id => lookup_key).merge(:auth_object => lookup_key, :permission => 'edit_external_variables', :authorizer => authorizer) %></td>
|
|
<td><%= link_to_if_authorized trunc_with_tooltip(lookup_key.puppetclass), hash_for_edit_puppetclass_path(:id => lookup_key.puppetclass).merge(:auth_object => lookup_key.puppetclass, :authorizer => @puppetclass_authorizer) %></td>
|
|
<td><%=h lookup_key.lookup_values_count %></td>
|
|
<td><%= display_delete_if_authorized hash_for_lookup_key_path(:id => lookup_key).merge(:auth_object => lookup_key, :permission => 'destroy_external_variables', :authorizer => authorizer),
|
|
:data => { :confirm => _("Delete %s?") % lookup_key.key } %></td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<%= will_paginate_with_info @lookup_keys %>
|