mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-07 21:55:20 +08:00
Remove link from assigned snapshot inventory row for simple view [SCI-9481] (#6405)
This commit is contained in:
parent
857bda6f69
commit
c3ae813fb9
2 changed files with 13 additions and 3 deletions
|
@ -182,8 +182,14 @@ var MyModuleRepositories = (function() {
|
|||
targets: 0,
|
||||
className: 'item-name',
|
||||
render: function(data, type, row) {
|
||||
var recordName = "<a href='" + row.recordInfoUrl + "'"
|
||||
+ "class='record-info-link'>" + data + '</a>';
|
||||
let recordName;
|
||||
|
||||
if (row.recordInfoUrl) {
|
||||
recordName = `<a href="${row.recordInfoUrl}" class="record-info-link">${data}</a>`;
|
||||
} else {
|
||||
recordName = `<div class="inline-block my-2 mx-0">${data}</div>`;
|
||||
}
|
||||
|
||||
if (row.hasActiveReminders) {
|
||||
recordName = `<div class="dropdown row-reminders-dropdown"
|
||||
data-row-reminders-url="${row.rowRemindersUrl}" tabindex='-1'>
|
||||
|
|
|
@ -119,7 +119,6 @@ module RepositoryDatatableHelper
|
|||
DT_RowId: record.id,
|
||||
DT_RowAttr: { 'data-state': row_style(record) },
|
||||
'0': escape_input(record.name),
|
||||
recordInfoUrl: Rails.application.routes.url_helpers.repository_repository_row_path(record.repository, record),
|
||||
rowRemindersUrl:
|
||||
Rails.application.routes.url_helpers
|
||||
.active_reminder_repository_cells_repository_repository_row_url(
|
||||
|
@ -128,6 +127,11 @@ module RepositoryDatatableHelper
|
|||
)
|
||||
}
|
||||
|
||||
unless record.repository.is_a?(RepositorySnapshot)
|
||||
row['recordInfoUrl'] = Rails.application.routes.url_helpers.repository_repository_row_path(record.repository,
|
||||
record)
|
||||
end
|
||||
|
||||
if reminders_enabled
|
||||
row['hasActiveReminders'] = record.has_active_stock_reminders || record.has_active_datetime_reminders
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue