Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

pirms 3 gadiem
pirms 3 gadiem
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. {% extends 'base.html' %}
  2. {% block content %}
  3. <div class="row">
  4. <div class="col">
  5. <h1 class="text-center">{% block title %} {{ resource['name'] }} {% endblock %}</h1>
  6. </div>
  7. </div>
  8. {% if current_user.is_authenticated %}
  9. {% if resource['type'] == 'tool' %}
  10. <div class="row text-center py-3">
  11. <a href="{{ url_for('tool.edit_tool', tool_id=resource['id']) }}">
  12. <span class="badge bg-dark">Edit</span>
  13. </a>
  14. </div>
  15. {% elif resource['type'] == 'practice' %}
  16. <div class="row text-center py-3">
  17. <a href="{{ url_for('practice.edit_practice', practice_id=resource['id']) }}">
  18. <span class="badge bg-dark">Edit</span>
  19. </a>
  20. </div>
  21. {% elif resource['type'] == 'book' %}
  22. <div class="row text-center py-3">
  23. <a href="{{ url_for('book.edit_book', book_id=resource['id']) }}">
  24. <span class="badge bg-dark">Edit</span>
  25. </a>
  26. </div>
  27. {% endif %}
  28. {% endif %}
  29. <div class="row">
  30. <div class="col">
  31. <table class="table table-hover">
  32. <tbody>
  33. <tr>
  34. <th>
  35. Created:
  36. </th>
  37. <td>
  38. {{ resource['created'].strftime("%Y-%m-%d %H:%M") }} UTC
  39. </td>
  40. </tr>
  41. {% if resource['description'] %}
  42. <tr>
  43. <th>
  44. Description:
  45. </th>
  46. <td>
  47. {{ resource['description'] }}
  48. </td>
  49. </tr>
  50. {% endif %}
  51. <!-- fields for tools -->
  52. {% if resource['developer'] %}
  53. <tr>
  54. <th>
  55. Developer
  56. </th>
  57. <td>
  58. {% if resource['developerUrl'] %}
  59. <a href="{{ resource['developerUrl'] }}">{{ resource['developer'] }}</a>
  60. {% else %}
  61. {{ resource['developer'] }}
  62. {% endif %}
  63. </td>
  64. </tr>
  65. {% endif %}
  66. {% if resource['license'] %}
  67. <tr>
  68. <th>
  69. Software license:
  70. </th>
  71. <td>
  72. {{ resource['license'] }}
  73. </td>
  74. </tr>
  75. {% endif %}
  76. {% if resource['scriptingLanguage'] %}
  77. <tr>
  78. <th>
  79. Software language(s):
  80. </th>
  81. <td>
  82. {{ resource['scriptingLanguage'] }}
  83. </td>
  84. </tr>
  85. {% endif %}
  86. {% if resource['projectUrl'] %}
  87. <tr>
  88. <th>
  89. Project page:
  90. </th>
  91. <td>
  92. <a href="{{ resource['projectUrl'] }}">{{ resource['projectUrl'] }}</a>
  93. </td>
  94. </tr>
  95. {% endif %}
  96. {% if resource['repositoryUrl'] %}
  97. <tr>
  98. <th>
  99. Code repository:
  100. </th>
  101. <td>
  102. <a href="{{ resource['repositoryUrl'] }}">{{ resource['repositoryUrl'] }}</a>
  103. </td>
  104. </tr>
  105. {% endif %}
  106. {% if resource['expertiseToUse'] %}
  107. <tr>
  108. <th>
  109. Expertise required to use:
  110. </th>
  111. <td>
  112. {{ resource['expertiseToUse'] }}
  113. </td>
  114. </tr>
  115. {% endif %}
  116. {% if resource['expertiseToHost'] %}
  117. <tr>
  118. <th>
  119. Expertise required to self-host:
  120. </th>
  121. <td>
  122. {{ resource['expertiseToHost'] }}
  123. </td>
  124. </tr>
  125. {% endif %}
  126. {% if resource['dependencies'] %}
  127. <tr>
  128. <th>
  129. Technical dependencies:
  130. </th>
  131. <td>
  132. {{ resource['dependencies'] }}
  133. </td>
  134. </tr>
  135. {% endif %}
  136. {% if resource['ingestFormats'] %}
  137. <tr>
  138. <th>
  139. Import / ingest formats:
  140. </th>
  141. <td>
  142. {{ resource['ingestFormats'] }}
  143. </td>
  144. </tr>
  145. {% endif %}
  146. {% if resource['outputFormats'] %}
  147. <tr>
  148. <th>
  149. Output formats:
  150. </th>
  151. <td>
  152. {{ resource['outputFormats'] }}
  153. </td>
  154. </tr>
  155. {% endif %}
  156. {% if resource['status'] %}
  157. <tr>
  158. <th>
  159. Platform status:
  160. </th>
  161. <td>
  162. {{ resource['status'] }}
  163. </td>
  164. </tr>
  165. {% endif %}
  166. <!-- fields for practices -->
  167. {% if resource['experimental'] %}
  168. <tr>
  169. <th>
  170. How is this / Can this be an experimental practice?
  171. </th>
  172. <td>
  173. {{ resource['experimental'] }}
  174. </td>
  175. </tr>
  176. {% endif %}
  177. {% if resource['lessonsLearned'] %}
  178. <tr>
  179. <th>
  180. How has it been applied experimentally (lessons learned for authors and publishers)?
  181. </th>
  182. <td>
  183. <p style="white-space: pre-line">{{ resource['lessonsLearned'] }}</p>
  184. </td>
  185. </tr>
  186. {% endif %}
  187. {% if resource['references'] %}
  188. <tr>
  189. <th>
  190. References:
  191. </th>
  192. <td>
  193. <p style="white-space: pre-line">{{ resource['references'] }}</p>
  194. </td>
  195. </tr>
  196. {% endif %}
  197. </tbody>
  198. </table>
  199. </div>
  200. </div>
  201. {% if relationships %}
  202. <div class="row">
  203. <div class="col">
  204. <h2 class="text-center">Linked resources:</h2>
  205. </div>
  206. </div>
  207. <div class="row">
  208. {% for relationship in relationships %}
  209. <div class="col-md-4 col-sm-6 py-3">
  210. {% if relationship['type'] == 'tool' %}
  211. <div class="card text-dark bg-tool mb-3">
  212. <div class="card-body">
  213. <a href="{{ url_for('tool.show_tool', tool_id=relationship['id']) }}">
  214. <h3 class="card-title text-center text-dark">{{ relationship['name'] }}</h3>
  215. </a>
  216. <p class="card-text">
  217. {{ relationship['description']|truncate(100) }}
  218. </p>
  219. </div>
  220. </div>
  221. {% elif relationship['type'] == 'practice' %}
  222. <div class="card text-dark bg-practice mb-3">
  223. <div class="card-body">
  224. <a href="{{ url_for('practice.show_practice', practice_id=relationship['id']) }}">
  225. <h3 class="card-title text-center text-dark">{{ relationship['name'] }}</h3>
  226. </a>
  227. <p class="card-text">
  228. {{ relationship['description']|truncate(100) }}
  229. </p>
  230. </div>
  231. </div>
  232. {% elif relationship['type'] == 'book' %}
  233. <div class="card text-dark bg-book mb-3">
  234. <div class="card-body">
  235. <a href="{{ url_for('book.show_book', book_id=relationship['id']) }}">
  236. <h3 class="card-title text-center text-dark">{{ relationship['name'] }}</h3>
  237. </a>
  238. <p class="card-text">
  239. {{ relationship['description']|truncate(100) }}
  240. </p>
  241. </div>
  242. </div>
  243. {% endif %}
  244. </div>
  245. {% endfor %}
  246. </div>
  247. {% endif %}
  248. {% endblock %}