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.

156 lines
8.4KB

  1. {% extends 'base.html' %}
  2. {% block content %}
  3. <h1>{% block title %} Add a New Resource{% endblock %}</h1>
  4. <form method="POST" action="/create" id="resource">
  5. <div class="mb-3 mt-3">
  6. <label for="type">Type</label>
  7. <select class="form-select" id="resource_type" name="resource_type" form="resource">
  8. <option selected="selected">Please choose</option>
  9. <option value="tool">Tool</option>
  10. <option value="practice">Practice</option>
  11. <option value="sensitivity">Sensitivity</option>
  12. <option value="typology">Typology</option>
  13. <option value="workflow">Workflow</option>
  14. <option value="publisher">Publisher</option>
  15. <option value="book">Book</option>
  16. <option value="reference">Reference</option>
  17. </select>
  18. </div>
  19. <div id="resource_type_tool" class="resource_type_input" style="display: none;">
  20. <div class="mb-3 mt-3">
  21. <label for="tool_name">Tool name</label>
  22. <input class="form-control" type="text" name="tool_name" placeholder="Tool name" autofocus="">
  23. </div>
  24. <div class="mb-3 mt-3">
  25. <label for="description">Short description</label>
  26. <textarea class="form-control" rows="4" type="text" name="description" placeholder="Tool description" autofocus=""></textarea>
  27. </div>
  28. <div class="mb-3 mt-3">
  29. <label for="projectUrl">Project URL</label>
  30. <input class="form-control" type="text" name="projectUrl" placeholder="Project URL" autofocus="">
  31. </div>
  32. <div class="mb-3 mt-3">
  33. <label for="repositoryUrl">Repository URL</label>
  34. <input class="form-control" type="text" name="repositoryUrl" placeholder="Repository URL" autofocus="">
  35. </div>
  36. <div class="mb-3 mt-3">
  37. <label for="expertiseToUse">Expertise required to use</label>
  38. <input class="form-control" type="text" name="expertiseToUse" placeholder="Expertise required to use" autofocus="">
  39. </div>
  40. <div class="mb-3 mt-3">
  41. <label for="expertiseToHost">Expertise required to self-host</label>
  42. <input class="form-control" type="text" name="expertiseToHost" placeholder="Expertise required to self-host" autofocus="">
  43. </div>
  44. <div class="mb-3 mt-3">
  45. <label for="dependencies">Technical dependencies</label>
  46. <input class="form-control" type="text" name="dependencies" placeholder="Technical dependencies" autofocus="">
  47. </div>
  48. <div class="mb-3 mt-3">
  49. <label for="ingestFormats">Import / ingest formats</label>
  50. <input class="form-control" type="text" name="ingestFormats" placeholder="Import / ingest formats" autofocus="">
  51. </div>
  52. <div class="mb-3 mt-3">
  53. <label for="outputFormats">Output formats</label>
  54. <input class="form-control" type="text" name="outputFormats" placeholder="Output formats" autofocus="">
  55. </div>
  56. <div class="mb-3 mt-3">
  57. <label for="status">Platform status</label>
  58. <input class="form-control" type="text" name="status" placeholder="Platform status" autofocus="">
  59. </div>
  60. <div class="mb-3 mt-3">
  61. <label for="linked_practice_id">Linked resources</label>
  62. </div>
  63. <div class="mb-3 mt-3">
  64. <select name="linked_resources" id="linked_resources" aria-label="Linked resources" class="selectpicker" data-live-search="true" multiple>
  65. {% for resource_dropdown in resource_dropdown %}
  66. {% if resource_dropdown['type'] != 'tool' %}
  67. <option value="{{ resource_dropdown['id'] }}">{{ resource_dropdown['name'] }}</option>
  68. {% endif %}
  69. {% endfor %}
  70. </select>
  71. </div>
  72. </div>
  73. <div id="resource_type_practice" class="resource_type_input" style="display: none;">
  74. <div class="mb-3 mt-3">
  75. <label for="practice_name">Practice name</label>
  76. <input class="form-control" type="text" name="practice_name" placeholder="Practice name" autofocus="">
  77. </div>
  78. <div class="mb-3 mt-3">
  79. <label for="description">Practice description</label>
  80. <textarea class="form-control" rows="4" type="text" name="description" placeholder="Practice description" autofocus=""></textarea>
  81. </div>
  82. </div>
  83. <div id="resource_type_sensitivity" class="resource_type_input" style="display: none;">
  84. <div class="mb-3 mt-3">
  85. <label for="sensitivity_name">Sensitivity name</label>
  86. <input class="form-control" type="text" name="sensitivity_name" placeholder="Sensitivity name" autofocus="">
  87. </div>
  88. <div class="mb-3 mt-3">
  89. <label for="description">Sensitivity description</label>
  90. <textarea class="form-control" rows="4" type="text" name="description" placeholder="Sensitivity description" autofocus=""></textarea>
  91. </div>
  92. </div>
  93. <div id="resource_type_typology" class="resource_type_input" style="display: none;">
  94. <div class="mb-3 mt-3">
  95. <label for="typology_name">Typology name</label>
  96. <input class="form-control" type="text" name="typology_name" placeholder="Typology name" autofocus="">
  97. </div>
  98. <div class="mb-3 mt-3">
  99. <label for="description">Typology description</label>
  100. <textarea class="form-control" rows="4" type="text" name="description" placeholder="Typology description" autofocus=""></textarea>
  101. </div>
  102. </div>
  103. <div id="resource_type_workflow" class="resource_type_input" style="display: none;">
  104. </div>
  105. <div id="resource_type_publisher" class="resource_type_input" style="display: none;">
  106. <div class="mb-3 mt-3">
  107. <label for="publisher_name">Publisher name</label>
  108. <input class="form-control" type="text" name="publisher_name" placeholder="Publisher name" autofocus="">
  109. </div>
  110. <div class="mb-3 mt-3">
  111. <label for="description">Publisher description</label>
  112. <textarea class="form-control" rows="4" type="text" name="description" placeholder="Publisher description" autofocus=""></textarea>
  113. </div>
  114. <div class="mb-3 mt-3">
  115. <label for="publisherUrl">Publisher URL</label>
  116. <input class="form-control" type="text" name="publisherUrl" placeholder="Publisher URL" autofocus="">
  117. </div>
  118. </div>
  119. <div id="resource_type_book" class="resource_type_input" style="display: none;">
  120. <div class="mb-3 mt-3">
  121. <label for="book_name">Book name</label>
  122. <input class="form-control" type="text" name="book_name" placeholder="Book name" autofocus="">
  123. </div>
  124. <div class="mb-3 mt-3">
  125. <label for="description">Book description</label>
  126. <textarea class="form-control" rows="4" type="text" name="description" placeholder="Book description" autofocus=""></textarea>
  127. </div>
  128. </div>
  129. <div id="resource_type_reference" class="resource_type_input" style="display: none;">
  130. <div class="mb-3 mt-3">
  131. <label for="zoteroUrl">Zotero URL</label>
  132. <input class="form-control" type="text" name="zoteroUrl" placeholder="Zotero URL" autofocus="">
  133. </div>
  134. </div>
  135. <button type="submit" class="btn btn-primary mb-3">Submit</button>
  136. </form>
  137. {% endblock %}