Merge branch 'members' of github.com:Geekner/Open-Source-Access-Control-Web-Interface into members
This commit is contained in:
		
						commit
						4fc18013d9
					
				| @ -6,7 +6,7 @@ class User < ActiveRecord::Base | ||||
|          :recoverable, :rememberable, :trackable, :validatable | ||||
| 
 | ||||
|   # Setup accessible (or protected) attributes for your model | ||||
|   attr_accessible :email, :password, :password_confirmation, :remember_me, :name, :admin | ||||
|   attr_accessible :email, :password, :password_confirmation, :remember_me, :name, :admin, :active | ||||
| 
 | ||||
|   has_many :cards | ||||
| end | ||||
|  | ||||
| @ -33,6 +33,10 @@ | ||||
|     <a href="?password=edit">Change Password</a> | ||||
|   </div> | ||||
| <% end %> | ||||
|   <div class="field"> | ||||
|     <%= f.label :active, "Active?" %><br /> | ||||
|     <%= f.check_box :active %> | ||||
|   </div> | ||||
|   <div class="field"> | ||||
|     <%= f.label :admin, "Admin?" %><br /> | ||||
|     <%= f.check_box :admin %> | ||||
|  | ||||
| @ -8,6 +8,8 @@ | ||||
|     <th>Name</th> | ||||
|     <th>Email</th> | ||||
|     <th>Cards</th> | ||||
|     <th>Active?</th> | ||||
|     <th>Waiver?</th> | ||||
|     <th>Admin?</th> | ||||
|     <th></th> | ||||
|     <th></th> | ||||
| @ -23,6 +25,8 @@ | ||||
|         <%= link_to c.card_number, card_url(c) %><%= "," unless c == user.cards.last %> | ||||
|       <% end %> | ||||
|     </td> | ||||
|     <td><%= if user.active? then "Active" end %></td> | ||||
|     <td><%= if user.waiver.blank? then "Not Signed" else "Signed" end %></td> | ||||
|     <td><%= if user.admin? then "Admin" end %></td> | ||||
|     <td><%= link_to 'Edit', edit_user_path(user) if can? :update, user %></td> | ||||
|     <td><%= link_to 'Destroy', user, :confirm => 'Are you sure? WARNING: THIS DOES NOT REMOVE THE USER FROM THE DOOR SYSTEM! DISABLE THEM FIRST.', :method => :delete if can? :destroy, user %></td> | ||||
|  | ||||
| @ -9,6 +9,11 @@ | ||||
|   <%= @user.email %> | ||||
| </p> | ||||
| 
 | ||||
| <p> | ||||
|   <b>Active?</b> | ||||
|   <%= @user.active %> | ||||
| </p> | ||||
| 
 | ||||
| <p> | ||||
|   <b>Admin?</b> | ||||
|   <%= @user.admin %> | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user