diff --git a/template_generator/app/views/admin/plugin_templates/_form.html.erb b/template_generator/app/views/admin/plugin_templates/_form.html.erb index eff9365..4e834e4 100644 --- a/template_generator/app/views/admin/plugin_templates/_form.html.erb +++ b/template_generator/app/views/admin/plugin_templates/_form.html.erb @@ -20,7 +20,7 @@
- + parse_again_start * 1 if locale_fields_input_fields - + parse_again_end + parse_again_start * 1 if locale_fields_input_fields
<% @site_in_use_locales.each_with_index do |locale, i| %>
"> + parse_again_end parse_again_start
@@ -49,16 +51,19 @@
parse_again_end + parse_again_start * 1 if locale_fields_input_fields
<% end %> + parse_again_end + parse_again_start * 1 if module_modal_template_link <% links_hash = {} plugin_template_related_links_text.each do |link| - hash = {} - hash["html"] = add_attribute("form_link", f, link.pluralize.to_sym) - hash["count"] = @plugin_template.send(link.pluralize).count rescue 0 - links_hash[link] = hash + hash = {} + hash["html"] = add_attribute("form_link", f, link.pluralize.to_sym) + hash["count"] = @plugin_template.send(link.pluralize).count rescue 0 + links_hash[link] = hash %>
@@ -88,44 +93,49 @@
<% end %> + parse_again_end + parse_again_start * 1 if module_modal_template_file <% files_hash = {} plugin_template_related_files_text.each do |file| - hash = {} - hash["html"] = add_attribute("form_file", f, file.pluralize.to_sym) - hash["count"] = @plugin_template.send(file.pluralize).count rescue 0 - files_hash[file] = hash + hash = {} + hash["html"] = add_attribute("form_file", f, file.pluralize.to_sym) + hash["count"] = @plugin_template.send(file.pluralize).count rescue 0 + files_hash[file] = hash %> -
- -
+
+ +
- - <% if !@plugin_template.new_record? && hash["count"] > 0 %> -
- <% @plugin_template.send(file.pluralize).each_with_index do |obj, i| %> - <% if !obj.new_record? %> - <%= f.fields_for file.pluralize.to_sym, obj do |f| %> - <%= render :partial => "form_file", :object => obj, :locals => {:f => f, :i => i} %> + + <% if !@plugin_template.new_record? && hash["count"] > 0 %> +
+ <% @plugin_template.send(file.pluralize).each_with_index do |obj, i| %> + <% if !obj.new_record? %> + <%= f.fields_for file.pluralize.to_sym, obj do |f| %> + <%= render :partial => "form_file", :object => obj, :locals => {:f => f, :i => i} %> + <% end %> <% end %> - <% end %> - <% end %> -
+ <% end %> +
+
+ <% end %> + + +
- <% end %> +

+ <%= t(:add) %> +

- -
-

- <%= t(:add) %> -

-
-
<% end %> + parse_again_end + parse_again_start * 1 if locale_fields_input_fields
+ parse_again_end