settings page: add help text, rearrange settings.
* Remove 'Change password' and 'Delete account' tabs. * Put 'Change password' under the Basic section. * Put 'Deactivate account' under the Advanced section. * Add help text to various settings.
This commit is contained in:
@@ -6,10 +6,6 @@
|
||||
<h2 id="edit-options">
|
||||
<%= link_to "Basic", "#basic-settings", :class => "active" %>
|
||||
| <%= link_to "Advanced", "#advanced-settings" %>
|
||||
<% if CurrentUser.user.id == @user.id %>
|
||||
| <%= link_to "Change password", edit_user_password_path(:user_id => @user.id), :id => "change-password" %>
|
||||
| <%= link_to "Delete account", maintenance_user_deletion_path, :id => "delete-account" %>
|
||||
<% end %>
|
||||
</h2>
|
||||
|
||||
<fieldset id="basic-settings-section">
|
||||
@@ -17,72 +13,63 @@
|
||||
<label>Name</label>
|
||||
|
||||
<% if CurrentUser.user.is_gold? %>
|
||||
<p><%= link_to "Request a name change", new_user_name_change_request_path %></p>
|
||||
<p><%= link_to "Change your name", new_user_name_change_request_path %></p>
|
||||
<% else %>
|
||||
<p>You must <%= link_to "upgrade your account", new_user_upgrade_path %> to request a name change</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="input">
|
||||
<label>Password</label>
|
||||
<p><%= link_to "Change password", edit_user_password_path(user_id: @user.id) %></p>
|
||||
</div>
|
||||
|
||||
<div class="input">
|
||||
<label>Email</label>
|
||||
<p>
|
||||
<% if CurrentUser.user.email.present? %>
|
||||
<%= CurrentUser.user.email %>
|
||||
<% else %>
|
||||
<em>blank</em>
|
||||
<% end %>
|
||||
–
|
||||
<%= link_to "Change your email", new_maintenance_user_email_change_path %>
|
||||
<%= CurrentUser.user.email.presence || "<em>blank</em>".html_safe %> – <%= link_to "Change your email", new_maintenance_user_email_change_path %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<%= f.input :time_zone, :include_blank => false %>
|
||||
|
||||
<%= f.input :receive_email_notifications, :as => :select, :include_blank => false, :collection => [["Yes", "true"], ["No", "false"]] %>
|
||||
|
||||
<%= f.input :comment_threshold, :hint => "Comments below this score will be hidden by default" %>
|
||||
|
||||
<%= f.input :default_image_size, :hint => "Show original image or show resized #{Danbooru.config.large_image_width} pixel version", :label => "Default image width", :collection => [["850px", "large"], ["original", "original"]], :include_blank => false %>
|
||||
|
||||
<% if CurrentUser.user.is_gold? %>
|
||||
<%= f.input :per_page, :label => "Posts per page", :as => :select, :collection => (1..100), :include_blank => false %>
|
||||
<%= f.input :per_page, :label => "Posts per page", :as => :select, :hint => "Number of thumbnails per page", :collection => (1..200), :include_blank => false %>
|
||||
<% end %>
|
||||
|
||||
<%= f.input :enable_safe_mode, :label => "Safe mode", :hint => "Show only safe images. Hide questionable and explicit images.", :as => :select, :include_blank => false, :collection => [["Yes", "true"], ["No", "false"]] %>
|
||||
|
||||
<%= f.input :blacklisted_tags, :hint => "Put any tag combinations you never want to see here. Each combination should go on a separate line. <a href='/wiki_pages/help:blacklists'>View help.</a>".html_safe, :input_html => {:size => "40x5", :data => {:autocomplete => "tag-query"}} %>
|
||||
<%= f.input :blacklisted_tags, :hint => "Posts with these tags will be hidden. Put each tag on a separate line. <a href='/wiki_pages/help:blacklists'>View help.</a>".html_safe, :input_html => {:size => "40x5", :data => {:autocomplete => "tag-query"}} %>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="advanced-settings-section">
|
||||
<%= f.input :style_usernames, :as => :select, :label => "Colored usernames", :hint => "Color each user's name depending on their level", :include_blank => false, :collection => [["Yes", "true"], ["No", "false"]] %>
|
||||
|
||||
<%= f.input :always_resize_images, :as => :select, :include_blank => false, :label => "Fit images to window", :hint => "Use JavaScript to resize images to fit window", :collection => [["Yes", "true"], ["No", "false"]] %>
|
||||
|
||||
<%= f.input :enable_post_navigation, :as => :select, :include_blank => false, :label => "Enable keyboard shortcuts", :collection => [["Yes", "true"], ["No", "false"]] %>
|
||||
|
||||
<%= f.input :enable_sequential_post_navigation, :as => :select, :label => "Enable slideshow mode", :hint => "Show prev/next links when viewing a post", :include_blank => false, :collection => [["Yes", "true"], ["No", "false"]] %>
|
||||
|
||||
<%= f.input :new_post_navigation_layout, :as => :select, :label => "Navigation bar position", :include_blank => false, :collection => [["Below", "true"], ["Above", "false"]], :hint => "When browsing pools or slideshows, place navigation links above or below the image" %>
|
||||
<div class="input">
|
||||
<label>Account</label>
|
||||
<p>
|
||||
<%= link_to "Deactivate account", maintenance_user_deletion_path, id: "delete-account" %>
|
||||
(<em>requires confirmation</em>)
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<%= f.input :style_usernames, :as => :select, :label => "Colored usernames", :hint => "Color users according to their user level", :include_blank => false, :collection => [["Yes", "true"], ["No", "false"]] %>
|
||||
<%= f.input :always_resize_images, :as => :select, :include_blank => false, :label => "Fit images to window", :hint => "Make images fit screen width by default", :collection => [["Yes", "true"], ["No", "false"]] %>
|
||||
<%= f.input :enable_post_navigation, :as => :select, :include_blank => false, :label => "Enable keyboard shortcuts", :hint => "Enable keyboard shortcuts", :collection => [["Yes", "true"], ["No", "false"]] %>
|
||||
<%= f.input :enable_sequential_post_navigation, :as => :select, :label => "Enable post navigation", :hint => "Show prev/next links when viewing a post", :include_blank => false, :collection => [["Yes", "true"], ["No", "false"]] %>
|
||||
<%= f.input :new_post_navigation_layout, :as => :select, :label => "Navigation bar position", :include_blank => false, :collection => [["Below", "true"], ["Above", "false"]], :hint => "When browsing pools or posts, place navigation links above or below the image" %>
|
||||
<%= f.input :hide_deleted_posts, :as => :select, :label => "Deleted post filter", :hint => "Remove deleted posts from search results", :include_blank => false, :collection => [["Yes", "true"], ["No", "false"]] %>
|
||||
|
||||
<%= f.input :show_deleted_children, :as => :select, :label => "Show deleted children", :hint => "Indicate that a post has children even if the children are deleted", :include_blank => false, :collection => [["Yes", "true"], ["No", "false"]] %>
|
||||
|
||||
<%= f.input :enable_auto_complete, :as => :select, :collection => [["Yes", "true"], ["No", "false"]], :include_blank => false %>
|
||||
|
||||
<%= f.input :disable_categorized_saved_searches, :as => :select, :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false %>
|
||||
|
||||
<%= f.input :enable_privacy_mode, :as => :select, :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false %>
|
||||
|
||||
<%= f.input :disable_tagged_filenames, :as => :select, :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false %>
|
||||
|
||||
<%= f.input :disable_mobile_gestures, :as => :select, :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false %>
|
||||
|
||||
<%= f.input :show_deleted_children, :as => :select, :label => "Show deleted children", :hint => "Show thumbnail borders on parent posts even if the children are deleted", :include_blank => false, :collection => [["Yes", "true"], ["No", "false"]] %>
|
||||
<%= f.input :enable_auto_complete, :as => :select, :hint => "Enable tag autocomplete in the search box", :collection => [["Yes", "true"], ["No", "false"]], :include_blank => false %>
|
||||
<%= f.input :disable_categorized_saved_searches, :hint => "Don't show dialog box when creating a new saved search", :as => :select, :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false %>
|
||||
<%= f.input :enable_privacy_mode, :as => :select, :hint => "Make your favorites private", :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false %>
|
||||
<%= f.input :disable_tagged_filenames, :as => :select, :hint => "Don't include tags in image filenames", :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false %>
|
||||
<%= f.input :disable_mobile_gestures, :as => :select, :hint => "Disable swipe left / swipe right gestures on mobile", :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false %>
|
||||
<%= f.input :disable_post_tooltips, :as => :select, :hint => "Disable advanced tooltips when hovering over thumbnails", :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false %>
|
||||
|
||||
<%= f.input :disable_cropped_thumbnails, :as => :select, :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false %>
|
||||
|
||||
<%#= f.input :enable_recommended_posts, :as => :select, :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false %>
|
||||
<%= f.input :disable_cropped_thumbnails, :as => :select, :hint => "Disable cropped (square) thumbnails on mobile", :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false %>
|
||||
<%= f.input :enable_recent_searches, :as => :select, :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false %>
|
||||
<%= f.input :disable_responsive_mode, :as => :select, :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false, :hint => "Disable alternative layout for mobile and tablet" %>
|
||||
<%= f.input :opt_out_tracking, :as => :select, :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false, :hint => "Opt out of tracking" %>
|
||||
|
||||
<div class="input text optional field_with_hint">
|
||||
<label class="text optional" for="user_dmail_filter_attributes_words">Dmail filter</label>
|
||||
@@ -91,15 +78,8 @@
|
||||
<span class="hint">A list of banned words (space delimited). Any dmail you receive with a banned word will automatically be deleted.</span>
|
||||
</div>
|
||||
|
||||
<%= f.input :enable_recent_searches, :as => :select, :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false %>
|
||||
|
||||
<%= f.input :favorite_tags, :label => "Frequent tags", :hint => "A list of tags that you use often. They will appear when using the list of Related Tags.", :input_html => { :rows => 5, :data => { :autocomplete => "tag-query" } } %>
|
||||
|
||||
<%= f.input :disable_responsive_mode, :as => :select, :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false, :hint => "Disable alternative layout for mobile and tablet" %>
|
||||
|
||||
<%= f.input :opt_out_tracking, :as => :select, :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false, :hint => "Opt out of tracking" %>
|
||||
|
||||
<%= f.input :custom_style, :label => "Custom <a href='https://en.wikipedia.org/wiki/Cascading_Style_Sheets'>CSS</a> style".html_safe, :hint => "Style to apply to the whole site.", :input_html => {:size => "40x5"} %>
|
||||
<%= f.input :custom_style, :label => "Custom <a href='https://en.wikipedia.org/wiki/Cascading_Style_Sheets'>CSS</a> style".html_safe, :hint => "CSS rules to apply to the whole site.", :input_html => {:size => "40x5"} %>
|
||||
</fieldset>
|
||||
|
||||
<%= f.button :submit, "Submit" %>
|
||||
@@ -115,7 +95,7 @@
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#advanced-settings-section").hide();
|
||||
$("#edit-options a:not(#delete-account):not(#change-password)").on("click", function(e) {
|
||||
$("#edit-options a").on("click", function(e) {
|
||||
var $target = $(e.target);
|
||||
$("h2 a").removeClass("active");
|
||||
$("#basic-settings-section,#advanced-settings-section").hide();
|
||||
|
||||
Reference in New Issue
Block a user