admin status change

This commit is contained in:
chris authored and ihower committed 2011-04-13 18:22:50 +08:00
1 parent e360baadde
commit 4b4cdbfd31
7 files changed
+17 -3

No files matched your search

+4 -1
View File
@@ -17,6 +17,10 @@
<%= f.label :email %>
<%= f.text_field :email %>
</p>
<p>
<%= t('panel.admin') %>
<%= f.check_box :admin %>
</p>
</div>
<% if @user_info_models %>
@@ -32,7 +36,6 @@
</fieldset>
<% end %>
<%= hidden_field_tag :active_roles, (@user.active_roles.size > 0 rescue nil ) %>
<% if @user_role_models %>
<fieldset id="roles" <%= raw(' style="display: none;"') unless (@user.active_roles.size > 0 rescue nil) %>>
<legend><%= t('panel.roles') %></legend>
+2
View File
@@ -4,6 +4,8 @@
</ul>
<% end -%>
<%= flash_messages %>
<h1><%= t('panel.user_panel') %></h1>
<%= form_for @user, :url => panel_user_path(@user), :html => { :multipart => true } do |f| %>
+2
View File
@@ -13,6 +13,7 @@
<th><%= t('panel.roles') %></th>
<th><%= t('panel.name') %></th>
<th><%= t('panel.email') %></th>
<th><%= t('panel.admin') %></th>
<th><%= t('panel.action') %></th>
</tr>
@@ -21,6 +22,7 @@
<td><%= user.get_roles %></td>
<td><%= user[:name] %></td>
<td><%= user.email %></td>
<td><%= user.admin ? t(:yes_) : t(:no_) %></td>
<td>
<%= link_to t(:show), panel_user_path(user) %> |
<%= link_to t(:edit), edit_panel_user_path(user) %> |