2011-02-01 07:12:23 +00:00
|
|
|
<%= fields_for "user_#{@attribute}_model[attribute_models][]", attribute_model, :index => nil do |f| %>
|
2011-04-13 10:19:51 +00:00
|
|
|
|
|
|
|
<tr>
|
2011-02-01 02:46:26 +00:00
|
|
|
<td><%= attribute_model.new_record? ? (f.text_field :key, {:style => "width:130px"}) : attribute_model.key %></td>
|
2011-04-13 10:19:51 +00:00
|
|
|
<td class='select_mulitlingual' style='text-align:center'>
|
2011-02-01 02:46:26 +00:00
|
|
|
<%= check_box_tag "locale[]", value = '', attribute_model.locale.nil? ? true : attribute_model.locale %>
|
2011-02-01 07:12:23 +00:00
|
|
|
<%= hidden_field_tag "user_#{@attribute}_model[attribute_models][][locale]", attribute_model.locale.nil? ? true : attribute_model.locale %>
|
2011-04-13 10:19:51 +00:00
|
|
|
</td>
|
|
|
|
<% @site_valid_locales.each do |locale| %>
|
2011-02-01 07:12:23 +00:00
|
|
|
<td><%= text_field_tag "user_#{@attribute}_model[attribute_models][][i18n_variable][#{locale}]", (attribute_model.i18n_variable[locale] rescue nil), :style => "width:130px" %></td>
|
2011-04-13 10:19:51 +00:00
|
|
|
<% end %>
|
|
|
|
<td class='select_type'>
|
|
|
|
<%= f.select :markup, LIST[:markups], {}, {:style => "width:90px"} %>
|
2011-02-01 02:46:26 +00:00
|
|
|
<div <%= attribute_model[:markup].eql?('select') ? nil : "style='display:none'"%>>
|
2011-04-13 10:19:51 +00:00
|
|
|
<%= t('admin.options') %>:
|
2011-02-01 07:12:23 +00:00
|
|
|
<%= text_field_tag "user_#{@attribute}_model[attribute_models][][select_list_options]", attribute_model.select_list_options, :style => "width:130px" %>
|
2011-04-13 10:19:51 +00:00
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td>
|
2011-02-01 02:46:26 +00:00
|
|
|
<% if attribute_model.new_record? %>
|
2011-04-13 10:19:51 +00:00
|
|
|
<a href="#" class="remove">(<%= t(:delete) %>)</a>
|
|
|
|
<% else %>
|
2011-05-02 04:07:31 +00:00
|
|
|
|
|
|
|
<% if attribute_model.is_built_in? %>
|
|
|
|
<a href="#" class="change_built_in" id="<%= attribute_model.id %>">
|
|
|
|
<span style="display:<%= attribute_model.is_disabled? ? 'none' : 'inline' %>"><%= t(:disable) %></span>
|
|
|
|
<span style="display:<%= attribute_model.is_disabled? ? 'inline' : 'none' %>"><%= t(:enable) %></span>
|
|
|
|
</a>
|
|
|
|
<%= hidden_field_tag "user_#{@attribute}_model[attribute_models][][disabled]", attribute_model.is_disabled? , :class => 'built_in_state' %>
|
|
|
|
<% else %>
|
|
|
|
<a href="#" class="remove_existing_record">(<%= t(:delete) %>)</a>
|
|
|
|
<%= hidden_field_tag "user_#{@attribute}_model[attribute_models][][should_destroy]", nil , :class => 'should_destroy' %>
|
|
|
|
<% end %>
|
2011-04-13 10:19:51 +00:00
|
|
|
<%= f.hidden_field :id %>
|
2011-01-28 06:44:08 +00:00
|
|
|
<%= f.hidden_field :key %>
|
2011-04-13 10:19:51 +00:00
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<% end %>
|