Commit Graph

19 Commits

Author SHA1 Message Date
Javi Martín
11ef917802 Use a button to delete comments
As mentioned in commit 5311daadf, there are several reasons to use
buttons in these situations. And, as mentioned in the previous commits,
using buttons instead of links for actions requiring confirmation will
help us test for accessibility issues.
2024-11-08 13:01:01 +01:00
Javi Martín
3b2b09be2b Use CSS to show separators in moderation actions
This is useful for people using screen readers, since the character used
as a separator won't be read aloud.

Since many screen readers also read content generated via CSS
pseudoelements, we aren't using `content: "|";` or similar but using
elements with a very small width instead.
2021-12-30 15:50:03 +01:00
Javi Martín
cac24b0159 Extract component to show moderation actions
Note that in proposal notifications we're writing the call to
render the component in the same line as the <div class="reply">
definition in order to be able to use the `:empty` selector when the
component renders nothing. No browser matches whitespace with the
`:empty` selector, so we can't add newline characters inside the tag. A
more elegant solution would be extracting the proposal notification
actions to a component and only rendering it if the moderation actions
component is rendered.
2021-12-30 15:50:03 +01:00
rhian-cs
b27a05cbfd Make confirmation alert message inform the triggering action 2021-12-22 12:32:45 +01:00
Julian Herrero
0698c0ff4f Allow users to delete their own comments 2021-04-13 20:04:04 +02:00
Javi Martín
31b65679c3 Extract partial to render flag actions
The main obstacle to extract this partial was probably the paths for the
flag and unflag actions.

Now that we use Rails 5.1 `resolve` method to handle nested resources,
we can use `polymorphic_path`.

Also note the code is a bit ugly because comments render a divider. We
should probably use a CSS border instead.

Co-Authored-By: taitus <sebastia.roig@gmail.com>
2020-07-07 23:39:21 +02:00
Javi Martín
9937e94fcd Fix flagging debates and comments with AJAX
We weren't using `foundation()` in these cases, so after flagging a
debate or a comment, we had to reload the page before we could unflag
it.

We're also adding a test for the fix in commit ea85059d. This test shows
it's necessary to filter the elements with JavaSctipt using `first()` if
we want the same code to work with comments.

Co-Authored-By: taitus <sebastia.roig@gmail.com>
2020-07-07 22:56:17 +02:00
Julian Herrero
f6489bc604 Use double quotes in app/views 2019-03-19 12:33:07 +01:00
Bertocq
5420cd36bf Disallow comment actions on valuation comments 2018-01-31 17:46:36 +01:00
Bertocq
033c197580 Disallow comment flagging when showing valuations 2018-01-31 02:05:35 +01:00
kikito
5b2ee94765 removes all mentions of debates from comment views 2015-09-13 12:32:27 +02:00
Alberto Garcia Cabeza
a61c006f7f Replaces bullet for bull 2015-09-09 20:33:21 +02:00
Juanjo Bazán
ea85059dbb fixes issue with flags on comments with children
Closes #318
2015-09-04 19:35:48 +02:00
kikito
909dfb4ce3 Several renamings
InappropiateFlag -> Flag
x.flag_as_inappropiate -> x.flag
x.undo_flag_as_inappropiate -> x.unflag
X.flagged_as_inappropiate -> x.flagged
flag-as-inappropiate-actions views & css -> flag-actions views & css
2015-08-27 10:48:49 +02:00
Alberto Garcia Cabeza
9202a4f8e4 Adds styles for flag as inappropriate 2015-08-25 14:09:04 +02:00
kikito
c6976b0905 Adds test for not using moderation links in my own comments 2015-08-24 18:36:56 +02:00
kikito
36fb9b60b2 Use a js-class instead of an id for moderator-comment-actions 2015-08-24 18:35:59 +02:00
Juanjo Bazán
b340d7741a adds hiding users by moderators 2015-08-20 13:16:37 +02:00
rgarcia
f31ed2940d adds moderation to comments and debates [#136] 2015-08-17 13:39:31 +02:00