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 ) {
|
2024-05-21 14:22:56 +00:00
|
|
|
const 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
|
|
|
|
} );
|
2022-08-02 13:02:02 +00:00
|
|
|
|
|
|
|
this.$element.addClass( 've-ui-mwTransclusionOutlinePlaceholderWidget' );
|
2021-07-09 15:04:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
OO.inheritClass( ve.ui.MWTransclusionOutlinePlaceholderWidget, ve.ui.MWTransclusionOutlinePartWidget );
|