Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/216943
Change subject: Special:CXStats: Add link to tagfilter page in targetwikis. ...................................................................... Special:CXStats: Add link to tagfilter page in targetwikis. The total translation count is a link to lang.wikipedia.org/wiki/Special:RecentChanges?tagfilter=contenttranslation Change-Id: Iff8084e39f04ffa12c92ebee6d0c23359aae4aad --- M modules/stats/ext.cx.stats.js 1 file changed, 18 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/43/216943/1 diff --git a/modules/stats/ext.cx.stats.js b/modules/stats/ext.cx.stats.js index f06d75a..e524fd0 100644 --- a/modules/stats/ext.cx.stats.js +++ b/modules/stats/ext.cx.stats.js @@ -237,6 +237,7 @@ CXStats.prototype.drawTranslationsChart = function ( direction, status, property ) { var $chart, $bar, translations, $translations, model, i, j, $rows = [], $callout, + $total, $row, width, max = 0, $tail, tailWidth = 0, tail, @@ -318,6 +319,22 @@ content: $callout } ); + $total = $( '<span>' ) + .addClass( 'cx-stats-chart__total' ) + .text( fmt( model[ i ][ property ] ) ); + + if ( direction === 'to' ) { + $total = $( '<a>' ) + .addClass( 'cx-stats-chart__total' ) + .attr( 'href', mw.cx.siteMapper.getPageUrl( + model[ i ].language, 'Special:RecentChanges', { tagfilter: 'contenttranslation' } + ) ) + .text( fmt( model[ i ][ property ] ) ); + } else { + $total = $( '<span>' ) + .addClass( 'cx-stats-chart__total' ) + .text( fmt( model[ i ][ property ] ) ); + } $row.append( $( '<span>' ) .addClass( 'cx-stats-chart__langcode' ) @@ -325,9 +342,7 @@ $( '<span>' ) .addClass( 'cx-stats-chart__autonym' ) .text( $.uls.data.getAutonym( model[ i ].language ) ), - $( '<span>' ) - .addClass( 'cx-stats-chart__total' ) - .text( fmt( model[ i ][ property ] ) ), + $total, $translations ); -- To view, visit https://gerrit.wikimedia.org/r/216943 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iff8084e39f04ffa12c92ebee6d0c23359aae4aad Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits