2016-02-12 23:52:43 +08:00
|
|
|
<% query ||= nil %>
|
2016-07-21 19:11:15 +08:00
|
|
|
<% text = query.present? ? highlight(asset.file_file_name, query.strip.split(/\s+/)) : asset.file_file_name %>
|
2016-02-12 23:52:43 +08:00
|
|
|
|
2016-07-21 19:11:15 +08:00
|
|
|
<% if asset.step and can_view_or_download_step_assets(asset.step.protocol) %>
|
|
|
|
<a href="<%= download_asset_path asset %>" target="_blank">
|
2016-02-12 23:52:43 +08:00
|
|
|
<%= text %>
|
2016-07-21 19:11:15 +08:00
|
|
|
</a>
|
|
|
|
<% elsif asset.result and can_view_or_download_result_assets(asset.result.my_module) %>
|
|
|
|
<a href="<%= download_asset_path asset %>" target="_blank">
|
2016-02-12 23:52:43 +08:00
|
|
|
<%= text %>
|
2016-07-21 19:11:15 +08:00
|
|
|
</a>
|
|
|
|
<% else %>
|
|
|
|
<%= text %>
|
|
|
|
<% end %>
|