您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

155 行
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. <!--<select class="form-select" aria-label="Linked practices" name="linked_practice_id" multiple="multiple" id="linked_practice_id">-->
  63. <select name="linked_resources" id="linked_resources" aria-label="Linked resources" class="selectpicker" data-live-search="true" multiple>
  64. <optgroup label="Practices">
  65. {% for practice_dropdown in practice_dropdown %}
  66. <option value="{{ practice_dropdown['id'] }}">{{ practice_dropdown['name'] }}</option>
  67. {% endfor %}
  68. </optgroup>
  69. </select>
  70. </div>
  71. </div>
  72. <div id="resource_type_practice" class="resource_type_input" style="display: none;">
  73. <div class="mb-3 mt-3">
  74. <label for="practice_name">Practice name</label>
  75. <input class="form-control" type="text" name="practice_name" placeholder="Practice name" autofocus="">
  76. </div>
  77. <div class="mb-3 mt-3">
  78. <label for="description">Practice description</label>
  79. <textarea class="form-control" rows="4" type="text" name="description" placeholder="Practice description" autofocus=""></textarea>
  80. </div>
  81. </div>
  82. <div id="resource_type_sensitivity" class="resource_type_input" style="display: none;">
  83. <div class="mb-3 mt-3">
  84. <label for="sensitivity_name">Sensitivity name</label>
  85. <input class="form-control" type="text" name="sensitivity_name" placeholder="Sensitivity name" autofocus="">
  86. </div>
  87. <div class="mb-3 mt-3">
  88. <label for="description">Sensitivity description</label>
  89. <textarea class="form-control" rows="4" type="text" name="description" placeholder="Sensitivity description" autofocus=""></textarea>
  90. </div>
  91. </div>
  92. <div id="resource_type_typology" class="resource_type_input" style="display: none;">
  93. <div class="mb-3 mt-3">
  94. <label for="typology_name">Typology name</label>
  95. <input class="form-control" type="text" name="typology_name" placeholder="Typology name" autofocus="">
  96. </div>
  97. <div class="mb-3 mt-3">
  98. <label for="description">Typology description</label>
  99. <textarea class="form-control" rows="4" type="text" name="description" placeholder="Typology description" autofocus=""></textarea>
  100. </div>
  101. </div>
  102. <div id="resource_type_workflow" class="resource_type_input" style="display: none;">
  103. </div>
  104. <div id="resource_type_publisher" class="resource_type_input" style="display: none;">
  105. <div class="mb-3 mt-3">
  106. <label for="publisher_name">Publisher name</label>
  107. <input class="form-control" type="text" name="publisher_name" placeholder="Publisher name" autofocus="">
  108. </div>
  109. <div class="mb-3 mt-3">
  110. <label for="description">Publisher description</label>
  111. <textarea class="form-control" rows="4" type="text" name="description" placeholder="Publisher description" autofocus=""></textarea>
  112. </div>
  113. <div class="mb-3 mt-3">
  114. <label for="publisherUrl">Publisher URL</label>
  115. <input class="form-control" type="text" name="publisherUrl" placeholder="Publisher URL" autofocus="">
  116. </div>
  117. </div>
  118. <div id="resource_type_book" class="resource_type_input" style="display: none;">
  119. <div class="mb-3 mt-3">
  120. <label for="book_name">Book name</label>
  121. <input class="form-control" type="text" name="book_name" placeholder="Book name" autofocus="">
  122. </div>
  123. <div class="mb-3 mt-3">
  124. <label for="description">Book description</label>
  125. <textarea class="form-control" rows="4" type="text" name="description" placeholder="Book description" autofocus=""></textarea>
  126. </div>
  127. </div>
  128. <div id="resource_type_reference" class="resource_type_input" style="display: none;">
  129. <div class="mb-3 mt-3">
  130. <label for="zoteroUrl">Zotero URL</label>
  131. <input class="form-control" type="text" name="zoteroUrl" placeholder="Zotero URL" autofocus="">
  132. </div>
  133. </div>
  134. <button type="submit" class="btn btn-primary mb-3">Submit</button>
  135. </form>
  136. {% endblock %}