add admin user interface
This commit is contained in:
14
app/views/admin/users/edit.html.erb
Normal file
14
app/views/admin/users/edit.html.erb
Normal file
@@ -0,0 +1,14 @@
|
||||
<div id="c-admin-users">
|
||||
<div id="a-edit">
|
||||
<h1>Edit User: <%= @user.name %></h1>
|
||||
|
||||
<%= form_tag(admin_user_path(@user), :class => "simple_form") do %>
|
||||
<div class="input integer optional">
|
||||
<label for="user_level" class="optional">Level</label>
|
||||
<%= user_level_select(:user, :level) %>
|
||||
</div>
|
||||
|
||||
<%= submit_tag "Update" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -80,7 +80,6 @@
|
||||
<% if CurrentUser.is_admin? %>
|
||||
<ul>
|
||||
<li><h1>Admin</h1></li>
|
||||
<li><%= link_to("User", admin_users_path) %></li>
|
||||
<li><%= link_to("Janitor Trials", janitor_trials_path) %></li>
|
||||
<li><%= link_to("IP Bans", ip_bans_path) %></li>
|
||||
</ul>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<table width="100%" class="highlightable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Name</th>
|
||||
<th>Posts</th>
|
||||
<th>Deleted</th>
|
||||
@@ -25,6 +26,11 @@
|
||||
<tbody>
|
||||
<% @users.each do |user| %>
|
||||
<tr>
|
||||
<td>
|
||||
<% if CurrentUser.is_admin? %>
|
||||
<%= link_to "Admin", edit_admin_user_path(user) %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to user.pretty_name, user_path(user.id) %>
|
||||
<% if user.inviter %>
|
||||
|
||||
Reference in New Issue
Block a user