mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-31 04:32:06 +08:00
63 lines
3.7 KiB
Text
63 lines
3.7 KiB
Text
<div class="repository-table">
|
|
<table id="repository-table-<%= repository.id %>" class="table"
|
|
data-current-uri="<%= request.original_url %>"
|
|
data-repository-id="<%= repository.id %>"
|
|
data-source="<%= repository_index_link %>"
|
|
data-toolbar-url="<%= repository_table_toolbar_path(@repository) %>"
|
|
data-num-columns="<%= repository.default_columns_count + repository.repository_columns.count %>"
|
|
data-create-record="<%= repository_repository_rows_path(repository) %>"
|
|
data-delete-record="<%= repository_delete_records_path(repository) %>"
|
|
data-copy-records="<%= repository_copy_records_path(repository) %>"
|
|
data-archive-records="<%= repository_archive_records_path(repository) %>"
|
|
data-restore-records="<%= repository_restore_records_path(repository) %>"
|
|
data-direct-upload-url="<%= rails_direct_uploads_url %>"
|
|
data-max-dropdown-length="<%= Constants::MODAL_TEXT_MAX_LENGTH %>"
|
|
data-repository-columns-ids="<%= repository.repository_columns.pluck(:id) %>"
|
|
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') %>"
|
|
data-columns-delete-text="<%= I18n.t('repositories.columns_delete') %>"
|
|
data-available-columns="<%= repository_available_columns_path(repository) %>"
|
|
data-columns-changed="<%= I18n.t('repositories.columns_changed') %>"
|
|
data-default-order="<%= default_table_order_as_js_array %>"
|
|
data-default-table-columns="<%= default_table_columns %>"
|
|
data-editable="<%= can_manage_repository_rows?(repository) %>"
|
|
data-snapshot-provisioning="<%= @snapshot_provisioning %>"
|
|
data-status-url="<%= repository_status_path(@repository) %>">
|
|
<thead>
|
|
<tr>
|
|
<th id="checkbox" data-unmanageable="true">
|
|
<input name="select_all" value="1" type="checkbox" class="sci-checkbox">
|
|
<span class="sci-checkbox-label"></span>
|
|
</th>
|
|
<th id="assigned" data-unmanageable="true"><%= t("repositories.table.assigned") %></th>
|
|
<th id="row-id"><%= t("repositories.table.id") %></th>
|
|
<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>
|
|
<th id="archived-on"><%= t("repositories.table.archived_on") %></th>
|
|
<th id="archived-by"><%= t("repositories.table.archived_by") %></th>
|
|
<% repository.repository_columns.order(:id).each do |column| %>
|
|
<th
|
|
class="repository-column"
|
|
id="<%= column.id %>"
|
|
data-type="<%= column.data_type %>"
|
|
data-edit-column-url="<%= edit_repository_repository_column_path(repository, column) %>"
|
|
data-destroy-column-url="<%= repository_columns_destroy_html_path(repository, column) %>"
|
|
data-editable-row="<%= can_manage_repository_column?(column) %>"
|
|
<% column.metadata.each do |k, v| %>
|
|
<%= "data-metadata-#{k}=#{v}" %>
|
|
<% end %>
|
|
<%= "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? %>
|
|
>
|
|
<%= display_tooltip(column.name) %>
|
|
</th>
|
|
<% end %>
|
|
</tr>
|
|
</thead>
|
|
<tbody></tbody>
|
|
</table>
|
|
</div>
|