-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfile_cell_component.html.erb
33 lines (33 loc) · 1.34 KB
/
file_cell_component.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<%= link_to new_workflow_executions_file_selector_path(
"file_selector[attachable_id]": @attachable.id,
"file_selector[attachable_type]": @attachable.class.to_s,
"file_selector[index]": @index,
"file_selector[selected_id]": @selected.empty? ? nil : @selected[:id],
"file_selector[property]": @property,
"file_selector[required_properties]": @required_properties,
"file_selector[file_type]": @file_type,
"file_selector[file_selector_arguments]": @file_selector_arguments
),
data: {
turbo_stream: "true",
} do %>
<div
id="<%="#{@attachable.id}_#{@property}" %>"
class="
w-full focus:ring-primary-500 focus:border-primary-500 p-2 dark:bg-inherit
bg-inherit dark:placeholder-slate-400 text-inherit
text-sm dark:focus:ring-primary-500 dark:focus:border-primary-500 cursor-pointer
hover:border-slate-300 border-transparent border-2
"
data-file-cell-required="<%= @required_properties.present? && @required_properties.include?(@property) ? "true" : "false" %>"
>
<% unless @selected.empty? %>
<input
type="hidden"
name="workflow_execution[samples_workflow_executions_attributes][<%= @index%>][samplesheet_params][<%= @property %>]"
value= <%= @selected[:global_id]%>
>
<% end %>
<%= @selected.empty? ? t(".no_selected_file") : @selected[:filename] %>
</div>
<% end %>