implements user name change requests
This commit is contained in:
24
app/views/user_name_change_requests/index.html.erb
Normal file
24
app/views/user_name_change_requests/index.html.erb
Normal file
@@ -0,0 +1,24 @@
|
||||
<div id="c-user-name-change-requests">
|
||||
<h1>Name Change Requests</h1>
|
||||
|
||||
<table class="striped" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>User</th>
|
||||
<th>Desired</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @change_requests.each do |change_request| %>
|
||||
<tr>
|
||||
<td><%= link_to change_request.original_name, user_path(change_request.user_id) %></td>
|
||||
<td><%= change_request.desired_name %></td>
|
||||
<td><%= link_to "view", user_name_change_request_path(change_request) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= numbered_paginator(@change_requests) %>
|
||||
</div>
|
||||
@@ -16,6 +16,6 @@
|
||||
</div>
|
||||
|
||||
<div class="input">
|
||||
<%= submit_tag %>
|
||||
<%= submit_tag "Submit" %>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -33,7 +33,11 @@
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<% if CurrentUser.user.is_admin? %>
|
||||
<% if @change_request.rejected? %>
|
||||
<section>
|
||||
<h2>Request was rejected</h2>
|
||||
</section>
|
||||
<% elsif CurrentUser.user.is_admin? %>
|
||||
<section>
|
||||
<h2>Options</h2>
|
||||
<%= form_tag(approve_user_name_change_request_path(@change_request)) do %>
|
||||
@@ -52,5 +56,11 @@
|
||||
<% end %>
|
||||
</section>
|
||||
<% end %>
|
||||
|
||||
<section>
|
||||
<%= form_tag(user_name_change_request_path(@change_request), :method => :delete) do %>
|
||||
<%= submit_tag "Delete" %>
|
||||
<% end %>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -97,6 +97,13 @@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<% if CurrentUser.user.is_janitor? && presenter.previous_names.present? %>
|
||||
<tr>
|
||||
<th>Previous Names</th>
|
||||
<td><%= presenter.previous_names %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
<% if CurrentUser.user.id == user.id %>
|
||||
<tr>
|
||||
<th>API Key</th>
|
||||
|
||||
@@ -5,9 +5,15 @@
|
||||
<%= simple_form_for @user do |f| %>
|
||||
<fieldset>
|
||||
<legend>Basic Settings</legend>
|
||||
|
||||
<div class="input">
|
||||
<label>Name</label>
|
||||
<p>Name changes are not supported. <%= link_to "Read why", name_change_path %>.</p>
|
||||
|
||||
<% if CurrentUser.user.is_privileged? %>
|
||||
<p><%= link_to "Request a name change", new_user_name_change_request_path %></p>
|
||||
<% else %>
|
||||
<p>You must <%= link_to "upgrade your account", upgrade_information_users_path %> to request a name change</p>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= f.input :email, :required => Danbooru.config.enable_email_verification?, :hint => "Used for messages and for password resets", :as => :email %>
|
||||
<%= f.input :time_zone, :include_blank => false %>
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Favorite Limit</td>
|
||||
<td>10,000</td>
|
||||
<td>20,000</td>
|
||||
<td>40,000</td>
|
||||
<td>Unlimited</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -80,7 +80,13 @@
|
||||
<td>9 sec</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>50 or 100 Posts Per Page</td>
|
||||
<td>Variable Posts Per Page</td>
|
||||
<td>No</td>
|
||||
<td>Yes</td>
|
||||
<td>Yes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Name Changes</td>
|
||||
<td>No</td>
|
||||
<td>Yes</td>
|
||||
<td>Yes</td>
|
||||
|
||||
Reference in New Issue
Block a user