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.

110 lines
4.2KB

  1. {% extends 'base.html' %}
  2. {% block content %}
  3. <div class="cell-margin grid mt-16 lg:grid-cols-2">
  4. <div class="left ">
  5. <div class="mb-4 capitalize">{{ resource['type'] }}</div>
  6. <div class="lg:border-r-2 lg:border-black lg:pr-8 resource">
  7. <h2 class="block-margin huge-title {{ resource['type'] }}">
  8. {% block title %}
  9. {% autoescape false %}
  10. {{ resource['name'] | replace(" ","<br>") }}
  11. {% endautoescape %}
  12. {% endblock %}
  13. </h2>
  14. {% if current_user.is_authenticated %}
  15. {% if resource['type'] == 'tool' %}
  16. <div class="row text-center py-3">
  17. <a href="{{ url_for('tool.edit_tool', tool_id=resource['id']) }}">
  18. <span class="">Edit</span>
  19. </a>
  20. </div>
  21. {% elif resource['type'] == 'practice' %}
  22. <div class="row text-center py-3">
  23. <a href="{{ url_for('practice.edit_practice', practice_id=resource['id']) }}">
  24. <span class="">Edit</span>
  25. </a>
  26. </div>
  27. {% endif %}
  28. {% endif %}
  29. <div class="facts">
  30. {% if resource.type == 'tool' %}
  31. {% if resource['description'] %}
  32. <div class="">
  33. <h3>Description</h3>
  34. {{ resource['description']|safe }}
  35. </div>
  36. {% endif %}
  37. <!-- fields for tools -->
  38. {% if resource['developer'] %}
  39. <div class="">
  40. <h3>Developer</h3>
  41. {% if resource['developerUrl'] %}
  42. <a href="{{ resource['developerUrl'] }}">{{ resource['developer'] }}</a>
  43. {% else %}
  44. {{ resource['developer'] }}
  45. {% endif %}
  46. </div>
  47. {% endif %}
  48. {% if resource['license'] %}
  49. <div class="">
  50. <h3>Software license</h3>
  51. {{ resource['license'] }}
  52. </div>
  53. {% endif %}
  54. {% if resource['scriptingLanguage'] %}
  55. <div class="">
  56. <h3>Software language(s)</h3>
  57. {{ resource['scriptingLanguage'] }}
  58. </div>
  59. {% endif %}
  60. {% if resource['projectUrl'] %}
  61. <div class="">
  62. <h3>Project page</h3>
  63. <a href="{{ resource['projectUrl'] }}">{{ resource['projectUrl'] }}</a>
  64. </div>
  65. {% endif %}
  66. {% if resource['repositoryUrl'] %}
  67. <div class="">
  68. <h3>Code repository</h3>
  69. <a href="{{ resource['repositoryUrl'] }}">{{ resource['repositoryUrl'] }}</a>
  70. </div>
  71. {% endif %}
  72. {% if resource['ingestFormats'] %}
  73. <div class="">
  74. <h3>Import / ingest formats</h3>
  75. {{ resource['ingestFormats'] }}
  76. </div>
  77. {% endif %}
  78. {% if resource['outputFormats'] %}
  79. <div class="">
  80. <h3>Output formats</h3>
  81. {{ resource['outputFormats'] }}
  82. </div>
  83. {% endif %}
  84. {% if resource['status'] %}
  85. <div class="">
  86. <h3>Platform status</h3>
  87. {{ resource['status'] }}
  88. </div>
  89. {% endif %}
  90. {% elif resource.type == 'practice' %}
  91. {{ practice_markdown | safe }}
  92. {% endif %}
  93. </div>
  94. </div>
  95. </div>
  96. <div class="right p-4 pr-8 lg:p-0 ">
  97. <div class="grid lg:grid-cols-2">
  98. {{ relationships_links(resource) }}
  99. </div>
  100. </div>
  101. </div>
  102. {% endblock %}