You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.tmpl 5.6 kB

4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. {{template "base/head" .}}
  2. <div class="repository release dataset-list view">
  3. {{template "repo/header" .}}
  4. <form class="ui container" action="{{.Link}}" method="post">
  5. <input name="id" value="{{.dataset.ID}}" type="hidden" />
  6. <!--
  7. <span class="alert" style="font-size:20px;color:red">
  8. <strong>{{.i18n.Tr "dataset.alert"}}</strong>
  9. </span>
  10. -->
  11. <div id="datasetId" datasetId="{{.dataset.ID}}">
  12. {{.CsrfTokenHtml}}
  13. {{template "base/alert" .}}
  14. <div class="ui stackable grid {{if .Error}}hide{{end}}" id="dataset-content">
  15. <div class="row">
  16. <div class="column sixteen {{if .Permission.CanWrite $.UnitTypeDatasets}}twelve{{end}} wide">
  17. <h2>{{.dataset.Title}}</h2>
  18. </div>
  19. {{if .Permission.CanWrite $.UnitTypeDatasets}}
  20. <div class="column four wide right aligned">
  21. <a class="ui button primary" href="javascript:void(0)" id="dataset-edit">
  22. {{.i18n.Tr "dataset.edit"}}
  23. </a>
  24. </div>
  25. {{end}}
  26. </div>
  27. <div class="row">
  28. <div class="column sixteen wide">
  29. {{if .dataset.Description }}
  30. <span class="no-description text-italic">{{.dataset.Description}}</span>
  31. {{else}}
  32. <span class="no-description text-italic">{{.Repository.DescriptionHTML}}</span>
  33. {{end}}
  34. </div>
  35. </div>
  36. </div>
  37. <div class="ui grid form segment success {{if not .Error}}hide{{end}}" id="dataset-content-edit">
  38. <label class="d-block">{{.i18n.Tr "dataset.title"}}</label>
  39. <div class="sixteen wide column">
  40. <input name="title" placeholder='{{.i18n.Tr "dataset.title"}}' value="{{.dataset.Title}}" autofocus required maxlength="255">
  41. </div>
  42. <label class="d-block">{{.i18n.Tr "dataset.description"}}</label>
  43. <div class="sixteen wide column">
  44. <textarea name="description" rows="3">{{.dataset.Description}}</textarea>
  45. </div>
  46. <div class="sixteen wide column">
  47. <a class="ui button" id="cancel">{{.i18n.Tr "cancel"}}</a>
  48. <button class="ui primary button" id="submit">{{.i18n.Tr "dataset.update_dataset"}}</button>
  49. </div>
  50. </div>
  51. <div class="ui divider"></div>
  52. <div class="ui stackable grid">
  53. <div class="twelve wide column">
  54. <div class="ui sixteen wide column">
  55. <div class="ui two column stackable grid">
  56. <div class="column">
  57. <h2>{{.i18n.Tr "datasets"}}</h2>
  58. </div>
  59. <div class="column right aligned">
  60. <div class="ui right dropdown type jump item">
  61. <span class="text">
  62. {{.i18n.Tr "repo.issues.filter_sort"}}<i class="dropdown icon"></i>
  63. </span>
  64. <div class="menu">
  65. <a class="item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
  66. <a class="item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. <div class="dataset list">
  73. {{template "repo/datasets/dataset_list" .}}
  74. </div>
  75. <div class="dataset ui middle very relaxed page">
  76. <div class="column">
  77. {{if .Permission.CanWrite $.UnitTypeDatasets}}
  78. <div style='display:none;'
  79. id="minioUploader-params"
  80. data-uuid="{{.uuid}}"
  81. data-add-url="{{AppSubUrl}}/attachments/add"
  82. data-accepts="{{.AttachmentAllowedTypes}}"
  83. data-remove-url="{{AppSubUrl}}/attachments/delete"
  84. data-csrf="{{.CsrfToken}}"
  85. dataset-id={{.dataset.ID}}
  86. data-max-file="100"
  87. data-dataset-id="{{.dataset.ID}}"
  88. data-max-size="{{.AttachmentMaxSize}}"
  89. data-default-message="{{.i18n.Tr "dropzone.default_message"}}"
  90. data-invalid-input-type="{{.i18n.Tr "dropzone.invalid_input_type"}}"
  91. data-file-too-big="{{.i18n.Tr "dropzone.file_too_big"}}"
  92. data-remove-file="{{.i18n.Tr "dropzone.remove_file"}}"
  93. data-file-status='{{.i18n.Tr "dropzone.file_status"}}'
  94. data-file-init-status='{{.i18n.Tr "dropzone.file_init_status"}}'
  95. data-waitting-uploading='{{.i18n.Tr "dropzone.waitting_uploading"}}'
  96. data-md5-computing='{{.i18n.Tr "dropzone.md5_computing"}}'
  97. data-loading-file='{{.i18n.Tr "dropzone.loading_file"}}'
  98. data-upload-complete='{{.i18n.Tr "dropzone.upload_complete"}}'
  99. data-uploading='{{.i18n.Tr "dropzone.uploading"}}'
  100. data-failed='{{.i18n.Tr "dropzone.failed"}}'
  101. >
  102. </div>
  103. {{if eq .StoreType "minio"}}
  104. <div id="minioUploader"></div>
  105. {{else}}
  106. <div style="margin: 2em 0;"> {{.i18n.Tr "dropzone.enable_minio_support"}} </div>
  107. {{end}}
  108. {{end}}
  109. </div>
  110. </div>
  111. </div>
  112. <div class="four wide column">
  113. {{template "repo/datasets/right_side" .}}
  114. </div>
  115. </div>
  116. </form>
  117. </div>
  118. <div class="ui small basic delete modal" id="data-dataset-delete-modal">
  119. <div class="ui icon header">
  120. <i class="trash icon"></i>
  121. {{.i18n.Tr "dataset.attachment.delete"}}
  122. </div>
  123. <div class="content">
  124. <p>{{.i18n.Tr "dataset.attachment.delete_desc" | Str2html}}</p>
  125. </div>
  126. {{template "base/delete_modal_actions" .}}
  127. </div>
  128. {{template "base/footer" .}}