include more messaging for user feedback

This commit is contained in:
Albert Yi
2018-09-05 16:32:18 -07:00
parent 22e30186b1
commit 4b9f3e384f
4 changed files with 30 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
$(() => {
$("#c-user-feedbacks #negative-policy").hide();
$("#c-user-feedbacks #user_feedback_category").on("change.danbooru", (e) => {
if (e.target.value === "negative") {
$("#c-user-feedbacks #negative-policy").show();
} else {
$("#c-user-feedbacks #negative-policy").hide();
}
});
});

View File

@@ -14,4 +14,9 @@ div#c-user-feedbacks, div#c-moderator-dashboards div#col2 {
blockquote {
padding: 0.5em;
}
#negative-policy {
max-width: 50em;
margin-bottom: 1em;
}
}

View File

@@ -84,9 +84,17 @@ class UserFeedback < ApplicationRecord
self.user_id = User.name_to_id(name)
end
def disclaimer
if category != "negative"
return nil
end
"The purpose of feedback is to help you become a valuable member of the site by highlighting adverse behaviors. The author, #{creator_name}, should have sent you a message in the recent past as a warning. The fact that you're receiving this feedback now implies you've ignored their advice.\n\nYou can protest this feedback by petitioning the mods and admins in the forum. If #{creator_name} fails to provide sufficient evidence, you can have the feedback removed. However, if you fail to defend yourself against the accusations, you will likely earn yourself another negative feedback.\n\nNegative feedback generally doesn't affect your usability of the site. But it does mean other users may trust you less and give you less benefit of the doubt.\n\n"
end
def create_dmail
unless disable_dmail_notification
body = %{@#{creator_name} created a "#{category} record":/user_feedbacks?search[user_id]=#{user_id} for your account:\n\n#{self.body}}
body = %{#{disclaimer}@#{creator_name} created a "#{category} record":/user_feedbacks?search[user_id]=#{user_id} for your account:\n\n#{self.body}}
Dmail.create_automated(:to_id => user_id, :title => "Your user record has been updated", :body => body)
end
end

View File

@@ -2,6 +2,12 @@
<div id="a-new">
<h1>New User Feedback</h1>
<div class="notice" id="negative-policy">
<p>Before submitting negative feedback, you must make a good faith effort at communicating with the user (through DMails) to tell them what they are doing wrong. It is unfair to drop a negative record on them without warning. If you have not done this with at least two weeks of notice, the user can dispute the feedback and have it removed. You will need to provide evidence that your feedback is accurate and you gave advanced warning, so you should collect any relevant links and include them in your feedback.</p>
<p>Please consult <%= link_to "the guide", show_or_new_wiki_pages_path(title: "help:user_records") %> for advice on how to write constructive feedback.</p>
</div>
<div id="preview">
</div>