Commit graph

42 commits

Author SHA1 Message Date
STran 43dd004a62 Allow partially blocking giving thanks
- Add hook to enable blocking thanks
- Check if user is blocked from 'thanks' action
  and disable giving thanks from  API and UI if so

Bug: T242785
Change-Id: I290a7c39c6fcb22a8ab4a9ecbad76a239cb18ea0
2021-05-12 13:06:09 -07:00
Reedy 4329060a7b $wgThanksLogTypeWhitelist has been replaced by $wgThanksAllowedLogTypes
Bug: T277963
Change-Id: I7ebc669b353bf6097cbcee3aca186d46419bb5c7
2021-03-20 04:43:48 +00:00
jdlrobson 99393ea6a6 Follow ups to I807f729c1b1a9e9b5952685bb18f540f81d70f47
* Capitalise "cancel"
* Link is inline block with margin from text so that
it can spill down to new line on small resolutions

Change-Id: Id7ceaa85ce88e7eef7cada88596781ca5f7755df
2019-02-12 11:55:49 -08:00
jdlrobson 4f276041f4 Add client side click to cancel on thank
When the thanks button is clicked a thanks will be
queued, that the user can cancel by clicking "cancel"
before the action is completed.

This should help the majority of users experiencing
accidental thanks.

Bug: T63737
Change-Id: I807f729c1b1a9e9b5952685bb18f540f81d70f47
2019-02-08 17:31:20 -05:00
Rafid Aslam b7cd517fb6 Move all apihelp translatable messages to separate files
Should be merged along with
Ie566f9b0b6ba267470c01f17c3f4ea74482e2d2d

Bug: T189982
Change-Id: Id3d44fe0e7884276f7c81253f6b765984f5c9945
2018-11-21 07:00:55 +07:00
Framawiki 801eed16b9 Better message when thanking on page creation
Add a new "revcreation" extra param to the stored echo event, that is set to "true" if it's a page creation.
Create notification-header-creation-thank message.

Bug: T201507
Change-Id: I80b206b1d24d53c9a60725bc25318e31f083aef0
2018-09-09 11:46:39 +02:00
Stephane Bisson 9813917966 Reword thanks confirmation
Bug: T159302
Change-Id: Icd6f88e6049953d12bb0d317d4953ccdaa9c64d5
2018-08-23 09:32:20 -04:00
Daimona Eaytoy e4eed78ded Add missing message for Special:Log filters
The form was converted to HTMLForm in
Iba3c6aa5ac40dcdee0792c2d045b238b02d76521 and some messages from core
were added. It also added a checkbox for the thanks log, but not the
associated message.

Bug: T199645
Bug: T199657
Change-Id: I4605a57fa8b4699a43dd5da30f51904b9cbd1aab
2018-07-17 19:49:53 +00:00
Kunal Mehta b8b892bb98 Hard depend upon Echo in extension.json
This extension is useless without Echo, and the API modules already
disable themselves if it's not installed. Just absolutely require Echo
to be installed.

Change-Id: I653eea78668bfe0875bc5a33e2d45607106d4ee5
2018-04-11 01:00:30 -07:00
jenkins-bot 431ca7785b Merge "Add GENDER support to thanks-thanked-notice" 2018-03-25 06:02:57 +00:00
jenkins-bot 3dbf781571 Merge "Add revision-thanking links to some log entries" 2018-03-23 01:09:20 +00:00
Matěj Suchánek ac9f8908ca Add GENDER support to thanks-thanked-notice
Change-Id: If23ce8d7ee8ff1edf484c217a70aa34046590fd6
2018-03-22 08:35:26 +00:00
Sam Wilson 2059e3ff4b Add revision-thanking links to some log entries
Many log entries are associated to (exactly one) revision,
and for these (only, and only where the log type is
whitelisted) we add a thank-link that behaves exactly
as the thank-link on diff and history pages.

Bug: T189752
Change-Id: I5f4e84c65d4fe2d95b20cdb3c3f9522ad3e5f422
2018-03-22 11:57:55 +08:00
Sam Wilson 30e582bd96 Add support for log-thanks to Special:Thanks
A new "Special:Thanks/Log/123" subpage format is added for
sending thanks for the given log entry. The 'Log' part of the
subpage is case-insensitive.

The form field labels are removed because the fields are hidden
and need no labels.

Bug: T186920
Change-Id: Ic2279d9a6dc170d1eeee519392d3a930a37bc2ec
2018-03-19 10:59:20 +08:00
Max Semenik ed087b044c Reintroduce the API to thank for log entries
Originally introduced in b84eedc74e, it was reverted for security concerns.
New changes:
* Instead of bundling the log summary with notification, load it on display
* If the log event has been suppressed after the thanks for it has been sent,
  silently delete the event to prevent the confusion of linking to something
  zapped.
* Keep the 'already sent' cache key compatible with old format
* Validate the log id in the API
* Change ApiCoreThank::getRevisionFromParams() to ApiCoreThank::getRevisionFromId()

Bug: T186855
Bug: T188791
Depends-On: Ic5e9db0def857d9dcecbd06bf081c8c83712c1ea
Change-Id: I03aea7d9f4dfa0fe49639c53968deabf89999d2d
2018-03-06 13:08:47 +08:00
MaxSem 3b2397fea9 Revert "Add support to the Thanks API for thanking log entries"
This reverts commit b84eedc74e.

Bug: T188791
Change-Id: If55ed6cbb5da34c0034da3cc564c6a8ff82448d2
2018-03-02 22:59:20 +00:00
Sam Wilson b84eedc74e Add support to the Thanks API for thanking log entries
Add a 'log' API parameter (for the log ID to thank), and add
a whitelist config variable for specifying which log types are
thankable.

Bug: T186855
Change-Id: I58ae90c9729c0066f952e90fca2cf99b029d0d9b
2018-03-01 14:57:57 -08:00
Roan Kattouw 6bb7939a79 revthank: Clarify confirmation message and change yes/no messages
Bug: T159302
Change-Id: I49ac7d644f207fe76a49efd650b727e33049b3af
2018-01-19 17:07:42 -08:00
Matthew Flaschen 641c4a702f Fix Thanks messages not say "received your thanks"
We don't know if they'll receive it, due to Echo preferences
being private.

Bug: T168589
Change-Id: I45375ea3fdc48128513c53c945e55578307633d4
2017-06-21 20:31:37 -04:00
Brad Jorsch aa06381b02 API: Split description messages into summary + additional text
See MediaWiki core patch I778bab2b

Change-Id: I9f1eaad0172a8e54001bf7fffbd41fcff663d12d
2017-06-13 13:27:51 -04:00
Brad Jorsch a9cbd9471b Update for API error i18n
See Iae0e2ce3. Since Thanks master requires core master, this just
depends on the master patch instead of trying to maintain BC.

Depends-On: Iae0e2ce3bd42dd4776a9779664086119ac188412
Change-Id: Ib6e66f7e94c41b7a27fe867f079626ac0ade4f1b
2016-11-15 03:22:14 +00:00
Stephane Bisson 245190c451 Cleanup old notification config
* Remove unused formatters
* Remove old formatter config
* Remove unused messages

Bug: T121612
Change-Id: I4c49c12bcf1366cd7a786aadaab6dfed67a3428a
2016-07-20 11:25:05 -04:00
matejsuchanek 26a87e0a45 Fix message params
Added getCompactHeaderMessage() to EchoThanksPresentationModel
as done in EchoFlowThanksPresentationModel and fixed message
params. (Previously the message only supported $1 and $2, $4
had no effect.)

Change-Id: I98743751657607f61c9d461f4327ffca5a6a99b5
2016-06-29 12:42:53 +02:00
Stephane Bisson b52fd0ea6f Make thanks notifications expandable bundles
* edit-thank
* flow-thank

Bug: T120152
Depends-On: I1507cae360f45cc87f2d60e966b4d047abfa202d
Depends-On: I91abb2dded9ab7f124aaa798dd07c52576ee791b
Change-Id: I21e36d1874967495d9541f621481cfccf54b7f19
2016-06-27 10:02:59 -04:00
Kunal Mehta 93c7a1048e Include error code in API failure message
Otherwise the error reports we get are completely useless.

Bug: T78697
Change-Id: Ic0244e2e947256c411c889a8850c8f18ee3658a4
2016-03-04 11:33:27 -08:00
Siebrand Mazeland e2844e193f Remove double emphasis in string
Change-Id: Ife0316e9e332cf978adb2d3847a24af9c315b2b5
2016-02-27 21:10:13 +01:00
Stephane Bisson 75393135ad Bold pages and topics in notifications
Bug: T121724
Change-Id: I03bcd8d0b59a453b5fdbdc3bc1faccbd691dc817
2016-02-11 12:50:12 -05:00
IoannisKydonis 2ee8d58281 Add <kbd> tags to messages
* apihelp-flowthank-example-1,
* apihelp-thank-param-source,
* apihelp-thank-example-1.

Thread:
https://translatewiki.net/wiki/Thread:Translating_talk:MediaWiki/About_MediaWiki:Apihelp-flowthank-example-1/en

Change-Id: I7e0afe01b36655fac09d22c2f1c475727849cd8f
2016-01-22 19:02:55 +00:00
Roan Kattouw 190ace1ed7 Convert Echo notifications to the new system
* Add ThanksPresentationModel and FlowThanksPresentationModel
* Rename notification-thanks-flyout2 to notification-header-edit-thank,
  shift parameters around and add GENDER support for thanked user
* Rename notification-flow-thanks-flyout to notification-header-flow-thank
  and shift parameters around; this one did already have GENDER support
  for the thanked user

Depends on Idb975feaec in Echo.

Bug: T116847
Change-Id: Iab0f2311e7ffb6a9ce21cd76e564511d03805530
2015-10-28 17:29:55 -07:00
haritha28 b753350e4e Remove unused key "notification-link-text-respond-to-user"
Bug:T56979
Change-Id: I628b3a02ba32ebeeefddce23f51d7ac2990b6479
2015-09-17 10:06:08 +02:00
Douglas Gardner dae848638e Remove message reuse for "send thanks"
Split the special page heading and the submit button into separate
messages. Previously, they used the same message key.

c.f. [[translatewiki:Thread:Support/About_MediaWiki:Thanks/en]].

Change-Id: I3611a0d7716ef3b0fd9d8b981a0445800906e039
2015-05-24 12:10:33 +02:00
Matthew Flaschen b3a74b2953 Further document Thanks gender (both en and qqq), and fix bug
thanks-thank was using plain, but this did not get caught because
the en value did not have a no-op example GENDER.  I've added
these to all of them, for both $1 and $2.  This also tells translators
they're both available.

Bug: T96527
Change-Id: I5130bbd60fe3c1c8051729758c2f2f4bea2b2030
2015-05-05 00:35:20 -04:00
jenkins-bot 506c928f66 Merge "Remove dead message" 2015-04-25 20:35:52 +00:00
Matthew Flaschen 1929dec28a Remove dead message
Change-Id: I9042ece1beea246a9a16ed9581be3b66f773370e
2015-04-22 23:50:53 -04:00
Matthew Flaschen 0a2c042d24 Notify the user that their thanks are public
Bug: T90486
Change-Id: I4ba9bb43262797a4de36c54c68c284b34daf16d4
2015-03-06 01:23:50 -05:00
Matthew Flaschen b7cefb78ae Add custom title text for Yes and No Thank confirmations
Bug: T89572
Change-Id: I54bfaf7852182c2b22bd897fe55480c2b0e7f1ab
2015-02-17 21:55:36 -05:00
Federico Leva d0ce274d75 Drop inconsistent "like" terminology referring to thanks
http://thread.gmane.org/gmane.org.wikimedia.foundation/75301

Change-Id: Idf595bfb59510f55266ed9ebc0f86c355a527b25
2014-11-12 16:49:50 +01:00
Brad Jorsch a0e4ccfa30 Add i18n for API module help
MediaWiki core change I04b1a384 added support for i18n of API module
help. This takes advantage of that while still maintaining backwards
compatibility with earlier versions of MediaWiki.

Once support for MediaWiki before 1.25 is dropped, the methods marked
deprecated in this patch may be removed.

Change-Id: I67395aff48185f3e09da31b51a08aa2541fe6a17
2014-11-03 13:32:23 -08:00
Matthias Mullie 5dba803d92 (bug 67966) Add GENDER support for recipient
As outlined on https://translatewiki.net/wiki/Thread:Support/MediaWiki:Notification-flow-thanks/en_and_MediaWiki:Notification-flow-thanks/fr

Bug: 67966
Change-Id: Ia3888b5c0f39fe1cb7507b7e5990aefe2357a09f
2014-09-01 14:33:25 +02:00
Kunal Mehta c1e4c568cc Use jquery.confirmable instead of jquery.ui.dialog
Change-Id: Id75fd57954edb9341d25ba754dd64279a28deb54
2014-08-31 07:14:35 -04:00
wctaiwan ab8b7847c3 Change UI of special page and support Flow Thanks
Change the UI to ask for confirmation instead of allowing the user to
change the revision ID, disallow using Special:Thanks directly, and add
support for Flow Thanks.

Bug: 63509
Change-Id: I48ef5e51fd3ac76ff5caf6907bc53d09357634bd
2014-06-02 04:10:21 +00:00
Siebrand Mazeland 1e375e830c Migrate to JSON i18n
Procedure per https://www.mediawiki.org/wiki/Manual:GenerateJsonI18n.php
with shim.

Change-Id: I163599c46d0d69cfc04959da8b2f792bd7c0417f
2014-03-29 13:31:00 +01:00