Show "no parameters" message only when there are no parameters

The message was also shown when a documented template appears as
part of a multi-part transclusion but with zero parameters being
used. You see the filters in this case and can click "show all".
The message is just wrong in this situation.

Bug: T312926
Change-Id: I8d26ceec483e05fd1f69013e506fa1eb4e4c29ed
This commit is contained in:
Thiemo Kreuz 2022-08-02 11:41:07 +02:00
parent c626f93a1f
commit b9376f5990

View file

@ -39,7 +39,7 @@ ve.ui.MWTransclusionOutlineTemplateWidget = function VeUiMWTransclusionOutlineTe
if ( parameterNames.length ) {
this.initializeParameterList();
this.parameterList.addItems( parameterNames.map( this.createCheckbox.bind( this ) ) );
} else {
} else if ( !canFilter ) {
this.$noParametersNote = $( '<div>' )
.text( ve.msg( 'visualeditor-dialog-transclusion-no-template-parameters' ) )
.addClass( 've-ui-mwTransclusionOutlineTemplateWidget-no-template-parameters' );