<div id="UserRole_block" class="roles_block">
	<h2><%= t("admin.user_#{@attribute}") %></h2>
	<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 style="color:<%= colorize_in_use_locale(locale) %>"><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></td>
			    <% end %>
				</tr>
			</thead>
			<tbody>
			<tr class="list_item">
			    <td><%= is_new ? (f.text_field :key, {:style => "width:150px"}) : @user_attribute_model.key %></td>
			    <% @site_valid_locales.each do |locale| %>
			      <td>
			        <%= text_field_tag "user_#{@attribute}_model[i18n_variable][#{locale}]", (@i18n_variable[locale] if @i18n_variable), :style => "width:150px" %>
			      </td>
			    <% end %>
			  </tr>
			</tbody>
		</table>
	</div>
</div>


<div id="attributes_block" class="roles_block">
	<h2>Attributes</h2>
	<div class="info_input">
		<table id='attributes' border="0" cellspacing="0" cellpadding="0">
			<thead class="list_head">
				<tr>
					<td><%= t('admin.key') %></td>
					<td><%= t('admin.multilingual') %></td>
					<% @site_valid_locales.each do |locale| %>
			      <td style="color:<%= colorize_in_use_locale(locale) %>"><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></td>
			    <% end %>
					<td><%= t('admin.type')%></td>
					<td>&nbsp;</td>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<td colspan="5"><a href="#" class="add"><%= t(:add) %></a></td>
				</tr>
			</tfoot>
			<tbody>
				<%= render :partial => 'admin/user_attribute_models/attribute_model', :collection => @user_attribute_model.attribute_models %>
			</tbody>
		</table>
	</div>
</div>

<% content_for :page_specific_javascript do %>
	<%= javascript_include_tag "user_attribute_model_form" %>
<% end -%>
