mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 09:42:46 +08:00
Add default text if not repository columns are selected for reports [SCI-11211]
This commit is contained in:
parent
6bd4d1a1bd
commit
c2b7c12497
3 changed files with 9 additions and 1 deletions
|
@ -20,7 +20,12 @@ module Reports::Docx::DrawMyModuleRepository
|
|||
@docx.p I18n.t('projects.reports.elements.module_repository.name',
|
||||
repository: repository.name,
|
||||
my_module: my_module.name), bold: true, size: Constants::REPORT_DOCX_STEP_ELEMENTS_TITLE_SIZE
|
||||
@docx.table table, border_size: Constants::REPORT_DOCX_TABLE_BORDER_SIZE
|
||||
|
||||
if table.present?
|
||||
@docx.table table, border_size: Constants::REPORT_DOCX_TABLE_BORDER_SIZE
|
||||
else
|
||||
@docx.p I18n.t('projects.reports.elements.module_repository.no_columns'), italic: true
|
||||
end
|
||||
|
||||
@docx.p
|
||||
@docx.p
|
||||
|
|
|
@ -5,6 +5,8 @@ module Reports::Docx::RepositoryHelper
|
|||
include ActionView::Helpers::NumberHelper
|
||||
|
||||
def prepare_row_columns_for_docx(repository_data, my_module = nil, repository = nil)
|
||||
return if repository_data[:headers].blank?
|
||||
|
||||
result = [repository_data[:headers]]
|
||||
excluded_columns = repository_data[:excluded_columns]
|
||||
|
||||
|
|
|
@ -978,6 +978,7 @@ en:
|
|||
name: "%{repository} of task %{my_module}"
|
||||
table_name: "%{name}"
|
||||
no_items: "No items"
|
||||
no_columns: "No columns selected"
|
||||
result:
|
||||
user_time: "Added on %{timestamp} by %{user}."
|
||||
result_asset:
|
||||
|
|
Loading…
Reference in a new issue