Skip to content

Commit

Permalink
Show page in citations list (#419)
Browse files Browse the repository at this point in the history
  • Loading branch information
stdtom authored Apr 7, 2024
1 parent 0e5254b commit 7735d19
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/views/GrampsjsViewCitations.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ export class GrampsjsViewCitations extends GrampsjsViewObjectsBase {
this._columns = {
grampsId: {title: 'Gramps ID', sort: 'gramps_id'},
sourceTitle: {title: 'Source: Title', sort: ''},
page: {title: 'Page', sort: ''},
change: {title: 'Last changed', sort: 'change'},
}
this._objectsName = 'citations'
}

// eslint-disable-next-line class-methods-use-this
get _fetchUrl() {
return '/api/citations/?extend=source_handle&keys=gramps_id,extended,change'
return '/api/citations/?extend=source_handle&keys=gramps_id,extended,page,change'
}

// eslint-disable-next-line class-methods-use-this
Expand Down Expand Up @@ -52,6 +53,7 @@ export class GrampsjsViewCitations extends GrampsjsViewObjectsBase {
const formattedRow = {
grampsId: row.gramps_id,
sourceTitle: row.extended.source?.title,
page: row.page,
change: prettyTimeDiffTimestamp(row.change, this.strings.__lang__),
}
return formattedRow
Expand Down

0 comments on commit 7735d19

Please sign in to comment.