mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-06 11:57:16 +08:00
Add title for full view assign modal
This commit is contained in:
parent
c00eec24bf
commit
69abccbbd6
2 changed files with 10 additions and 4 deletions
|
@ -176,7 +176,8 @@ var MyModuleRepositories = (function() {
|
||||||
FilePreviewModal.init();
|
FilePreviewModal.init();
|
||||||
renderFullViewRepositoryName(
|
renderFullViewRepositoryName(
|
||||||
tableContainer.attr('data-repository-name'),
|
tableContainer.attr('data-repository-name'),
|
||||||
tableContainer.attr('data-repository-snapshot-created')
|
tableContainer.attr('data-repository-snapshot-created'),
|
||||||
|
options.assign_mode
|
||||||
);
|
);
|
||||||
updateFullViewRowsCount(tableContainer.attr('data-assigned-items-count'));
|
updateFullViewRowsCount(tableContainer.attr('data-assigned-items-count'));
|
||||||
if (FULL_VIEW_TABLE_SCROLLBAR) {
|
if (FULL_VIEW_TABLE_SCROLLBAR) {
|
||||||
|
@ -463,11 +464,15 @@ var MyModuleRepositories = (function() {
|
||||||
FULL_VIEW_MODAL.find('.repository-name').attr('data-rows-count', value);
|
FULL_VIEW_MODAL.find('.repository-name').attr('data-rows-count', value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderFullViewRepositoryName(name, snapshotDate) {
|
function renderFullViewRepositoryName(name, snapshotDate, assignMode) {
|
||||||
var title;
|
var title;
|
||||||
var repositoryName = name || FULL_VIEW_MODAL.find('.repository-name').data('repository-name');
|
var repositoryName = name || FULL_VIEW_MODAL.find('.repository-name').data('repository-name');
|
||||||
|
|
||||||
if (snapshotDate) {
|
if (assignMode) {
|
||||||
|
title = I18n.t('my_modules.repository.full_view.assign_modal_header', {
|
||||||
|
repository_name: repositoryName
|
||||||
|
});
|
||||||
|
} else if (snapshotDate) {
|
||||||
title = I18n.t('my_modules.repository.full_view.modal_snapshot_header', {
|
title = I18n.t('my_modules.repository.full_view.modal_snapshot_header', {
|
||||||
repository_name: repositoryName,
|
repository_name: repositoryName,
|
||||||
snaphot_date: snapshotDate
|
snaphot_date: snapshotDate
|
||||||
|
@ -567,7 +572,7 @@ var MyModuleRepositories = (function() {
|
||||||
HelperModule.flashAlertMsg(data.flash, 'success');
|
HelperModule.flashAlertMsg(data.flash, 'success');
|
||||||
SELECTED_ROWS = {};
|
SELECTED_ROWS = {};
|
||||||
$(FULL_VIEW_TABLE.table().container()).find('.dataTable')
|
$(FULL_VIEW_TABLE.table().container()).find('.dataTable')
|
||||||
.attr('data-assigned-items-count', data.rows_count)
|
.attr('data-assigned-items-count', data.rows_count);
|
||||||
FULL_VIEW_TABLE.ajax.reload(null, false);
|
FULL_VIEW_TABLE.ajax.reload(null, false);
|
||||||
reloadRepositoriesList();
|
reloadRepositoriesList();
|
||||||
renderFullViewAssignButtons();
|
renderFullViewAssignButtons();
|
||||||
|
|
|
@ -794,6 +794,7 @@ en:
|
||||||
full_view:
|
full_view:
|
||||||
modal_live_header: '%{repository_name}: Live version'
|
modal_live_header: '%{repository_name}: Live version'
|
||||||
modal_snapshot_header: '%{repository_name}: Snapshot of %{snaphot_date}'
|
modal_snapshot_header: '%{repository_name}: Snapshot of %{snaphot_date}'
|
||||||
|
assign_modal_header: 'Assign from %{repository_name} inventory'
|
||||||
snapshots:
|
snapshots:
|
||||||
simple_view:
|
simple_view:
|
||||||
live_bottom_label: 'Live version'
|
live_bottom_label: 'Live version'
|
||||||
|
|
Loading…
Add table
Reference in a new issue