don't embed BUR script in expand tags if it's short enough
This commit is contained in:
@@ -21,12 +21,18 @@ module ForumTopicsHelper
|
|||||||
end
|
end
|
||||||
|
|
||||||
if obj.is_a?(BulkUpdateRequest)
|
if obj.is_a?(BulkUpdateRequest)
|
||||||
|
if obj.script.size < 700
|
||||||
|
embedded_script = obj.script_with_links
|
||||||
|
else
|
||||||
|
embedded_script = "[expand]#{obj.script_with_links}[/expand]"
|
||||||
|
end
|
||||||
|
|
||||||
if obj.is_approved?
|
if obj.is_approved?
|
||||||
return "The bulk update request ##{obj.id} is active.\n\n[expand]#{obj.script_with_links}[/expand]"
|
return "The bulk update request ##{obj.id} is active.\n\n#{embedded_script}"
|
||||||
elsif obj.is_pending?
|
elsif obj.is_pending?
|
||||||
return "The \"bulk update request ##{obj.id}\":/bulk_update_requests/#{obj.id} is pending approval.\n\n[expand]#{obj.script_with_links}[/expand]"
|
return "The \"bulk update request ##{obj.id}\":/bulk_update_requests/#{obj.id} is pending approval.\n\n#{embedded_script}"
|
||||||
elsif obj.is_rejected?
|
elsif obj.is_rejected?
|
||||||
return "The bulk update request ##{obj.id} has been rejected.\n\n[expand]#{obj.script_with_links}[/expand]"
|
return "The bulk update request ##{obj.id} has been rejected.\n\n#{embedded_script}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user