Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

resource.html 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. {% extends 'base.html' %}
  2. {% block content %}
  3. <div class="cell-margin">
  4. <div class="cell-margin">
  5. <h2 class="block-margin">
  6. {% block title %}
  7. {% autoescape false %}
  8. {{ resource['name'] | replace(" ","<br>") }}
  9. {% endautoescape %}
  10. {% endblock %}
  11. </h2>
  12. {% if current_user.is_authenticated %}
  13. {% if resource['type'] == 'tool' %}
  14. <div class="row text-center py-3">
  15. <a href="{{ url_for('tool.edit_tool', tool_id=resource['id']) }}">
  16. <span class="">Edit</span>
  17. </a>
  18. </div>
  19. {% elif resource['type'] == 'practice' %}
  20. <div class="row text-center py-3">
  21. <a href="{{ url_for('practice.edit_practice', practice_id=resource['id']) }}">
  22. <span class="">Edit</span>
  23. </a>
  24. </div>
  25. {% endif %}
  26. {% endif %}
  27. <table class="table table-hover">
  28. <tbody>
  29. <tr>
  30. <th>
  31. Created:
  32. </th>
  33. <td>
  34. {{ resource['created'].strftime("%Y-%m-%d %H:%M") }} UTC
  35. </td>
  36. </tr>
  37. {% if resource['description'] %}
  38. <tr>
  39. <th>
  40. Description:
  41. </th>
  42. <td>
  43. {{ resource['description'] }}
  44. </td>
  45. </tr>
  46. {% endif %}
  47. <!-- fields for tools -->
  48. {% if resource['developer'] %}
  49. <tr>
  50. <th>
  51. Developer
  52. </th>
  53. <td>
  54. {% if resource['developerUrl'] %}
  55. <a href="{{ resource['developerUrl'] }}">{{ resource['developer'] }}</a>
  56. {% else %}
  57. {{ resource['developer'] }}
  58. {% endif %}
  59. </td>
  60. </tr>
  61. {% endif %}
  62. {% if resource['license'] %}
  63. <tr>
  64. <th>
  65. Software license:
  66. </th>
  67. <td>
  68. {{ resource['license'] }}
  69. </td>
  70. </tr>
  71. {% endif %}
  72. {% if resource['scriptingLanguage'] %}
  73. <tr>
  74. <th>
  75. Software language(s):
  76. </th>
  77. <td>
  78. {{ resource['scriptingLanguage'] }}
  79. </td>
  80. </tr>
  81. {% endif %}
  82. {% if resource['projectUrl'] %}
  83. <tr>
  84. <th>
  85. Project page:
  86. </th>
  87. <td>
  88. <a href="{{ resource['projectUrl'] }}">{{ resource['projectUrl'] }}</a>
  89. </td>
  90. </tr>
  91. {% endif %}
  92. {% if resource['repositoryUrl'] %}
  93. <tr>
  94. <th>
  95. Code repository:
  96. </th>
  97. <td>
  98. <a href="{{ resource['repositoryUrl'] }}">{{ resource['repositoryUrl'] }}</a>
  99. </td>
  100. </tr>
  101. {% endif %}
  102. {% if resource['ingestFormats'] %}
  103. <tr>
  104. <th>
  105. Import / ingest formats:
  106. </th>
  107. <td>
  108. {{ resource['ingestFormats'] }}
  109. </td>
  110. </tr>
  111. {% endif %}
  112. {% if resource['outputFormats'] %}
  113. <tr>
  114. <th>
  115. Output formats:
  116. </th>
  117. <td>
  118. {{ resource['outputFormats'] }}
  119. </td>
  120. </tr>
  121. {% endif %}
  122. {% if resource['status'] %}
  123. <tr>
  124. <th>
  125. Platform status:
  126. </th>
  127. <td>
  128. {{ resource['status'] }}
  129. </td>
  130. </tr>
  131. {% endif %}
  132. <!-- fields for practices -->
  133. {% if resource['longDescription'] %}
  134. <tr>
  135. <th>
  136. Full description
  137. </th>
  138. <td>
  139. {{ resource['longDescription']|safe }}
  140. </td>
  141. </tr>
  142. {% endif %}
  143. {% if resource['experimental'] %}
  144. <tr>
  145. <th>
  146. Experimental uses
  147. </th>
  148. <td>
  149. {{ resource['experimental']|safe }}
  150. </td>
  151. </tr>
  152. {% endif %}
  153. {% if resource['considerations'] %}
  154. <tr>
  155. <th>
  156. Considerations
  157. </th>
  158. <td>
  159. <p style="white-space: pre-line">{{ resource['considerations']|safe }}</p>
  160. </td>
  161. </tr>
  162. {% endif %}
  163. {% if resource['references'] %}
  164. <tr>
  165. <th>
  166. References:
  167. </th>
  168. <td>
  169. <p style="white-space: pre-line">{{ resource['references']|safe }}</p>
  170. </td>
  171. </tr>
  172. {% endif %}
  173. </tbody>
  174. </table>
  175. </div>
  176. </div>
  177. {% if relationships %}
  178. <div class="grid lg:grid-cols-3">
  179. {% for relationship in relationships %}
  180. {{ resource_small(relationship) }}
  181. {% endfor %}
  182. </div>
  183. {% endif %}
  184. {% endblock %}