Added experiment code to PDF and DOCX [SCI-5830]

This commit is contained in:
Martin Artnik 2021-06-18 14:11:54 +02:00
parent 29ff910eba
commit afc1b2d8b6
3 changed files with 3 additions and 3 deletions

View file

@ -11,7 +11,7 @@ module Reports::Docx::DrawExperiment
@docx.h2 experiment.name, size: Constants::REPORT_DOCX_EXPERIMENT_TITLE_SIZE
@docx.p do
text I18n.t('projects.reports.elements.experiment.user_time',
timestamp: I18n.l(experiment.created_at, format: :full)), color: color[:gray]
code: experiment.code, timestamp: I18n.l(experiment.created_at, format: :full)), color: color[:gray]
if experiment.archived?
text ' | '
text I18n.t('search.index.archived'), color: color[:gray]

View file

@ -5,7 +5,7 @@
<div class="report-element-header">
<div class="row">
<div class="pull-left user-time">
<%= t('projects.reports.elements.experiment.user_time', timestamp: l(timestamp, format: :full)) %>
<%= t('projects.reports.elements.experiment.user_time', code: experiment.code, timestamp: l(timestamp, format: :full)) %>
<b><%= link_to t('projects.reports.elements.all.scinote_link'),canvas_experiment_url(experiment), target: :_blank %></b>
</div>
</div>

View file

@ -677,7 +677,7 @@ en:
protocol:
user_time: "Protocol created on %{timestamp}."
experiment:
user_time: "Experiment created on %{timestamp}."
user_time: "Experiment %{code} created on %{timestamp}."
no_description: "No description"
no_tags: "No tags"
module_activity: