foodsoft/app/views/admin/users/show.html.erb

56 lines
2 KiB
Text
Raw Normal View History

2009-01-06 11:49:19 +01:00
<h1><%=h @user.nick %></h1>
<div class="left_column" style="width:100%">
<div class="box_title">
<h2>Übersicht</h2>
</div>
2009-01-06 11:49:19 +01:00
<div class="column_content">
<p>
Mitglied seit <%= distance_of_time_in_words(Time.now, @user.created_on) -%>
</p>
<div style="float:left;margin:5px; margin-right:10px;" class="box">
<p><b>Person</b></p>
<p><b>Nick:</b> <%=h @user.nick %></p>
<p><b>Name:</b> <%=h @user.first_name + ' ' + @user.last_name %></p>
<p><b>Email:</b> <%=h @user.email %></p>
<p><b>Telefon:</b> <%=h @user.phone %></p>
<p><b>Adresse:</b> <%=h @user.address %></p>
</div>
<div style="float:left; margin:5px;" class="box">
<p>
<b>Einstellungen</b>
</p>
<table style="width:26em">
<tbody>
<% for setting in User::setting_keys.keys -%>
<tr>
<td><%= User::setting_keys[setting] %></td>
<td><%= @user.settings[setting] == '1' ? 'ja' : 'nein' %></td>
</tr>
<% end -%>
</tbody>
</table>
<p>
<b>Benutzer_in hat Zugriff auf:</b>
</p>
<% roles = Array.new
roles << 'Admin' if @user.role_admin?
roles << 'Finanzen' if @user.role_finance?
roles << 'Lieferanten' if @user.role_suppliers?
roles << 'Artikel' if @user.role_article_meta?
roles << 'Bestellung' if @user.role_orders? %>
<p>
<%=h roles.join(', ') %>
</p>
</div>
2009-01-06 11:49:19 +01:00
<p style="clear:both">
<%= link_to 'Bearbeiten', edit_admin_user_path(@user) %>
| <%= link_to 'Löschen', [:admin, @user], :confirm => "Willst du #{@user.first_name} wirklich rausschmeißen?", :method => :delete %>
| <%= link_to 'Nachricht senden', :controller => 'messages', :action => 'user', :id => @user %>
2009-01-06 11:49:19 +01:00
</p>
</div>
<div class="box_title"><h2>Gruppenabos</h2></div>
<div class="column_content">
<%= render :partial => 'shared/user_memberships'%>
2009-01-06 11:49:19 +01:00
<p><%= link_to 'Gruppenübersicht', :action => 'listGroups' %></p>
</div>
</div>