9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/pretty_file_input/views/component.rb', line 9
def content
div(
class: "pfi cf #{filename ? 'is_uploaded' : ''}",
'data-pfi' => {
name: name,
persisted: persisted,
action: action,
method: method,
additionalParams: additional_params
}.to_json
) {
div(class: 'pfi_uploaded') {
span filename, class: 'pfi_existing_filename'
text ' '
a 'Remove', 'data-pfi-remove' => true, class: 'button mini info'
}
div(class: 'pfi_not_uploaded') {
input type: 'file'
span class: 'pfi_status'
}
}
end
|