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
|
|
|
|
2017-12-06 02:51:44 +08:00
|
|
|
<% if asset.step %>
|
|
|
|
<% protocol = asset.step.protocol %>
|
2018-02-02 01:41:28 +08:00
|
|
|
<% if can_read_protocol_in_module?(protocol) ||
|
|
|
|
can_read_protocol_in_repository?(protocol) ||
|
2018-02-09 23:14:40 +08:00
|
|
|
(asset.result && can_read_experiment?(protocol.my_module.experiment)) %>
|
2017-12-06 02:51:44 +08:00
|
|
|
<a href="<%= download_asset_path asset %>" target="_blank">
|
|
|
|
<%= text %>
|
|
|
|
</a>
|
|
|
|
<% end %>
|
2016-07-21 19:11:15 +08:00
|
|
|
<% else %>
|
|
|
|
<%= text %>
|
2016-10-11 22:16:48 +08:00
|
|
|
<% end %>
|