Add devise gem and panel/users controller

This commit is contained in:
Wen-Tien Chang committed 2010-03-04 16:33:26 +08:00
1 parent e87b3c1d61
commit 13065aa85a
23 files changed
+331 -4

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
<p>
<%= label_tag :name %>
<%= text_field_tag "user[name]" %>
</p>
<p>
<%= f.label :email %>
<%= f.text_field :email %>
</p>
+18
View File
@@ -0,0 +1,18 @@
<% content_for :secondary do %>
<ul class="list">
<li><%= link_to t(:new_user, :scope => :panel), new_panel_user_path, :class => 'button positive' %></li>
</ul>
<% end -%>
<h1>Users panel</h1>
<% form_for @user, :url => panel_user_path(@user) do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<p>
<%= f.submit %>
</p>
<% end -%>
+24
View File
@@ -0,0 +1,24 @@
<% content_for :secondary do %>
<ul class="list">
<li><%= link_to t(:new_user, :scope => :panel), new_panel_user_path, :class => 'button positive' %></li>
</ul>
<% end -%>
<h1>Users panel</h1>
<table>
<tr>
<th>Name</th>
<th>Email</th>
<th>Action</th>
</tr>
<% @users.each do |user| %>
<tr>
<td><%#= user.name %></td>
<td><%= user.email %></td>
<td><%= link_to 'Edit', edit_panel_user_path(user) %> | <%= link_to 'Destroy', panel_user_path(user), :method => :delete %></td>
</tr>
<% end %>
</table>
+18
View File
@@ -0,0 +1,18 @@
<% content_for :secondary do %>
<ul class="list">
<li><%= link_to t(:new_user, :scope => :panel), new_panel_user_path, :class => 'button positive' %></li>
</ul>
<% end -%>
<h1>Users panel</h1>
<% form_for @user, :url => panel_users_path do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<p>
<%= f.submit %>
</p>
<% end -%>