FEATURE: small action post accepts href (#14816)

Optionally add href to small action.
It can be used by discourse-assign to link to correct post from translation
This commit is contained in:
Krzysztof Kotlarek
2021-11-08 08:24:44 +11:00
committed by GitHub
parent 53abcd825d
commit fe8087e523
7 changed files with 32 additions and 5 deletions
+3
View File
@@ -170,6 +170,7 @@ class UserAction < ActiveRecord::Base
action_type
action_code
action_code_who
action_code_href
topic_closed
topic_id
topic_archived
@@ -218,6 +219,7 @@ class UserAction < ActiveRecord::Base
p.post_type,
p.action_code,
pc.value AS action_code_who,
pc2.value AS action_code_href,
p.edit_reason,
t.category_id
FROM user_actions as a
@@ -229,6 +231,7 @@ class UserAction < ActiveRecord::Base
JOIN users au on au.id = a.user_id
LEFT JOIN categories c on c.id = t.category_id
LEFT JOIN post_custom_fields pc ON pc.post_id = a.target_post_id AND pc.name = 'action_code_who'
LEFT JOIN post_custom_fields pc2 ON pc2.post_id = a.target_post_id AND pc.name = 'action_code_href'
/*where*/
/*order_by*/
/*offset*/