mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
Add link to the PeWu history viewer to the History panel (close #6202)
This commit is contained in:
+2
-5
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user