Guest User

Untitled

a guest
Oct 20th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.61 KB | None | 0 0
  1. diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb
  2. index 2de4142..0e0355f 100644
  3. --- a/app/controllers/posts_controller.rb
  4. +++ b/app/controllers/posts_controller.rb
  5. @@ -13,6 +13,7 @@ class PostsController < BaseCommunityController
  6.  
  7. before_filter :login_required, :only => [:comment, :preview_comment, :preview, :post_comment]
  8. before_filter :set_show_avatars, :only => [:comment, :preview_comment, :show]
  9. + before_filter :set_show_signatures, :only => [:comment, :preview_comment, :show]
  10. before_filter :ensure_can_create_comments, :only => [:comment, :preview_comment, :post_comment]
  11. before_filter :ensure_can_create_forum_comments, :only => [:comment, :preview_comment, :post_comment]
  12. before_filter :setup_comments_local_request_cache, :only => [:show, :preview_comment, :comment, :ajax_comments_update]
  13. @@ -408,6 +409,10 @@ class PostsController < BaseCommunityController
  14. @show_avatars = logged_in? ? current_user.settings.display_avatars : true
  15. end
  16.  
  17. + def set_show_signatures
  18. + @show_signatures = logged_in? ? current_user.settings.display_signatures : true
  19. + end
  20. +
  21. def render_portal_feature_rjs
  22. render :update do |page|
  23. page << "Control.Modal.close();"
  24. diff --git a/app/controllers/verge/hub_posts_controller.rb b/app/controllers/verge/hub_posts_controller.rb
  25. index e754859..43259ae 100644
  26. --- a/app/controllers/verge/hub_posts_controller.rb
  27. +++ b/app/controllers/verge/hub_posts_controller.rb
  28. @@ -15,6 +15,7 @@ class Verge::HubPostsController < HubPostsController
  29.  
  30. def figure_out_action
  31. @show_avatars = logged_in?
  32. + @show_signatures = logged_in?
  33. @show_comment_children = true
  34. @ajax_load_comments = true
  35. @auto_update_comments = false
  36. diff --git a/app/mixins/controllers/shared/comments.rb b/app/mixins/controllers/shared/comments.rb
  37. index 5e04768..d0d81cf 100644
  38. --- a/app/mixins/controllers/shared/comments.rb
  39. +++ b/app/mixins/controllers/shared/comments.rb
  40. @@ -172,6 +172,7 @@ module Mixins::Controllers::Shared::Comments
  41.  
  42. unless @last_version == @commentable.version.to_s
  43. # we disabled these filters, so call them here
  44. + set_show_signatures
  45. set_show_avatars
  46. ensure_community
  47.  
  48. diff --git a/app/views/layouts/base_community.html.erb b/app/views/layouts/base_community.html.erb
  49. index 12f5941..c911f89 100644
  50. --- a/app/views/layouts/base_community.html.erb
  51. +++ b/app/views/layouts/base_community.html.erb
  52. @@ -97,6 +97,7 @@
  53. </div>
  54.  
  55. <div id="main" class="main clearfix">
  56. + <% debugger %>
  57. <%= render_sponsored_post_component(@sponsored_post_component,:pushdown) %>
  58. <% if @front_page %>
  59. <div id="col-side-2" class="col col-side col-side2">
  60. diff --git a/app/views/shared/comments/sbn/_comment.html.erb b/app/views/shared/comments/sbn/_comment.html.erb
  61. index 502f762..e396cd5 100644
  62. --- a/app/views/shared/comments/sbn/_comment.html.erb
  63. +++ b/app/views/shared/comments/sbn/_comment.html.erb
  64. @@ -13,8 +13,10 @@
  65. </h5>
  66. <div id="<%= comment_css_id(comment, 'body')%>" class="cbody"<%= " style=\"display:none\"" unless @expanded_comments %>>
  67. <%= comment.body %>
  68. - <% unless comment.signature.blank? %>
  69. - <div class="sig"><%= comment.signature %></div>
  70. + <% if @show_signatures %>
  71. + <% unless comment.signature.blank? %>
  72. + <div class="sig"><%= comment.signature %></div>
  73. + <% end %>
  74. <% end %>
  75. </div>
  76. <p class="by">
  77. diff --git a/app/views/users/account.html.erb b/app/views/users/account.html.erb
  78. index f6ac0f5..14a0a86 100644
  79. --- a/app/views/users/account.html.erb
  80. +++ b/app/views/users/account.html.erb
  81. @@ -114,6 +114,12 @@
  82. </p>
  83. <% end %>
  84.  
  85. + <% user_account_setting(:display_signatures) do %>
  86. + <p><label>Display member signatures?</label>
  87. + <%= settings.select("display_signatures", [["yes", true,], ["no", false]])%>
  88. + </p>
  89. + <% end %>
  90. +
  91. <% user_account_setting(:on_mailing_list) do %>
  92. <p><label>Email Newsletter</label>
  93. <span class="taller"><%= f.check_box "on_mailing_list" %> <span style="font-size: 10px"> Check this box to receive updates from SB Nation</span></span></p>
  94. diff --git a/db/schema.rb b/db/schema.rb
  95. index cf6e6ed..4e2d2fe 100644
  96. --- a/db/schema.rb
  97. +++ b/db/schema.rb
  98. @@ -1,4 +1,4 @@
  99. -# This file is auto-generated from the current state of the database. Instead of editing this file,
  100. +# This file is auto-generated from the current state of the database. Instead of editing this file,
  101. # please use the migrations feature of Active Record to incrementally modify your database, and
  102. # then regenerate this schema definition.
  103. #
  104. @@ -9,7 +9,7 @@
  105. #
  106. # It's strongly recommended to check this file into your version control system.
  107.  
  108. -ActiveRecord::Schema.define(:version => 20120604190959) do
  109. +ActiveRecord::Schema.define(:version => 20120614174813) do
  110.  
  111. create_table "absolut_microsite_settings", :force => true do |t|
  112. t.integer "community_id", :null => false
  113. @@ -1755,7 +1755,7 @@ ActiveRecord::Schema.define(:version => 20120604190959) do
  114. t.integer "community_id"
  115. t.string "admin_title"
  116. t.integer "network_id"
  117. - t.integer "page_layout_id", :null => false
  118. + t.integer "page_layout_id", :null => false
  119. end
  120.  
  121. add_index "pls_pages", ["community_id"], :name => "index_pls_pages_on_community_id"
  122. @@ -1973,6 +1973,7 @@ ActiveRecord::Schema.define(:version => 20120604190959) do
  123. t.integer "editor_type", :default => 0
  124. t.boolean "display_avatars", :default => true
  125. t.boolean "wide_layout", :default => false, :null => false
  126. + t.boolean "display_signatures", :default => true
  127. end
  128.  
  129. create_table "solr_sync_records", :force => true do |t|
  130. @@ -2324,14 +2325,14 @@ ActiveRecord::Schema.define(:version => 20120604190959) do
  131. add_index "verge_product_review_data", ["product_id"], :name => "index_verge_product_review_data_on_product_id"
  132.  
  133. create_table "video_post_data", :force => true do |t|
  134. - t.integer "entry_id", :null => false
  135. + t.integer "entry_id", :null => false
  136. t.string "vidio_token"
  137. t.string "vidio_id"
  138. t.string "vidio_tags"
  139. t.string "mp4_link"
  140. t.string "ooyala_id"
  141. t.boolean "syndicate_to_youtube", :default => false
  142. - t.text "provided_embed_code"
  143. + t.text "provided_embed_code"
  144. end
  145.  
  146. add_index "video_post_data", ["entry_id"], :name => "index_verge_video_post_data_on_entry_id"
  147. @@ -2449,5 +2450,3 @@ ActiveRecord::Schema.define(:version => 20120604190959) do
  148. add_index "yahoo_fantasy_teams", ["yahoo_fantasy_profile_id"], :name => "index_yahoo_fantasy_teams_on_yahoo_fantasy_profile_id"
  149.  
  150. end
  151. -
  152. -
Add Comment
Please, Sign In to add comment