Project

General

Profile

Download (1.19 KB) Statistics
| Branch: | Tag: | Revision:
0f9df583 Amos Benari
<% lookup_keys = overridable_lookup_keys(puppetclass, obj) %>
3a96ba00 Amos Benari
<% value_hash = Classification::ClassParam.new(:host=>obj).inherited_values if obj.class.model_name == "Host" %>
4d4557e9 Joseph Magen
<% lookup_keys.each_with_index do |key,i| %>
0f9df583 Amos Benari
<tr id="puppetclass_<%= puppetclass.id %>_params[<%= key.id %>]">
298756ca Amos Benari
<%= content_tag :td, (i == 0 ? {:rowspan => lookup_keys.size} : {:class => 'hide'}) do
# In order to use the class .hide-first-col, we must have an extra, invisible cell.
# Plus, we make the class name available from javascript without having to look at any previous row.
0f9df583 Amos Benari
content_tag :span, puppetclass.name, :'data-property' => 'class'
298756ca Amos Benari
end %>
bf4a13d3 Walden Raines
<td><%= content_tag :span, key.key, :class => "col-md-2", :'data-property' => 'name' %></td>
0f9df583 Amos Benari
<td><%= obj.class.model_name == "Host" ? host_key_with_diagnostic(obj, value_hash, key) : hostgroup_key_with_diagnostic(obj, key)%></td>
298756ca Amos Benari
<td>
9d69fc8f Dominic Cleal
<%= link_to_function(_("override"), "override_class_param(this)", :title => _("Override this value"),
bf4a13d3 Walden Raines
:'data-tag' => 'override', :class =>"btn btn-default") if authorized_via_my_scope("host_editing", "create_params") %>
298756ca Amos Benari
</td>
</tr>
4d4557e9 Joseph Magen
<% end %>