scinote-web/app/views/reports/elements/_experiment_element.html.erb

25 lines
1,007 B
Text
Raw Normal View History

2021-06-10 16:59:34 +08:00
<% experiment ||= report_element.experiment %>
<% timestamp = experiment.created_at %>
<% export_all = defined?(export_all) && export_all %>
2021-06-10 16:59:34 +08:00
<div class="report-element report-experiment-element">
<div class="report-element-body" data-hook="report-experiment-element">
<h3 class="experiment-name">
<%= link_to experiment.name, my_modules_experiment_url(experiment), target: :_blank %>
2022-05-31 20:40:25 +08:00
<% if experiment.archived? %>
<span class="label label-warning"><%= t('search.index.archived') %></span>
<% end %>
</h3>
2022-05-31 20:40:25 +08:00
<div class="user-time">
<%= t('projects.reports.elements.experiment.user_time', code: experiment.code, timestamp: l(timestamp, format: :full)) %>
</div>
2022-05-31 20:40:25 +08:00
<% if experiment.description.present? %>
<%= custom_auto_link(experiment.description, team: current_team, base64_encoded_imgs: export_all) %>
<% end %>
</div>
<% if defined?(children) %>
<div class="report-element-children">
<%= children %>
</div>
<% end %>
</div>