Amend BMT repository default columns [SCI-6385]

This commit is contained in:
Martin Artnik 2021-12-21 12:19:19 +01:00
parent 9026029a26
commit f3cc31052b
3 changed files with 7 additions and 8 deletions

View file

@ -108,7 +108,8 @@ module RepositoryDatatableHelper
'2': escape_input(record.external_id),
'3': record.code,
'4': escape_input(record.name),
'5': I18n.l(record.created_at, format: :full)
'5': escape_input(record.created_by.full_name),
'6': I18n.l(record.created_at, format: :full)
}
end

View file

@ -13,7 +13,7 @@ class BmtRepository < LinkedRepository
def default_sortable_columns
[
'assigned',
'users.full_name',
'repository_rows.external_id',
'repository_rows.id',
'repository_rows.name',
@ -21,10 +21,6 @@ class BmtRepository < LinkedRepository
]
end
def default_search_fileds
super - ['users.full_name']
end
private
def enforce_singleton

View file

@ -32,15 +32,17 @@
<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>
<% unless @repository.is_a?(BmtRepository) %>
<th id="assigned" data-unmanageable="true"><%= t("repositories.table.assigned") %></th>
<% end %>
<% if @repository.is_a?(LinkedRepository) %>
<th id="row-external-id"><%= t('repositories.table.external_id') %></th>
<% end %>
<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>
<% unless @repository.is_a?(BmtRepository) %>
<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>
<% end %>