Add remote translations to debates and proposals
Include RemotelyTranslatable concern on commentable actions to detect remote translations on index and show controllers actions.
This commit is contained in:
@@ -3,6 +3,7 @@ module CommentableActions
|
||||
include Polymorphic
|
||||
include Search
|
||||
include DownloadSettingsHelper
|
||||
include RemotelyTranslatable
|
||||
|
||||
def index
|
||||
@resources = resource_model.all
|
||||
@@ -23,6 +24,8 @@ module CommentableActions
|
||||
set_resource_votes(@resources)
|
||||
|
||||
set_resources_instance
|
||||
@remote_translations = detect_remote_translations(@resources, featured_proposals)
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.csv {send_data to_csv(resources_csv, resource_model),
|
||||
@@ -38,6 +41,7 @@ module CommentableActions
|
||||
@comment_tree = CommentTree.new(@commentable, params[:page], @current_order)
|
||||
set_comment_flags(@comment_tree.comments)
|
||||
set_resource_instance
|
||||
@remote_translations = detect_remote_translations([@resource], @comment_tree.comments)
|
||||
end
|
||||
|
||||
def new
|
||||
@@ -132,4 +136,7 @@ module CommentableActions
|
||||
end
|
||||
end
|
||||
|
||||
def featured_proposals
|
||||
@featured_proposals ||= []
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user