orbit-basic/app/views/panel/users/show.html.erb

33 lines
936 B
Plaintext
Raw Normal View History

<% content_for :secondary do %>
<ul class="list">
<li><%= link_to t(:new_user, :scope => :panel), new_panel_user_path, :class => 'button positive' %></li>
</ul>
<% end -%>
<h1><%= t('panel.user_panel') %></h1>
<%= image_tag(@user.avatar.thumb.url) rescue nil %>
<%= @user.email %>
<% @user.get_active_attribute_models.each do |am| %>
2011-02-01 02:46:26 +00:00
<% user_role = @user.get_role_from_model_key(am.key) %>
<fieldset>
<legend><%= am.i18n_variable[I18n.locale] %></legend>
<table>
2011-02-01 02:46:26 +00:00
<% am.attribute_models.each do |attr| %>
<tr>
<td><%= attr.i18n_variable[I18n.locale] %></td>
<td>
<% if attr["locale"] && attr["markup"] == 'text_field' %>
2011-02-01 02:46:26 +00:00
<%= user_role["#{attr.key}_#{I18n.locale}"] %>
<% else %>
2011-02-01 02:46:26 +00:00
<%= user_role["#{attr.key}"] %>
<% end %>
</td>
</tr>
<% end %>
</table>
</fieldset>
<% end -%>