2017-06-06 23:35:29 +08:00
|
|
|
<div class="repository-table">
|
2017-07-17 21:05:28 +08:00
|
|
|
<table id="repository-table-<%= repository.id %>" class="table"
|
2017-06-06 23:35:29 +08:00
|
|
|
data-current-uri="<%= request.original_url %>"
|
|
|
|
data-repository-id="<%= repository.id %>"
|
|
|
|
data-source="<%= repository_index_link %>"
|
2018-04-04 17:55:11 +08:00
|
|
|
data-num-columns="<%= 6 + repository.repository_columns.count %>"
|
2017-06-06 23:35:29 +08:00
|
|
|
data-create-record="<%= repository_repository_rows_path(repository) %>"
|
|
|
|
data-delete-record="<%= repository_delete_records_path(repository) %>"
|
2018-04-11 23:17:19 +08:00
|
|
|
data-copy-records="<%= repository_copy_records_path(repository) %>"
|
2019-07-26 00:00:24 +08:00
|
|
|
data-direct-upload-url="<%= rails_direct_uploads_url %>"
|
2020-01-14 18:13:19 +08:00
|
|
|
data-max-dropdown-length="<%= Constants::MODAL_TEXT_MAX_LENGTH %>"
|
2018-06-29 16:28:10 +08:00
|
|
|
data-repository-columns-ids="<%= repository.available_columns_ids %>"
|
2017-06-06 23:35:29 +08:00
|
|
|
data-save-text="<%= I18n.t('general.save') %>"
|
|
|
|
data-edit-text="<%= I18n.t('general.edit') %>"
|
|
|
|
data-cancel-text="<%= I18n.t('general.cancel') %>"
|
|
|
|
data-columns-visibility-text="<%= I18n.t('repositories.columns_visibility') %>"
|
2018-06-12 21:28:03 +08:00
|
|
|
data-columns-delete-text="<%= I18n.t('repositories.columns_delete') %>"
|
|
|
|
data-available-columns="<%= repository_available_columns_path(repository) %>"
|
2019-07-26 19:00:25 +08:00
|
|
|
data-columns-changed="<%= I18n.t('repositories.columns_changed') %>"
|
2019-11-20 22:05:44 +08:00
|
|
|
data-default-order="<%= default_table_order_as_js_array %>"
|
2019-07-26 19:00:25 +08:00
|
|
|
data-default-table-columns="<%= default_table_columns %>"
|
2019-11-18 21:04:53 +08:00
|
|
|
data-editable="<%= can_manage_repository_rows?(repository) %>">
|
2017-06-06 23:35:29 +08:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2020-01-14 18:39:15 +08:00
|
|
|
<th id="checkbox">
|
|
|
|
<input name="select_all" value="1" type="checkbox" class="sci-checkbox">
|
|
|
|
<span class="sci-checkbox-label"></span>
|
|
|
|
</th>
|
2017-06-16 17:47:41 +08:00
|
|
|
<th id="assigned"><%= t("repositories.table.assigned") %></th>
|
2018-04-04 17:55:11 +08:00
|
|
|
<th id="row-id"><%= t("repositories.table.id") %></th>
|
2017-06-06 23:35:29 +08:00
|
|
|
<th id="row-name"><%= t("repositories.table.row_name") %></th>
|
|
|
|
<th id="added-on"><%= t("repositories.table.added_on") %></th>
|
|
|
|
<th id="added-by"><%= t("repositories.table.added_by") %></th>
|
2017-07-10 21:32:18 +08:00
|
|
|
<% repository.repository_columns.order(:id).each do |column| %>
|
2019-12-18 18:55:12 +08:00
|
|
|
<th
|
|
|
|
class="repository-column"
|
|
|
|
id="<%= column.id %>"
|
2019-12-10 22:48:53 +08:00
|
|
|
data-type="<%= column.data_type %>"
|
2020-01-14 23:46:48 +08:00
|
|
|
data-edit-column-url="<%= edit_repository_repository_column_path(repository, column) %>"
|
|
|
|
data-destroy-column-url="<%= repository_columns_destroy_html_path(repository, column) %>"
|
2020-01-25 19:36:36 +08:00
|
|
|
data-editable-row="<%= can_manage_repository_column?(column) %>"
|
2019-12-18 18:55:12 +08:00
|
|
|
<% column.metadata.each do |k, v| %>
|
|
|
|
<%= "data-metadata-#{k}=#{v}" %>
|
|
|
|
<% end %>
|
2019-12-23 21:34:11 +08:00
|
|
|
<%= "data-items-url=#{items_repository_repository_columns_checklist_column_path(repository, column)}" if column.repository_checklist_value? %>
|
|
|
|
<%= "data-items-url=#{items_repository_repository_columns_list_column_path(repository, column)}" if column.repository_list_value? %>
|
|
|
|
<%= "data-items-url=#{items_repository_repository_columns_status_column_path(repository, column)}" if column.repository_status_value? %>
|
2019-12-10 22:48:53 +08:00
|
|
|
>
|
2017-06-06 23:35:29 +08:00
|
|
|
<%= display_tooltip(column.name) %>
|
|
|
|
</th>
|
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody></tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|