X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/66f9b3f7c72b20bd01ecfbfc782a4c52900a6602..76b612e16686de1b65a6d14bffd6d14879a6f4c7:/src/templates/detailspage.hbs
diff --git a/src/templates/detailspage.hbs b/src/templates/detailspage.hbs
index c7098b4..bbc2914 100644
--- a/src/templates/detailspage.hbs
+++ b/src/templates/detailspage.hbs
@@ -1,186 +1,209 @@
{{#*inline "partial_details_one_row"}}
-
-
- {{#if this.localname}}
- {{this.localname}}
- {{else}}
- No Name
- {{/if}}
- |
- {{this.class}}:{{this.type}} |
- {{osmLink this}} |
- {{this.rank_address}} |
- {{formatAdminLevel this.admin_level}} |
- {{formatDistance this.distance}} |
- {{detailsLink this}} |
-
+
+
+ {{#if this.localname}}
+ {{this.localname}}
+ {{else}}
+ No Name
+ {{/if}}
+ |
+ {{formatPlaceType this}} |
+ {{osmLink this}} |
+ {{this.rank_address}} |
+ {{formatAdminLevel this.admin_level}} |
+ {{formatDistance this.distance bDistanceInMeters}} |
+ {{detailsPermaLink this 'details >'}} |
+
{{/inline}}
{{#*inline "partial_details_keyword_one_row"}}
-
- {{formatKeywordToken this.word_token}} |
- {{#if this.word_id}}
- word id: {{this.word_id}} |
- {{/if}}
-
+
+ {{formatKeywordToken this.token}} |
+ {{#if this.id}}
+ word id: {{this.id}} |
+ {{/if}}
+
{{/inline}}
{{#*inline "partial_h2"}}
- {{this}} |
+ {{this}} |
{{/inline}}
{{#*inline "partial_h3"}}
- {{this}} |
+ {{this}} |
{{/inline}}
-
-
-
{{aPlace.localname}}
-
-
- {{formatMapIcon aPlace.icon}}
-
+
+
+
+ {{aPlace.localname}}
+ {{detailsPermaLink aPlace 'link to this page'}}
+
+
+
+ {{formatMapIcon aPlace}}
+
+
+
+
+
+
+ Name |
+
+ {{#each aPlace.names}}
+
+ {{this}} ({{@key}})
+
+ {{/each}}
+ |
+
+
+ Type |
+ {{aPlace.category}}:{{aPlace.type}} |
+
+
+ Last Updated |
+ {{aPlace.indexed_date}} |
+
+
+ Admin Level |
+ {{aPlace.admin_level}} |
+
+
+ Rank |
+ {{formatSearchRank aPlace.rank_search}} |
+
+ {{#if aPlace.calculated_importance}}
+
+ Importance |
+
+ {{aPlace.calculated_importance}}
+ {{#unless aPlace.importance}} (estimated){{/unless}}
+ |
+
+ {{/if}}
+
+ Coverage |
+ {{coverageType aPlace}} |
+
+
+ Centre Point (lat,lon) |
+
+ {{aPlace.centroid.coordinates.[1]}},{{aPlace.centroid.coordinates.[0]}}
+ |
+
+
+ OSM |
+ {{osmLink aPlace}}
+ |
+
+
+ Place Id
+ (on this server)
+ |
+ {{aPlace.place_id}} |
+
+ {{#if aPlace.calculated_wikipedia}}
+
+ Wikipedia Calculated |
+ {{wikipediaLink aPlace}} |
+
+ {{/if}}
+
+ Computed Postcode |
+ {{aPlace.calculated_postcode}} |
+
+
+ Address Tags |
+
+ {{#each aPlace.addresstags}}
+
+ {{this}} ({{@key}})
+
+ {{/each}}
+ |
+
+
+ Extra Tags |
+
+ {{#each aPlace.extratags}}
+
+ {{this}} ({{@key}})
+
+ {{/each}}
+ |
+
+
-
-
-
-
- Name |
-
- {{#each aPlace.aNames}}
- {{this}} ({{@key}})
- {{/each}}
- |
-
-
- Type |
- {{aPlace.class}}:{{aPlace.type}} |
-
-
- Last Updated |
- {{aPlace.indexed_date}} |
-
-
- Admin Level |
- {{aPlace.admin_level}} |
-
-
- Rank |
- {{aPlace.rank_search_label}} |
-
- {{#if aPlace.calculated_importance}}
-
- Importance |
-
- {{aPlace.calculated_importance}}
- {{#unless aPlace.importance}} (estimated){{/unless}}
- |
-
- {{/if}}
-
- Coverage |
- {{coverageType aPlace}} |
-
-
- Centre Point |
- {{aPlace.lat}},{{aPlace.lon}} |
-
-
- OSM |
- {{osmLink aPlace}}
- |
- {{#if aPlace.wikipedia}}
-
- Wikipedia Calculated |
- {{wikipediaLink aPlace}} |
-
- {{/if}}
-
- Computed Postcode |
- {{aPlace.postcode}} |
-
-
- Address Tags |
-
- {{#each aPlace.aAddressTags}}
- {{this}} ({{@key}})
- {{/each}}
- |
-
-
- Extra Tags |
-
- {{#each aPlace.aExtraTags}}
- {{this}} ({{@key}})
- {{/each}}
- |
-
-
-
-
+
-
-
-
Address
-
-
-
- Local name |
- Type |
- OSM |
- Address rank |
- Admin level |
- Distance |
- |
-
-
-
- {{#if aPlace.address_lines}}
- {{#each aPlace.address_lines}}
- {{> partial_details_one_row}}
- {{/each}}
- {{/if}}
+
+
+
+
Address
+
+
+
+ Local name |
+ Type |
+ OSM |
+ Address rank |
+ Admin level |
+ Distance |
+ |
+
+
+
+ {{#if aPlace.address}}
+ {{#each aPlace.address}}
+ {{> partial_details_one_row bDistanceInMeters=false bAddressLineUsed=this.isaddress}}
+ {{/each}}
+ {{/if}}
- {{#if aPlace.linked_lines}}
- {{> partial_h2 'Linked Places'}}
- {{#each aPlace.linked_lines}}
- {{> partial_details_one_row}}
- {{/each}}
- {{/if}}
+ {{#if aPlace.linked_places}}
+ {{> partial_h2 'Linked Places'}}
+ {{#each aPlace.linked_places}}
+ {{> partial_details_one_row bDistanceInMeters=true bAddressLineUsed=true}}
+ {{/each}}
+ {{/if}}
- {{#if aPlace.place_search_name_keywords}}
- {{> partial_h2 'Name Keywords'}}
- {{#each aPlace.place_search_name_keywords}}
- {{> partial_details_keyword_one_row}}
- {{/each}}
- {{/if}}
+ {{#if aPlace.keywords}}
+ {{> partial_h2 'Name Keywords'}}
+ {{#each aPlace.keywords.name}}
+ {{> partial_details_keyword_one_row}}
+ {{/each}}
- {{#if aPlace.place_search_address_keywords}}
- {{> partial_h2 'Address Keywords'}}
- {{#each aPlace.place_search_address_keywords}}
- {{> partial_details_keyword_one_row}}
- {{/each}}
- {{/if}}
+ {{> partial_h2 'Address Keywords'}}
+ {{#each aPlace.keywords.address}}
+ {{> partial_details_keyword_one_row}}
+ {{/each}}
+ {{/if}}
- {{#if aPlace.parentof_lines}}
- {{> partial_h2 'Parent Of'}}
+ {{> partial_h2 'Parent Of'}}
+ {{#if aPlace.hierarchy}}
- {{#each aPlace.parentof_lines as |lines type|}}
- {{> partial_h3 type}}
- {{#each lines}}
- {{> partial_details_one_row}}
- {{/each}}
- {{/each}}
- {{/if}}
- {{tooManyParentLinesWarning aPlace}}
-
-
-
+ {{#each aPlace.hierarchy as |lines type|}}
+ {{> partial_h3 type}}
+ {{#each lines}}
+ {{> partial_details_one_row bDistanceInMeters=true bAddressLineUsed=true}}
+ {{/each}}
+ {{/each}}
+ {{else}}
+
+
+ display child places
+ |
+
+ {{/if}}
+ {{tooManyHierarchyLinesWarning aPlace}}
+
+
+