mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 14:45:56 +08:00
Merge branch 'develop' into features/new-task-layout
This commit is contained in:
commit
a2ade6e0ec
|
@ -246,7 +246,7 @@ GEM
|
||||||
discard (1.1.0)
|
discard (1.1.0)
|
||||||
activerecord (>= 4.2, < 7)
|
activerecord (>= 4.2, < 7)
|
||||||
docile (1.3.2)
|
docile (1.3.2)
|
||||||
doorkeeper (5.1.0)
|
doorkeeper (5.1.1)
|
||||||
railties (>= 5)
|
railties (>= 5)
|
||||||
down (5.0.0)
|
down (5.0.0)
|
||||||
addressable (~> 2.5)
|
addressable (~> 2.5)
|
||||||
|
|
|
@ -47,6 +47,7 @@ var DasboardCurrentTasksWidget = (function() {
|
||||||
function filtersEnabled() {
|
function filtersEnabled() {
|
||||||
return dropdownSelector.getValues(experimentFilter)
|
return dropdownSelector.getValues(experimentFilter)
|
||||||
|| dropdownSelector.getValues(projectFilter)
|
|| dropdownSelector.getValues(projectFilter)
|
||||||
|
|| $('.current-tasks-widget .task-search-field').val().length > 0
|
||||||
|| dropdownSelector.getValues(viewFilter) !== 'uncompleted';
|
|| dropdownSelector.getValues(viewFilter) !== 'uncompleted';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -244,7 +244,6 @@ function initializeEdit() {
|
||||||
{ color: 'white', shadow: true }
|
{ color: 'white', shadow: true }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
$.initTooltips();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function destroyEdit() {
|
function destroyEdit() {
|
||||||
|
@ -900,8 +899,6 @@ function bindEditTagsAjax(elements) {
|
||||||
.find(".edit-tags-link")
|
.find(".edit-tags-link")
|
||||||
.html(my_module.tags_html);
|
.html(my_module.tags_html);
|
||||||
});
|
});
|
||||||
// initialize tooltips again
|
|
||||||
$.initTooltips();
|
|
||||||
},
|
},
|
||||||
error: function(data){
|
error: function(data){
|
||||||
// TODO
|
// TODO
|
||||||
|
|
|
@ -100,7 +100,6 @@ function initProtocolsTable() {
|
||||||
fnDrawCallback: function(settings, json) {
|
fnDrawCallback: function(settings, json) {
|
||||||
animateSpinner(this, false);
|
animateSpinner(this, false);
|
||||||
initRowSelection();
|
initRowSelection();
|
||||||
$.initTooltips();
|
|
||||||
},
|
},
|
||||||
preDrawCallback: function(settings) {
|
preDrawCallback: function(settings) {
|
||||||
animateSpinner(this);
|
animateSpinner(this);
|
||||||
|
|
|
@ -115,7 +115,6 @@
|
||||||
toggleButtons(true);
|
toggleButtons(true);
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$.initTooltips();
|
|
||||||
initStepsComments();
|
initStepsComments();
|
||||||
FilePreviewModal.init();
|
FilePreviewModal.init();
|
||||||
SmartAnnotation.preventPropagation('.atwho-user-popover');
|
SmartAnnotation.preventPropagation('.atwho-user-popover');
|
||||||
|
@ -618,7 +617,6 @@
|
||||||
animateSpinner(null, false);
|
animateSpinner(null, false);
|
||||||
DragNDropSteps.clearFiles();
|
DragNDropSteps.clearFiles();
|
||||||
FilePreviewModal.init();
|
FilePreviewModal.init();
|
||||||
$.initTooltips();
|
|
||||||
if (typeof refreshProtocolStatusBar === 'function') refreshProtocolStatusBar();
|
if (typeof refreshProtocolStatusBar === 'function') refreshProtocolStatusBar();
|
||||||
},
|
},
|
||||||
error: function(xhr) {
|
error: function(xhr) {
|
||||||
|
|
|
@ -35,7 +35,8 @@ var RepositoryChecklistColumnType = (function() {
|
||||||
previewContainer,
|
previewContainer,
|
||||||
itemsTextarea,
|
itemsTextarea,
|
||||||
delimiterDropdown,
|
delimiterDropdown,
|
||||||
dropdownOptions
|
dropdownOptions,
|
||||||
|
GLOBAL_CONSTANTS.REPOSITORY_CHECKLIST_ITEMS_PER_COLUMN
|
||||||
);
|
);
|
||||||
$('.changing-existing-list-items-warning').removeClass('hidden');
|
$('.changing-existing-list-items-warning').removeClass('hidden');
|
||||||
initChecklistDropdown();
|
initChecklistDropdown();
|
||||||
|
@ -45,7 +46,8 @@ var RepositoryChecklistColumnType = (function() {
|
||||||
previewContainer,
|
previewContainer,
|
||||||
itemsTextarea,
|
itemsTextarea,
|
||||||
delimiterDropdown,
|
delimiterDropdown,
|
||||||
dropdownOptions
|
dropdownOptions,
|
||||||
|
GLOBAL_CONSTANTS.REPOSITORY_CHECKLIST_ITEMS_PER_COLUMN
|
||||||
);
|
);
|
||||||
initChecklistDropdown();
|
initChecklistDropdown();
|
||||||
initUpdatePlaceholder(this);
|
initUpdatePlaceholder(this);
|
||||||
|
@ -55,7 +57,8 @@ var RepositoryChecklistColumnType = (function() {
|
||||||
previewContainer,
|
previewContainer,
|
||||||
itemsTextarea,
|
itemsTextarea,
|
||||||
delimiterDropdown,
|
delimiterDropdown,
|
||||||
dropdownOptions
|
dropdownOptions,
|
||||||
|
GLOBAL_CONSTANTS.REPOSITORY_CHECKLIST_ITEMS_PER_COLUMN
|
||||||
);
|
);
|
||||||
initChecklistDropdown();
|
initChecklistDropdown();
|
||||||
})
|
})
|
||||||
|
@ -71,7 +74,7 @@ var RepositoryChecklistColumnType = (function() {
|
||||||
checkValidation: () => {
|
checkValidation: () => {
|
||||||
var $manageModal = $(manageModal);
|
var $manageModal = $(manageModal);
|
||||||
var count = $manageModal.find('.items-count').attr('data-count');
|
var count = $manageModal.find('.items-count').attr('data-count');
|
||||||
return count < GLOBAL_CONSTANTS.REPOSITORY_CHECKLIST_ITEMS_PER_COLUMN;
|
return count <= GLOBAL_CONSTANTS.REPOSITORY_CHECKLIST_ITEMS_PER_COLUMN;
|
||||||
},
|
},
|
||||||
loadParams: () => {
|
loadParams: () => {
|
||||||
var repositoryColumnParams = {};
|
var repositoryColumnParams = {};
|
||||||
|
|
|
@ -83,7 +83,7 @@ var RepositoryListColumnType = (function() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshCounter(number) {
|
function refreshCounter(number, limit) {
|
||||||
var $manageModal = $(manageModal);
|
var $manageModal = $(manageModal);
|
||||||
var $counterContainer = $manageModal.find('.limit-counter-container');
|
var $counterContainer = $manageModal.find('.limit-counter-container');
|
||||||
var $btn = $manageModal.find('.column-save-btn');
|
var $btn = $manageModal.find('.column-save-btn');
|
||||||
|
@ -91,7 +91,7 @@ var RepositoryListColumnType = (function() {
|
||||||
|
|
||||||
$counterContainer.find('.items-count').html(number).attr('data-count', number);
|
$counterContainer.find('.items-count').html(number).attr('data-count', number);
|
||||||
|
|
||||||
if (number >= GLOBAL_CONSTANTS.REPOSITORY_LIST_ITEMS_PER_COLUMN) {
|
if (number > limit) {
|
||||||
$counterContainer.addClass('error-to-many-items');
|
$counterContainer.addClass('error-to-many-items');
|
||||||
$textarea.addClass('too-many-items');
|
$textarea.addClass('too-many-items');
|
||||||
$btn.addClass('disabled');
|
$btn.addClass('disabled');
|
||||||
|
@ -102,11 +102,11 @@ var RepositoryListColumnType = (function() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshPreviewDropdownList(preview, textarea, delimiterContainer, dropdown) {
|
function refreshPreviewDropdownList(preview, textarea, delimiterContainer, dropdown, limit) {
|
||||||
var items = textToItems($(textarea).val(), delimiterContainer);
|
var items = textToItems($(textarea).val(), delimiterContainer);
|
||||||
var hashItems = [];
|
var hashItems = [];
|
||||||
drawDropdownPreview(items, preview);
|
drawDropdownPreview(items, preview);
|
||||||
refreshCounter(items.length);
|
refreshCounter(items.length, limit);
|
||||||
|
|
||||||
$.each(items, (index, option) => {
|
$.each(items, (index, option) => {
|
||||||
hashItems.push({ data: option });
|
hashItems.push({ data: option });
|
||||||
|
@ -126,7 +126,8 @@ var RepositoryListColumnType = (function() {
|
||||||
previewContainer,
|
previewContainer,
|
||||||
itemsTextarea,
|
itemsTextarea,
|
||||||
delimiterDropdown,
|
delimiterDropdown,
|
||||||
dropdownOptions
|
dropdownOptions,
|
||||||
|
GLOBAL_CONSTANTS.REPOSITORY_LIST_ITEMS_PER_COLUMN
|
||||||
);
|
);
|
||||||
initListDropdown();
|
initListDropdown();
|
||||||
$('.changing-existing-list-items-warning').removeClass('hidden');
|
$('.changing-existing-list-items-warning').removeClass('hidden');
|
||||||
|
@ -137,7 +138,8 @@ var RepositoryListColumnType = (function() {
|
||||||
previewContainer,
|
previewContainer,
|
||||||
itemsTextarea,
|
itemsTextarea,
|
||||||
delimiterDropdown,
|
delimiterDropdown,
|
||||||
dropdownOptions
|
dropdownOptions,
|
||||||
|
GLOBAL_CONSTANTS.REPOSITORY_LIST_ITEMS_PER_COLUMN
|
||||||
);
|
);
|
||||||
initListDropdown();
|
initListDropdown();
|
||||||
})
|
})
|
||||||
|
@ -146,7 +148,8 @@ var RepositoryListColumnType = (function() {
|
||||||
previewContainer,
|
previewContainer,
|
||||||
itemsTextarea,
|
itemsTextarea,
|
||||||
delimiterDropdown,
|
delimiterDropdown,
|
||||||
dropdownOptions
|
dropdownOptions,
|
||||||
|
GLOBAL_CONSTANTS.REPOSITORY_LIST_ITEMS_PER_COLUMN
|
||||||
);
|
);
|
||||||
initListDropdown();
|
initListDropdown();
|
||||||
})
|
})
|
||||||
|
@ -162,7 +165,7 @@ var RepositoryListColumnType = (function() {
|
||||||
checkValidation: () => {
|
checkValidation: () => {
|
||||||
var $manageModal = $(manageModal);
|
var $manageModal = $(manageModal);
|
||||||
var count = $manageModal.find('.items-count').attr('data-count');
|
var count = $manageModal.find('.items-count').attr('data-count');
|
||||||
return count < GLOBAL_CONSTANTS.REPOSITORY_LIST_ITEMS_PER_COLUMN;
|
return count <= GLOBAL_CONSTANTS.REPOSITORY_LIST_ITEMS_PER_COLUMN;
|
||||||
},
|
},
|
||||||
loadParams: () => {
|
loadParams: () => {
|
||||||
var repositoryColumnParams = {};
|
var repositoryColumnParams = {};
|
||||||
|
@ -172,8 +175,8 @@ var RepositoryListColumnType = (function() {
|
||||||
return repositoryColumnParams;
|
return repositoryColumnParams;
|
||||||
},
|
},
|
||||||
|
|
||||||
refreshPreviewDropdownList: (preview, textarea, delimiter, dropdown) => {
|
refreshPreviewDropdownList: (preview, textarea, delimiter, dropdown, limit) => {
|
||||||
refreshPreviewDropdownList(preview, textarea, delimiter, dropdown);
|
refreshPreviewDropdownList(preview, textarea, delimiter, dropdown, limit);
|
||||||
},
|
},
|
||||||
|
|
||||||
initListDropdown: () => {
|
initListDropdown: () => {
|
||||||
|
|
|
@ -158,7 +158,6 @@
|
||||||
function init(location) {
|
function init(location) {
|
||||||
LOCATION = location;
|
LOCATION = location;
|
||||||
global.addEventListener('paste', listener, false);
|
global.addEventListener('paste', listener, false);
|
||||||
$.initTooltips();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function destroy() {
|
function destroy() {
|
||||||
|
|
|
@ -1,130 +0,0 @@
|
||||||
(function() {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
$.initTooltips = function() {
|
|
||||||
var popoversArray = [];
|
|
||||||
var leaveTimeout;
|
|
||||||
var enterTimeout;
|
|
||||||
|
|
||||||
if ($(document.body).data('tooltips-enabled') === true || $(document.body).data('tooltips-enabled') == null) {
|
|
||||||
$('.tooltip_open').remove(); // Destroy all (if any) old open popovers
|
|
||||||
$('.help_tooltips').each(function(i, obj) {
|
|
||||||
var popoverObject = obj;
|
|
||||||
popoversArray.push(popoverObject);
|
|
||||||
});
|
|
||||||
$('.help_tooltips').each(function(i, obj) {
|
|
||||||
var link = $(obj).data('tooltiplink');
|
|
||||||
var textData = $(obj).data('tooltipcontent');
|
|
||||||
var customStyle = $(obj).data('tooltipstyle');
|
|
||||||
obj.dataset.tooltipId = i;
|
|
||||||
|
|
||||||
$(obj)
|
|
||||||
.popover({
|
|
||||||
html: true,
|
|
||||||
container: 'body',
|
|
||||||
placement: 'auto right',
|
|
||||||
trigger: 'manual',
|
|
||||||
content: 'popovers will not display if empty',
|
|
||||||
template:
|
|
||||||
'<div class="popover tooltip_' + i + '_window tooltip-open" '
|
|
||||||
+ 'role="tooltip" style="' + customStyle + '" data-popover-id="' + i + '">'
|
|
||||||
+ '<div class="popover-body" >' + textData + '</div>'
|
|
||||||
+ '<br><br><br>'
|
|
||||||
+ '<div class="popover-footer">'
|
|
||||||
+ '<a class="btn btn-link text-nowrap" href="' + link + '" target="_blank" rel="noopener noreferrer" >'
|
|
||||||
+ 'Read more <i class="fas fa-external-link-alt"></i>'
|
|
||||||
+ '</a>'
|
|
||||||
+ '</div>'
|
|
||||||
+ '</div>'
|
|
||||||
})
|
|
||||||
.off('shown.bs.popover')
|
|
||||||
.on('shown.bs.popover', function() {
|
|
||||||
// hide popup if object element hidden
|
|
||||||
if (!$(obj).is(':visible') || $(obj).is(':disabled')) {
|
|
||||||
$(obj).popover('hide');
|
|
||||||
}
|
|
||||||
// hide all other popovers
|
|
||||||
popoversArray.forEach(function(arrayItem) {
|
|
||||||
if (obj !== arrayItem) {
|
|
||||||
$(arrayItem).popover('hide');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.off('mouseleave')
|
|
||||||
.on('mouseleave', function() {
|
|
||||||
clearTimeout(enterTimeout);
|
|
||||||
leaveTimeout = setTimeout(function() {
|
|
||||||
if (!$('.tooltip_' + i + '_window:hover').length > 0) {
|
|
||||||
$(obj).popover('hide');
|
|
||||||
}
|
|
||||||
}, 100);
|
|
||||||
})
|
|
||||||
.off('mouseenter')
|
|
||||||
.on('mouseenter', function() {
|
|
||||||
clearTimeout(leaveTimeout);
|
|
||||||
enterTimeout = setTimeout(function() {
|
|
||||||
var top;
|
|
||||||
if ($(obj).hover().length > 0) {
|
|
||||||
$(obj).popover('show');
|
|
||||||
$('.tooltip_' + i + '_window').removeClass('tooltip-enter');
|
|
||||||
top = $(obj).offset().top;
|
|
||||||
$('.tooltip_' + i + '_window').css({
|
|
||||||
top: (top) + 'px'
|
|
||||||
});
|
|
||||||
$('.tooltip_' + i + '_window').off('mouseleave').on('mouseleave', function() {
|
|
||||||
$('.tooltip_' + i + '_window').removeClass('tooltip-enter');
|
|
||||||
$(obj).popover('hide');
|
|
||||||
});
|
|
||||||
$('.tooltip_' + i + '_window').off('mouseenter').on('mouseenter', function() {
|
|
||||||
$('.tooltip_' + i + '_window').addClass('tooltip-enter');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document.body).on('click', function() {
|
|
||||||
$('.help_tooltips').each(function(i, obj) {
|
|
||||||
$(obj).popover('hide');
|
|
||||||
});
|
|
||||||
$('.popover.tooltip-open').each(function(i, obj) {
|
|
||||||
if ($('*[data-tooltip-id="' + obj.dataset.popoverId + '"]').length === 0) {
|
|
||||||
$(obj).remove();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
$(document.body).on('mousemove', function(e) {
|
|
||||||
var mouse = { x: e.clientX, y: e.clientY };
|
|
||||||
$('.popover.tooltip-open').each(function(i, obj) {
|
|
||||||
var tooltipObj = '*[data-tooltip-id="' + obj.dataset.popoverId + '"]';
|
|
||||||
var objHeight;
|
|
||||||
var objWidth;
|
|
||||||
var objLeft;
|
|
||||||
var objTop;
|
|
||||||
var objCorners;
|
|
||||||
if ($(tooltipObj).length === 0) return;
|
|
||||||
objHeight = $(tooltipObj)[0].clientHeight;
|
|
||||||
objWidth = $(tooltipObj)[0].clientWidth;
|
|
||||||
objLeft = $(tooltipObj)[0].offsetLeft;
|
|
||||||
objTop = $(tooltipObj)[0].offsetTop;
|
|
||||||
objCorners = {
|
|
||||||
tl: { x: objLeft, y: objTop },
|
|
||||||
tr: { x: (objLeft + objWidth), y: objTop },
|
|
||||||
bl: { x: objLeft, y: (objTop + objHeight) },
|
|
||||||
br: { x: (objLeft + objWidth), y: (objTop + objHeight) }
|
|
||||||
};
|
|
||||||
if (
|
|
||||||
!(mouse.x > objCorners.tl.x && mouse.x < objCorners.br.x)
|
|
||||||
|| !(mouse.y > objCorners.tl.y && mouse.y < objCorners.br.y)
|
|
||||||
) {
|
|
||||||
$(tooltipObj).popover('hide');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$(document).on('turbolinks:load', function() {
|
|
||||||
$.initTooltips();
|
|
||||||
});
|
|
||||||
}());
|
|
|
@ -76,19 +76,6 @@
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize tooltips settings form
|
|
||||||
function tooltipSettings() {
|
|
||||||
var toggleInput = $('[name="tooltips_enabled"]');
|
|
||||||
toggleInput
|
|
||||||
.checkboxpicker({ onActiveCls: 'btn-toggle', offActiveCls: 'btn-toggle' });
|
|
||||||
|
|
||||||
if (toggleInput.attr('value') === 'true') {
|
|
||||||
toggleInput.prop('checked', true);
|
|
||||||
} else {
|
|
||||||
toggleInput.prop('checked', false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// triggers submit action when the user clicks
|
// triggers submit action when the user clicks
|
||||||
function initTogglableSettingsForm() {
|
function initTogglableSettingsForm() {
|
||||||
$('#togglable-settings-panel')
|
$('#togglable-settings-panel')
|
||||||
|
@ -148,6 +135,5 @@
|
||||||
initTimeZoneSelector();
|
initTimeZoneSelector();
|
||||||
initDateFormatSelector();
|
initDateFormatSelector();
|
||||||
notificationsSettings();
|
notificationsSettings();
|
||||||
tooltipSettings();
|
|
||||||
initTogglableSettingsForm();
|
initTogglableSettingsForm();
|
||||||
})();
|
})();
|
||||||
|
|
|
@ -123,8 +123,8 @@
|
||||||
|
|
||||||
.fas-custom {
|
.fas-custom {
|
||||||
float: right;
|
float: right;
|
||||||
margin-right: 5px;
|
margin-right: 15px;
|
||||||
top: 2px;
|
top: 17px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.active {
|
.active {
|
||||||
|
|
|
@ -23,6 +23,7 @@ class ProtocolsController < ApplicationController
|
||||||
linked_children
|
linked_children
|
||||||
linked_children_datatable
|
linked_children_datatable
|
||||||
)
|
)
|
||||||
|
before_action :switch_team_with_param, only: :index
|
||||||
before_action :check_view_all_permissions, only: %i(
|
before_action :check_view_all_permissions, only: %i(
|
||||||
index
|
index
|
||||||
datatable
|
datatable
|
||||||
|
|
|
@ -31,6 +31,7 @@ class ReportsController < ApplicationController
|
||||||
only: %i(new edit available_repositories)
|
only: %i(new edit available_repositories)
|
||||||
|
|
||||||
before_action :check_manage_permissions, only: BEFORE_ACTION_METHODS
|
before_action :check_manage_permissions, only: BEFORE_ACTION_METHODS
|
||||||
|
before_action :switch_team_with_param, only: :index
|
||||||
|
|
||||||
# Index showing all reports of a single project
|
# Index showing all reports of a single project
|
||||||
def index; end
|
def index; end
|
||||||
|
|
|
@ -5,7 +5,9 @@ class RepositoriesController < ApplicationController
|
||||||
include ActionView::Helpers::TagHelper
|
include ActionView::Helpers::TagHelper
|
||||||
include ActionView::Context
|
include ActionView::Context
|
||||||
include IconsHelper
|
include IconsHelper
|
||||||
|
include TeamsHelper
|
||||||
|
|
||||||
|
before_action :switch_team_with_param, only: :show
|
||||||
before_action :load_vars,
|
before_action :load_vars,
|
||||||
except: %i(index create create_modal parse_sheet)
|
except: %i(index create create_modal parse_sheet)
|
||||||
before_action :load_parent_vars, except:
|
before_action :load_parent_vars, except:
|
||||||
|
|
|
@ -122,10 +122,10 @@ module Users
|
||||||
Activities::CreateActivityService
|
Activities::CreateActivityService
|
||||||
.call(activity_type: :invite_user_to_team,
|
.call(activity_type: :invite_user_to_team,
|
||||||
owner: current_user,
|
owner: current_user,
|
||||||
subject: current_team,
|
subject: @team,
|
||||||
team: current_team,
|
team: @team,
|
||||||
message_items: {
|
message_items: {
|
||||||
team: current_team.id,
|
team: @team.id,
|
||||||
user_invited: user.id,
|
user_invited: user.id,
|
||||||
role: user_team.role_str
|
role: user_team.role_str
|
||||||
})
|
})
|
||||||
|
|
|
@ -43,9 +43,6 @@ module Users
|
||||||
read_from_params(:system_message_notification_email) do |val|
|
read_from_params(:system_message_notification_email) do |val|
|
||||||
@user.system_message_email_notification = val
|
@user.system_message_email_notification = val
|
||||||
end
|
end
|
||||||
read_from_params(:tooltips_enabled) do |val|
|
|
||||||
@user.settings[:tooltips_enabled] = val
|
|
||||||
end
|
|
||||||
if @user.save
|
if @user.save
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.json do
|
format.json do
|
||||||
|
|
|
@ -198,12 +198,8 @@ class ProtocolsDatatable < CustomDatatable
|
||||||
end
|
end
|
||||||
|
|
||||||
def modules_html(record)
|
def modules_html(record)
|
||||||
"<a href='#' data-action='load-linked-children' class='help_tooltips' " \
|
"<a href='#' data-action='load-linked-children'" \
|
||||||
"data-tooltiplink='" +
|
"data-url='#{linked_children_protocol_path(record)}'>" \
|
||||||
I18n.t('tooltips.link.protocol.num_linked') +
|
|
||||||
"' data-tooltipcontent='" +
|
|
||||||
I18n.t('tooltips.text.protocol.num_linked') +
|
|
||||||
"' data-url='#{linked_children_protocol_path(record)}'>" \
|
|
||||||
"#{record.nr_of_linked_children}" \
|
"#{record.nr_of_linked_children}" \
|
||||||
"</a>"
|
"</a>"
|
||||||
end
|
end
|
||||||
|
|
|
@ -42,17 +42,17 @@ module GlobalActivitiesHelper
|
||||||
# Not link for now
|
# Not link for now
|
||||||
return current_value
|
return current_value
|
||||||
when Team
|
when Team
|
||||||
path = projects_path
|
path = projects_path(team: obj.id)
|
||||||
when Repository
|
when Repository
|
||||||
path = repository_path(obj)
|
path = repository_path(obj, team: obj.team.id)
|
||||||
when RepositoryRow
|
when RepositoryRow
|
||||||
return current_value unless obj.repository
|
return current_value unless obj.repository
|
||||||
|
|
||||||
path = repository_path(obj.repository)
|
path = repository_path(obj.repository, team: obj.repository.team.id)
|
||||||
when RepositoryColumn
|
when RepositoryColumn
|
||||||
return current_value unless obj.repository
|
return current_value unless obj.repository
|
||||||
|
|
||||||
path = repository_path(obj.repository)
|
path = repository_path(obj.repository, team: obj.repository.team.id)
|
||||||
when Project
|
when Project
|
||||||
path = obj.archived? ? projects_path : project_path(obj)
|
path = obj.archived? ? projects_path : project_path(obj)
|
||||||
when Experiment
|
when Experiment
|
||||||
|
@ -69,11 +69,11 @@ module GlobalActivitiesHelper
|
||||||
end
|
end
|
||||||
when Protocol
|
when Protocol
|
||||||
if obj.in_repository_public?
|
if obj.in_repository_public?
|
||||||
path = protocols_path(type: :public)
|
path = protocols_path(type: :public, team: obj.team.id)
|
||||||
elsif obj.in_repository_private?
|
elsif obj.in_repository_private?
|
||||||
path = protocols_path(type: :private)
|
path = protocols_path(type: :private, team: obj.team.id)
|
||||||
elsif obj.in_repository_archived?
|
elsif obj.in_repository_archived?
|
||||||
path = protocols_path(type: :archive)
|
path = protocols_path(type: :archive, team: obj.team.id)
|
||||||
elsif obj.my_module.navigable?
|
elsif obj.my_module.navigable?
|
||||||
path = protocols_my_module_path(obj.my_module)
|
path = protocols_my_module_path(obj.my_module)
|
||||||
else
|
else
|
||||||
|
@ -86,7 +86,7 @@ module GlobalActivitiesHelper
|
||||||
when Step
|
when Step
|
||||||
return current_value
|
return current_value
|
||||||
when Report
|
when Report
|
||||||
path = reports_path
|
path = reports_path(team: obj.team.id)
|
||||||
else
|
else
|
||||||
return current_value
|
return current_value
|
||||||
end
|
end
|
||||||
|
|
|
@ -20,4 +20,8 @@ module TeamsHelper
|
||||||
def team_created_by(team)
|
def team_created_by(team)
|
||||||
User.find_by_id(team.created_by_id)
|
User.find_by_id(team.created_by_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def switch_team_with_param
|
||||||
|
current_team_switch(Team.find_by(id: params[:team])) if params[:team]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -9,6 +9,7 @@ module TeamBySubjectModel
|
||||||
valid_subjects = Extends::ACTIVITY_SUBJECT_CHILDREN
|
valid_subjects = Extends::ACTIVITY_SUBJECT_CHILDREN
|
||||||
# Check all activity subject
|
# Check all activity subject
|
||||||
valid_subjects.each do |subject, _children|
|
valid_subjects.each do |subject, _children|
|
||||||
|
subject = subject.to_s.camelize.to_sym
|
||||||
next unless subjects[subject]
|
next unless subjects[subject]
|
||||||
|
|
||||||
parent_array = [subject.to_s.underscore]
|
parent_array = [subject.to_s.underscore]
|
||||||
|
|
|
@ -43,8 +43,7 @@ class User < ApplicationRecord
|
||||||
recent: true,
|
recent: true,
|
||||||
recent_email: false,
|
recent_email: false,
|
||||||
system_message_email: false
|
system_message_email: false
|
||||||
},
|
}
|
||||||
tooltips_enabled: true
|
|
||||||
)
|
)
|
||||||
|
|
||||||
store_accessor :variables, :export_vars
|
store_accessor :variables, :export_vars
|
||||||
|
|
|
@ -18,7 +18,7 @@ module RepositoryColumns
|
||||||
to_be_deleted = existing_items_names - updating_items_names
|
to_be_deleted = existing_items_names - updating_items_names
|
||||||
to_be_created = updating_items_names - existing_items_names
|
to_be_created = updating_items_names - existing_items_names
|
||||||
|
|
||||||
if @column.repository_list_items.size - to_be_deleted.size + to_be_created.size >=
|
if @column.repository_list_items.size - to_be_deleted.size + to_be_created.size >
|
||||||
Constants::REPOSITORY_CHECKLIST_ITEMS_PER_COLUMN
|
Constants::REPOSITORY_CHECKLIST_ITEMS_PER_COLUMN
|
||||||
|
|
||||||
@errors[:repository_column] = { repository_checklist_items: 'too many items' }
|
@errors[:repository_column] = { repository_checklist_items: 'too many items' }
|
||||||
|
|
|
@ -18,7 +18,7 @@ module RepositoryColumns
|
||||||
to_be_deleted = existing_items_names - updating_items_names
|
to_be_deleted = existing_items_names - updating_items_names
|
||||||
to_be_created = updating_items_names - existing_items_names
|
to_be_created = updating_items_names - existing_items_names
|
||||||
|
|
||||||
if @column.repository_list_items.size - to_be_deleted.size + to_be_created.size >=
|
if @column.repository_list_items.size - to_be_deleted.size + to_be_created.size >
|
||||||
Constants::REPOSITORY_LIST_ITEMS_PER_COLUMN
|
Constants::REPOSITORY_LIST_ITEMS_PER_COLUMN
|
||||||
|
|
||||||
@errors[:repository_column] = { repository_list_items: 'too many items' }
|
@errors[:repository_column] = { repository_list_items: 'too many items' }
|
||||||
|
|
|
@ -116,10 +116,9 @@ module ProtocolsExporter
|
||||||
if step.tables.count > 0
|
if step.tables.count > 0
|
||||||
step_xml << "<elnTables>\n"
|
step_xml << "<elnTables>\n"
|
||||||
step.tables.order(:id).each do |table|
|
step.tables.order(:id).each do |table|
|
||||||
table_xml = "<elnTable id=\"#{table.id}\" " \
|
table_xml = "<elnTable id=\"#{table.id}\" guid=\"#{get_guid(table.id)}\">\n"
|
||||||
"guid=\"#{get_guid(table.id)}\">\n"
|
table_xml << "<name>#{table.name}</name>\n"
|
||||||
table_xml << "<contents>#{table.contents.unpack1('H*')}" \
|
table_xml << "<contents>#{table.contents.unpack1('H*')}</contents>\n"
|
||||||
"</contents>\n"
|
|
||||||
table_xml << "</elnTable>\n"
|
table_xml << "</elnTable>\n"
|
||||||
step_xml << table_xml
|
step_xml << table_xml
|
||||||
end
|
end
|
||||||
|
|
|
@ -10,9 +10,7 @@
|
||||||
>
|
>
|
||||||
<%= bootstrap_form_tag url: canvas_experiment_url, method: "post", html: {class: "canvas-header"} do |f| %>
|
<%= bootstrap_form_tag url: canvas_experiment_url, method: "post", html: {class: "canvas-header"} do |f| %>
|
||||||
<% if can_manage_experiment?(@experiment) %>
|
<% if can_manage_experiment?(@experiment) %>
|
||||||
<%=link_to "", type: "button", class: "btn btn-primary help_tooltips", id: "canvas-new-module",
|
<%=link_to "", type: "button", class: "btn btn-primary", id: "canvas-new-module" do %>
|
||||||
data: { tooltiplink: I18n.t('tooltips.link.task.new'),
|
|
||||||
tooltipcontent: I18n.t('tooltips.text.task.new') } do %>
|
|
||||||
<span class="hbtn-default">
|
<span class="hbtn-default">
|
||||||
<span class="fas fa-credit-card"></span>
|
<span class="fas fa-credit-card"></span>
|
||||||
<%= t("experiments.canvas.edit.new_module") %>
|
<%= t("experiments.canvas.edit.new_module") %>
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
<div
|
<div class="tags-container pull-right">
|
||||||
class="tags-container pull-right help_tooltips"
|
|
||||||
data-tooltiplink="<%= I18n.t('tooltips.link.task.color_tag') %>"
|
|
||||||
data-tooltipcontent="<%= I18n.t('tooltips.text.task.color_tag') %>"
|
|
||||||
>
|
|
||||||
<% tags2 = my_module.tags[0..3] %>
|
<% tags2 = my_module.tags[0..3] %>
|
||||||
<% tags2.each do |tag| %>
|
<% tags2.each do |tag| %>
|
||||||
<div style="color: <%= tag.color %>"
|
<div style="color: <%= tag.color %>"
|
||||||
|
|
|
@ -31,11 +31,7 @@
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<% if !my_module.completed? && can_manage_module?(my_module) %>
|
<% if !my_module.completed? && can_manage_module?(my_module) %>
|
||||||
<%= link_to due_date_my_module_path(my_module, format: :json), remote: true,
|
<%= link_to due_date_my_module_path(my_module, format: :json), remote: true,
|
||||||
class: "due-date-link due-date-refresh help_tooltips",
|
class: "due-date-link due-date-refresh" do %>
|
||||||
data: {
|
|
||||||
tooltiplink: I18n.t('tooltips.link.task.due_date'),
|
|
||||||
tooltipcontent: I18n.t('tooltips.text.task.due_date')
|
|
||||||
} do %>
|
|
||||||
<%= render partial: "my_modules/card_due_date_label.html.erb", locals: { my_module: my_module, format: :full_date } %>
|
<%= render partial: "my_modules/card_due_date_label.html.erb", locals: { my_module: my_module, format: :full_date } %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
|
@ -15,21 +15,15 @@
|
||||||
<li><%= link_to t('experiments.clone.label_title'),
|
<li><%= link_to t('experiments.clone.label_title'),
|
||||||
clone_modal_experiment_url(experiment),
|
clone_modal_experiment_url(experiment),
|
||||||
remote: true, type: 'button',
|
remote: true, type: 'button',
|
||||||
class: 'clone-experiment help_tooltips',
|
class: 'clone-experiment' %>
|
||||||
data: {
|
</li>
|
||||||
tooltiplink: I18n.t('tooltips.link.experiment.copy'),
|
|
||||||
tooltipcontent: I18n.t('tooltips.text.experiment.copy')
|
|
||||||
} %></li>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if can_move_experiment?(experiment) %>
|
<% if can_move_experiment?(experiment) %>
|
||||||
<li><%= link_to t('experiments.move.label_title'),
|
<li><%= link_to t('experiments.move.label_title'),
|
||||||
move_modal_experiment_url(experiment),
|
move_modal_experiment_url(experiment),
|
||||||
remote: true, type: 'button',
|
remote: true, type: 'button',
|
||||||
class: 'move-experiment help_tooltips',
|
class: 'move-experiment'%>
|
||||||
data: {
|
</li>
|
||||||
tooltiplink: I18n.t('tooltips.link.experiment.move'),
|
|
||||||
tooltipcontent: I18n.t('tooltips.text.experiment.move')
|
|
||||||
} %></li>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if can_archive_experiment?(experiment) %>
|
<% if can_archive_experiment?(experiment) %>
|
||||||
<li><%= link_to t('experiments.archive.label_title'),
|
<li><%= link_to t('experiments.archive.label_title'),
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<div class="ga-breadcrumb">
|
<div class="ga-breadcrumb">
|
||||||
<span class="fas fa-clipboard-check"></span>
|
<span class="fas fa-clipboard-check"></span>
|
||||||
<% if subject %>
|
<% if subject %>
|
||||||
<%= route_to_other_team(reports_path(subject),
|
<%= route_to_other_team(reports_path(subject, team: subject.team.id),
|
||||||
team,
|
team,
|
||||||
subject.name&.truncate(Constants::NAME_TRUNCATION_LENGTH),
|
subject.name&.truncate(Constants::NAME_TRUNCATION_LENGTH),
|
||||||
title: subject.name) %>
|
title: subject.name) %>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<div class="ga-breadcrumb">
|
<div class="ga-breadcrumb">
|
||||||
<span class="fas fa-list-alt"></span>
|
<span class="fas fa-list-alt"></span>
|
||||||
<% if subject %>
|
<% if subject %>
|
||||||
<%= route_to_other_team(repository_path(subject.id),
|
<%= route_to_other_team(repository_path(subject.id, team: subject.team.id),
|
||||||
team,
|
team,
|
||||||
subject.name&.truncate(Constants::NAME_TRUNCATION_LENGTH),
|
subject.name&.truncate(Constants::NAME_TRUNCATION_LENGTH),
|
||||||
title: subject.name) %>
|
title: subject.name) %>
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
data-atwho-repositories-url="<%= atwho_repositories_team_path(current_team) %>"
|
data-atwho-repositories-url="<%= atwho_repositories_team_path(current_team) %>"
|
||||||
data-atwho-rep-items-url="<%= atwho_rep_items_team_path(current_team) %>"
|
data-atwho-rep-items-url="<%= atwho_rep_items_team_path(current_team) %>"
|
||||||
data-atwho-menu-items="<%= atwho_menu_items_team_path(current_team) %>"
|
data-atwho-menu-items="<%= atwho_menu_items_team_path(current_team) %>"
|
||||||
data-tooltips-enabled="<%= current_user.settings[:tooltips_enabled] %>"
|
|
||||||
<% end %>
|
<% end %>
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
<% Repository.accessible_by_teams(current_team).order(created_at: :asc).each do |repository| %>
|
<% Repository.accessible_by_teams(current_team).order(created_at: :asc).each do |repository| %>
|
||||||
<li>
|
<li>
|
||||||
<a class="dropdown-item <%= "active-item" if @repository == repository %> help_tooltips"
|
<a class="dropdown-item <%= "active-item" if @repository == repository %>"
|
||||||
data-tooltiplink="<%= I18n.t('tooltips.link.protocol.inventories') %>"
|
|
||||||
data-tooltipcontent="<%= I18n.t('tooltips.text.protocol.inventories') %>"
|
|
||||||
href="<%= repository_my_module_url(id: @my_module, repository_id: repository) %>"
|
href="<%= repository_my_module_url(id: @my_module, repository_id: repository) %>"
|
||||||
title="<%= repository.name %>">
|
title="<%= repository.name %>">
|
||||||
<% if enable_counters %>
|
<% if enable_counters %>
|
||||||
|
@ -22,8 +20,7 @@
|
||||||
|
|
||||||
<% Repository.used_on_task_but_unshared(@my_module, current_team).each do |repository| %>
|
<% Repository.used_on_task_but_unshared(@my_module, current_team).each do |repository| %>
|
||||||
<li>
|
<li>
|
||||||
<a class="muted dropdown-item help_tooltips"
|
<a class="muted dropdown-item"
|
||||||
data-tooltipcontent="<%= I18n.t('tooltips.text.protocol.unshared_inventory') + repository.team.name %>"
|
|
||||||
title="<%= repository.name %>"
|
title="<%= repository.name %>"
|
||||||
href="<%= unshared_inventory_my_module_path(inventory_id: repository.id)%>">
|
href="<%= unshared_inventory_my_module_path(inventory_id: repository.id)%>">
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
<div class="pull-right my_module-state-buttons">
|
<div class="pull-right my_module-state-buttons">
|
||||||
<% if can_complete_module?(@my_module) %>
|
<% if can_complete_module?(@my_module) %>
|
||||||
<div class="btn-group help_tooltips"
|
<div class="btn-group">
|
||||||
data-tooltiplink="<%= I18n.t('tooltips.link.protocol.complete') %>"
|
|
||||||
data-tooltipcontent="<%= I18n.t('tooltips.text.protocol.complete') %>">
|
|
||||||
<% if !@my_module.completed? %>
|
<% if !@my_module.completed? %>
|
||||||
<div data-action="complete-task" data-link-url="<%= toggle_task_state_my_module_path(@my_module) %>">
|
<div data-action="complete-task" data-link-url="<%= toggle_task_state_my_module_path(@my_module) %>">
|
||||||
<%= render 'my_modules/state_button_complete.html.erb' %>
|
<%= render 'my_modules/state_button_complete.html.erb' %>
|
||||||
|
|
|
@ -18,11 +18,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="repo-datatables-buttons pull-right" style="display: inline;">
|
<div class="repo-datatables-buttons pull-right" style="display: inline;">
|
||||||
<button class="btn btn-secondary help_tooltips manage-repo-column-index"
|
<button class="btn btn-secondary manage-repo-column-index"
|
||||||
data-modal-url="<%= repository_columns_index_html_path(@repository) %>"
|
data-modal-url="<%= repository_columns_index_html_path(@repository) %>"
|
||||||
data-action="new"
|
data-action="new">
|
||||||
data-tooltiplink="<%= I18n.t('tooltips.link.inventory.manage_columns') %>"
|
|
||||||
data-tooltipcontent="<%= I18n.t('tooltips.text.inventory.manage_columns') %>">
|
|
||||||
<span class="fas fa-wrench"></span> <%= t('repositories.index.columns') %>
|
<span class="fas fa-wrench"></span> <%= t('repositories.index.columns') %>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -18,9 +18,7 @@
|
||||||
<% if can_manage_module?(@my_module) %>
|
<% if can_manage_module?(@my_module) %>
|
||||||
<div class="add-result-toolbar">
|
<div class="add-result-toolbar">
|
||||||
<span class="hidden-xs add-result-text"><%= t'my_modules.results.add_label' %></span>
|
<span class="hidden-xs add-result-text"><%= t'my_modules.results.add_label' %></span>
|
||||||
<div class="sci-btn-group help_tooltips"
|
<div class="sci-btn-group">
|
||||||
data-tooltiplink="<%= I18n.t('tooltips.link.task.results') %>"
|
|
||||||
data-tooltipcontent="<%= I18n.t('tooltips.text.task.results') %>">
|
|
||||||
<a class="btn btn-primary"
|
<a class="btn btn-primary"
|
||||||
id="new-result-text"
|
id="new-result-text"
|
||||||
data-href="<%= new_my_module_result_text_path(my_module_id: @my_module.id) %>"
|
data-href="<%= new_my_module_result_text_path(my_module_id: @my_module.id) %>"
|
||||||
|
|
|
@ -22,11 +22,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal"><%=t "general.cancel" %></button>
|
<button type="button" class="btn btn-secondary" data-dismiss="modal"><%=t "general.cancel" %></button>
|
||||||
<%= f.submit t("projects.index.modal_new_project.create"), class: "btn btn-primary help_tooltips",
|
<%= f.submit t("projects.index.modal_new_project.create"), class: "btn btn-primary" %>
|
||||||
data: {
|
|
||||||
tooltiplink: I18n.t('tooltips.link.new_project'),
|
|
||||||
tooltipcontent: I18n.t('tooltips.text.new_project')
|
|
||||||
} %>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -20,11 +20,7 @@
|
||||||
<% if can_clone_experiment?(experiment) %>
|
<% if can_clone_experiment?(experiment) %>
|
||||||
<%= link_to clone_modal_experiment_url(experiment),
|
<%= link_to clone_modal_experiment_url(experiment),
|
||||||
remote: true, type: 'button',
|
remote: true, type: 'button',
|
||||||
class: 'clone-experiment help_tooltips pull-right',
|
class: 'clone-experiment pull-right' do %>
|
||||||
data: {
|
|
||||||
tooltiplink: I18n.t('tooltips.link.experiment.copy'),
|
|
||||||
tooltipcontent: I18n.t('tooltips.text.experiment.copy')
|
|
||||||
} do %>
|
|
||||||
<span class="fas fa-copy"></span>
|
<span class="fas fa-copy"></span>
|
||||||
<%= t('experiments.clone.label_title') %>
|
<%= t('experiments.clone.label_title') %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -33,7 +29,7 @@
|
||||||
|
|
||||||
<div class="panel-title"><%= link_to experiment.name, canvas_experiment_path(experiment) %></div>
|
<div class="panel-title"><%= link_to experiment.name, canvas_experiment_path(experiment) %></div>
|
||||||
|
|
||||||
<span class="help_tooltips panel-date" data-tooltiplink="<%= I18n.t('tooltips.link.experiment.dates') %>" data-tooltipcontent="<%= I18n.t('tooltips.text.experiment.dates') %>">
|
<span class="panel-date">
|
||||||
<span class="fas fa-calendar-alt" aria-hidden="true"></span>
|
<span class="fas fa-calendar-alt" aria-hidden="true"></span>
|
||||||
<%= l(experiment.created_at, format: :full_date) %> - <%= l(experiment.updated_at, format: :full_date) %>
|
<%= l(experiment.created_at, format: :full_date) %> - <%= l(experiment.updated_at, format: :full_date) %>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -16,11 +16,12 @@
|
||||||
<% repositories.each do |repository| %>
|
<% repositories.each do |repository| %>
|
||||||
<li class="branch <%= 'active parent_li' if current_page?(repository_path(repository)) %>" >
|
<li class="branch <%= 'active parent_li' if current_page?(repository_path(repository)) %>" >
|
||||||
<span class="tree-link no-indent" title="<%= repository.name %>">
|
<span class="tree-link no-indent" title="<%= repository.name %>">
|
||||||
<%= link_to repository.name,
|
<%= link_to repository_path(repository),
|
||||||
repository_path(repository),
|
|
||||||
class: current_page?(repository_path(repository)) ? 'disabled line-wrap' : 'line-wrap',
|
class: current_page?(repository_path(repository)) ? 'disabled line-wrap' : 'line-wrap',
|
||||||
data: { 'no-turbolink' => 'true', type: 'repository', id: repository.id } %>
|
data: { 'no-turbolink' => 'true', type: 'repository', id: repository.id } do %>
|
||||||
<%= inventory_shared_status_icon(repository, current_team) %>
|
<%= repository.name %>
|
||||||
|
<%= inventory_shared_status_icon(repository, current_team) %>
|
||||||
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -44,11 +44,9 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button class="btn btn-secondary help_tooltips manage-repo-column-index"
|
<button class="btn btn-secondary manage-repo-column-index"
|
||||||
data-modal-url="<%= repository_columns_index_html_path(@repository) %>"
|
data-modal-url="<%= repository_columns_index_html_path(@repository) %>"
|
||||||
data-action="new"
|
data-action="new">
|
||||||
data-tooltiplink="<%= I18n.t('tooltips.link.inventory.manage_columns') %>"
|
|
||||||
data-tooltipcontent="<%= I18n.t('tooltips.text.inventory.manage_columns') %>">
|
|
||||||
<span class="fas fa-wrench"></span> <%= t('repositories.index.columns') %>
|
<span class="fas fa-wrench"></span> <%= t('repositories.index.columns') %>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
@ -113,10 +111,8 @@
|
||||||
<div class="toolbarButtonsDatatable" style="display:none">
|
<div class="toolbarButtonsDatatable" style="display:none">
|
||||||
|
|
||||||
<% if can_create_repository_rows?(@repository) %>
|
<% if can_create_repository_rows?(@repository) %>
|
||||||
<button type="button" class="btn btn-primary editAdd help_tooltips"
|
<button type="button" class="btn btn-primary editAdd"
|
||||||
id="addRepositoryRecord" onclick="onClickAddRecord()"
|
id="addRepositoryRecord" onclick="onClickAddRecord()">
|
||||||
data-tooltiplink="<%= I18n.t('tooltips.link.inventory.new') %>"
|
|
||||||
data-tooltipcontent="<%= I18n.t('tooltips.text.inventory.new') %>">
|
|
||||||
<span class="fas fa-plus"></span>
|
<span class="fas fa-plus"></span>
|
||||||
<span class="hidden-xs"><%= t("repositories.add_new_record") %></span>
|
<span class="hidden-xs"><%= t("repositories.add_new_record") %></span>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -14,11 +14,9 @@
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<% if can_create_repository_columns?(@repository)%>
|
<% if can_create_repository_columns?(@repository)%>
|
||||||
<button id="new-repo-column-modal"
|
<button id="new-repo-column-modal"
|
||||||
class="btn btn-secondary help_tooltips manage-repo-column"
|
class="btn btn-secondary manage-repo-column"
|
||||||
data-modal-url="<%= repository_columns_create_html_path(@repository) %>"
|
data-modal-url="<%= repository_columns_create_html_path(@repository) %>"
|
||||||
data-action="new"
|
data-action="new">
|
||||||
data-tooltiplink="<%= I18n.t('tooltips.link.inventory.manage_columns') %>"
|
|
||||||
data-tooltipcontent="<%= I18n.t('tooltips.text.inventory.manage_columns') %>">
|
|
||||||
<span class="fas fa-plus"></span> <%=t 'libraries.manange_modal_column_index.add_column' %>
|
<span class="fas fa-plus"></span> <%=t 'libraries.manange_modal_column_index.add_column' %>
|
||||||
</button>
|
</button>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
<div class="well">
|
<div class="well">
|
||||||
<%= form_for(@result, url: my_module_result_assets_path(format: :json), data: { type: :json }) do |f| %>
|
<%= form_for(@result, url: my_module_result_assets_path(format: :json), data: { type: :json }) do |f| %>
|
||||||
<div id="new-result-assets-select" class="text-center new-asset-box">
|
<div id="new-result-assets-select" class="text-center new-asset-box">
|
||||||
<span class="help_tooltips"
|
<span>
|
||||||
data-tooltiplink="<%= I18n.t('tooltips.link.protocol.step_add_files') %>"
|
|
||||||
data-tooltipcontent="<%= I18n.t('tooltips.text.protocol.step_add_files') %>">
|
|
||||||
<%= t('assets.drag_n_drop.label_html') %>
|
<%= t('assets.drag_n_drop.label_html') %>
|
||||||
<label>
|
<label>
|
||||||
<span class="btn btn-default new-asset-upload-button">
|
<span class="btn btn-default new-asset-upload-button">
|
||||||
|
|
|
@ -117,18 +117,14 @@ invite_to_team = type.in?(%w(invite_to_team invite_to_team_with_role))
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<!-- Invite buttons -->
|
<!-- Invite buttons -->
|
||||||
<button type="button" class="btn btn-primary help_tooltips"
|
<button type="button" class="btn btn-primary"
|
||||||
data-tooltiplink="<%= I18n.t('tooltips.link.invite_to_sci') %>"
|
|
||||||
data-tooltipcontent="<%= I18n.t('tooltips.text.invite_to_sci') %>"
|
|
||||||
data-role="invite-btn" data-action="invite"
|
data-role="invite-btn" data-action="invite"
|
||||||
disabled="disabled">
|
disabled="disabled">
|
||||||
<%= t('invite_users.invite_btn') %>
|
<%= t('invite_users.invite_btn') %>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div class="btn-group" data-role="invite-with-role-div">
|
<div class="btn-group" data-role="invite-with-role-div">
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle help_tooltips"
|
<button type="button" class="btn btn-primary dropdown-toggle"
|
||||||
data-tooltiplink="<%= I18n.t('tooltips.link.invite_to_sci') %>"
|
|
||||||
data-tooltipcontent="<%= I18n.t('tooltips.text.invite_to_sci') %>"
|
|
||||||
data-toggle="dropdown" data-id="invite-btn" aria-haspopup="true"
|
data-toggle="dropdown" data-id="invite-btn" aria-haspopup="true"
|
||||||
aria-expanded="false" data-role="invite-with-role-btn"
|
aria-expanded="false" data-role="invite-with-role-btn"
|
||||||
disabled="disabled">
|
disabled="disabled">
|
||||||
|
|
|
@ -52,9 +52,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane" role="tabpanel" id="new-step-assets">
|
<div class="tab-pane" role="tabpanel" id="new-step-assets">
|
||||||
<div class="text-center new-asset-box">
|
<div class="text-center new-asset-box">
|
||||||
<span class="help_tooltips"
|
<span>
|
||||||
data-tooltiplink="<%= I18n.t('tooltips.link.protocol.step_add_files') %>"
|
|
||||||
data-tooltipcontent="<%= I18n.t('tooltips.text.protocol.step_add_files') %>">
|
|
||||||
<%=t 'assets.drag_n_drop.label_html' %>
|
<%=t 'assets.drag_n_drop.label_html' %>
|
||||||
<label>
|
<label>
|
||||||
<span class="btn btn-default new-asset-upload-button">
|
<span class="btn btn-default new-asset-upload-button">
|
||||||
|
|
|
@ -127,26 +127,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
|
||||||
<div class="preferences-settings-container">
|
|
||||||
<h4><%= t('users.settings.account.preferences.edit.tips.title') %></h4>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-2">
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-10">
|
|
||||||
<p><%=t 'users.settings.account.preferences.edit.tips.text1' %></p>
|
|
||||||
<p><%=t 'users.settings.account.preferences.edit.tips.text2' %></p>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-4">
|
|
||||||
<%=t 'users.settings.account.preferences.edit.tips.toggle' %>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<%= check_box_tag :tooltips_enabled, @user.settings[:tooltips_enabled] %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<br>
|
<br>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1623,11 +1623,6 @@ en:
|
||||||
date_format_label: "Date format"
|
date_format_label: "Date format"
|
||||||
date_format_sublabel: "Date format setting affects all date display throughout application."
|
date_format_sublabel: "Date format setting affects all date display throughout application."
|
||||||
date_format_title: "Date format"
|
date_format_title: "Date format"
|
||||||
tips:
|
|
||||||
title: "Help Tips"
|
|
||||||
text1: "When you place your mouse cursor on a certain element in SciNote and hold it for a bit, a short and helpful description will appear."
|
|
||||||
text2: "If you feel confident in SciNote already, you can turn off these Help Tips."
|
|
||||||
toggle: "Show Help Tips"
|
|
||||||
update_flash: "Preferences successfully updated."
|
update_flash: "Preferences successfully updated."
|
||||||
addons:
|
addons:
|
||||||
head_title: "Settings | Add-ons"
|
head_title: "Settings | Add-ons"
|
||||||
|
@ -2350,57 +2345,6 @@ en:
|
||||||
invite_users:
|
invite_users:
|
||||||
permission_error: "You don't have permission to invite additional users to this team. Contact its administrator/s."
|
permission_error: "You don't have permission to invite additional users to this team. Contact its administrator/s."
|
||||||
|
|
||||||
tooltips:
|
|
||||||
text:
|
|
||||||
invite_to_sci: "Invite other scientists to SciNote and gain additional free storage space for your team. How?"
|
|
||||||
new_project: "Project is the topmost layer when you are organizing your data in SciNote. It allows you to assign members and keep all project-related data within one project card."
|
|
||||||
experiment:
|
|
||||||
copy: "Copy this experiment as a template to another project. Only tasks and protocol steps will be copied!"
|
|
||||||
dates: "You can see the date when this experiment was created and when it was last modified."
|
|
||||||
move: "Move your experiment with all its tasks to another project. Make sure that members of both projects are the same even if a few other members were added."
|
|
||||||
task:
|
|
||||||
due_date: "Set due dates to your tasks and stay organized."
|
|
||||||
new: "Your experiment can be defined by a series of tasks. Start by adding the tasks and, if needed, connect them into a workflow."
|
|
||||||
color_tag: "Create personalised colorful tags to mark your tasks."
|
|
||||||
due_date_specific: "Set a due date to a specific task."
|
|
||||||
results: "You have three options to save your lab results: as classic text, created table or uploaded file from computer."
|
|
||||||
protocol:
|
|
||||||
step_edit: "You can edit the name and description of a protocol step, add checklists, tables or files."
|
|
||||||
step_add_files: "Drag and drop your files here. SciNote supports all types of files and images."
|
|
||||||
linking: "By linking the protocol in your task and the protocol in a repository you can see if any of the versions has been modified and decide to update either of them at any point."
|
|
||||||
complete: "You can complete the task if you are done working on it."
|
|
||||||
inventories: "You can assign inventory items to your task."
|
|
||||||
num_linked: "This number represents how many tasks are linked to the selected protocol."
|
|
||||||
unshared_inventory: "This Inventory has been unshared with your Team by "
|
|
||||||
inventory:
|
|
||||||
new: "Inventories in SciNote enable you to manage all your resources, from samples, reagents, lab equipment, plasmids, etc."
|
|
||||||
visibility: "You can make inventory columns visible or hidden."
|
|
||||||
manage_columns: "Add custom columns to your inventory table and choose whether the rows will contain text, number, file, date, time or be defined as a checklist, dropdown or status list."
|
|
||||||
|
|
||||||
link:
|
|
||||||
invite_to_sci: "https://support.scinote.net/hc/en-us/articles/115003902929"
|
|
||||||
new_project: "https://support.scinote.net/hc/en-us/articles/115003373852"
|
|
||||||
experiment:
|
|
||||||
copy: "https://support.scinote.net/hc/en-us/articles/115001434365"
|
|
||||||
dates: "https://support.scinote.net/hc/en-us/articles/115001799832"
|
|
||||||
move: "https://support.scinote.net/hc/en-us/articles/115001434385"
|
|
||||||
task:
|
|
||||||
due_date: "https://support.scinote.net/hc/en-us/articles/360000527572"
|
|
||||||
new: "https://support.scinote.net/hc/en-us/articles/360000537411"
|
|
||||||
color_tag: "https://support.scinote.net/hc/en-us/articles/360007237912"
|
|
||||||
due_date_specific: "https://support.scinote.net/hc/en-us/articles/360000527572"
|
|
||||||
results: "https://support.scinote.net/hc/en-us/articles/360007238592"
|
|
||||||
protocol:
|
|
||||||
step_edit: "https://support.scinote.net/hc/en-us/articles/115001788051"
|
|
||||||
step_add_files: "https://support.scinote.net/hc/en-us/articles/360007237252"
|
|
||||||
linking: "https://support.scinote.net/hc/en-us/articles/115003680385"
|
|
||||||
complete: "https://support.scinote.net/hc/en-us/articles/115001799812"
|
|
||||||
inventories: "https://support.scinote.net/hc/en-us/articles/360004694971"
|
|
||||||
num_linked: "https://support.scinote.net/hc/en-us/articles/115001788711"
|
|
||||||
inventory:
|
|
||||||
new: "https://support.scinote.net/hc/en-us/articles/360004627792"
|
|
||||||
visibility: "https://support.scinote.net/hc/en-us/articles/360004627472"
|
|
||||||
manage_columns: "https://support.scinote.net/hc/en-us/articles/360004695831"
|
|
||||||
marvinjs:
|
marvinjs:
|
||||||
new_sketch: "New Chemical Drawing"
|
new_sketch: "New Chemical Drawing"
|
||||||
new_button: "Create Chemical Drawing"
|
new_button: "Create Chemical Drawing"
|
||||||
|
|
|
@ -45,9 +45,9 @@ en:
|
||||||
add_comment_to_project_html: "%{user} commented on project %{project}."
|
add_comment_to_project_html: "%{user} commented on project %{project}."
|
||||||
edit_project_comment_html: "%{user} edited comment on project %{project}."
|
edit_project_comment_html: "%{user} edited comment on project %{project}."
|
||||||
delete_project_comment_html: "%{user} deleted comment on project %{project}."
|
delete_project_comment_html: "%{user} deleted comment on project %{project}."
|
||||||
create_report_html: "%{user} created report <strong>%{report}</strong>."
|
create_report_html: "%{user} created report %{report}."
|
||||||
edit_report_html: "%{user} edited report <strong>%{report}</strong>."
|
edit_report_html: "%{user} edited report %{report}."
|
||||||
delete_report_html: "%{user} deleted report <strong>%{report}</strong>."
|
delete_report_html: "%{user} deleted report %{report}."
|
||||||
add_result_html: "%{user} added %{type_of_result} result %{result}."
|
add_result_html: "%{user} added %{type_of_result} result %{result}."
|
||||||
edit_result_html: "%{user} edited %{type_of_result} result %{result}."
|
edit_result_html: "%{user} edited %{type_of_result} result %{result}."
|
||||||
add_comment_to_result_html: "%{user} commented on result %{result}."
|
add_comment_to_result_html: "%{user} commented on result %{result}."
|
||||||
|
|
|
@ -68,7 +68,7 @@ describe RepositoryColumns::UpdateListColumnService do
|
||||||
context 'when there is more than 500 items' do
|
context 'when there is more than 500 items' do
|
||||||
let(:params) do
|
let(:params) do
|
||||||
{
|
{
|
||||||
repository_list_items_attributes: Array(1..510).map { |e| { data: "Item #{e}" } }
|
repository_list_items_attributes: Array(1..501).map { |e| { data: "Item #{e}" } }
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue