mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-12-18 02:51:26 +00:00
Merge "Disable "Share feedback..." links by default"
This commit is contained in:
commit
af6f6e6149
|
@ -59,7 +59,8 @@
|
||||||
"config": {
|
"config": {
|
||||||
"enable": "DiscussionToolsEnable",
|
"enable": "DiscussionToolsEnable",
|
||||||
"replyIndentation": "DiscussionToolsReplyIndentation",
|
"replyIndentation": "DiscussionToolsReplyIndentation",
|
||||||
"switchTime": "DiscussionToolsTimestampFormatSwitchTime"
|
"switchTime": "DiscussionToolsTimestampFormatSwitchTime",
|
||||||
|
"showFeedbackLinks": "DiscussionToolsShowFeedbackLinks"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ReplyLinksController.js",
|
"ReplyLinksController.js",
|
||||||
|
@ -546,6 +547,10 @@
|
||||||
"value": "invisible",
|
"value": "invisible",
|
||||||
"description": "Reply indentation syntax to use: 'invisible' (use `<dl><dd>` tags to output `:` in wikitext) or 'bullet' (use `<ul><li>` tags to output `*` in wikitext)."
|
"description": "Reply indentation syntax to use: 'invisible' (use `<dl><dd>` tags to output `:` in wikitext) or 'bullet' (use `<ul><li>` tags to output `*` in wikitext)."
|
||||||
},
|
},
|
||||||
|
"DiscussionToolsShowFeedbackLinks": {
|
||||||
|
"value": false,
|
||||||
|
"description": "Show 'Share feedback...' links in the footer of reply tool and new topic tool."
|
||||||
|
},
|
||||||
"DiscussionToolsTimestampFormatSwitchTime": {
|
"DiscussionToolsTimestampFormatSwitchTime": {
|
||||||
"value": "2022-07-12",
|
"value": "2022-07-12",
|
||||||
"description": "Date on which the internal timestamp format has changed (T304595), in ISO 8601 format."
|
"description": "Date on which the internal timestamp format has changed (T304595), in ISO 8601 format."
|
||||||
|
|
|
@ -85,5 +85,6 @@ module.exports = {
|
||||||
HeadingItem: require( './HeadingItem.js' ),
|
HeadingItem: require( './HeadingItem.js' ),
|
||||||
CommentItem: require( './CommentItem.js' ),
|
CommentItem: require( './CommentItem.js' ),
|
||||||
utils: require( './utils.js' ),
|
utils: require( './utils.js' ),
|
||||||
|
config: require( './config.json' ),
|
||||||
logger: require( './logger.js' )
|
logger: require( './logger.js' )
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,7 +5,8 @@ var controller = require( 'ext.discussionTools.init' ).controller,
|
||||||
ModeTabOptionWidget = require( './ModeTabOptionWidget.js' ),
|
ModeTabOptionWidget = require( './ModeTabOptionWidget.js' ),
|
||||||
licenseMessages = require( './licenseMessages.json' ),
|
licenseMessages = require( './licenseMessages.json' ),
|
||||||
featuresEnabled = mw.config.get( 'wgDiscussionToolsFeaturesEnabled' ) || {},
|
featuresEnabled = mw.config.get( 'wgDiscussionToolsFeaturesEnabled' ) || {},
|
||||||
enable2017Wikitext = featuresEnabled.sourcemodetoolbar;
|
enable2017Wikitext = featuresEnabled.sourcemodetoolbar,
|
||||||
|
dtConf = require( 'ext.discussionTools.init' ).config;
|
||||||
|
|
||||||
require( './AbandonCommentDialog.js' );
|
require( './AbandonCommentDialog.js' );
|
||||||
require( './AbandonTopicDialog.js' );
|
require( './AbandonTopicDialog.js' );
|
||||||
|
@ -189,19 +190,21 @@ function ReplyWidget( commentController, commentDetails, config ) {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$footerLinks.append(
|
if ( dtConf.showFeedbackLinks ) {
|
||||||
$( '<li>' ).append(
|
$footerLinks.append(
|
||||||
$( '<a>' )
|
$( '<li>' ).append(
|
||||||
.attr( {
|
$( '<a>' )
|
||||||
href: this.isNewTopic ?
|
.attr( {
|
||||||
mw.msg( 'discussiontools-replywidget-feedback-link-newtopic' ) :
|
href: this.isNewTopic ?
|
||||||
mw.msg( 'discussiontools-replywidget-feedback-link' ),
|
mw.msg( 'discussiontools-replywidget-feedback-link-newtopic' ) :
|
||||||
target: '_blank',
|
mw.msg( 'discussiontools-replywidget-feedback-link' ),
|
||||||
rel: 'noopener'
|
target: '_blank',
|
||||||
} )
|
rel: 'noopener'
|
||||||
.text( mw.msg( 'discussiontools-replywidget-feedback' ) )
|
} )
|
||||||
)
|
.text( mw.msg( 'discussiontools-replywidget-feedback' ) )
|
||||||
);
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
this.$footer.append(
|
this.$footer.append(
|
||||||
$( '<p>' ).addClass( 'plainlinks' ).html(
|
$( '<p>' ).addClass( 'plainlinks' ).html(
|
||||||
this.isNewTopic ? licenseMessages.newtopic : licenseMessages.reply
|
this.isNewTopic ? licenseMessages.newtopic : licenseMessages.reply
|
||||||
|
|
Loading…
Reference in a new issue