Main categories of OpenStreetBrowser
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

223 lines
6.9 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. <ul>
  2. {% set hasDescription = tagsPrefix(tags, 'description:') %}
  3. {% if tags.description or hasDescription %}
  4. <li class='hasSymbol'>
  5. <i class="fa fa-info" aria-hidden="true"></i>
  6. <span class='value'>{{ localizedTag(tags, 'description')|default(attribute(tags, 'description:' ~ hasDescription|keys[0]))|nl2br }}</span>
  7. </li>
  8. {% endif %}
  9. {% set address = tagsPrefix(tags, 'addr:') %}
  10. {% if address %}
  11. <li class='hasSymbol'>
  12. <i class="fa fa-map-marker" aria-hidden="true"></i>
  13. <span class='key'>{{ keyTrans('address') }}:</span>
  14. <span class='value'>
  15. {{ attribute(tags, 'addr:street') }}
  16. {{ attribute(tags, 'addr:housenumber') }},
  17. {{ attribute(tags, 'addr:postcode') }}
  18. {{ attribute(tags, 'addr:city') }}
  19. </span>
  20. </li>
  21. {% endif %}
  22. {% set address = tagsPrefix(tags, 'contact:') %}
  23. {% if address %}
  24. <li class='hasSymbol'>
  25. <i class="fa fa-map-marker" aria-hidden="true"></i>
  26. <span class='key'>{{ keyTrans('address') }}:</span>
  27. <span class='value'>
  28. {{ attribute(tags, 'contact:street') }}
  29. {{ attribute(tags, 'contact:housenumber') }},
  30. {{ attribute(tags, 'contact:postcode') }}
  31. {{ attribute(tags, 'contact:city') }}
  32. </span>
  33. </li>
  34. {% endif %}
  35. {% if layer_id|split('/')|last != 'etymology' and (attribute(tags, 'name:etymology') or attribute(tags, 'name:etymology:wikidata')) %}
  36. <li class='hasSymbol'>
  37. <i class="fa fa-book" aria-hidden="true"></i>
  38. <span class='key'>{{ keyTrans('name:etymology') }}:</span>
  39. <span class='value'>
  40. {% set etymWikidata = attribute(tags, 'name:etymology:wikidata') %}
  41. {% if etymWikidata %}
  42. {% set etymWikidata = etymWikidata|split(';') %}
  43. {% set etymName = attribute(tags, 'name:etymology')|split(';') %}
  44. {% set result = [] %}
  45. {% for i in 0..max(etymName|length - 1, etymWikidata|length - 1) %}
  46. {% set result = result|merge([ etymWikidata[i] ? '<a target="_blank" href="https://wikidata.org/wiki/' ~ etymWikidata[i]|url_encode ~ '">' ~ (etymName[i]|default(etymWikidata[i]))|e ~ '</a>' : etymName[i]|e ]) %}
  47. {% endfor %}
  48. {{ result|enumerate|raw }}
  49. {% else %}
  50. {{ attribute(tags, "name:etymology")|enumerate }}
  51. {% endif %}
  52. </span>
  53. </li>
  54. {% endif %}
  55. {% if tags.website %}
  56. <li class='hasSymbol'>
  57. <i class="fa fa-globe" aria-hidden="true"></i>
  58. <span class='key'>{{ keyTrans('website') }}:</span>
  59. <span class='value'>
  60. {% for i, v in tags.website|split(';') -%}
  61. {%- if i > 0 %}, {% endif %}
  62. <a target='_blank' href='{{ v|websiteUrl }}'>{{ v }}</a>
  63. {%- endfor %}
  64. </span>
  65. </li>
  66. {% endif %}
  67. {% if attribute(tags, 'contact:website') %}
  68. <li class='hasSymbol'>
  69. <i class="fa fa-globe" aria-hidden="true"></i>
  70. <span class='key'>{{ keyTrans('website') }}:</span>
  71. <span class='value'>
  72. {% for i, v in attribute(tags, 'contact:website')|split(';') -%}
  73. {%- if i > 0 %}, {% endif %}
  74. <a target='_blank' href='{{ v|websiteUrl }}'>{{ v }}</a>
  75. {%- endfor %}
  76. </span>
  77. </li>
  78. {% endif %}
  79. {% if tags.phone %}
  80. <li class='hasSymbol'>
  81. <i class="fa fa-phone" aria-hidden="true"></i>
  82. <span class='key'>{{ keyTrans('phone') }}:</span>
  83. <span class='value'>
  84. {% for i, v in tags.phone|split(';') -%}
  85. {%- if i > 0 %}, {% endif %}
  86. <a target='_blank' href='tel:{{ v }}'>{{ v }}</a>
  87. {%- endfor %}
  88. </span>
  89. </li>
  90. {% endif %}
  91. {% if attribute(tags, 'contact:phone') %}
  92. <li class='hasSymbol'>
  93. <i class="fa fa-phone" aria-hidden="true"></i>
  94. <span class='key'>{{ keyTrans('phone') }}:</span>
  95. <span class='value'>
  96. {% for i, v in attribute(tags, 'contact:phone')|split(';') -%}
  97. {%- if i > 0 %}, {% endif %}
  98. <a target='_blank' href='tel:{{ v }}'>{{ v }}</a>
  99. {%- endfor %}
  100. </span>
  101. </li>
  102. {% endif %}
  103. {% if attribute(tags, 'contact:email') %}
  104. <li class='hasSymbol'>
  105. <i class="fa fa-envelope" aria-hidden="true"></i>
  106. <span class='key'>{{ keyTrans('email') }}:</span>
  107. <span class='value'>
  108. {% for i, v in attribute(tags, 'contact:email')|split(';') -%}
  109. {%- if i > 0 %}, {% endif %}
  110. <a target='_blank' href='mailto:{{ v }}'>{{ v }}</a>
  111. {%- endfor %}
  112. </span>
  113. </li>
  114. {% endif %}
  115. {% if attribute(tags, 'email') %}
  116. <li class='hasSymbol'>
  117. <i class="fa fa-envelope" aria-hidden="true"></i>
  118. <span class='key'>{{ keyTrans('email') }}:</span>
  119. <span class='value'>
  120. {% for i, v in tags.email|split(';') -%}
  121. {%- if i > 0 %}, {% endif %}
  122. <a target='_blank' href='mailto:{{ v }}'>{{ v }}</a>
  123. {%- endfor %}
  124. </span>
  125. </li>
  126. {% endif %}
  127. {% if tags.opening_hours %}
  128. <li class='hasSymbol'>
  129. <i class="fa fa-clock-o" aria-hidden="true"></i>
  130. <span class='key'>{{ keyTrans('opening_hours') }}:</span>
  131. <span class='value'>
  132. {{ tags.opening_hours }}
  133. </span>
  134. </li>
  135. {% endif %}
  136. {% set payment = tagsPrefix(tags, 'payment:') %}
  137. {% if payment %}
  138. <li class='hasSymbol'>
  139. <i class="fa fa-money" aria-hidden="true"></i>
  140. <span class='key'>{{ keyTrans('payment') }}:</span>
  141. <span class='value'>
  142. {% set i = 0 %}
  143. {% for k, tag in payment %}
  144. {%- if i > 0 %},{% endif %}
  145. <span title="{{ tagTrans(k, tags[tag]) }}">{% if tags[tag] == 'no' %}<s>{{ keyTrans(tag, { default: k }) }}</s>{% else %}{{ keyTrans(tag, { default: k }) }}{% endif -%}</span>
  146. {% set i = i + 1 -%}
  147. {% endfor %}
  148. </span>
  149. </li>
  150. {% endif %}
  151. {% if attribute(tags, 'wheelchair') %}
  152. <li class='hasSymbol'>
  153. <i class="fa fa-info-circle" aria-hidden="true"></i>
  154. <span class='key'>{{ trans('facilities') }}:</span>
  155. <span class='value'>
  156. <ul>
  157. {% if attribute(tags, 'wheelchair') %}
  158. <li class='hasSymbol'>
  159. <i class="fa fa-wheelchair-alt {{ tags.wheelchair }}" aria-hidden="true"></i>
  160. <span class='key'>{{ keyTrans('wheelchair') }}:</span>
  161. <span class='value'>
  162. {{ tagTrans('wheelchair', tags.wheelchair) }}
  163. <ul>
  164. {% if attribute(tags, 'toilets:wheelchair') %}
  165. <li class='hasSymbol'>
  166. <span class='{{ attribute(tags, 'toilets:wheelchair') }} symbol'>&#128701;</span>
  167. <span class='key'>{{ keyTrans('toilets:wheelchair') }}:</span>
  168. <span class='value'>{{ tagTrans('toilets:wheelchair', attribute(tags, 'toilets:wheelchair')) }}</span>
  169. </li>
  170. {% endif %}
  171. </ul>
  172. </span>
  173. </li>
  174. {% endif %}
  175. </ul>
  176. </span>
  177. </li>
  178. {% endif %}
  179. {% if tags.year_of_construction or tags.start_date or tags.opening_date or tags.end_date %}
  180. <li class='hasSymbol'>
  181. <i class="fa fa-clock-o" aria-hidden="true"></i>
  182. {% if tags.year_of_construction %}
  183. <span class='key'>{{ keyTrans('year_of_construction') }}:</span>
  184. <span class='value'>{{ tags.year_of_construction|osmFormatDate }}</span>
  185. <br/>
  186. {% endif %}
  187. {% if tags.start_date %}
  188. <span class='key'>{{ keyTrans('start_date') }}:</span>
  189. <span class='value'>{{ tags.start_date|osmFormatDate }}</span>
  190. <br/>
  191. {% endif %}
  192. {% if tags.opening_date %}
  193. <span class='key'>{{ keyTrans('opening_date') }}:</span>
  194. <span class='value'>{{ tags.opening_date|osmFormatDate }}</span>
  195. {% endif %}
  196. {% if tags.end_date %}
  197. <span class='key'>{{ keyTrans('end_date') }}:</span>
  198. <span class='value'>{{ tags.end_date|osmFormatDate }}</span>
  199. {% endif %}
  200. </li>
  201. {% endif %}
  202. </ul>