Let user know if the documentation is a redirect page

(closes #3337)
This commit is contained in:
Bryan Housel
2016-10-25 11:03:35 -04:00
parent e4e2298ad6
commit 699da57ad1
3 changed files with 6 additions and 2 deletions
+1
View File
@@ -239,6 +239,7 @@ en:
inspector:
no_documentation_combination: There is no documentation available for this tag combination
no_documentation_key: There is no documentation available for this key
documentation_redirect: This documentation has been redirected to a new page
show_more: Show More
view_on_osm: View on openstreetmap.org
all_fields: All fields
+1
View File
@@ -293,6 +293,7 @@
"inspector": {
"no_documentation_combination": "There is no documentation available for this tag combination",
"no_documentation_key": "There is no documentation available for this key",
"documentation_redirect": "This documentation has been redirected to a new page",
"show_more": "Show More",
"view_on_osm": "View on openstreetmap.org",
"all_fields": "All fields",
+4 -2
View File
@@ -54,7 +54,8 @@ export function uiTagReference(tag) {
body.html('');
if (!docs || !docs.description) {
if (!docs || !docs.title) {
if (param.hasOwnProperty('value')) {
load(_.omit(param, 'value')); // retry with key only
} else {
@@ -64,6 +65,7 @@ export function uiTagReference(tag) {
return;
}
if (docs.image && docs.image.thumb_url_prefix) {
body
.append('img')
@@ -77,7 +79,7 @@ export function uiTagReference(tag) {
body
.append('p')
.text(docs.description);
.text(docs.description || t('inspector.documentation_redirect'));
body
.append('a')