diff --git a/data/core.yaml b/data/core.yaml index 6c3c59961..059d8975d 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -325,6 +325,7 @@ en: key: H title: History selected: "{n} selected" + no_history: "No History (New Feature)" version: Version last_edit: Last Edit edited_by: Edited By diff --git a/dist/locales/en.json b/dist/locales/en.json index 8bf4f41d7..9dfb67330 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -407,6 +407,7 @@ "key": "H", "title": "History", "selected": "{n} selected", + "no_history": "No History (New Feature)", "version": "Version", "last_edit": "Last Edit", "edited_by": "Edited By", diff --git a/modules/ui/panels/history.js b/modules/ui/panels/history.js index b665fe5f9..710cfa8b1 100644 --- a/modules/ui/panels/history.js +++ b/modules/ui/panels/history.js @@ -96,8 +96,8 @@ export function uiPanelHistory(context) { function redraw(selection) { - var selected = _filter(context.selectedIDs(), function(e) { return context.hasEntity(e); }), - singular = selected.length === 1 ? selected[0] : null; + var selected = _filter(context.selectedIDs(), function(e) { return context.hasEntity(e); }); + var singular = selected.length === 1 ? selected[0] : null; osm = context.connection(); @@ -112,6 +112,13 @@ export function uiPanelHistory(context) { var entity = context.entity(singular); + if (!entity.version) { + selection + .append('div') + .text(t('info_panels.history.no_history')); + return; + } + var list = selection .append('ul');