Commit Graph

17 Commits

Author SHA1 Message Date
riking
71b7c80257 UX: CSS tweaks for badge query previews 2014-09-02 19:09:51 -07:00
riking
1833b43ae2 FEATURE: Badge query validation, preview results, and EXPLAIN
Upon saving a badge or requesting a badge result preview,
BadgeGranter.contract_checks! will examine the provided badge SQL for
some contractual obligations - namely, the returned columns and use of
trigger parameters.

Saving the badge is wrapped in a transaction to make this easier, by
raising ActiveRecord::Rollback on a detected violation.

On the client, a modal view is added for the badge query sample run
results, named admin-badge-preview.
The preview action is moved up to the route.
The save action, on failure, triggers a 'saveError' action (also in the
route).

The preview action gains a new parameter, 'explain', which will give the
output of an EXPLAIN query for the badge sql, which can be used by forum
admins to estimate the cost of their badge queries.
The preview link is replaced by two links, one which omits (false) and
includes (true) the EXPLAIN query.

The Badge.save() method is amended to propogate errors.

Badge::Trigger gets some utility methods for use in the
BadgeGranter.contract_checks! method.

Additionally, extra checks outside of BadgeGranter.contract_checks! are
added in the preview() method, to cover cases of null granted_at
columns.

An uninitialized variable path is removed in the backfill() method.

TODO - it would be nice to be able to get the actual names of all
columns the provided query returns, so we could give more errors
2014-08-31 11:25:44 -07:00
Régis Hanol
8a20d05ba5 FEATURE: backup without uploads 2014-08-20 18:53:58 +02:00
Jeff Atwood
2690a758e6 use hide icon for Agree and Hide Post 2014-08-07 03:12:23 -07:00
Régis Hanol
ec30086dea FEATURE: agree all the flags 2014-08-04 22:48:04 +02:00
Jeff Atwood
71aa41ccac copyedits on new flagging behaviors 2014-07-31 16:17:38 -07:00
Régis Hanol
a49a8e8c05 FIX: no primary action on disposition buttons 2014-07-29 09:36:12 +02:00
Régis Hanol
bddffa7f9a FEATURE: flag dispositions normalization
All flags should end up in one of the three dispositions
  - Agree
  - Disagree
  - Defer

In the administration area, the *active* flags section displays 4 buttons
  - Agree (hide post + send PM)
  - Disagree
  - Defer
  - Delete

Clicking "Delete" will open a modal that offer to
  - Delete Post & Defer Flags
  - Delete Post & Agree with Flags
  - Delete Spammer (if available)

When the flag has a list associated, the list will now display 1
response and 1 reply and a "show more..." link if there are more in the
conversation. Replying to the conversation will NOT give a disposition.
Moderators must click the buttons that does that.

If someone clicks one buttons, this will add a default moderator message
from that moderator saying what happened.

The *old* flags section now displays the proper dispositions and is
super duper fast (no more N+9999 queries).

FIX: the old list includes deleted topics
FIX: the lists now properly display the topic states (deleted, closed,
archived, hidden, PM)
FIX: flagging a topic that you've already flagged the first post
2014-07-28 19:28:07 +02:00
Sam
1a6aa07611 FEATURE: editable badge groups 2014-07-27 18:22:01 +10:00
Robin Ward
580a1bf8b0 ES6: Migrated and deprecated a bunch of views 2014-06-10 11:54:38 -04:00
Jeff Atwood
3ed8b8f155 f**ing bootstrap, span2 = topic-avatar 2014-06-05 01:42:27 -07:00
Neil Lalonde
dc77e7e27c You must give a reason for suspending a user 2014-02-04 11:03:35 -05:00
Neil Lalonde
ed3d3ae1e1 Upgrade font-awesome to version 4 2013-12-11 10:31:09 -05:00
Neil Lalonde
dbd2332b74 Public user profile page shows if the user is suspended and why. 2013-11-07 16:34:31 -05:00
Neil Lalonde
0c6f794eb0 Used the term suspended instead of banned. 2013-11-07 13:53:49 -05:00
Neil Lalonde
0060050c08 Replace data-dismiss=modal with action close. It's better to use our own ember code instead of relying on bootbox magic. 2013-11-01 12:14:08 -04:00
Neil Lalonde
92a0729937 When banning a user, a reason can be provided. The user will see this reason when trying to log in. Also log bans and unbans in the staff action logs. 2013-11-01 10:47:26 -04:00