2021-07-09 15:04:14 +00:00
|
|
|
/**
|
2022-07-12 09:55:54 +00:00
|
|
|
* Sidebar item for a template which has yet to be added, its name is not yet
|
|
|
|
* given.
|
|
|
|
*
|
2021-07-09 15:04:14 +00:00
|
|
|
* @class
|
|
|
|
* @extends ve.ui.MWTransclusionOutlinePartWidget
|
|
|
|
*
|
|
|
|
* @constructor
|
2021-07-09 15:33:16 +00:00
|
|
|
* @param {ve.dm.MWTemplatePlaceholderModel} placeholder
|
2021-07-09 15:04:14 +00:00
|
|
|
*/
|
2021-07-13 09:00:57 +00:00
|
|
|
ve.ui.MWTransclusionOutlinePlaceholderWidget = function VeUiMWTransclusionOutlinePlaceholderWidget( placeholder ) {
|
2021-10-06 15:57:10 +00:00
|
|
|
var label = placeholder.getTransclusion().isSingleTemplate() ?
|
2021-07-13 09:00:57 +00:00
|
|
|
ve.msg( 'visualeditor-dialog-transclusion-template-search' ) :
|
|
|
|
ve.msg( 'visualeditor-dialog-transclusion-add-template' );
|
2021-07-09 15:04:14 +00:00
|
|
|
|
|
|
|
// Parent constructor
|
2021-07-13 09:00:57 +00:00
|
|
|
ve.ui.MWTransclusionOutlinePlaceholderWidget.super.call( this, placeholder, {
|
|
|
|
icon: 'puzzle',
|
|
|
|
label: label
|
|
|
|
} );
|
2021-07-09 15:04:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
OO.inheritClass( ve.ui.MWTransclusionOutlinePlaceholderWidget, ve.ui.MWTransclusionOutlinePartWidget );
|