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 %>"
|
|
|
|
data-num-columns="<%= 5 + repository.repository_columns.count %>"
|
|
|
|
data-create-record="<%= repository_repository_rows_path(repository) %>"
|
|
|
|
data-delete-record="<%= repository_delete_records_path(repository) %>"
|
|
|
|
data-max-dropdown-length="<%= Constants::NAME_TRUNCATION_LENGTH_DROPDOWN %>"
|
|
|
|
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') %>">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th id="checkbox"><input name="select_all" value="1" type="checkbox"></th>
|
2017-06-16 17:47:41 +08:00
|
|
|
<th id="assigned"><%= t("repositories.table.assigned") %></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| %>
|
2017-06-06 23:35:29 +08:00
|
|
|
<th class="repository-column" id="<%= column.id %>"
|
2017-06-07 23:07:28 +08:00
|
|
|
<%= 'data-editable' if can_edit_column_in_repository(column) %>
|
|
|
|
<%= 'data-deletable' if can_delete_column_in_repository(column) %>
|
2017-06-06 23:35:29 +08:00
|
|
|
<%= "data-edit-url='#{edit_repository_repository_column_path(repository, column)}'" %>
|
|
|
|
<%= "data-update-url='#{repository_repository_column_path(repository, column)}'" %>
|
|
|
|
<%= "data-destroy-html-url='#{repository_columns_destroy_html_path(repository, column)}'" %>
|
|
|
|
>
|
|
|
|
<%= display_tooltip(column.name) %>
|
|
|
|
</th>
|
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody></tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|