mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-20 18:56: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,
|
targets: 0,
|
||||||
className: 'item-name',
|
className: 'item-name',
|
||||||
render: function(data, type, row) {
|
render: function(data, type, row) {
|
||||||
var recordName = "<a href='" + row.recordInfoUrl + "'"
|
let recordName;
|
||||||
+ "class='record-info-link'>" + data + '</a>';
|
|
||||||
|
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) {
|
if (row.hasActiveReminders) {
|
||||||
recordName = `<div class="dropdown row-reminders-dropdown"
|
recordName = `<div class="dropdown row-reminders-dropdown"
|
||||||
data-row-reminders-url="${row.rowRemindersUrl}" tabindex='-1'>
|
data-row-reminders-url="${row.rowRemindersUrl}" tabindex='-1'>
|
||||||
|
|
|
@ -119,7 +119,6 @@ module RepositoryDatatableHelper
|
||||||
DT_RowId: record.id,
|
DT_RowId: record.id,
|
||||||
DT_RowAttr: { 'data-state': row_style(record) },
|
DT_RowAttr: { 'data-state': row_style(record) },
|
||||||
'0': escape_input(record.name),
|
'0': escape_input(record.name),
|
||||||
recordInfoUrl: Rails.application.routes.url_helpers.repository_repository_row_path(record.repository, record),
|
|
||||||
rowRemindersUrl:
|
rowRemindersUrl:
|
||||||
Rails.application.routes.url_helpers
|
Rails.application.routes.url_helpers
|
||||||
.active_reminder_repository_cells_repository_repository_row_url(
|
.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
|
if reminders_enabled
|
||||||
row['hasActiveReminders'] = record.has_active_stock_reminders || record.has_active_datetime_reminders
|
row['hasActiveReminders'] = record.has_active_stock_reminders || record.has_active_datetime_reminders
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue