Add link to the PeWu history viewer to the History panel (close #6202)

This commit is contained in:
Quincy Morgan
2019-04-18 14:06:48 -07:00
parent 63b6023601
commit 2f695a9747
2 changed files with 24 additions and 17 deletions
+2 -5
View File
@@ -4047,12 +4047,9 @@ img.tile-debug {
margin-left: auto;
margin-right: 8px;
}
.panel-content-history .view-history-on-osm {
display: block;
margin-top: 10px;
.panel-content-history h4 {
padding-bottom: 0;
}
.panel-content-location .location-info {
margin-top: 10px;
}
+22 -12
View File
@@ -180,6 +180,28 @@ export function uiPanelHistory(context) {
return;
}
var links = selection
.append('div')
.attr('class', 'links');
if (osm) {
links
.append('a')
.attr('class', 'view-history-on-osm')
.attr('href', osm.historyURL(entity))
.attr('target', '_blank')
.attr('tabindex', -1)
.attr('title', t('info_panels.history.link_text'))
.text('OSM');
}
links
.append('a')
.attr('class', 'pewu-history-viewer-link')
.attr('href', 'https://pewu.github.io/osm-history/#/' + entity.type + '/' + entity.osmId())
.attr('target', '_blank')
.attr('tabindex', -1)
.text('PeWu');
var list = selection
.append('ul');
@@ -204,18 +226,6 @@ export function uiPanelHistory(context) {
.append('li')
.text(t('info_panels.history.changeset') + ':')
.call(displayChangeset, entity.changeset);
if (osm) {
selection
.append('a')
.attr('class', 'view-history-on-osm')
.attr('target', '_blank')
.attr('tabindex', -1)
.attr('href', osm.historyURL(entity))
.call(svgIcon('#iD-icon-out-link', 'inline'))
.append('span')
.text(t('info_panels.history.link_text'));
}
}