Commit graph

47 commits

Author SHA1 Message Date
Moriel Schottlender 0a5664ce5e Check the thanked user's gender for Thanks messages
Retrieve gender data for the thanked user for i18n message parsing
with the correct {{GENDER...}} data.

Bug: T96527
Change-Id: I14c831be51482682f2b628a15c79341a4f372c16
2015-05-04 17:16:09 -07:00
Matthew Flaschen e3414ba230 Put back removed code coverage annotation
Change-Id: I12b1880990e5f404881122e9e3bbaba72ddb7f3b
2015-02-19 17:43:38 -05:00
Kunal Mehta 121f4932b9 Register directory with UnitTestsList hook
Change-Id: I7a6498af48c0d62428bf012d5045ad3db60aa0cc
2015-02-19 20:51:59 +00:00
jdlrobson e02c334880 Add tests for rendering of thanks button on mobile diff page
This has broken many times and I want this test to ensure its protection
in future.

Bug: T86687
Change-Id: Iea01c5c7c1ba00de47182521eeba86c8aef03522
2015-01-28 12:48:08 -08:00
Kunal Mehta a20a33c72d Use Title::hasContentModel() instead of a direct comparison
Change-Id: Ic3cd8630d2dfc6d46eb951bfcdab83c78fb958b6
2014-09-19 01:08:46 +00: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
Erik Bernhardson ccdca0d0d7 Support updated flow frontend
* Flow no-longer allows arbitrary html insertion, so remove
* Update ext.thanks.flowthank.js to work with thank links generated
  directly by flow.

Change-Id: I8ae14352f1b177446f3696ffadd6921a5125238e
2014-07-15 15:07:33 -07: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
wctaiwan dfb639af3e Call getAlphadecimal() directly
Relying on UUID::__toString() now triggers a notice, causing
unrelated patches to fail. This patch addresses the issue.

Change-Id: Ia94826a0e600adf8afd5908af75772b596ab8d0a
2014-04-15 03:54:00 +00:00
jenkins-bot 412d8f372f Merge "Add hover highlight to Thank link in Flow posts" 2014-04-01 20:57:47 +00:00
Erik Bernhardson 82039be262 Only use ->parse on i18n messages if required
Change-Id: I89e9d9aa4becde968900f7f07a302de791519004
2014-03-27 15:03:35 -07:00
Benjamin Chen 36b839ead2 Add hover highlight to Thank link in Flow posts
Bug: 62556
Change-Id: I3adb60d5b1c75500f8276cda8b8eaa2646bb1565
2014-03-21 04:04:04 +08:00
wctaiwan 98726b568b Add "Thanks" for comments on Flow boards
bug: 61930
Change-Id: Id37a14e3c75c63419fc34e0b7c2e21f74b3fa875
Co-authored-by: Bencmq <bencmqwiki@gmail.com>
2014-03-14 11:03:11 +00:00
Jackmcbarn 49c061de29 Fix mismatched parentheses
I have no idea how this ever worked properly, but it did.

Change-Id: I82efd5054c4f497cc28e06c88d33c654ecb7933a
2014-02-26 18:03:11 -05:00
jenkins-bot c811693ae9 Merge "Make the diff the primary link in thanks" 2014-02-04 20:16:20 +00:00
Jackmcbarn 75c8853265 Remove misleading Thank button from some diffs
To prevent thanking someone for the wrong revision, don't show the Thank
button unless the old revision is the parent of the revision being thanked
for. This needs I6ee956c5 in core to function, but it degrades gracefully
if it's not present.

Bug: 57721
Change-Id: I8f973a8a54db35838ce4c697c0310f67b2dba1a0
2014-01-29 01:47:55 +00:00
Jackmcbarn bafe6568e9 Make the diff the primary link in thanks
When viewing a thank message, make the link to the diff the primary link.
Visiting the user's user page is almost never the desired action when
viewing a thank notification. The link to the user page is no longer
present as a secondary link, but the notification-thanks-flyout2 and
notification-thanks messages both include a link from the user's name to
their user page.

Bug: 56225
Change-Id: If971385e6d1a47e394d06decf25db2c1b7cc2fb9
2014-01-28 16:43:53 +00:00
kaldari cdc91d7f54 Story 1604: Remember mobile thanks
If the user has already been thanked, make the button greyed out
and display the text "Thanked" instead of "Thank".

Dependency: Ife9f456a7a9cf74b1b54fdc6128feb230fd6f671
Bug: 59828
Change-Id: Ifab78fe62910c9c3f2a927a6a4bbe28fb953b160
2014-01-15 17:36:53 -08:00
jenkins-bot 31437cf89d Merge "Add Special:Thanks as a non-JS fallback" 2013-12-19 05:43:11 +00:00
Kunal Mehta 47e95c5852 Add handler for GetLogTypesOnUser hook
Change-Id: I2db58b81c40eec1ac0d858efad23001762269a6d
2013-12-19 03:35:48 +00:00
Kunal Mehta 06360b6d0d Add Special:Thanks as a non-JS fallback
If the user has JavaScript disabled, clicking
on "thank" will send the user to Special:Thanks
with the revision id already filled in. When
submitted, the form calls the API internally
and then shows the user an error or confirmation
message.

Special:Thanks is not a listed special page
since it's mainly intended as a fallback.

The API was modified to return the user name of the
editor who is being thanked if a new notification
was created.

Bug: 49161
Change-Id: I7ba4664b92bb0da425784350487ed0e7ca352b4e
2013-12-05 23:23:21 -08:00
addshore 422f0f6062 Add really basic API tests
This also includes the unit test hooks

Jenkings job will be added with I6ec2edf62b9

Change-Id: Id085db7096db420416e9fba72a65586d021f1c76
2013-11-04 16:38:23 +00:00
jenkins-bot 084bd53382 Merge "Only allow Thanks for public revisions" 2013-10-30 17:47:04 +00:00
Kunal Mehta 05c7f89a8e Only allow Thanks for public revisions
Bug: 54100
Change-Id: Ied2846076ecf86b7045563fe5f2b0c002bd42647
2013-10-26 20:18:04 -07:00
Kunal Mehta 73554fa0ab Fix phpdoc
See https://www.mediawiki.org/wiki/Manual:Hooks/DiffViewHeader

Change-Id: I551c5b5a4f98503dad01c763032c5b1b86daba6f
2013-10-23 21:16:50 -07:00
Kunal Mehta 5e0277e9a5 Remove outdated comment
Preference was removed in 4c88b5973a.

Change-Id: Ibaa277b5468eda29a0c6b11eeed9c9985ed15580
2013-10-23 20:45:53 -07:00
Kunal Mehta 86e031bcdd Fix phpdoc comment
Change-Id: I38fdc9826cb78a08c8d04c8dc172509c6d11440b
2013-10-07 13:56:47 -07:00
bsitu 4c88b5973a Remove the deprecated user preference: 'vector-noexperiments'
In addition, Thanks is not an experimental feature anymore

bug: 54852

Change-Id: I10b63c3e5f659c06e72f7e9f925c1044eb1986ac
2013-10-01 22:59:55 +00:00
kaldari bd5bdba07e Migrating Mobile thanks into Thanks extension
Also making thank button for mobile capitalized.

Also update for new clickTracking code.

Also promoting to stable.

Dependency: I56e2c5bc69f85e83ab3dfd9b9e617dbb98661870
Change-Id: Ifaf44fe8994a8085c30522292bba8b768da533db
2013-09-26 18:42:13 -07:00
bsitu d4661cd379 Add gender support to two i18n messages
* thanks-thank-tooltip
* logentry-thanks-thank

Change-Id: Ib5e17695dda7db5b07db51bb20579d23f88666e5
2013-08-20 16:23:37 -07:00
jenkins-bot f070d0d6ab Merge "Remove unused i18n messages" 2013-08-10 01:46:34 +00:00
bsitu 269f6bafa2 Remove unused i18n messages
'email-body-message' is not used anymore

Change-Id: Iade9f3146cbfc0b5cde174ca002e44885bb0d352
2013-08-02 21:33:21 +00:00
jenkins-bot 31ff5b375a Merge "Adding new custom icon" 2013-07-10 18:35:22 +00:00
kaldari b053cd930f Adding support for primary and secondary links
Depends on Echo change I94aed697

Change-Id: I6654c74da12ee22beba8b479dd05ecf9fc890927
2013-07-02 10:42:20 -07:00
kaldari 7e927a62dc Adding new custom icon
Change-Id: I8e3d2bc7cadbf321bbe504d17621c99c035c978d
2013-06-28 13:44:17 -07:00
kaldari aa2f23517b Adding optional confirmation process to Thanks workflow
If the new $wgThanksConfirmationRequired global variable is true,
require users to confirm that they want to send thanks.

Bug: 47658
Change-Id: I4663844a324a2797917b027ceb1c8c07b1e180d5
2013-06-10 12:05:09 -07:00
kaldari 36003bd6db Adding tooltip for preference
Change-Id: Ic73f46d2c216202158ddc9fc3ed41a073c5a3b43
2013-05-30 14:44:29 -07:00
bsitu 9898cb32df Thanks notif should fall under positive group
Change-Id: I19bfe1483ba7edc5928c3c39968e7d84161ab441
2013-04-30 15:32:04 -07:00
jenkins-bot 795059b79d Merge "Moving a pref override from Echo to Thanks" 2013-04-29 17:15:02 +00:00
jenkins-bot 8b8c1057c8 Merge "Add new $icons parameter to Echo hook:" 2013-04-29 06:12:47 +00:00
ebernhardson a4cfb9ded6 Prevent short-term duplicate thanking
Thanked revision to be stored both server side in the session and client side
in a cookie.  Thanked revisions found in either storage solution will replace
their 'thank' link with the string 'thanked'.
Bug: 46690
Change-Id: I976cd8fbf00856c67b77daeb0d0a952efb371661
2013-04-28 22:58:28 -07:00
Matthew Flaschen 62a070f69c Add new $icons parameter to Echo hook:
* Update doc block
* Use names that indicate the variables are passed in, not used as globals.

Bug: 46585
Change-Id: I0f15498ab1fba239bce141b178340a9d9984bedf
2013-04-29 00:54:10 -04:00
kaldari a49ed2cd59 Moving a pref override from Echo to Thanks
Bug: 47757
Change-Id: I1aa81cf81ca71af323f0d5448fb5800086a09b1e
2013-04-26 16:36:24 -07:00
jenkins-bot ae511e7cf4 Merge "Attribute value is double escaped" 2013-04-11 22:13:16 +00:00
bsitu af8164814d Attribute value is double escaped
Change-Id: Ibf2e1f9cae5c30ed0871de3ad3598b1bd13094ec
Html::element() already escapes attribuate values, there is no need to escape it explicitly again
2013-04-01 15:43:21 -07:00
Siebrand Mazeland 3373975b93 Update PHPDoc
Change-Id: I920aa1875548120efa2c670e4290ba2d4a004878
2013-03-27 11:45:25 +01:00
Kaldari bc369fdf85 Initial version of Thanks extension
See https://www.mediawiki.org/wiki/Extension:Thanks

Change-Id: Ic037f1fcde0f7fa10848c2ed8e31291ad022027d
2013-03-21 11:33:50 -07:00