Moved User.address-info into Ordergroup.contact_... attributes. Updated model-fixtures for testing.

This commit is contained in:
Benjamin Meichsner 2009-02-02 16:35:43 +01:00
parent aa47a24fda
commit 0a2a79237a
60 changed files with 466 additions and 443 deletions

View file

@ -9,30 +9,23 @@
%table.list
%thead
%tr
%th= _('Username')
%th= _('First name')
%th= _('Last name')
%th= _('Email')
%th= _('Roles')
%th= _('Last Login')
%th Login
%th Name
%th Email
%th Zugriff auf
%th Letzter login
%th{:style => "width:3em"}
%tbody
- for user in @users
- 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?
%tr{:class => cycle('even','odd', :name => 'users')}
%td= link_to user.nick, [:admin, user]
%td=h user.first_name
%td=h user.last_name
%td=h user.name
%td=h user.email
%td=h roles.join(', ')
%td=h format_roles(user)
%td=h format_time(user.last_login)
%td
= link_to(image_tag('b_edit.png', :size => "16x16", :border => "0", :alt => 'Benutzer_in bearbeiten', :title => 'Benutzer_in bearbeiten'), edit_admin_user_path(user))
= link_to(image_tag('b_drop.png', :size => "16x16", :border => "0", :alt => 'Benutzer_in löschen', :title => 'Benutzer_in löschen'), |
[:admin, user], |
:confirm => 'Willst du ' + user.first_name + ' wirklich löschen?', :method => :delete) |
:confirm => 'Willst du ' + user.name + ' wirklich löschen?', :method => :delete) |

View file

@ -10,10 +10,9 @@
<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>Name:</b> <%=h @user.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>
@ -32,14 +31,8 @@
<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(', ') %>
<%=h format_roles(@user) %>
</p>
</div>
<p style="clear:both">