Main categories of OpenStreetBrowser with support for whitewater
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.

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