- Fix display of related items in reports
- Fix redundant display of case/statute/email titles in report tables
This commit is contained in:
parent
b336674100
commit
161a21b180
2 changed files with 10 additions and 3 deletions
|
@ -3921,6 +3921,13 @@ Zotero.Item.prototype.toArray = function (mode) {
|
|||
}
|
||||
|
||||
if (!arr.title) {
|
||||
var titleFieldID = Zotero.ItemFields.getFieldIDFromTypeAndBase(this.itemTypeID, 'title');
|
||||
var titleFieldName = Zotero.ItemFields.getName(titleFieldID);
|
||||
if (arr[titleFieldName]) {
|
||||
arr.title = titleFieldName;
|
||||
delete arr[titleFieldName];
|
||||
}
|
||||
|
||||
switch (this.typeID) {
|
||||
case Zotero.ItemTypes.getID('note'):
|
||||
break;
|
||||
|
|
|
@ -116,10 +116,10 @@ Zotero.Report = new function() {
|
|||
}
|
||||
|
||||
// Related
|
||||
if (arr.reportSearchMatch && arr['seeAlso'] && arr['seeAlso'].length) {
|
||||
if (arr.reportSearchMatch && arr.related && arr.related.length) {
|
||||
content += '<h3 class="related">' + escapeXML(Zotero.getString('itemFields.related')) + '</h3>\n';
|
||||
content += '<ul class="related">\n';
|
||||
var relateds = Zotero.Items.get(arr['seeAlso']);
|
||||
var relateds = Zotero.Items.get(arr.related);
|
||||
for each(var related in relateds) {
|
||||
content += '<li id="i' + related.getID() + '">';
|
||||
content += escapeXML(related.getField('title'));
|
||||
|
@ -203,7 +203,7 @@ Zotero.Report = new function() {
|
|||
case 'firstCreator':
|
||||
case 'creators':
|
||||
case 'tags':
|
||||
case 'seeAlso':
|
||||
case 'related':
|
||||
case 'notes':
|
||||
case 'note':
|
||||
case 'attachments':
|
||||
|
|
Loading…
Add table
Reference in a new issue