Orbit/app/views/admin/users/_info.html.erb

40 lines
1.5 KiB
Plaintext
Raw Normal View History

2011-12-23 10:34:21 +00:00
<div id="basic_block" class="attributes_block <%= @class %>">
<h2><%= info.i18n_variable[I18n.locale] %></h2>
<hr>
<div class="info_input">
<table border="0" cellspacing="0" cellpadding="0">
<thead class="list_head">
<tr>
<td><%= t("admin.key") %></td>
<% @site_valid_locales.each do |locale| %>
<td><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></td>
<% end %>
</tr>
</thead>
<tbody>
<% info.get_enabled_attribute_fields.each do |attr| %>
<%= f.fields_for :attribute_values, @user.get_value_from_field_id(attr.id) do |f| %>
<tr class="list_item">
<td><%= attr.i18n_variable[I18n.locale] %></td>
<% if attr["locale"] && attr["markup"] == 'text_field' %>
<% @site_valid_locales.each do |locale| %>
<td><%= f.text_field locale %></td>
<% end %>
<% else %>
<td colspan=<%= @site_valid_locales.size %>>
<% if attr["markup"] == "text_field" %>
<%= f.text_field :non_locale %>
<% elsif attr["markup"] == "select" %>
<%= f.select :non_locale, options_for_select(attr["options"], value['non_locale']) %>
<% end -%>
</td>
<% end -%>
<%= f.hidden_field :attribute_field_id, :value => attr.id %>
<%= f.hidden_field :key, :value => attr.key %>
</tr>
<% end %>
<% end %>
</tbody>
</table>
</div>
</div>