mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-12 12:16:06 +08:00
14 lines
503 B
Text
14 lines
503 B
Text
<% query ||= nil %>
|
|
<% text = query.present? ? highlight(asset.file_file_name, query.strip.split(/\s+/)) : asset.file_file_name %>
|
|
|
|
<% if asset.step and can_view_or_download_step_assets(asset.step.protocol) %>
|
|
<a href="<%= download_asset_path asset %>" target="_blank">
|
|
<%= text %>
|
|
</a>
|
|
<% elsif asset.result and can_view_or_download_result_assets(asset.result.my_module) %>
|
|
<a href="<%= download_asset_path asset %>" target="_blank">
|
|
<%= text %>
|
|
</a>
|
|
<% else %>
|
|
<%= text %>
|
|
<% end %>
|