mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-12 12:16:06 +08:00
26 lines
638 B
Text
26 lines
638 B
Text
|
<% is_result ||= nil %>
|
||
|
<% query ||= nil %>
|
||
|
<% text = query.present? ? highlight(asset.file_file_name, query) : asset.file_file_name %>
|
||
|
|
||
|
<% if is_result.blank? %>
|
||
|
<%= text %>
|
||
|
<% elsif is_result %>
|
||
|
<!-- RESULT -->
|
||
|
<% if can_download_result_assets(asset.result.my_module) %>
|
||
|
<a href="<%= download_asset_path asset %>" target="_blank">
|
||
|
<%= text %>
|
||
|
</a>
|
||
|
<% else %>
|
||
|
<%= text %>
|
||
|
<% end %>
|
||
|
<% else %>
|
||
|
<!-- STEP -->
|
||
|
<% if can_download_step_assets(asset.step.my_module) %>
|
||
|
<a href="<%= download_asset_path asset %>" target="_blank">
|
||
|
<%= text %>
|
||
|
</a>
|
||
|
<% else %>
|
||
|
<%= text %>
|
||
|
<% end %>
|
||
|
<% end %>
|