mediawiki-extensions-Visual.../modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlinePlaceholderWidget.js
Thiemo Kreuz 29ef00fa29 Rework all code using template type related conditions
This is a more radical change, compared to the previous patch.
I will post more detailled explanations as comments on Gerrit.

Change-Id: I6909b3f0b2c153b7ee9995441e995ffa793eab40
2021-10-22 10:42:16 +00:00

23 lines
719 B
JavaScript

/**
* @class
* @extends ve.ui.MWTransclusionOutlinePartWidget
*
* @constructor
* @param {ve.dm.MWTemplatePlaceholderModel} placeholder
*/
ve.ui.MWTransclusionOutlinePlaceholderWidget = function VeUiMWTransclusionOutlinePlaceholderWidget( placeholder ) {
var label = placeholder.getTransclusion().isSingleTemplate() ?
ve.msg( 'visualeditor-dialog-transclusion-template-search' ) :
ve.msg( 'visualeditor-dialog-transclusion-add-template' );
// Parent constructor
ve.ui.MWTransclusionOutlinePlaceholderWidget.super.call( this, placeholder, {
icon: 'puzzle',
label: label
} );
};
/* Inheritance */
OO.inheritClass( ve.ui.MWTransclusionOutlinePlaceholderWidget, ve.ui.MWTransclusionOutlinePartWidget );