<% li_id = "#{added ? 'selected_' : '' }config_group_#{config_group.id}" li_class = "#{added ? 'selected_config_group' : 'config_group'} #{css_class}" %> <%= content_tag :li, id: li_id, class: li_class do %> <%= hidden_field_tag("#{type}[config_group_ids][]", config_group.id) if added == 'manually' %> <%= link_to(icon_text('plus', config_group.name), '#', :rel=>'twipsy', :class => 'config_group_name', :onclick => "tfm.classEditor.expandClassList(this, '#cgroup_#{config_group.id}')", :data => {:puppetclass_ids => config_group.puppetclass_ids, :'group-id' => config_group.id, :id => config_group.id, :type => type, :'original-title' => (obj.parent_config_groups.include?(config_group) ? _('included already from parent') : '' ) } ) %> <%= link_to(" #{added ? _('Remove') : _('Add')}", '#', :rel=>'twipsy', :class => "btn btn-default btn-sm glyphicon glyphicon-#{added ? 'minus' : 'plus'}-sign", :onclick => (added ? 'tfm.classEditor.removeConfigGroup(this)' : 'tfm.classEditor.addConfigGroup(this)'), :data => {:puppetclass_ids => config_group.puppetclass_ids, :'group-id' => config_group.id, :id => config_group.id, :type => type } ) unless obj.parent_config_groups.include?(config_group) %> <% end %>