jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/354527 )
Change subject: Add help icon/link to constraint reports ...................................................................... Add help icon/link to constraint reports The link points to the constraint type’s subpage of the Property constraints portal on Wikidata. Change-Id: Icced3d6624f8eb2059bd71e9fb2df372924ca46f --- M docs/user.js 1 file changed, 12 insertions(+), 4 deletions(-) Approvals: Jonas Kress (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/docs/user.js b/docs/user.js index 08a65e3..b3ffe4b 100644 --- a/docs/user.js +++ b/docs/user.js @@ -34,14 +34,22 @@ } function buildReport( result ) { - var $report; + var $report, $heading, $helpButton; if ( result.status === 'violation' ) { $report = $( '<div>' ).addClass( 'wbqc-report' ); $report.css( 'border-top', '1px solid #eaecf0' ); // TODO move to CSS on .wbqc-report class - $report.append( - $( '<h4>' ).text( result.constraint.type ) - ); + $heading = $( '<h4>' ).text( result.constraint.type ); + $helpButton = new OO.ui.ButtonWidget( { + icon: 'help', + framed: false, + classes: [ 'wbqc-constraint-type-help' ], + href: 'https://www.wikidata.org/wiki/Help:Property_constraints_portal/' + result.constraint.type, + target: '_blank' + } ).$element; + $helpButton.css( 'transform', 'scale(0.75)' ); // TODO move to CSS on .wbqc-constraint-type-help class + $heading.append( $helpButton ); + $report.append( $heading ); if ( result[ 'message-html' ] ) { $report.append( $( '<p>' ).html( result[ 'message-html' ] ) -- To view, visit https://gerrit.wikimedia.org/r/354527 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icced3d6624f8eb2059bd71e9fb2df372924ca46f Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints Gerrit-Branch: master Gerrit-Owner: Lucas Werkmeister (WMDE) <lucas.werkmeis...@wikimedia.de> Gerrit-Reviewer: Jonas Kress (WMDE) <jonas.kr...@wikimedia.de> Gerrit-Reviewer: Lucas Werkmeister (WMDE) <lucas.werkmeis...@wikimedia.de> Gerrit-Reviewer: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits