Skip to content

Commit

Permalink
Show container title in center pane if no title
Browse files Browse the repository at this point in the history
  • Loading branch information
fbennett committed Mar 31, 2019
1 parent 94efaee commit da762d0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions chrome/content/zotero/xpcom/data/item.js
Expand Up @@ -1028,8 +1028,14 @@ Zotero.Item.prototype.updateDisplayTitle = function () {
var title = this.getField('title', false, true, Zotero.CachedLanguages.getDisplayLang());
var itemTypeID = this.itemTypeID;
var itemTypeName = Zotero.ItemTypes.getName(itemTypeID);

if (title === "" && (itemTypeID == 8 || itemTypeID == 10)) { // 'letter' and 'interview' itemTypeIDs

if (title === "" && ["journalArticle", "magazineArticle", "newspaperArticle", "encyclopediaArticle", "dictionaryEntry"].indexOf(itemTypeID) > -1) {
var containerID = Zotero.Item.Fields.getFieldIDFromTypeAndBase(itemTypeID, "publicationTitle")
var containerTitle = getField(containerID);
if (containerTitle) {
title = "[" + containerTitle + "]"
}
} else if (title === "" && (itemTypeID == 8 || itemTypeID == 10)) { // 'letter' and 'interview' itemTypeIDs
var creatorsData = this.getCreators();
var authors = [];
var participants = [];
Expand Down

0 comments on commit da762d0

Please sign in to comment.