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.

218 lines
6.7 KiB

  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 attribute(tags, 'name:etymology') %}
  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'>{{ enumerate(attribute(tags, "name:etymology")) }}</span>
  40. </li>
  41. {% endif %}
  42. {% if tags.website %}
  43. <li class='hasSymbol'>
  44. <i class="fa fa-globe" aria-hidden="true"></i>
  45. <span class='key'>{{ keyTrans('website') }}:</span>
  46. <span class='value'>
  47. {% for i, v in tags.website|split(';') -%}
  48. {%- if i > 0 %}, {% endif %}
  49. <a target='_blank' href='{{ v|websiteUrl }}'>{{ v }}</a>
  50. {%- endfor %}
  51. </span>
  52. </li>
  53. {% endif %}
  54. {% if attribute(tags, 'contact:website') %}
  55. <li class='hasSymbol'>
  56. <i class="fa fa-globe" aria-hidden="true"></i>
  57. <span class='key'>{{ keyTrans('website') }}:</span>
  58. <span class='value'>
  59. {% for i, v in attribute(tags, 'contact:website')|split(';') -%}
  60. {%- if i > 0 %}, {% endif %}
  61. <a target='_blank' href='{{ v|websiteUrl }}'>{{ v }}</a>
  62. {%- endfor %}
  63. </span>
  64. </li>
  65. {% endif %}
  66. {% if tags.phone %}
  67. <li class='hasSymbol'>
  68. <i class="fa fa-phone" aria-hidden="true"></i>
  69. <span class='key'>{{ keyTrans('phone') }}:</span>
  70. <span class='value'>
  71. {% for i, v in tags.phone|split(';') -%}
  72. {%- if i > 0 %}, {% endif %}
  73. <a target='_blank' href='tel:{{ v }}'>{{ v }}</a>
  74. {%- endfor %}
  75. </span>
  76. </li>
  77. {% endif %}
  78. {% if attribute(tags, 'contact:phone') %}
  79. <li class='hasSymbol'>
  80. <i class="fa fa-phone" aria-hidden="true"></i>
  81. <span class='key'>{{ keyTrans('phone') }}:</span>
  82. <span class='value'>
  83. {% for i, v in attribute(tags, 'contact:phone')|split(';') -%}
  84. {%- if i > 0 %}, {% endif %}
  85. <a target='_blank' href='tel:{{ v }}'>{{ v }}</a>
  86. {%- endfor %}
  87. </span>
  88. </li>
  89. {% endif %}
  90. {% if attribute(tags, 'contact:email') or tags.email %}
  91. <li class='hasSymbol'>
  92. <i class="fa fa-user-circle" aria-hidden="true"></i>
  93. <span class='key'>{{ keyTrans('contact') }}:</span>
  94. <span class='value'>
  95. {% if attribute(tags, 'contact:email') %}
  96. {% for i, v in attribute(tags, 'contact:email')|split(';') -%}
  97. {%- if i > 0 %}, {% endif %}
  98. <a target='_blank' href='mailto:{{ v }}'>
  99. <i class="fa fa-envelope" aria-hidden="true"></i>
  100. </a>
  101. {%- endfor %}
  102. {% endif %}
  103. {% if attribute(tags, 'email') %}
  104. {% for i, v in tags.email|split(';') -%}
  105. {%- if i > 0 %}, {% endif %}
  106. <a target='_blank' href='mailto:{{ v }}'>
  107. <i class="fa fa-envelope" aria-hidden="true"></i>
  108. </a>
  109. {%- endfor %}
  110. {% endif %}
  111. </span>
  112. </li>
  113. {% endif %}
  114. {% if tags.opening_hours %}
  115. <li class='hasSymbol'>
  116. <i class="fa fa-clock-o" aria-hidden="true"></i>
  117. <span class='key'>{{ keyTrans('opening_hours') }}:</span>
  118. <span class='value'>
  119. {{ tags.opening_hours }}
  120. </span>
  121. </li>
  122. {% endif %}
  123. {% set payment = tagsPrefix(tags, 'payment:') %}
  124. {% if payment %}
  125. <li class='hasSymbol'>
  126. <i class="fa fa-money" aria-hidden="true"></i>
  127. <span class='key'>{{ keyTrans('payment') }}:</span>
  128. <span class='value'>
  129. {% set i = 0 %}
  130. {% for k, tag in payment %}
  131. {%- if i > 0 %},{% endif %}
  132. <span title="{{ tagTrans(k, tags[tag]) }}">{% if tags[tag] == 'no' %}<s>{{ keyTrans(tag, { default: k }) }}</s>{% else %}{{ keyTrans(tag, { default: k }) }}{% endif -%}</span>
  133. {% set i = i + 1 -%}
  134. {% endfor %}
  135. </span>
  136. </li>
  137. {% endif %}
  138. {% if attribute(tags, 'wheelchair') %}
  139. <li class='hasSymbol'>
  140. <i class="fa fa-info-circle" aria-hidden="true"></i>
  141. <span class='key'>{{ trans('facilities') }}:</span>
  142. <span class='value'>
  143. {% if attribute(tags, 'wheelchair') %}
  144. <i class="fa fa-wheelchair-alt {{ tags.wheelchair }}" aria-hidden="true" title='{{ keyTrans('wheelchair') }}: {{ tagTrans('wheelchair', tags.wheelchair) }}'></i>
  145. {% if attribute(tags, 'toilets:wheelchair') %}
  146. (<span class='{{ attribute(tags, 'toilets:wheelchair') }}' title='{{ keyTrans('toilets:wheelchair') }}: {{ tagTrans('toilets:wheelchair', attribute(tags, 'toilets:wheelchair')) }}'>&#128701;</span>)
  147. {% endif %}
  148. {% endif %}
  149. </span>
  150. </li>
  151. {% endif %}
  152. {% set wikipedia = null %}
  153. {% if attribute(tags, 'wikipedia') %}
  154. {% set wikipedia = tags.wikipedia|matches("^([^:]+):(.*)$") %}
  155. {% endif %}
  156. {% if not wikipedia %}
  157. {% for k, v in tags %}
  158. {% set m = k|matches("^wikipedia:(.*)$") %}
  159. {% if m %}
  160. {% set wikipedia = [ 0, m[1], v ] %}
  161. {% endif %}
  162. {% endfor %}
  163. {% endif %}
  164. {% if wikipedia %}
  165. <li class='hasSymbol'>
  166. <i class="fa fa-wikipedia-w" aria-hidden="true"></i>
  167. <span class='key'>{{ keyTrans('wikipedia') }}:</span>
  168. <span class='value'><a target='_blank' href="https://{{ wikipedia[1] }}.wikipedia.org/wiki/{{ wikipedia[2]|replace({ ' ': '_' }) }}">{{ wikipedia[2] }}</a></span>
  169. {% endif %}
  170. {% if tags.year_of_construction or tags.start_date or tags.opening_date or tags.end_date %}
  171. <li class='hasSymbol'>
  172. <i class="fa fa-clock-o" aria-hidden="true"></i>
  173. {% if tags.year_of_construction %}
  174. <span class='key'>{{ keyTrans('year_of_construction') }}:</span>
  175. <span class='value'>{{ tags.year_of_construction|osmFormatDate }}</span>
  176. <br/>
  177. {% endif %}
  178. {% if tags.start_date %}
  179. <span class='key'>{{ keyTrans('start_date') }}:</span>
  180. <span class='value'>{{ tags.start_date|osmFormatDate }}</span>
  181. <br/>
  182. {% endif %}
  183. {% if tags.opening_date %}
  184. <span class='key'>{{ keyTrans('opening_date') }}:</span>
  185. <span class='value'>{{ tags.opening_date|osmFormatDate }}</span>
  186. {% endif %}
  187. {% if tags.end_date %}
  188. <span class='key'>{{ keyTrans('end_date') }}:</span>
  189. <span class='value'>{{ tags.end_date|osmFormatDate }}</span>
  190. {% endif %}
  191. </li>
  192. {% endif %}
  193. </ul>