Separate sub-ref content from main content in ContextItem

Bug: T376131
Change-Id: I859298746cf85b75cc27192c1e1c9c136312beea
This commit is contained in:
WMDE-Fisch 2024-10-01 13:58:33 +02:00
parent b7e9910a35
commit c40dc94c37
3 changed files with 11 additions and 4 deletions

View file

@ -34,7 +34,7 @@
"cite-ve-citationneeded-description": "An editor has indicated that this claim needs a citation to a reliable source.", "cite-ve-citationneeded-description": "An editor has indicated that this claim needs a citation to a reliable source.",
"cite-ve-citationneeded-reason": "Reason given:", "cite-ve-citationneeded-reason": "Reason given:",
"cite-ve-citationneeded-title": "Citation needed", "cite-ve-citationneeded-title": "Citation needed",
"cite-ve-dialog-reference-contextitem-extends": "This reference is a re-use with additional details.", "cite-ve-dialog-reference-contextitem-extends": "This reference is a re-use with additional details:",
"cite-ve-dialog-reference-editing-add-details": "You're adding additional details to this reference:", "cite-ve-dialog-reference-editing-add-details": "You're adding additional details to this reference:",
"cite-ve-dialog-reference-editing-add-details-placeholder": "Write or paste the information you would like to add to this reference here.", "cite-ve-dialog-reference-editing-add-details-placeholder": "Write or paste the information you would like to add to this reference here.",
"cite-ve-dialog-reference-editing-reused": "This reference is used {{PLURAL:$1|once|2=twice|$1 times}} on this page.", "cite-ve-dialog-reference-editing-reused": "This reference is used {{PLURAL:$1|once|2=twice|$1 times}} on this page.",

View file

@ -93,7 +93,10 @@ ve.ui.MWReferenceContextItem.prototype.getReuseWarning = function () {
ve.ui.MWReferenceContextItem.prototype.getExtendsWarning = function () { ve.ui.MWReferenceContextItem.prototype.getExtendsWarning = function () {
if ( this.model.getAttribute( 'extendsRef' ) ) { if ( this.model.getAttribute( 'extendsRef' ) ) {
return $( '<div>' ) return $( '<div>' )
.addClass( 've-ui-mwReferenceContextItem-muted' ) .addClass( [
've-ui-mwReferenceContextItem-muted',
've-ui-mwReferenceContextItemSubNote'
] )
.text( ve.msg( 'cite-ve-dialog-reference-contextitem-extends' ) ); .text( ve.msg( 'cite-ve-dialog-reference-contextitem-extends' ) );
} }
}; };
@ -155,9 +158,9 @@ ve.ui.MWReferenceContextItem.prototype.setup = function () {
ve.ui.MWReferenceContextItem.prototype.renderBody = function () { ve.ui.MWReferenceContextItem.prototype.renderBody = function () {
this.$body.empty().append( this.$body.empty().append(
this.getParentRef(), this.getParentRef(),
this.getExtendsWarning(),
this.getRendering(), this.getRendering(),
this.getReuseWarning(), this.getReuseWarning()
this.getExtendsWarning()
); );
}; };

View file

@ -23,5 +23,9 @@
+ .ve-ui-mwReferenceContextItem-muted { + .ve-ui-mwReferenceContextItem-muted {
margin-top: 0.5em; margin-top: 0.5em;
} }
+ .ve-ui-mwReferenceContextItemSubNote {
margin-bottom: 0.5em;
}
} }
} }