Commit Graph

14 Commits

Author SHA1 Message Date
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