Revision b0e2071a
Added by Ohad Levy about 14 years ago
- ID b0e2071ac54b3a08f1f8a6872819e3d61b994e69
app/helpers/application_helper.rb | ||
---|---|---|
end
|
||
|
||
def link_to_remove_fields(name, f)
|
||
f.hidden_field(:_destroy) + link_to_function(name, "remove_fields(this)")
|
||
f.hidden_field(:_destroy) + link_to_function(image_tag("false.png", :title => "remove"), "remove_fields(this)")
|
||
end
|
||
|
||
def link_to_add_fields(name, f, association, partial = nil)
|
app/views/common_parameters/_parameter.erb | ||
---|---|---|
<%= f.label :name, "name" %>
|
||
<%= f.text_field :name, :size => 10 %>
|
||
<%= f.label :value, "value" %>
|
||
<%= f.text_field :value, :size => 10 %>
|
||
<%= f.text_field :value, :size => 75 %>
|
||
<%= f.hidden_field :nested %>
|
||
<%= link_to_remove_fields("remove", f) %>
|
||
</p>
|
app/views/puppetclasses/_classes.html.erb | ||
---|---|---|
<li title="Click to expand module class list"><%= link_to_function list.first, toggle_div(list.first) %></li>
|
||
<div id=<%= list.first %> style="display: none;">
|
||
<% for klass in list.last.sort -%>
|
||
<% content_tag_for :div, klass, :title => "Click to add this class" do %>
|
||
<% content_tag_for :div, klass, :title => "Click to add #{klass}" do %>
|
||
<%= link_to_add_puppetclass(klass, type) %>
|
||
<% end -%>
|
||
<% end -%>
|
Also available in: Unified diff
minor formating changes