-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add button to report answers spams to Comments upon Answers #2733
Changes from 1 commit
0663ac5
05636a6
400a4c5
c3bd7f6
010bb27
0e96e13
062ff10
64316a3
7df33b3
116db0c
68a4f74
a58af69
c1db11e
52fbe54
5dac2f3
4a84796
3f1bafe
4927b23
a0e957e
c779723
04d5bbc
01cffdd
e1e57db
ed75ab7
17827d1
be06b33
e1fdf29
ea2b5ba
e532b92
39cfd13
57a6b04
066efe5
4b0e408
8d51151
a9a762f
d9bbfad
c0b98c1
7dc17b9
7c774b5
a4bd068
552218c
e2818af
4015e70
0f01c74
713cef0
797442c
06ab52b
5d19a7d
d641bce
28c3951
65a747e
3f0bdf2
44c15bd
d5aa3de
5c2bce3
312a2ef
8252c21
e98cf75
75f094a
725406a
60c95f0
0c0408e
3f404f4
363d5ce
7ff77e7
7a85c41
80fb380
990c965
acbcac9
205daf4
6735a95
a128622
217bfb5
2159f5e
5281a3a
1a7f332
cdef0bd
d1c5c06
cda8e40
a1f8b7c
2522459
ca78a67
8ab6368
dec63b4
faa0352
325d009
136b448
adc58df
b6a84ea
4610d1f
97ec0bf
296cca9
cf3d29b
e8b929d
7896dfa
d44f1d7
35449fd
bac1465
542716d
825020e
3c39a02
832a6e2
626811c
0e84f2d
6595ef3
fda0654
0c0007f
4ff74b4
32156a6
8fbebfd
c2c319c
2898e63
885dd06
33dd66a
a749878
619ab07
79d65bf
a67f7f9
2a238ae
377c051
232907d
363cf2a
693f226
f78d53e
d4133cf
e05ab60
61e928a
672f2d3
738d54d
2837147
accfbc0
a29b43f
142d193
fdf99c5
f9966e7
92fa0e2
a53d388
3d0c7f6
f1467a5
3e2e016
0d8bf8c
7643bee
0ca4cba
fe9da1e
002dfba
42230eb
ca11403
2d87712
1d5eeeb
1b0d680
b319070
01969eb
75b9c48
9df9e1a
ed4eabf
d41ea21
a8539f4
87ea277
5d92b5b
9f1aba2
3a6373f
4ddf5e8
cc2df02
dd18e97
6cb3641
32f613f
423dc34
b538aa3
b6e1647
9b3ec37
642f39e
ef97499
420580e
f5ccbe9
ae3fa89
43dca60
88d3963
e75d0f0
bef59bb
277a8f6
fed2087
34b7e77
76d4164
83da2b2
cae846e
e7adb1b
55fb685
75245c1
c105268
0a57ad1
51b17a8
a9a48bc
3de151d
4f028aa
92837da
0c3d59e
e3de62b
9724d9a
f423719
46235a7
d842316
589c0e1
e9fc83e
1bedd02
7f426ec
a005f76
4a224eb
9b2f7e2
fd7a454
9e03a6e
fc10d69
af295d7
ec0b0f9
1a0f874
27edfa7
8bb96dd
bf74fea
3169673
fccbb43
b62f51d
5c0a69d
3f3fa0a
759ae06
72aa454
4a69cdd
1c7f7ee
9828793
65dd963
0619156
1c88a81
ab9c301
955c663
398c870
12a528d
c306fbf
1ec67c8
97ddfbc
7db3b68
f7856e7
788ff6f
ad42a8b
6955585
d1ccce3
2f03211
e31959c
52ca105
546287d
a50aca6
5438f85
5ccb2ea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,10 @@ | |
|
||
</div> | ||
<div class="inline pull-xs-right" style="vertical-align: top"> | ||
<p><% if answer_id == 0 && current_user && (current_user.role == "admin" || current_user.role == "moderator" || comment.uid == current_user.uid)%> | ||
<a rel="tooltip" title="Flag as spam" class="btn btn-sm btn-default btn-flag-spam-<%= comment.id %>" href="mailto:moderators@publiclab.org?subject=Reporting+spam+on+Public+Lab&body=Hi,+I+found+this+comment+that+looks+like+spam+or+needs+to+be+moderated:+https://publiclab.org/<%= comment.parent.path %>#c<%= comment.cid %>+by+https://publiclab.org/profile/<%= comment.author.username %>+Thanks!"> | ||
<i class="fa fa-flag"></i> | ||
</a> | ||
<p><% if answer_id == 0 && current_user && (current_user.role == "admin" || current_user.role == "moderator" || comment.uid == current_user.uid)%> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Code seems fine .. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you think we can do some changes to make view cleaner by aligning all three buttons in a line? Actually, the delete button is visible to you because you are currently logged in as 'moderator' from localhost. And, I think as moderator already has the power to delete the comment, so flag option is not needed for moderator and admin. So, here's what you can do -
Thanks! |
||
<a class="btn btn-default btn-sm" id="answer-<%= answer_id %>-comment-<%= comment.id %>-reorder-btn" data-remote="true" data-confirm="Are you sure? <% if current_user && comment.uid != current_user.uid %>Please exercise caution in promoting others' comments; this cannot be undone.<% end %>" rel="tooltip" title="<%= t('questions._comment.promotion') %>" data-placement="left" href="/comment/make_answer/<%= comment.id %>"><i class="fa fa-plus"></i></a> | ||
<% end %> | ||
<% if current_user && current_user.uid == comment.uid %> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @Toiya , changes are looking great! Could you please attach a screenshot of the updated view? Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little unsure if this is what you want but here are three screenshots of the flag button created, if I understand correctly. As you can see in the third one with the email, the words are currently seperated by plus-signs, which I guess is not what we want. I could try to fix this with my semi-limited HTML-skills, if you want to :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @Toiya, actually, these are the screenshot of the dashboard I guess and the flag is already implemented there. Changes from your code should appear in a question's comment. So, first you need to install plots2 and after that run localhost, and generate a question. After generating the question, generate test comments on that. And, with each of those comments, you should be able to see a flag button.
If you have not installed plots2 repo, then we can help you in installation. You can ask us anytime. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello! Sorry for getting it wrong, and thank you for being so patient. I'm currently following the installation guide in the README, but I'm stuck on step 4. Do you want me to rename db/schema.rb.example to db/schema.rb? Since they are both files, I don't understand how I'm supposed to make a copy of a file and place it "at" another file. Again, thank you so much for your patience!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to delete the existing db/schema.rb and replace it with a copy of the example file. Sorry that wasn't as clear as it could be!