mirror of
https://github.com/gramps-project/gramps-web.git
synced 2026-01-06 05:40:09 -06:00
Use place_name where possible
This commit is contained in:
@@ -82,7 +82,8 @@ export class GrampsjsEvent extends GrampsjsObject {
|
||||
<a
|
||||
href="${BASE_DIR}/place/${this.data.extended.place
|
||||
.gramps_id}"
|
||||
>${this.data.profile.place}</a
|
||||
>${this.data.profile.place_name ||
|
||||
this.data.profile.place}</a
|
||||
>
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
@@ -73,7 +73,8 @@ export class GrampsjsPerson extends GrampsjsObject {
|
||||
return html`
|
||||
<span class="event">
|
||||
<i>${asteriskIcon}</i>
|
||||
${obj.date || ''} ${obj.place ? this._('in') : ''} ${obj.place || ''}
|
||||
${obj.date || ''} ${obj.place ? this._('in') : ''}
|
||||
${obj.place_name || obj.place || ''}
|
||||
</span>
|
||||
`
|
||||
}
|
||||
@@ -84,12 +85,11 @@ export class GrampsjsPerson extends GrampsjsObject {
|
||||
return ''
|
||||
}
|
||||
return html`
|
||||
<span class="event">
|
||||
<i>${crossIcon}</i>
|
||||
${obj.date || ''}
|
||||
${obj.place ? this._('in') : ''}
|
||||
${obj.place || ''}
|
||||
</event>
|
||||
<span class="event">
|
||||
<i>${crossIcon}</i>
|
||||
${obj.date || ''} ${obj.place ? this._('in') : ''}
|
||||
${obj.place_name || obj.place || ''}
|
||||
</span>
|
||||
`
|
||||
}
|
||||
|
||||
|
||||
@@ -357,7 +357,7 @@ export function objectDetail(type, obj, strings) {
|
||||
return `
|
||||
${obj?.profile?.birth?.date ? `* ${obj.profile.birth.date}` : ''}${
|
||||
obj?.profile?.birth?.place && obj?.profile?.birth?.date ? ', ' : ''
|
||||
}${obj?.profile?.birth?.place || ''}
|
||||
}${obj?.profile?.birth?.place_name || obj?.profile?.birth?.place || ''}
|
||||
`
|
||||
// case 'family':
|
||||
// return ''
|
||||
@@ -365,7 +365,7 @@ export function objectDetail(type, obj, strings) {
|
||||
return `
|
||||
${obj?.profile?.date || ''}${
|
||||
obj?.profile?.place && obj?.profile?.date ? ', ' : ''
|
||||
}${obj?.profile?.place || ''}
|
||||
}${obj?.profile?.place_name || obj?.profile?.place || ''}
|
||||
`
|
||||
case 'place':
|
||||
return `
|
||||
|
||||
@@ -98,7 +98,9 @@ export class GrampsjsViewAnniversaries extends GrampsjsConnectedComponent {
|
||||
timestamp="${timestamp}"
|
||||
locale="${this.appState.i18n.lang}"
|
||||
></grampsjs-timedelta
|
||||
>${event?.profile?.place ? html`, ${event.profile.place}` : ''}
|
||||
>${event?.profile?.place
|
||||
? html`, ${event.profile.place_name || event.profile.place}`
|
||||
: ''}
|
||||
</span>
|
||||
</mwc-list-item>
|
||||
`
|
||||
|
||||
@@ -71,7 +71,7 @@ export class GrampsjsViewEvents extends GrampsjsViewObjectsBase {
|
||||
grampsId: row.gramps_id,
|
||||
type: row?.profile?.type,
|
||||
date: row?.profile?.date,
|
||||
place: row?.profile?.place,
|
||||
place: row?.profile?.place_name || row?.profile?.place,
|
||||
change: prettyTimeDiffTimestamp(row.change, this.appState.i18n.lang),
|
||||
}
|
||||
return formattedRow
|
||||
|
||||
Reference in New Issue
Block a user