Index: de.wigbels.ruby/contact/app/controllers/admincontact_controller.rb
===================================================================
--- de.wigbels.ruby/contact/app/controllers/admincontact_controller.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/controllers/admincontact_controller.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,58 @@
+class AdmincontactController < ApplicationController
+  layout 'standard'
+  
+  # logged_in
+  before_filter :authorize
+
+  def index
+    list
+    render :action => 'list'
+  end
+
+  # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
+  verify :method => :post, :only => [ :destroy, :create, :update ],
+         :redirect_to => { :action => :list }
+
+  def list
+    @contacts = Contact.find(:all)
+  end
+
+  def show
+    @contact = Contact.find(params[:id])
+  end
+
+  def new
+    @contact = Contact.new
+  end
+
+  def create
+    @contact = Contact.new(params[:contact])
+    if @contact.save
+      flash[:notice] = 'Contact was successfully created.'
+      redirect_to :action => 'list'
+    else
+      render :action => 'new'
+    end
+  end
+
+  def edit
+    @contact = Contact.find(params[:id])
+  end
+
+  def update
+    @contact = Contact.find(params[:id])
+    if @contact.update_attributes(params[:contact])
+      flash[:notice] = 'Contact was successfully updated.'
+      redirect_to :action => 'show', :id => @contact
+    else
+      render :action => 'edit'
+    end
+  end
+
+  def destroy
+    Contact.find(params[:id]).destroy
+    redirect_to :action => 'list'
+  end
+  
+ 
+end
Index: de.wigbels.ruby/contact/app/controllers/admincontactgroup_controller.rb
===================================================================
--- de.wigbels.ruby/contact/app/controllers/admincontactgroup_controller.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/controllers/admincontactgroup_controller.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,73 @@
+class AdmincontactgroupController < ApplicationController
+  layout 'standard'
+  
+  # get all contactgroups
+  before_filter :authorize
+  
+  def index
+    list
+    render :action => 'list'
+  end
+  
+  # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
+  verify :method => :post, :only => [ :destroy, :create, :update ],
+  :redirect_to => { :action => :list }
+  
+  def list
+    @contactgroups = Contactgroup.find(:all)
+  end
+  
+  def show
+    @contactgroup = Contactgroup.find(params[:id])
+  end
+  
+  def new
+    @contactgroup = Contactgroup.new
+  end
+  
+  def send_email_to_contacts_from_group
+    @contactgroup = Contactgroup.find(params[:id])
+    flash_email = String.new
+    if request.post?
+      @contactsfromgroup = Contact.get_contactsfrom @contactgroup.groupname
+      @contactsfromgroup.each do |contact|
+        unless contact.email.empty?
+          logger.info("Send email to contact #{contact.email}")
+          Contactmailer.deliver_send_mail_to_contact(params[:subject], params[:body], contact.email, params[:from])
+          flash_email += "email send to #{contact.email}<br />"
+        end
+        flash[:notice] = flash_email
+#        redirect_to :action => 'show', :id => @contactgroup
+      end
+    end
+  end
+  
+  def create
+    @contactgroup = Contactgroup.new(params[:contactgroup])
+    if @contactgroup.save
+      flash[:notice] = 'Contactgroup was successfully created.'
+      redirect_to :action => 'list'
+    else
+      render :action => 'new'
+    end
+  end
+  
+  def edit
+    @contactgroup = Contactgroup.find(params[:id])
+  end
+  
+  def update
+    @contactgroup = Contactgroup.find(params[:id])
+    if @contactgroup.update_attributes(params[:contactgroup])
+      flash[:notice] = 'Contactgroup was successfully updated.'
+      redirect_to :action => 'show', :id => @contactgroup
+    else
+      render :action => 'edit'
+    end
+  end
+  
+  def destroy
+    Contactgroup.find(params[:id]).destroy
+    redirect_to :action => 'list'
+  end
+end
Index: de.wigbels.ruby/contact/app/controllers/application_controller.rb
===================================================================
--- de.wigbels.ruby/contact/app/controllers/application_controller.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/controllers/application_controller.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,29 @@
+# Filters added to this controller apply to all controllers in the application.
+# Likewise, all the methods added will be available for all controllers.
+
+class ApplicationController < ActionController::Base
+  # Pick a unique cookie name to distinguish our session data from others'
+  session :session_key => '_contact_session_id'
+
+  before_filter :get_contactgroups
+
+  # HACK - do something more advanced here:-)
+  @@magic_password = 'bla14fasel'
+  
+  def ApplicationController.application_password
+    @@magic_password
+  end
+  
+  private
+  def authorize
+    unless session[:valid_login]
+      session[:original_uri] = request.request_uri
+      # flash[:notice] = "Please log in"
+      redirect_to(:controller => "login" , :action => "login" )
+    end
+  end
+  
+  def get_contactgroups
+    @contactgroups = Contactgroup.find(:all)
+  end
+end
Index: de.wigbels.ruby/contact/app/controllers/listcontactgroup_controller.rb
===================================================================
--- de.wigbels.ruby/contact/app/controllers/listcontactgroup_controller.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/controllers/listcontactgroup_controller.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,10 @@
+class ListcontactgroupController < ApplicationController
+  # get all contactgroups
+  before_filter :get_contactgroups
+  
+  layout 'standard'
+  
+  def index
+    @contacts = Contact.get_contactsfrom params[:id]
+  end
+end
Index: de.wigbels.ruby/contact/app/controllers/login_controller.rb
===================================================================
--- de.wigbels.ruby/contact/app/controllers/login_controller.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/controllers/login_controller.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,25 @@
+class LoginController < ApplicationController
+  layout 'standard'
+  
+  def index
+    @logged_in = session[:valid_login]
+  end
+  
+  def logout
+    session[:valid_login] = nil
+  end
+  
+  def login
+    session[:valid_login] = nil
+    if request.post?
+      session[:valid_login] = params[:password] == ApplicationController.application_password
+      if session[:valid_login]
+        uri = session[:original_uri]
+        session[:original_uri] = nil
+        redirect_to(uri || { :action => "index" })
+      else
+        flash[:notice] = "Invalid user/password combination"      
+      end
+    end
+  end
+end
Index: de.wigbels.ruby/contact/app/helpers/admincontact_helper.rb
===================================================================
--- de.wigbels.ruby/contact/app/helpers/admincontact_helper.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/helpers/admincontact_helper.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,2 @@
+module AdmincontactHelper
+end
Index: de.wigbels.ruby/contact/app/helpers/admincontactgroup_helper.rb
===================================================================
--- de.wigbels.ruby/contact/app/helpers/admincontactgroup_helper.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/helpers/admincontactgroup_helper.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,2 @@
+module AdmincontactgroupHelper
+end
Index: de.wigbels.ruby/contact/app/helpers/application_helper.rb
===================================================================
--- de.wigbels.ruby/contact/app/helpers/application_helper.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/helpers/application_helper.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,3 @@
+# Methods added to this helper will be available to all templates in the application.
+module ApplicationHelper
+end
Index: de.wigbels.ruby/contact/app/helpers/listcontactgroup_helper.rb
===================================================================
--- de.wigbels.ruby/contact/app/helpers/listcontactgroup_helper.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/helpers/listcontactgroup_helper.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,2 @@
+module ListcontactgroupHelper
+end
Index: de.wigbels.ruby/contact/app/helpers/login_helper.rb
===================================================================
--- de.wigbels.ruby/contact/app/helpers/login_helper.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/helpers/login_helper.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,2 @@
+module LoginHelper
+end
Index: de.wigbels.ruby/contact/app/models/contact.rb
===================================================================
--- de.wigbels.ruby/contact/app/models/contact.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/models/contact.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,15 @@
+class Contact < ActiveRecord::Base
+  # 1..1
+  belongs_to :contactgroup
+  
+  validates_presence_of :name, :surname
+  # If somebody has no email, the following validation does not work
+  #validates_uniqueness_of :email
+  
+  def self.get_contactsfrom groupname
+    find  :all,
+          :include => [:contactgroup],
+          :conditions => ["contactgroups.groupname = ?", groupname],
+          :order => "name, surname"
+  end
+end
Index: de.wigbels.ruby/contact/app/models/contactgroup.rb
===================================================================
--- de.wigbels.ruby/contact/app/models/contactgroup.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/models/contactgroup.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,6 @@
+class Contactgroup < ActiveRecord::Base
+  # 1..n
+  has_many :contacts
+  
+  validates_presence_of :groupname
+end
Index: de.wigbels.ruby/contact/app/models/contactmailer.rb
===================================================================
--- de.wigbels.ruby/contact/app/models/contactmailer.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/models/contactmailer.rb	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,11 @@
+class Contactmailer < ActionMailer::Base
+
+  def send_mail_to_contact(subject, body, to, from, sent_at = Time.now)
+    @subject    = subject
+    @body       = body
+    @recipients = to
+    @from       = from
+    @sent_on    = sent_at
+    @headers    = {}
+  end
+end
Index: de.wigbels.ruby/contact/app/views/admincontact/_form.rhtml
===================================================================
--- de.wigbels.ruby/contact/app/views/admincontact/_form.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/views/admincontact/_form.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,40 @@
+<%= error_messages_for 'contact' %>
+
+<!--[form:contact]-->
+
+    <tr>
+      <td><label for="contact_name">Name</label></td>
+      <td><%= text_field 'contact', 'name'  %></td>
+      <td><label for="contact_name">Vorname</label></td>
+      <td><%= text_field 'contact', 'surname'  %></td>
+    </tr>
+    
+    <tr>
+      <td><label for="contact_name">Neuer Name</label></td>
+      <td><%= text_field 'contact', 'newname'  %></td>
+      <td></td>
+      <td></td>
+    </tr>
+
+    <tr>
+      <td><label for="contact_email">EMail</label></td>
+      <td><%= text_field 'contact', 'email'  %></td>
+      <td><label for="contact_url">Url</label></td>
+      <td><%= text_field 'contact', 'url'  %></td>
+    </tr>
+
+    <tr>
+      <td><label for="contact_free_text">Free Text</label></td>
+      <td><%= text_area 'contact', 'free_text', "cols"=>22, "rows"=>10 %></td>
+      <td></td>
+      <td></td>
+    </tr>
+
+    <tr>
+      <td><label for="contact_contactgroup_id">Select Group</label></td>
+      <td><%= collection_select(:contact, :contactgroup_id, @contactgroups, :id, :groupname, options ={:prompt => "Select a group"}, :class =>"contactgroup") %></td>
+      <td></td>
+      <td></td>
+    </tr>
+
+<!--[eoform:contact]-->
Index: de.wigbels.ruby/contact/app/views/admincontact/edit.rhtml
===================================================================
--- de.wigbels.ruby/contact/app/views/admincontact/edit.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/views/admincontact/edit.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,17 @@
+<h1>Editing contact</h1>
+
+<table>
+<% form_tag :action => 'update', :id => @contact do %>
+  <%= render :partial => 'form' %>
+	<tr>
+		<td><label>Action</label></td>
+		<td><%= submit_tag 'Submit' %></td>
+	</tr>
+<% end %>
+    <tr>
+      <td><%= link_to 'Show', :action => 'show', :id => @contact %></td>
+      <td><%= link_to 'Back', :action => 'list' %></td>
+      <td></td>
+      <td></td>
+    </tr>
+</table>
Index: de.wigbels.ruby/contact/app/views/admincontact/list.rhtml
===================================================================
--- de.wigbels.ruby/contact/app/views/admincontact/list.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/views/admincontact/list.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,31 @@
+<h1>Listing contacts</h1>
+
+<table>
+  <tr>
+  <% for column in Contact.content_columns %>
+    <th><%= column.human_name %></th>
+  <% end %>
+  </tr>
+  
+<% for contact in @contacts %>
+  <tr>
+  <% for column in Contact.content_columns %>
+    <td><%=h contact.send(column.name) %></td>
+  <% end %>
+    <td><%= link_to 'Show', :action => 'show', :id => contact %></td>
+    <td><%= link_to 'Edit', :action => 'edit', :id => contact %></td>
+    <td><%= link_to 'Destroy', { :action => 'destroy', :id => contact }, :confirm => 'Are you sure?', :method => :post %></td>
+  </tr>
+<% end %>
+  <tr>
+	<td><%= link_to 'New contact', :action => 'new' %></td>
+	<td></td>
+	<td></td>
+	<td></td>
+	<td></td>
+	<td></td>
+	<td></td>
+	<td></td>	
+  </tr>
+</table>
+
Index: de.wigbels.ruby/contact/app/views/admincontact/new.rhtml
===================================================================
--- de.wigbels.ruby/contact/app/views/admincontact/new.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/views/admincontact/new.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,13 @@
+<h1>New contact</h1>
+
+<table>
+<% form_tag :action => 'create' do %>
+  <%= render :partial => 'form' %>
+    <tr>
+      <td><%= submit_tag "Create" %></td>
+      <td><%= link_to 'Back', :action => 'list' %></td>
+      <td></td>
+      <td></td>
+    </tr>
+<% end %>
+</table>
Index: de.wigbels.ruby/contact/app/views/admincontact/show.rhtml
===================================================================
--- de.wigbels.ruby/contact/app/views/admincontact/show.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/views/admincontact/show.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,12 @@
+<table>
+<% for column in Contact.content_columns %>
+	<tr>
+		<td><b><%= column.human_name %>:</b></td>
+		<td><%=h @contact.send(column.name) %></td>
+	</tr>
+<% end %>
+	<tr>
+      <td><%= link_to 'Edit', :action => 'edit', :id => @contact %></td>
+      <td><%= link_to 'Back', :action => 'list' %></td>
+	</tr>
+</table>
Index: de.wigbels.ruby/contact/app/views/admincontactgroup/_form.rhtml
===================================================================
--- de.wigbels.ruby/contact/app/views/admincontactgroup/_form.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/views/admincontactgroup/_form.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,8 @@
+<%= error_messages_for 'contactgroup' %>
+
+<!--[form:contactgroup]-->
+  <tr>
+	<td><label for="contactgroup_groupname">Groupname</label></td>
+	<td><%= text_field 'contactgroup', 'groupname'  %></td>
+  </tr>
+<!--[eoform:contactgroup]-->
Index: de.wigbels.ruby/contact/app/views/admincontactgroup/edit.rhtml
===================================================================
--- de.wigbels.ruby/contact/app/views/admincontactgroup/edit.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/views/admincontactgroup/edit.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,15 @@
+<h1>Editing contactgroup</h1>
+
+<table>
+<% form_tag :action => 'update', :id => @contactgroup do %>
+  <%= render :partial => 'form' %>
+  <tr>
+  	<td><%= submit_tag 'Edit' %></td>
+  	<td></td>
+  </tr>
+  <tr>
+  	<td><%= link_to 'Show', :action => 'show', :id => @contactgroup %></td>
+  	<td><%= link_to 'Back', :action => 'list' %></td>
+  </tr>
+<% end %>
+</table>
Index: de.wigbels.ruby/contact/app/views/admincontactgroup/list.rhtml
===================================================================
--- de.wigbels.ruby/contact/app/views/admincontactgroup/list.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/views/admincontactgroup/list.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,29 @@
+<h1>Listing contactgroups</h1>
+
+<table>
+  <tr>
+  <% for column in Contactgroup.content_columns %>
+    <th><%= column.human_name %></th>
+  <% end %>
+  </tr>
+  
+<% for contactgroup in @contactgroups %>
+  <tr>
+  <% for column in Contactgroup.content_columns %>
+    <td><%=h contactgroup.send(column.name) %></td>
+  <% end %>
+  	<td><%= link_to 'Send EMail', :action => 'send_email_to_contacts_from_group', :id => contactgroup %></td>
+    <td><%= link_to 'Show', :action => 'show', :id => contactgroup %></td>
+    <td><%= link_to 'Edit', :action => 'edit', :id => contactgroup %></td>
+    <td><%= link_to 'Destroy', { :action => 'destroy', :id => contactgroup }, :confirm => 'Are you sure?', :method => :post %></td>
+  </tr>
+<% end %>
+<tr>
+	<td><%= link_to 'New contactgroup', :action => 'new' %></td>
+	<td></td>
+	<td></td>
+	<td></td>
+</tr>
+</table>
+
+
Index: de.wigbels.ruby/contact/app/views/admincontactgroup/new.rhtml
===================================================================
--- de.wigbels.ruby/contact/app/views/admincontactgroup/new.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/views/admincontactgroup/new.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,12 @@
+<h1>New contactgroup</h1>
+
+<table>
+<% form_tag :action => 'create' do %>
+  <%= render :partial => 'form' %>
+  <tr>
+  	<td><%= submit_tag "Create" %></td>
+  	<td><%= link_to 'Back', :action => 'list' %></td>
+  </tr>
+<% end %>
+</table>
+
Index: de.wigbels.ruby/contact/app/views/admincontactgroup/send_email_to_contacts_from_group.rhtml
===================================================================
--- de.wigbels.ruby/contact/app/views/admincontactgroup/send_email_to_contacts_from_group.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/views/admincontactgroup/send_email_to_contacts_from_group.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,31 @@
+<h1>Send EMail to <b><%= @contactgroup.groupname %></b></h1>
+
+<table>
+
+<% form_tag :action => :send_email_to_contacts_from_group, :id => @contactgroup do %>
+    <tr>
+      <td><label>From:</label></td>
+      <td><%= text_field_tag :from, params[:from] %></td>
+      
+    </tr>
+
+    <tr>
+      <td><label>Subject:</label></td>
+      <td><%= text_field_tag :subject, params[:subject] %></td>
+    </tr>
+
+    <tr>
+      <td><label>Body:</label></td>
+      <td><%= text_area_tag :body, params[:body], "cols"=>40, "rows"=>10 %></td>
+    </tr>
+
+	<tr>
+		<td><label>Action:</label></td>
+		<td><%= submit_tag 'Submit' %></td>
+	</tr>
+<% end %>
+    <tr>
+      <td></td>
+      <td><%= link_to 'Back', :action => 'list' %></td>
+    </tr>
+</table>
Index: de.wigbels.ruby/contact/app/views/admincontactgroup/show.rhtml
===================================================================
--- de.wigbels.ruby/contact/app/views/admincontactgroup/show.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/views/admincontactgroup/show.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,12 @@
+<table>
+<% for column in Contactgroup.content_columns %>
+  <tr>
+  	<td><b><%= column.human_name %>:</b></td>
+  	<td><%=h @contactgroup.send(column.name) %></td>
+  </tr>
+<% end %>
+  <tr>
+  	<td><%= link_to 'Edit', :action => 'edit', :id => @contactgroup %></td>
+  	<td><%= link_to 'Back', :action => 'list' %></td>
+  </tr>
+</table>
Index: de.wigbels.ruby/contact/app/views/cleanlooks/index.html
===================================================================
--- de.wigbels.ruby/contact/app/views/cleanlooks/index.html	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/views/cleanlooks/index.html	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,62 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<title>Clean Looks</title>
+<link href="style.css" rel="stylesheet" type="text/css" />
+</head>
+
+<body>
+<div id="container">
+<div id="header">
+<h1>wigbels.de/contact</h1>
+<h2>remember us <em>sometimes...</em></h2>
+<br />
+<hr />
+
+</div> <!-- end header -->
+
+<div class="spacer"></div>
+<div id="left">
+
+<div id="leftcontent">
+
+	<ul>
+		<li>Navigation</li>
+		<li><a href="#">Link One</a></li>
+		<li><a href="#">Link Two</a></li>
+		<li><a href="#">Link Three</a></li>
+		<li><a href="#">Link Four</a></li>
+	</ul>
+<p>&nbsp;</p>
+<h3>News</h3>
+<p class="news">08/2007 | Projektstart<br />09/2007 | Go Live</p>
+</div> <!-- end left content -->
+</div> <!-- end left division -->
+<div id="main">
+<div id="maincontent">
+
+<h3 class="top_main_heading">Place heading here</h3>
+<table>
+<tr>
+<th>Kopfzelle</th>
+<th>Kopfzelle</th>
+</tr>
+<tr>
+<td>Datenzelle</td>
+<td>Datenzelle</td>
+</tr>
+</table>
+</div> <!-- end main content section -->
+</div> 
+<div id="footer"><div class="spacer"></div>
+<hr />
+<p class="left">| <a href="http://jigsaw.w3.org/css-validator/">CSS</a> | <a href="http://validator.w3.org/check?uri=referer">XHTML 1.1</a> |</p>
+<p class="right">application by Norbert Wigbels &copy;2007; design by Matt Hollis &copy;2006</p>
+<p>&nbsp;</p>
+</div> <!-- end footer -->
+
+</div> <!-- end container -->
+</body>
+
+</html>
Index: de.wigbels.ruby/contact/app/views/cleanlooks/style.css
===================================================================
--- de.wigbels.ruby/contact/app/views/cleanlooks/style.css	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/views/cleanlooks/style.css	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,185 @@
+body {
+	font-family:arial, verdana, helvetica, sans-serif;
+	font-size:12px;
+	cursor:default;
+	color:#AAAAAA;
+	background-color:#FFFFFF
+}
+* {
+	margin: 0px;
+	padding: 0px;
+	text-decoration: none;
+}
+html {
+	height:100%;
+	margin-bottom:1px;
+}
+#container {
+	width: 750px;
+	margin-right: auto;
+	margin-left: auto;
+	text-align: left;
+	background-color: #FFFFFF;
+	color:#AAAAAA;
+}
+#header {
+	width:100%;
+	padding-top:15px;
+}
+.spacer {
+	width:100%;
+	height:15px;
+}
+hr {
+	border:0px;
+	color:#CCCCCC;
+	background-color:#CDCDCD;
+	height: 1px;
+	width: 100%;
+	text-align: left;
+}
+h1 {
+	font-size:28px;
+	color:#FFBA27;
+	background-color:#FFFFFF;
+	font-family:Arial, Verdana, Helvetica, sans-serif;
+	font-weight:300;
+}
+h2 {
+	font-size:20px;
+	color:#CCCCCC;
+	font-family:Arial, Verdana, Helvetica, sans-serif;
+	font-weight:300;
+	background-color:#FFFFFF;
+}
+h3 {
+	color:#FFBA27;
+	font-size:15px;
+	background-color:#F9F9F9;
+	border-width:1px;
+	border-color:#AAAAAA;
+	border-style:solid;
+	text-align:left;
+	margin-left:20px;
+	margin-right:20px;
+	font-weight:300;
+	padding:5px;
+}
+.top_main_heading {
+	margin-top:15px;
+}
+#left {
+	float:left;
+	width:200px;
+	background-color:#FFFFFF;
+	color:#AAAAAA;
+}
+#leftcontent p {
+	color:#AAAAAA;
+	background-color:#FFFFFF;
+	font-size: 12px;
+	text-align:left;
+	margin-left:20px;
+	margin-right:20px;
+}
+#leftcontent ul {
+	list-style:none;
+	padding-left:20px;
+	color:#AAAAAA;
+	background-color:#FFFFFF;
+}
+#leftcontent a {
+	color:#FFBA27;
+	text-decoration:none;
+	font-size:16px;
+	background-color:#FFFFFF;
+}
+.news {
+	color:#999999;
+	border-bottom:1px;
+	border-left:1px;
+	border-right:1px;
+	border-top:0px;
+	border-style:solid;
+	border-color:#AAAAAA;
+	background-color:#FFFFFF;
+	line-height:20px;
+	padding:5px;
+}
+#leftcontent a:hover {
+	color:#FFBA27;
+	background-color:#FFFFFF;
+	text-decoration:underline;
+}
+#main {
+	float:left;
+	width:550px;
+	color:#999999;
+	background-color:#FFFFFF;
+	padding-bottom:20px;
+	background:url(img/background.png);
+}
+#maincontent p {
+	color:#999999;
+	background-color:#FFFFFF;
+	border-bottom:1px;
+	border-left:1px;
+	border-right:1px;
+	border-top:0px;
+	border-style:solid;
+	border-color:#AAAAAA;
+	margin-left:20px;
+	margin-right:20px;
+	margin-bottom:15px;
+	line-height:20px;
+	padding:20px;
+}
+#maincontent table {
+	color:#999999;
+	background-color:#FFFFFF;
+	margin-left:20px;
+	margin-right:20px;
+	margin-bottom:15px;
+	line-height:20px;
+	padding:20px;
+}
+#maincontent a {
+	color:#FFBA27;
+	background-color:#FFFFFF;
+	text-decoration:none;
+}
+#maincontent a:hover {
+	color:#FFBA27;
+	background-color:#FFFFFF;
+	text-decoration:underline;
+}
+#footer {
+	clear:both;
+	width:750px;
+	font-size:12px;
+	font-family:Verdana, Arial, Helvetica, sans-serif;
+}
+#footer a {
+	color:#AAAAAA;
+	background-color:#FFFFFF;
+	text-decoration:none;
+}
+#footer a:hover {
+	color:#AAAAAA;
+	background-color:#FFFFFF;
+	text-decoration:underline;
+}
+.right {
+	color:#AAAAAA;
+	background-color:#FFFFFF;
+	float:right;
+	font-size:100%;
+	margin-top:5px;
+}
+.left {
+	color:#AAAAAA;
+	background-color:#FFFFFF;
+	float:left;
+	font-size:100%;
+	margin-top:5px;
+}
Index: de.wigbels.ruby/contact/app/views/contactmailer/send_mail_to_contact.rhtml
===================================================================
--- de.wigbels.ruby/contact/app/views/contactmailer/send_mail_to_contact.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/views/contactmailer/send_mail_to_contact.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,1 @@
+if this gets delivered to someone, something is really fucked up...
Index: de.wigbels.ruby/contact/app/views/layouts/admincontact.rhtml
===================================================================
--- de.wigbels.ruby/contact/app/views/layouts/admincontact.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/views/layouts/admincontact.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  <title>Admincontact: <%= controller.action_name %></title>
+  <%= stylesheet_link_tag 'scaffold' %>
+</head>
+<body>
+
+<p style="color: green"><%= flash[:notice] %></p>
+
+<%= yield  %>
+
+</body>
+</html>
Index: de.wigbels.ruby/contact/app/views/layouts/admincontactgroup.rhtml
===================================================================
--- de.wigbels.ruby/contact/app/views/layouts/admincontactgroup.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/views/layouts/admincontactgroup.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  <title>Admincontactgroup: <%= controller.action_name %></title>
+  <%= stylesheet_link_tag 'scaffold' %>
+</head>
+<body>
+
+<p style="color: green"><%= flash[:notice] %></p>
+
+<%= yield  %>
+
+</body>
+</html>
Index: de.wigbels.ruby/contact/app/views/layouts/standard.rhtml
===================================================================
--- de.wigbels.ruby/contact/app/views/layouts/standard.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/views/layouts/standard.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,67 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<title>ListContactGroup <%= controller.action_name %></title>
+<%= stylesheet_link_tag 'style' %>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+</head>
+
+<body>
+<div id="container">
+<div id="header">
+<h1>contact.wigbels.de</h1>
+<h2>remember us <em>sometimes...</em></h2>
+<br />
+<hr />
+
+</div> <!-- end header -->
+
+<div class="spacer"></div>
+<div id="left">
+
+<div id="leftcontent">
+
+<ul>
+
+<li>Navigation</li>
+<li><%= link_to "Home","http://www.wigbels.de/contact" %></li>
+
+<% @contactgroups.each do |c| %>
+	<li><%= link_to c.groupname, :controller=>"listcontactgroup", :action=>'index', :id=>c.groupname %></li>
+<% end %>
+<!-- TODO 
+<li>Suchen</li>
+<li>disclaimer</li>
+-->
+<br />
+<li>Maintainance</li>
+<% if session[:valid_login] %>
+<li><%=link_to 'Maintain Groups', :controller=>'admincontactgroup', :action=>'index' %></li>
+<li><%= link_to 'Maintain Contacts', :controller=>'admincontact', :action=>'index' %></li>
+<% end %>
+<li><%= link_to 'Login', :controller=>'login', :action=>'login' %></li>
+</ul>
+
+<p>&nbsp;</p>
+<h3>News</h3>
+<p class="news">06/2008 | see also <a href="http://abi92.rioline.de">abi92.rioline.de</a><br />09/2007 | new app to maintain contacts<br /></p>
+</div> <!-- end left content -->
+</div> <!-- end left division -->
+<div id="main">
+<div id="maincontent">
+<%= flash[:notice] %>
+<%=yield %>
+</div> <!-- end main content section -->
+</div> 
+<div id="footer"><div class="spacer"></div>
+<hr />
+<p class="left">| <a href="http://jigsaw.w3.org/css-validator/">CSS</a> | <a href="http://validator.w3.org/check?uri=referer">XHTML 1.1</a> |</p>
+<p class="right">application by Norbert Wigbels &copy;2007; design by Matt Hollis &copy;2006</p>
+<p>&nbsp;</p>
+</div> <!-- end footer -->
+
+</div> <!-- end container -->
+</body>
+
+</html>
Index: de.wigbels.ruby/contact/app/views/listcontactgroup/_contact.rhtml
===================================================================
--- de.wigbels.ruby/contact/app/views/listcontactgroup/_contact.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/views/listcontactgroup/_contact.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,9 @@
+<div class="contacts">
+<tr>
+<td><%= h contact.name %>, <%= h contact.surname %></td>
+<td><%= h contact.email.sub('@', ' #at# ') %></td>
+<td><%= link_to contact.url ,contact.url %></td>
+<td><%= h contact.newname %></td>
+<td><%= link_to "...", :controller=>"admincontact", :action=>"edit", :id=>contact.id %></td>
+</tr>
+</div>
Index: de.wigbels.ruby/contact/app/views/listcontactgroup/index.rhtml
===================================================================
--- de.wigbels.ruby/contact/app/views/listcontactgroup/index.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/views/listcontactgroup/index.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,21 @@
+<% if @contacts.size >= 1 %>
+  <table>
+  <tr>
+  <th>Name, Vorname</th>
+  <th>EMail</th>
+  <th>Homepage</th>
+  <th>Name</th>
+  <th>...</th>
+  </tr>
+  <%= render :partial => "contact", :collection => @contacts %>
+  </table>
+<% else %>
+<h3 class="top_main_heading">Bitte w&auml;hle in der Navigation links eine g&uuml;ltige Gruppe aus.</h3>
+<p>
+Fragen, Korrekturen oder Neueintraege bitte an norbert #at# wigbels de emailen.
+</p>
+<h3>Ihr Nachname lautet Wigbels?</h3>
+<p>
+Es besteht die M&ouml;glichkeit, sich kostenlos eine personalisierte E-Mail-Adresse der Form: IhrVorname@wigbels.de einzurichten; ausserdem k&ouml;nnt ihr eine Homepage unter der Domain wigbels.de registrieren: www.wigbels.de/IhrVorname oder IhrVorname.wigbels.de . Voraussetzung ist lediglich der Nachname Wigbels. Folgende TLDs sind verf&uuml;gbar: .net .com .eu
+</p>
+<% end %>
Index: de.wigbels.ruby/contact/app/views/login/index.rhtml
===================================================================
--- de.wigbels.ruby/contact/app/views/login/index.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/views/login/index.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,5 @@
+<h1>Login - Status</h1>
+
+<table>
+	<tr><td>You are logged in: <%= @logged_in %></td></tr>
+</table>
Index: de.wigbels.ruby/contact/app/views/login/login.rhtml
===================================================================
--- de.wigbels.ruby/contact/app/views/login/login.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/views/login/login.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,14 @@
+<h3>Please Login</h3>
+
+<table>
+    <% form_tag do %>
+	<tr>
+		<td><label for="password">Password:</label></td>
+		<td><%= password_field_tag :password, params[:password] %></td>
+	</tr>
+  <tr>
+  	<td><%= submit_tag "Login" %></td>
+  	<td></td>
+  </tr>
+  <% end %>
+</table>
Index: de.wigbels.ruby/contact/app/views/login/logout.rhtml
===================================================================
--- de.wigbels.ruby/contact/app/views/login/logout.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
+++ de.wigbels.ruby/contact/app/views/login/logout.rhtml	(revision 7b7d827c4fbf1c46a6aab6ad9e1ae735e3bdb79d)
@@ -0,0 +1,1 @@
+<h1>Your are logged out...</h1>
