incubator-heraldry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From quellho...@apache.org
Subject svn commit: r449142 [3/31] - in /incubator/heraldry: idp/ idp/pip/ idp/pip/branches/ idp/pip/tags/ idp/pip/trunk/ idp/pip/trunk/app/ idp/pip/trunk/app/controllers/ idp/pip/trunk/app/helpers/ idp/pip/trunk/app/models/ idp/pip/trunk/app/views/ idp/pip/tr...
Date Sat, 23 Sep 2006 01:37:43 GMT
Added: incubator/heraldry/idp/pip/trunk/app/models/property.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/models/property.rb?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/models/property.rb (added)
+++ incubator/heraldry/idp/pip/trunk/app/models/property.rb Fri Sep 22 18:37:26 2006
@@ -0,0 +1,88 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# == Schema Information
+# Schema version: 27
+#
+# Table name: properties
+#
+#  id               :integer(11)   not null, primary key
+#  user_id          :integer(11)   
+#  property_type_id :integer(11)   
+#  value            :text          
+#  created_at       :datetime      
+#  updated_at       :datetime      
+#
+
+# Used to store a value for a property.  It belongs to a User and to a PropertyType.
+class Property < ActiveRecord::Base
+  belongs_to :user
+  belongs_to :property_type
+  delegate :title, :title, :to => :property_type
+  before_update :validate_format
+  
+  validates_presence_of :user_id, :property_type_id
+  validates_uniqueness_of :property_type_id, :scope => :user_id
+
+  # Returns the value of the property as a String. If the property is a date, then it returns a Date object.
+  def value
+    val = read_attribute(:value)
+    return convert_select_date(val) if self.property_type.control_type == 'date_select' && val
+    return val
+  end
+
+private
+  def validate_format
+    control_type = self.property_type.control_type
+    format = self.property_type.format
+    self.value = case
+                 when control_type == 'date_select'
+                   convert_select_date(self.value).to_s
+                 when format && format =~ %r[^/.*/$]
+                   (self.value =~ Regexp.new(format[2..-2]) ? self.value : '') 
+                 else
+                   self.value
+                 end
+  end
+  
+  # Convert a string or hash into a date object.
+  def convert_select_date(date)
+    return date if date.is_a?(Date)
+
+    begin
+      Date.strptime( date.is_a?(Hash) ? "#{date[:year]}-#{date[:month]}-#{date[:day]}" : date, '%Y-%m-%d' )
+    rescue
+      return nil
+    end
+  end
+
+  def year_is_empty?(date)
+    field_is_empty?(date, :year)
+  end
+
+  def month_is_empty?(date)
+    field_is_empty?(date, :month)
+  end
+
+  def day_is_empty?(date)
+    field_is_empty?(date, :day)
+  end
+
+  def field_is_empty?(hash, field)
+    !hash[:field] || hash[field].empty?
+  end
+end

Added: incubator/heraldry/idp/pip/trunk/app/models/property_type.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/models/property_type.rb?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/models/property_type.rb (added)
+++ incubator/heraldry/idp/pip/trunk/app/models/property_type.rb Fri Sep 22 18:37:26 2006
@@ -0,0 +1,77 @@
+# == Schema Information
+# Schema version: 27
+#
+# Table name: property_types
+#
+#  id           :integer(11)   not null, primary key
+#  parent_id    :integer(11)   
+#  title        :string(255)   
+#  short_name   :string(255)   
+#  mime_type    :string(255)   
+#  description  :text          
+#  created_at   :datetime      
+#  updated_at   :datetime      
+#  user_id      :integer(11)   
+#  is_global    :boolean(1)    
+#  control_type :string(255)   default(input_text)
+#  format       :string(255)   
+#  order_by     :integer(11)   
+#
+
+# Determines what kind of properties can exist.
+# Acts as a tree.
+#--
+# TODO DOCUMENTATION: Comment on global vs. personal property types.
+class PropertyType < ActiveRecord::Base
+  acts_as_tree :order => 'order_by ASC'#:counter_cache => true
+  belongs_to :user
+  after_create :set_order_by
+  has_many :properties, :dependent => :delete_all
+  belongs_to  :open_id_mapping
+
+  validates_presence_of :title
+  validates_presence_of :short_name
+  
+  class << self
+    # Return all the root nodes of PropertyType trees.
+    def roots
+      find(:all, :conditions => ['property_types.parent_id IS NULL'], :include => :children)
+    end
+    
+    # Find all global PropertyTypes that do not have children.
+    def find_global_leaves
+      find_leaf_nodes.to_a.select {|node| node.is_global?}
+    end
+    
+    # Find all PropertyTypes that do not have children.
+    def find_leaf_nodes
+      find(:all, :conditions => ['property_types.id NOT IN (SELECT DISTINCT parent_id FROM property_types WHERE parent_id != 1) AND property_types.id != 1'])
+    end
+  
+    # Find all root node PropertyTypes that are global or owned by _user_.
+    # ====Parameters
+    # user:: The User for whom we're finding PropertyTypes.
+    def roots_global_or_owned_by(user)
+      find(:all, :conditions => ['property_types.parent_id = 1 AND (property_types.is_global = 1 OR property_types.user_id = ?)', user.id], :order => 'property_types.created_at ASC')
+    end
+  end
+  
+  # Returns true if the PropertyType is global or owned by _user_.
+  # ====Parameters
+  # user:: The User for whom we're determining ownership.
+  def is_global_or_owned_by?(user)
+    self.is_global? || self.user_id == user.id
+  end
+  
+  # Returns true if the PropertyType is not global and is owned by _user_.
+  # ====Parameters
+  # user:: The User for whom we're determining ownership.
+  def is_not_global_and_is_owned_by?(user)
+    !self.is_global? && self.user_id == user.id
+  end
+
+  private
+  def set_order_by
+    self.update_attribute(:order_by, self.id)
+  end
+end

Added: incubator/heraldry/idp/pip/trunk/app/models/trust.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/models/trust.rb?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/models/trust.rb (added)
+++ incubator/heraldry/idp/pip/trunk/app/models/trust.rb Fri Sep 22 18:37:26 2006
@@ -0,0 +1,58 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# == Schema Information
+# Schema version: 27
+#
+# Table name: trusts
+#
+#  id         :integer(11)   not null, primary key
+#  title      :string(255)   
+#  expires_at :datetime      
+#  created_at :datetime      
+#  updated_at :datetime      
+#  profile_id :integer(11)   
+#  trust_root :string(255)   
+#
+
+# Used to establish a trust relationship between a site and a profile.
+# Belongs to a Profile.
+class Trust < ActiveRecord::Base
+  belongs_to :profile
+  
+  validates_presence_of :profile_id, :trust_root
+  validate_on_create :expires_in_future
+  validates_uniqueness_of :trust_root, :scope => :profile_id
+
+  # Returns true if the Trust is not expired (It's expiriation date has not passed.)
+  def active?
+    return true if new_record?
+    t = Time.now.utc
+    (never_expires? || t < self.expires_at) && (t > self.created_at)
+  end
+
+  # Returns true if the Trust has no expiration date.
+  def never_expires?
+    !self.expires_at
+  end
+  
+private
+  def expires_in_future
+    t = Time.now.utc
+    errors.add_to_base "Expiration must occur in the future" if self.expires_at && (self.expires_at < t)
+  end
+end

Added: incubator/heraldry/idp/pip/trunk/app/models/user.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/models/user.rb?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/models/user.rb (added)
+++ incubator/heraldry/idp/pip/trunk/app/models/user.rb Fri Sep 22 18:37:26 2006
@@ -0,0 +1,201 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# == Schema Information
+# Schema version: 27
+#
+# Table name: users
+#
+#  id               :integer(11)   not null, primary key
+#  login            :string(40)    
+#  email            :string(100)   
+#  crypted_password :string(40)    
+#  salt             :string(40)    
+#  activation_code  :string(40)    
+#  activated_at     :datetime      
+#  created_at       :datetime      
+#  updated_at       :datetime      
+#  identity_url     :string(255)   
+#
+
+require 'digest/sha1'
+
+# Contains a user of the app.
+# Has Trusts, Profiles, Properties, Ledgers, and an Avatar
+class User < ActiveRecord::Base  
+  OPENID_MAPPINGS = 
+      {'nickname' => 'nickname', 'email' => 'contact_email_personal', 'fullname' => 'full_name', 'dob' => 'dob',
+       'gender' => 'gender', 'postcode' => 'address_home_postal_code', 'country' => 'address_home_country',
+       'language' => 'language', 'timezone' => 'timezone'} unless defined?(OPENID_MAPPINGS)
+  
+  attr_accessor :password       # Virtual attribute for the unencrypted password
+  attr_accessor :avatar_data
+
+  attr_protected :crypted_password, :updated_at, :created_at, :activation_code,
+                 :activated_at, :salt, :identity_url
+
+  validates_presence_of     :password_confirmation,      :if => :password_required?
+  validates_length_of       :password, :within => 5..40, :if => :password_required?
+  validates_confirmation_of :password,                   :if => :password_required?
+  validates_length_of       :login,    :within => 3..40
+  validates_length_of       :email,    :within => 3..100
+  validates_uniqueness_of   :login, :email
+  before_save :encrypt_password
+  before_create :make_activation_code
+  validates_format_of       :login, :with => /^([a-z0-9]+\.){0,2}[a-z0-9]+$/i, :on => :create,
+                            :message => 'can only contain letters, numbers, and two dots.',
+                            :if => Proc.new {|user| user.login && !user.login.empty? }
+  validates_format_of       :email, :with => /^[a-z0-9.+-_]+@([a-z0-9-]+(.[a-z0-9-]+)+)$/i, :on => :create,
+                            :message => 'must be a proper email address.',
+                            :if => Proc.new {|user| user.email && !user.email.empty? }
+  validates_exclusion_of    :login, :in => %w( www ),
+                            :message => "'www' is not a valid username."
+
+  after_create  :add_global_properties
+  after_save    :save_avatar
+  
+  has_many :ledgers,    :dependent => :destroy
+  has_one  :avatar,     :dependent => :destroy
+  has_many :profiles,   :dependent => :delete_all
+  has_many :trusts,     :through   => :profiles
+  has_many :property_types
+  has_many :properties, :include => :property_type, :dependent => :delete_all do
+    
+    # Defined for User#properties
+    # Returns true if the user has the property of type _property_type_.
+    # ====Parameters
+    # property_type:: The PropertyType we are checking for.
+    def has_property?(property_type)
+      self.to_a.any? {|p| p.property_type_id == property_type.id }
+    end
+    
+    # Defined for User#properties
+    # Find a property by its PropertyType.
+    # ====Parameters
+    # property_type:: Object of class PropertyType
+    def find_by_property_type(property_type)
+      self.to_a.detect { |p| p.property_type_id == property_type.id }
+    end
+    
+    # Returns a hash containing a hard coding of PropertyType short names to OpenID Sreg fields.
+    def openid
+      OPENID_MAPPINGS
+    end
+    
+    # Defined for User#properties
+    # Use value_for_[short_name] to find the value of a property given its PropertyType short_name.
+    # For example: profile.properties.value_for_nickname would return the value for the property that
+    # has a PropertyType with a shortname of nickname.
+    # *args:: String that matches a PropertyType.short_name
+    def method_missing(sym, *args)
+      return super unless sym.to_s =~ /value_for_(\w*)/
+      return nil unless property_type = PropertyType.find_by_short_name($1)
+      (prop = self.find_by_property_type(property_type)) ? prop.value : nil
+    end
+  end
+  
+  # Finds the global PropertyType leaf nodes and creates a new property for each of them for the user.
+  def add_global_properties
+    @property_types = PropertyType.find_global_leaves
+    @property_types.each do |ptype|
+      logger.info ptype.short_name
+      self.properties << Property.new(:property_type => ptype) unless self.properties.has_property?(ptype)
+    end
+    self.save
+  end
+  
+  # Authenticates a user by their login name and unencrypted password.  Returns the User or nil.
+  # ====Parameters
+  # login:: The User's login.
+  # password:: The user's unencrypted password.
+  def self.authenticate(login, password)
+    u = self.find_by_login(login) # need to get the salt 
+    return nil unless u
+    u.authenticated?(password) ? u : nil
+  end
+
+  # Returns true if _password_ matches the User's password.
+  # ====Parameters
+  # password:: The User's unencrypted password.
+  def authenticated?(password)
+    crypted_password == encrypt(password)
+  end
+
+  # Marks the user as activated in the database.
+  # Primarily used to mark when a user's email as verified.
+  def activate
+    unless self.activated_at
+      @activated = true
+      self.activated_at = Time.now.utc
+    end
+    self.activation_code = nil
+    self.save
+  end
+  
+  # Returns true if the user has just been activated within the current request.
+  def recently_activated?
+    @activated
+  end
+
+  # Returns true if the user has verified their email address.
+  def email_verified?
+    !self.activated_at.nil?
+  end
+
+  # Returns the time of the User's last login as a Time object.
+  # Returns Time.now if the user has not previously logged in.
+  def last_login
+    last_two = self.ledgers.find(:all, :conditions => "event = 'Login'", :order => 'created_at DESC', :limit => 2)
+    last = !last_two.empty? ? last_two.last.created_at : Time.now.utc
+    last.to_formatted_s(:short_date)
+  end
+  
+  # Create an activation code for the user.
+  def make_activation_code
+    self.activation_code = Digest::SHA1.hexdigest(Time.now.to_s.split('//').sort_by { rand }.join) unless activation_code
+  end
+  
+  protected
+  # Save the User's avatar in the database
+  def save_avatar
+    return unless @avatar_data && @avatar_data.size > 0
+    self.avatar = Avatar.create :uploaded_data => @avatar_data
+  end
+
+  # before filter 
+  def encrypt_password
+    return if password.blank?
+    self.salt = Digest::SHA1.hexdigest("--#{Time.now.to_s}--#{login}--") if new_record?
+    self.crypted_password = encrypt(password)
+    self.password = self.password_confirmation = nil
+  end
+  
+  def password_required?
+    crypted_password.blank? || !password.blank?
+  end
+  
+  # Encrypts some data with the salt.
+  def self.encrypt(password, salt)
+    Digest::SHA1.hexdigest("--#{salt}--#{password}--")
+  end
+
+  # Encrypts the password with the user salt
+  def encrypt(password)
+    self.class.encrypt(password, salt)
+  end
+  
+end

Added: incubator/heraldry/idp/pip/trunk/app/models/user_notifier.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/models/user_notifier.rb?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/models/user_notifier.rb (added)
+++ incubator/heraldry/idp/pip/trunk/app/models/user_notifier.rb Fri Sep 22 18:37:26 2006
@@ -0,0 +1,58 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# ActionMailer class for sending notification emails to the user.
+class UserNotifier < ActionMailer::Base
+  
+  # Creates and sends a signup notification email to the _user's_ email address.
+  # ====Parameters
+  # user:: The User to whom we are sending the email.
+  def signup_notification(user)
+    setup_email(user)
+    @subject    += 'Please activate your new account'
+    @body[:url]  = "http://#{AppConfig.host}/account/activate/#{user.activation_code}"
+  end
+
+  # Creates and sends a password reset email to the _user's_ email address.
+  # This email allows the user to return to the app and set a new password without first logging
+  # in with their current password.
+  # ====Parameters
+  # user:: The User to whom we are sending the email.
+  def password_reset(user)
+    setup_email(user)
+    @subject    += 'Reset your password'
+    @body[:url]  = "http://#{AppConfig.host}/account/reset_password/#{user.activation_code}"
+  end
+
+  # Creates and sends an email to the _user's_ email address when their account is activated.
+  # ====Parameters
+  # user:: The User to whom we are sending the email.  
+  def activation(user)
+    setup_email(user)
+    @subject    += 'Your account has been activated!'
+    @body[:url]  = "http://#{AppConfig.host}/"
+  end
+  
+  protected
+  def setup_email(user)
+    @recipients  = "#{user.email}"
+    @from        = APP_CONFIG[:reply_email]
+    @subject     = "[#{AppConfig.host}] "
+    @sent_on     = Time.now
+    @body[:user] = user
+  end
+end

Added: incubator/heraldry/idp/pip/trunk/app/models/user_observer.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/models/user_observer.rb?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/models/user_observer.rb (added)
+++ incubator/heraldry/idp/pip/trunk/app/models/user_observer.rb Fri Sep 22 18:37:26 2006
@@ -0,0 +1,31 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# UserObserver is used by AccountController to observe the User model for
+# the purposes of sending signup_notification and activation_notification
+# to the user.
+class UserObserver < ActiveRecord::Observer
+  # Cause UserNotifier to send an email to the user for verifying their email address.
+  def after_create(user)
+    UserNotifier.deliver_signup_notification(user)
+  end
+
+  # Cause UserNotifier to send an email to the user after they verify their email address.
+  def after_save(user)
+    UserNotifier.deliver_activation(user) if user.recently_activated?
+  end
+end

Added: incubator/heraldry/idp/pip/trunk/app/views/account/_email_verification.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/account/_email_verification.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/account/_email_verification.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/account/_email_verification.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,35 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<div class="not-verified">
+  <div class='rbroundbox3'>
+    <div class='rbtop3'>
+      <div></div>
+    </div>
+    <div class='rbcontent3' style="padding-left: 10px">
+        <h1>You have not yet verified your e-mail address.</h1><br />
+        <h2><%= current_user.email %></h2><br />
+      <p>A confirmation e-mail has been sent to your e-mail address. Your account will not be verified until you respond to that message.</p>
+      <br />
+      <%= link_to "Resend confirmation e-mail", account_url(:action => 'resend_confirmation'), :post => true, :class => 'white' %>
+    </div>
+    <div class='rbbot3'>
+      <div></div>
+    </div>
+  </div>  
+  <br style="clear: both" />
+</div>

Added: incubator/heraldry/idp/pip/trunk/app/views/account/congratulations.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/account/congratulations.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/account/congratulations.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/account/congratulations.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,65 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<div class="page-head">
+  <div id="pagebody-idimage"><%= current_avatar %></div>
+  <h1 class="pagebody">Congratulations!</h1>
+  <br style='clear:both' />  
+</div>
+
+<div class="gradient_arch" style="background: url(/images/gradient_arch.gif) no-repeat top left; min-height: 70px">
+  <br /><br />
+
+  <h2 class="pagebody" style="margin: 0 0 0 40px;">You have successfully created your Personal Identity.</h2><br />
+  <h3 class="pagebody">Next Steps</h3>
+
+  <div id="steps">
+    <div id="step1">
+      <div class="steps-title">1. Choose your ID<br /> Image</div><br />
+      <p>
+        A personal &quot;ID Image&quot; ensures that all Trust Requests are taking place on your Identity URL.
+        <% if logged_in? && current_user.avatar -%>
+        You can update your own image:
+        <% else -%>
+        You can choose to upload your own image:
+        <% end -%>
+      </p>
+
+      <% form_for :user, current_user, :url => { :controller => 'avatar', :action => 'create' }, :html => { :multipart => true } do |f| %>
+        <p><%= f.file_field :avatar_data, :size => 18, :class => 'myacct' %></p>
+        <p><%= image_submit_tag 'buttons/get_image.gif', :alt => 'Get Image' %></p>
+      <% end -%>
+
+    </div>
+    
+    <div id="step2">
+      <div class="steps-title">2. Customize your Profile</div>
+      <br />
+      Go to &quot;<%= link_to "My Account", account_url(:action => 'edit') %>&quot;
+      to modify settings like e-mail, password and ID Image.</div>
+    
+    <div id="step3">
+      <div id="steps-title">3. Verify your e-mail address</div>
+      <br />
+      <span class="e-mail"><%= current_user.email %></span><br />
+      A confirmation e-mail has been sent to your e-mail address.
+      Your account will not be verified until you respond to that message.<br />
+      <br />
+      <%= link_to "Resend confirmation e-mail", account_url(:action => 'resend_confirmation'), :post => true %>
+    </div>  
+  </div>
+</div>

Added: incubator/heraldry/idp/pip/trunk/app/views/account/edit.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/account/edit.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/account/edit.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/account/edit.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,61 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<div class="page-head">
+  <div id="pagebody-idimage"><%= current_avatar %></div>  
+  <h1 class="pagebody">Account Settings</h1>
+
+  <br style="clear:both" />
+</div>  
+<div class="gradient_arch"><img src="/images/gradient_arch.gif" width="760" height="70" alt="" /></div>
+
+<div id="pagebody-text">
+  <% form_for :user, current_user, :html => { :multipart => true } do |form|; form.with_options :class => 'myacct' do |f| -%>  
+
+    <label for="identityurl" class="myacct">Identity URL</label>
+    <div id="noinput">
+      <span class="highlighted">
+        <%= identity_url(:username => current_user.login)[0..34] %><br />
+        <%= (identity_url(:username => current_user.login)[35..-1] || '') %>
+      </span>
+    </div><br /><br />
+  
+    <label class="myacct">User ID</label>
+    <div class="noinput"><%= current_user.login %></div><br /><br />
+  
+    <label for="user_email" class="myacct">E-mail</label>
+    <%= f.text_field :email %><br /><br />
+  
+    <label for="user_password" class="myacct">Change Password</label>
+    <%= f.password_field :password %><br />
+  
+    <label for="user_password_confirmation" class="myacct">Confirm</label>
+    <%= f.password_field :password_confirmation %><br /><br />
+  
+    <%= image_submit_tag 'buttons/save_changes.gif', :alt => 'Create Account' %>
+  
+    <div id="sidebar">
+      <label for="imageid" class="myacct">Image ID</label><br /><br />
+     <%= current_avatar %><br />
+      Change your ID Image<br />
+      <br />
+      <%= %>
+      <%= f.file_field :avatar_data, :size => 20 %>
+    </div>
+
+  <% end;end -%>
+</div>

Added: incubator/heraldry/idp/pip/trunk/app/views/account/forgot_password.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/account/forgot_password.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/account/forgot_password.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/account/forgot_password.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,37 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<div class="page-head">
+  <h1 class="pagebody">Account Information Reminder</h1>
+    <br style="clear:both" />
+  </div>
+  
+<div class="gradient_arch"><img src="/images/gradient_arch.gif" width="760" height="70" alt="" /></div>
+  
+<%= start_form_tag %>
+  <div id="pagebody-text">
+    Just enter your e-mail address below and we'll send you a link that will let you reset it.
+<br /><br />
+
+    <p>
+      <label for="user_email" class="myacct">E-mail Address</label>
+      <%= text_field_tag :email, '', :class => 'forgot' %>
+    </p>
+  <br />
+    <%= image_submit_tag 'buttons/resend_account_info.gif', :alt => 'Send' %>
+  </div>
+</form>
\ No newline at end of file

Added: incubator/heraldry/idp/pip/trunk/app/views/account/index.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/account/index.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/account/index.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/account/index.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,26 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<% yadis_header_content if using_subdomain? -%>
+
+<div style="margin-top: 40px;">
+  <noscript><h1>Javascript is required for some functionality. Please enable javascript in your browser.</h1></noscript>
+  <div id="title">OPEN_SOURCE: Put your title copy here.<br style="clear:both" /></div>
+  <div id="create_acct"><%= link_to image_tag('buttons/create_account.gif', :size => '165x38', :alt => 'Create an Account'), signup_url %></div>
+</div>
+
+<!-- OPEN_SOURCE: Put your welcome page here. -->

Added: incubator/heraldry/idp/pip/trunk/app/views/account/login.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/account/login.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/account/login.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/account/login.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,38 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<div class="page-head">
+  <h1 class="pagebody">Log In</h1>
+  <%= error_messages_for :user %>
+  <br style="clear:both" />
+</div>
+
+<div class="gradient_arch"><img src="/images/gradient_arch.gif" width="760" height="70" alt="" /></div>
+<%= start_form_tag %>
+  <div id="pagebody-text">
+    <label for="login_username" class="createacct">Username</label>
+    <%= text_field_tag 'login', default_value_for_login, :class => 'createacct', :id => 'login_username' %><br />
+    
+    <label for="login_password" class="createacct">Password</label>
+    <%= password_field_tag 'password', nil, :class => 'createacct', :id => 'login_password' %><br />
+    
+    <%= hidden_field_tag 'return_to_query', session[:return_to_query] || @return_to_query %>
+    <%= hidden_field_tag 'return_to', session[:return_to] || @return_to %>
+    <%= hidden_field_tag 'previous_protocol', session[:previous_protocol] || @previous_protocol %>
+    <p><%= image_submit_tag 'buttons/login.gif', :alt => 'Login', :name => 'commit' %></p>
+  </div>
+<%= end_form_tag %>

Added: incubator/heraldry/idp/pip/trunk/app/views/account/resend_confirmation.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/account/resend_confirmation.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/account/resend_confirmation.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/account/resend_confirmation.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,36 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<div class="page-head">
+  <div id="pagebody-idimage"><%= current_avatar %></div>
+  <h1 class="pagebody">Resend Confirmation Email</h1>
+
+  <br style='clear:both' />
+</div>
+
+<div class="gradient_arch"><img src="/images/gradient_arch.gif" width="760" height="70" alt="" /></div>
+  
+<%= start_form_tag -%>  
+  <div id="pagebody-text">
+    <p>
+      <label for="user_email" class="myacct">E-mail</label>
+      <%= text_field_tag :email, current_user ? current_user.email : '', :class => 'forgot' %>
+    </p>
+  <br />
+    <%= image_submit_tag 'buttons/resend_confirmation.gif', :alt => 'Save Changes' %>
+  </div>
+</form>

Added: incubator/heraldry/idp/pip/trunk/app/views/account/reset_password.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/account/reset_password.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/account/reset_password.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/account/reset_password.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,43 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<div class="page-head">
+  <div id="pagebody-idimage"><%= current_avatar %></div>
+  <h1 class="pagebody">Reset Password</h1>
+  <%= error_messages_for :user %>
+  <br style='clear:both' />
+</div>
+
+<div class="gradient_arch"><img src="/images/gradient_arch.gif" width="760" height="70" alt="" /></div>
+
+<% form_for :user, :url => { :id => params[:id] } do |form|; form.with_options :class => 'forgot' do |f| -%>  
+  <div id="pagebody-text">
+    Please fill out the form below to choose a new password and sign in.
+    <br /><br />
+    <p>
+      <label for="user_password" class="myacct">New Password</label>
+      <%= f.password_field :password %>
+    </p>
+    
+    <p>
+      <label for="user_password_confirmation" class="myacct">Confirm New Password</label>
+      <%= f.password_field :password_confirmation %>
+    </p>
+    <br />
+    <%= image_submit_tag 'buttons/save_changes.gif', :alt => 'Save Changes' %>
+  </div>
+<% end;end -%>
\ No newline at end of file

Added: incubator/heraldry/idp/pip/trunk/app/views/account/signup.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/account/signup.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/account/signup.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/account/signup.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,58 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<% @page_title = 'Sign Up'%>
+
+<div class="page-head">
+  <h1 class="pagebody">Create Your Account</h1>
+  <%= error_messages_for 'user' %>
+  <br style='clear:both' />
+</div>
+
+<div class="gradient_arch"><img src="/images/gradient_arch.gif" width="760" height="70" alt="" /></div>
+
+<% form_for :user, @user, :url => {:action => 'complete_signup'} do |form|; form.with_options :class => 'createacct' do |f| -%>
+  <div id="pagebody-text">
+    <label for="username" class="createacct">Username</label>
+    <%= f.text_field :login %><br />
+    
+    <label for="password" class="createacct">Password</label>
+    <%= f.password_field :password %><br />
+    
+    <label for="confirm-pass" class="createacct">Confirm Password</label>
+    <%= f.password_field :password_confirmation %><br />
+    
+    <label for="e-mail" class="createacct">E-mail</label>
+    <%= f.text_field :email %><br />
+    
+    <img id="captcha_image" src="/captcha/new" alt="" height="70" />
+    <br /><br /><br />
+    
+    For security purposes, type the code seen in the image above.<br /><br />
+    <%= text_field_tag :captcha , '', :class => 'createacct'%>
+    <% if @captcha_error %>
+      <span class="error"><%= @captcha_error %></span>
+    <% end %>
+
+    <br /><br />
+    <p>By creating my account I have read and agree to the 
+      <a href="/static/terms" onclick="window.open(this.href);return false;">Terms of Service</a> and 
+      <a href="/static/privacy" onclick="window.open(this.href);return false;">Privacy Policy</a>.</p>
+    <br /><br />
+    <%= image_submit_tag 'buttons/create_account.gif', :alt => 'Create Account' %><br />
+  </div>
+<% end;end -%>
\ No newline at end of file

Added: incubator/heraldry/idp/pip/trunk/app/views/account/welcome.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/account/welcome.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/account/welcome.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/account/welcome.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,53 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<div class="page-head">
+  <div id="pagebody-idimage"><%= current_avatar %></div>
+  <h1 class="pagebody">Welcome Back!</h1>
+  <br /><br /><br />
+  <h2 class="about" style="left: 0;font-size: 14px; color: #999999;">Your last visit was <%= current_user.last_login %></h2>
+  <br style='clear:both' />  
+</div>
+
+<div class="gradient_arch" style="background: url(/images/gradient_arch.gif) no-repeat top left; min-height: 70px">
+  <br />
+
+  <div id="steps">
+    <div id="step1">
+      <div class="steps-title">Fill in your Personal<br /> Profile</div><br />
+      Your <span class="highlighted">
+        <%= link_to '&quot;Personal Profile&quot;', :controller => 'property_types', :action => 'index' %>
+      </span> 
+      contains information we can automatically provide to web sites when they request it, 
+      saving you time when signing up for new services.
+    </div>
+    
+    <div id="step2">
+      <div class="steps-title">Customize your Account Settings</div>
+      <br />
+      Go to <span class="highlighted"><%= link_to '&quot;My Account&quot;', :action => 'edit' %></span>
+      to modify settings like e-mail, password and ID Image.
+    </div>
+  
+    <div id="step3">
+      <div class="steps-title">Modify Web Site Permissions</div>
+      <br />
+      Go to <span class="highlighted"><%= link_to '&quot;Trust Profiles&quot;', :controller => 'profiles' %></span>
+      to control what information your current web sites can access.
+    </div>  
+  </div>
+</div>

Added: incubator/heraldry/idp/pip/trunk/app/views/errors/server_index.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/errors/server_index.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/errors/server_index.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/errors/server_index.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,19 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<% @page_title = 'Error' %>
+<p>The Request that you have attempted does not meet the OpenID protocol standard - please contact the host administrator of your site to advise them of this situation.</p>

Added: incubator/heraldry/idp/pip/trunk/app/views/layouts/_errors.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/layouts/_errors.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/layouts/_errors.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/layouts/_errors.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,31 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<div class="not-verified">
+  <div class='rbroundbox3'>
+    <div class='rbtop3'>
+      <div></div>
+    </div>
+    <div class='rbcontent3' style="padding-left: 10px">
+      <%= content %>
+    </div>
+    <div class='rbbot3'>
+      <div></div>
+    </div>
+  </div>  
+  <br style="clear: both" />
+</div>
\ No newline at end of file

Added: incubator/heraldry/idp/pip/trunk/app/views/layouts/_flash.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/layouts/_flash.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/layouts/_flash.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/layouts/_flash.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,33 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<% unless show_flash?(@flash) || @hide_flash -%>
+<div id="flash">
+  <br style="clear:both" />
+  <div class="rbroundbox3">
+    <div class="rbtop3"><div></div></div>
+    <div class="rbcontent3">
+    <% for key,value in @flash -%>
+      <% if show_flash_key?(key) -%> 
+        <%= content_tag('div',value,{ :class => key.to_s.downcase, :id => "flash-#{key.to_s.downcase}" }) %>
+      <% end -%>
+    <% end -%>
+    </div>
+    <div class="rbbot3"><div></div></div>
+  </div>
+</div>
+<% end -%>

Added: incubator/heraldry/idp/pip/trunk/app/views/layouts/_footer.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/layouts/_footer.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/layouts/_footer.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/layouts/_footer.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,30 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<div id="footer">
+  <div id="footer-blue"></div>
+  <div id="footer-gray">
+    <a href="/">Home</a> | 
+    <a href="/static/about">About</a> | 
+    <%= link_to 'Blog', APP_CONFIG[:blog_link] %> |
+    <%= link_to 'Contact', "mailto:#{APP_CONFIG[:contact_email]}" %> |
+    <a href="/static/faq">FAQ</a> | 
+    <a href="/static/terms">Terms of Service</a> | 
+    <a href="/static/privacy">Privacy Policy</a><br />  
+    <span>&copy; Copyright 2006. <%= APP_CONFIG[:company_name] %></span>
+  </div>
+</div>

Added: incubator/heraldry/idp/pip/trunk/app/views/layouts/_header.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/layouts/_header.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/layouts/_header.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/layouts/_header.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,31 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<div id="hdr">
+  <div id="header-loginlock">&nbsp;</div>
+
+  <div id="header-logo">
+    <%= link_to image_tag('logo.gif', :size => '201x93', :alt => APP_CONFIG[:app_name]), '/' %>
+  </div>
+
+  <%= render_specific_header_items %>
+
+  <div id="header-company">
+    <%= link_to image_tag('company_logo.gif', :size => '88x38', :alt => APP_CONFIG[:company_name]), 
+                          APP_CONFIG[:company_link], :target => '_blank' %>
+  </div>
+</div>

Added: incubator/heraldry/idp/pip/trunk/app/views/layouts/_logged_in_header_items.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/layouts/_logged_in_header_items.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/layouts/_logged_in_header_items.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/layouts/_logged_in_header_items.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,27 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<div id="header-loggedin">
+  You are logged in as <strong><%=h current_user.login %></strong> | 
+  Identity URL: <span class="highlighted"><%= identity_url(:username => current_user.login) %></span>
+</div>
+<div id="header-login">
+  <%= link_to image_tag('logout.gif', :size => '99x37', :alt => 'Log Out'), logout_url %>
+</div>
+<div id="header-navigation">
+  <%= render :partial => '/layouts/tabs' %>
+</div>

Added: incubator/heraldry/idp/pip/trunk/app/views/layouts/_login_button.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/layouts/_login_button.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/layouts/_login_button.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/layouts/_login_button.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,24 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<div id="header-login">
+  <p id="session-id-validation" style="display:none"><%= security_token %></p>
+  <p id="protocol" style="display:none"><%= APP_CONFIG[:disable_ssl] ? 'http' : 'https' %></p>
+  <p id="domain" style="display:none"><%= AppConfig.host %></p>
+  <%= link_to_function image_tag('login.gif', :size => '99x37'), "toggleLoginForm(this)", 
+                       :href => login_url %>
+</div>

Added: incubator/heraldry/idp/pip/trunk/app/views/layouts/_regular_header_items.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/layouts/_regular_header_items.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/layouts/_regular_header_items.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/layouts/_regular_header_items.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,17 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+

Added: incubator/heraldry/idp/pip/trunk/app/views/layouts/_tabs.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/layouts/_tabs.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/layouts/_tabs.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/layouts/_tabs.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,40 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+ <%= link_to("My Account", {:controller => 'account', :action => 'edit'}, 
+                           {:id => 'nav-my-account', 
+                            :class => [selected?(/^account\/edit/), 'tooltip'].join(' '), 
+                            :title => 'Information about your account' }) %>
+ <%= link_to("My Profile", {:controller => 'property_types', :action => 'index'}, 
+                            {:id => 'nav-my-profile',      
+                             :class => [selected?(/^account\/profile/),  'tooltip'].join(' '), 
+                             :title => 'Information about yourself' }) %>
+ <%= link_to("Trusted IDs", {:controller => 'trusts', :action => "index"},   
+                            {:id => 'nav-trusted-ids',     
+                             :class => [selected?(/^trusts/), 'tooltip'].join(' '), 
+                             :title => 'A list of websites and services where ' + 
+                                       'you have shared your Profile' }) %>
+ <%= link_to("Trusted Profiles", {:controller => 'profiles', :action => "index"},   
+                                 {:id => 'nav-trusted-profiles',
+                                  :class => [selected?(/^profiles/), 'tooltip'].join(' '), 
+                                  :title => 'A list of specific profiles you have created to ' +
+                                            'facilitate information sharing' }) %>
+ <%= link_to("Activity", {:controller => 'ledgers', :action => 'index'},   
+                          {:id => 'nav-activity',        
+                           :class => [selected?(/^ledgers/), 'tooltip'].join(' '), 
+                           :title => 'A ongoing record of which sites have asked for ' +
+                                     'information and when those transactions occurred' }) %>

Added: incubator/heraldry/idp/pip/trunk/app/views/layouts/application.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/layouts/application.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/layouts/application.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/layouts/application.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,42 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+    <meta name="description" content="Identity Provider." />
+    <meta name="keywords" content="personal, identity, open id, login" />
+    <title><%=  'Identity Provider ' + (@page_title ? "&mdash; #{@page_title}" : '') %></title>
+    <%= javascript_include_tag :defaults, 'help_popup', 'debug' %>
+    <%= stylesheet_link_tag "application" %>
+    <%= @content_for_script %>
+    <%= @content_for_header %>
+  </head>
+  <body>
+    <div id="tophdr"></div>
+    <div id="left">
+      <%= render :partial => 'layouts/header' %>
+      <div id="main">
+        <%= render :partial => 'layouts/flash' %>
+        <%= yield %>
+        <div class="spacer"></div>
+      </div>
+    </div>
+    <%= render :partial => 'layouts/footer' %>
+  </body>
+</html>

Added: incubator/heraldry/idp/pip/trunk/app/views/ledgers/_ledger.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/ledgers/_ledger.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/ledgers/_ledger.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/ledgers/_ledger.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,26 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+    <tr id="<%= ledger.to_dom_id %>">
+      <td class="ledgers-time-cell"><%=h ledger.created_at.to_formatted_s(:short_date) %></td>
+      <td class="ledgers-source-cell"><%=h truncate(ledger.source,20) %></td>
+      <td class="ledgers-event-cell"><%=h ledger.event %></td>
+      <td class="ledgers-target-cell"><%=h truncate(ledger.target,20) %></td>
+      <td class="ledgers-idname-cell"><%=h ledger.login %></td>
+      <td class="ledgers-result-cell"><%=h ledger.result %></td>
+      <td class="ledgers-source-cell"><%=h ledger.source_ip %></td>
+    </tr>
\ No newline at end of file

Added: incubator/heraldry/idp/pip/trunk/app/views/ledgers/list.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/ledgers/list.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/ledgers/list.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/ledgers/list.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,52 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<div class="page-head">
+  <div id="pagebody-idimage"><%= current_avatar %></div>
+  <h1 class='pagebody'>Your Account Activity</h1>
+  <br style='clear:both' />
+</div>
+
+<div class="gradient_arch" style="background: url(/images/gradient_arch.gif) no-repeat top left; min-height: 70px">
+  <br />
+
+  <table id="ledgers" cellpadding="0" cellspacing="0">
+    <thead>
+      <tr>
+        <th class="ledgers-time-cell">Time (UTC)</th>
+        <th class="ledgers-source-cell">Source</th>
+        <th class="ledgers-event-cell">Event</th>
+        <th class="ledgers-target-cell">Target</th>
+        <th class="ledgers-idname-cell">ID/Name</th>
+        <th class="ledgers-result-cell">Result</th>
+        <th class="ledgers-source-cell">Source IP</th>
+      </tr>
+    </thead>
+    <tbody id="trusts-body">
+      <%= render :partial => "ledger", :collection => @ledgers %>
+    </tbody>
+  </table>
+</div>
+<script type="text/javascript">
+// <![CDATA[
+  DataTable.colorizeRows('ledgers');
+// ]]>
+</script>
+
+<%= link_to 'Previous page', { :page => @ledger_pages.current.previous } if @ledger_pages.current.previous %>
+&nbsp;&nbsp;&nbsp;
+<%= link_to 'Next page', { :page => @ledger_pages.current.next } if @ledger_pages.current.next %> 

Added: incubator/heraldry/idp/pip/trunk/app/views/ledgers/show.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/ledgers/show.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/ledgers/show.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/ledgers/show.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,25 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<% for column in Ledger.content_columns %>
+<p>
+  <b><%= column.human_name %>:</b> <%=h @ledger.send(column.name) %>
+</p>
+<% end %>
+
+<%= link_to 'Edit', :action => 'edit', :id => @ledger %> |
+<%= link_to 'Back', :action => 'list' %>

Added: incubator/heraldry/idp/pip/trunk/app/views/profiles/_category.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/profiles/_category.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/profiles/_category.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/profiles/_category.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,29 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<div id="<%= category.to_dom_id %>" class="trust-profile-category-set">
+  <div id="category_<%= category.to_dom_id %>" class="category-set">
+    <div class="gradient">
+      <div class="profile-row">
+        <h2 class="category"><%= category.title %></h2>
+      </div>
+    </div>
+  </div>
+  <div id="category_content_<%= category.to_dom_id %>" class="outer-property-set">
+    <%= render_children(category) %>
+  </div>
+</div>

Added: incubator/heraldry/idp/pip/trunk/app/views/profiles/_form.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/profiles/_form.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/profiles/_form.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/profiles/_form.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,35 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<%= error_messages_for 'profile' %>
+<div class="profile-member">
+  <label for="title">Name of this Trust Profile</label>
+  <%= text_field 'profile', 'title', :class => "trust-name"  %>
+  <br /><br />
+  <label for="description">Description</label>
+  <%= text_field 'profile', 'description', :class => "trust-name"  %>
+  <br />
+</div>
+
+<h1 class="profile">Select the information you want in this Trust Profile and save at bottom of page.</h1>
+
+<%= render :partial => "category", :collection => @global_or_owned_property_types %>
+
+<div class='profile-row'>
+  <%= image_submit_tag 'buttons/save_changes.gif', :alt => 'Create Account', :class => 'profile-save' %>
+  <br style='clear:both' />
+</div>

Added: incubator/heraldry/idp/pip/trunk/app/views/profiles/_member.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/profiles/_member.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/profiles/_member.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/profiles/_member.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,23 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<tr id="<%= member.to_dom_id %>" class="<%= row_class(member_counter) %>">
+  <td class="trusts-web-cell"><%=h member.trust_root %></td>
+  <td class="trusts-action-cell">
+    <%= link_to_remote 'Delete', :url => { :controller => 'trusts', :action => 'destroy', :id => member.id }, :confirm => "Are you sure?" %>
+  </td>
+</tr>

Added: incubator/heraldry/idp/pip/trunk/app/views/profiles/_profile.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/profiles/_profile.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/profiles/_profile.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/profiles/_profile.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,26 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<tr id="<%= profile.to_dom_id %>">
+  <td class="profiles-name-cell"><%=h profile.title %></td>
+  <td class="profiles-desc-cell"><%=h profile.description %></td>
+  <td class="profiles-action-cell">
+    <%= link_to 'Edit', :action => 'edit', :id => profile %> |
+    <%= link_to_remote 'Delete', :url => { :action => 'destroy', :id => profile }, :confirm => "Are you sure?" %> |
+    <%= link_to 'Members', {:action => 'members', :id => profile} %>
+  </td>
+</tr>
\ No newline at end of file

Added: incubator/heraldry/idp/pip/trunk/app/views/profiles/_property.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/profiles/_property.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/profiles/_property.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/profiles/_property.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,23 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<div id='<%= property.to_dom_id %>' class='profile-row'>
+  <input type='checkbox' name='property[]' class="checkbox" value="<%= property.id %>" <%= (!@profile.new_record? && @profile.properties.include?(property)) ? "checked='checked'" : "" %> />
+  <label for="property_<%= property.id %>" class="profile-title"><%= property.title %></label>
+  <%= text_field_tag "property_value_#{property.id}", friendly_property_value(property), {:class => 'profile-field', :readonly => true} %>
+  <br style='clear:both' />
+</div>

Added: incubator/heraldry/idp/pip/trunk/app/views/profiles/_sub_category.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/profiles/_sub_category.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/profiles/_sub_category.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/profiles/_sub_category.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,24 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<div id="<%= sub_category.to_dom_id %>" class="category-row">
+  <div class='profile-row'>
+    <h4 id="title_<%= sub_category.to_dom_id %>" class="profile"><%= sub_category.title %></h4>
+    <br style='clear:both' />
+  </div>
+  <%= render_children(sub_category) %>
+</div>

Added: incubator/heraldry/idp/pip/trunk/app/views/profiles/destroy.rjs
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/profiles/destroy.rjs?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/profiles/destroy.rjs (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/profiles/destroy.rjs Fri Sep 22 18:37:26 2006
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+page[@profile.to_dom_id].visual_effect :drop_out, 
+  :afterFinish => ActiveSupport::JSON::Variable.new("function() { DataTable.colorizeRows('profiles') }")
\ No newline at end of file

Added: incubator/heraldry/idp/pip/trunk/app/views/profiles/edit.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/profiles/edit.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/profiles/edit.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/profiles/edit.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,46 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<%= start_form_tag :action => 'update', :id => @profile %>
+
+<div class="page-head">
+  <div id="pagebody-idimage"><%= current_avatar %></div>
+  <h1 class="pagebody">Editing Trust Profile <%= @profile.title %></h1>
+  
+  <%= error_messages_for 'profile' %>
+
+  <div class="profile-member">
+    <label for="title">Name of this Trust Profile</label>
+    <%= text_field 'profile', 'title', :class => "trust-name"  %>
+    <br /><br />
+    <label for="description">Description</label>
+    <%= text_field 'profile', 'description', :class => "trust-name"  %>
+    <br />
+  </div>
+
+  <h1 class="profile">Select the information you want in this Trust Profile and save at bottom of page.</h1>
+  <br style='clear:both' />
+</div>
+
+<%= render :partial => "category", :collection => @global_or_owned_property_types %>
+
+<div class='profile-row'>
+  <%= image_submit_tag 'buttons/save_changes.gif', :alt => 'Create Account', :class => 'profile-save' %>
+  <br style='clear:both' />
+</div>
+
+<%= end_form_tag %>

Added: incubator/heraldry/idp/pip/trunk/app/views/profiles/export.rxml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/profiles/export.rxml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/profiles/export.rxml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/profiles/export.rxml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+xml.instruct!
+xml.profile do
+  @profile.properties.each do |property|
+    xml.tag! property.property_type.short_name, property.value
+  end
+end

Added: incubator/heraldry/idp/pip/trunk/app/views/profiles/list.rhtml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/app/views/profiles/list.rhtml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/app/views/profiles/list.rhtml (added)
+++ incubator/heraldry/idp/pip/trunk/app/views/profiles/list.rhtml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,48 @@
+<% # Licensed to the Apache Software Foundation (ASF) under one
+   # or more contributor license agreements.  See the NOTICE file
+   # distributed with this work for additional information
+   # regarding copyright ownership.  The ASF licenses this file
+   # to you under the Apache License, Version 2.0 (the
+   # "License"); you may not use this file except in compliance
+   # with the License.  You may obtain a copy of the License at
+   # 
+   #   http://www.apache.org/licenses/LICENSE-2.0
+   # 
+   # Unless required by applicable law or agreed to in writing,
+   # software distributed under the License is distributed on an
+   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   # KIND, either express or implied.  See the License for the
+   # specific language governing permissions and limitations
+   # under the License. %>
+
+<div class="page-head">
+  <div id="pagebody-idimage"><%= current_avatar %></div>
+  
+  <h1 class="trusted">A <span class="colored">Trust Profile</span> is a grouping of specific fields from your Profile to allow you to efficiently organize your profile information into easily identifiable buckets.</h1>
+
+  <br />
+  <%= link_to image_tag('buttons/create_new.gif', :size => '105x22', :alt => 'Create new'), url_for(:controller => 'profiles', :action => 'new') %>
+
+  <br style="clear:both" />
+</div>
+
+<div class="gradient_arch" style="background: url(/images/gradient_arch.gif) no-repeat top left; min-height: 70px">
+  <br />
+<table id="profiles" cellpadding="0" cellspacing="0">
+  <thead>
+    <tr>
+      <th class="profiles-name-cell"><%= sort_link_for('Name', 'profiles.title') %></th>
+      <th class="profiles-desc-cell"><%= sort_link_for('Description', 'profiles.description') %></th>
+      <th class="profiles-action-cell">&nbsp;</th>
+    </tr>
+  </thead>
+  <tbody id="profiles-body">
+    <%= render :partial => "profile", :collection => @profiles %>
+  </tbody>
+</table>
+</div>
+<script type="text/javascript">
+// <![CDATA[
+  DataTable.colorizeRows('profiles');
+// ]]>
+</script>



Mime
View raw message