This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/views/admin/users/_info.html.erb

40 lines
1.4 KiB
Plaintext
Raw Normal View History

2011-12-23 10:34:21 +00:00
<div id="basic_block" class="attributes_block <%= @class %>">
2012-07-25 21:58:09 +00:00
<h2><%= info.title %></h2>
2011-12-23 10:34:21 +00:00
<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">
2012-07-25 21:58:09 +00:00
<td><%= attr.title %></td>
2011-12-23 10:34:21 +00:00
<% 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>