Display libraries and collections box for standalone notes and attachments (#5554)

Display Libraries and Collections box in the itemPane
for standalone notes and attachments.

Fixes: #5553
This commit is contained in:
abaevbog 2025-09-29 11:44:18 -07:00 • committed by GitHub
parent dd19cf58cc
commit ac36b6d361
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 1 deletions

View file

@ -46,7 +46,10 @@ import { getCSSIcon } from 'components/icons';
}
set item(item) {
if (item?.isRegularItem() && !item?.isFeedItem) {
let isRegularItem = item?.isRegularItem() && !item?.isFeedItem;
let isStandaloneAttachment = item?.isAttachment() && !item.parentItemID;
let isStandaloneNote = item?.isNote() && !item.parentItemID;
if (isRegularItem || isStandaloneAttachment || isStandaloneNote) {
this.hidden = false;
}
else {

View file

@ -361,6 +361,7 @@
<html:div id="parent-value" class="value zotero-clicky" hidden="true"/>
-->
<tags-box id="tags"/>
<libraries-collections-box id="libraries-collections"/>
<related-box id="related"/>
`, ['chrome://zotero/locale/zotero.dtd']);
}
@ -388,6 +389,12 @@
this._item = val;
this._id('related').item = this._item;
this._id('tags').item = this._item;
if (this._item.parentItem) {
this._id('libraries-collections').hidden = true;
}
else {
this._id('libraries-collections').item = this._item;
}
this.refresh();
}