users: rework privacy mode into private favorites (fix #4257).
* Rename 'privacy mode' to 'private favorites'. * Make the private favorites setting only hide favorites, not favgroups and not the user's uploads on their profile page. * Make the favgroup is_public flag default to true instead of false and fix existing favgroups to be public if the user didn't have privacy mode enabled before. * List _all_ public favgroups on the /favorite_groups index, not just favgroups belonging to the current user. * Add a /users/<id>/favorite_groups endpoint.
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if presenter.has_favorites? %>
|
||||
<% if presenter.has_favorites? && !user.hide_favorites? %>
|
||||
<div class="box user-favorites">
|
||||
<h2>
|
||||
<%= link_to "Favorites", posts_path(tags: "ordfav:#{user.name}") %>
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<%= 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 :enable_private_favorites, :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 %>
|
||||
|
||||
@@ -4,10 +4,8 @@
|
||||
|
||||
<%= render "statistics", presenter: @user.presenter, user: @user %>
|
||||
|
||||
<% if !CurrentUser.is_admin? && !@user.enable_privacy_mode? || CurrentUser.id == @user.id %>
|
||||
<%= render "posts/partials/common/inline_blacklist" %>
|
||||
<%= render "post_summary", presenter: @user.presenter, user: @user %>
|
||||
<% end %>
|
||||
<%= render "posts/partials/common/inline_blacklist" %>
|
||||
<%= render "post_summary", presenter: @user.presenter, user: @user %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user