bullet_train-themes-tailwind_css 1.3.12 → 1.3.14
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce6a1347739bb99fd58d323378dc80c84c1efcc15c74281b948faa055facbba8
|
4
|
+
data.tar.gz: 5d5793b6cc9e318c016c756e9a9bf9e0238f84e8ab03c421f24c59cd38c760d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd3c9ec60b23e9b1ff94964dd99a490ea8705cf6f542fc2bc883560905f9fced79d8e052105756eaf2779afcb5bf4446f473149b7a297c81fcc5e4ceb5db5402
|
7
|
+
data.tar.gz: dda92a627bda26479f1a5408db0e94b15c821ba7ae0d0aed052d3bfecd11692aa077e28caf7bd1c4c61f7e9b79cff6de7da0f77566444f9590db3b7eb118738e
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<% object ||= current_attributes_object %>
|
2
|
+
<% strategy ||= current_attributes_strategy || :none %>
|
3
|
+
<% url ||= nil %>
|
4
|
+
<% if object.send(attribute).attached? %>
|
5
|
+
<%= render 'shared/attributes/attribute', object: object, attribute: attribute, strategy: strategy, url: url do %>
|
6
|
+
<% object.send(attribute).each do |file| %>
|
7
|
+
<%= link_to url_for(file), class: 'button download-file' do %>
|
8
|
+
<i class="leading-none mr-2 text-base ti ti-download"></i>
|
9
|
+
<span>Download File</span>
|
10
|
+
<% end %>
|
11
|
+
<% end %>
|
12
|
+
<% end %>
|
13
|
+
<% end %>
|
@@ -2,29 +2,33 @@
|
|
2
2
|
form ||= current_fields_form
|
3
3
|
options ||= {}
|
4
4
|
other_options ||= {}
|
5
|
+
multiple ||= false
|
6
|
+
persisted_files = multiple ? form.object.send(method) : [form.object.send(method)]
|
5
7
|
%>
|
6
8
|
|
7
9
|
<%= render 'shared/fields/field', form: form, method: method, helper: :file_field, options: options, other_options: other_options do %>
|
8
10
|
<% content_for :field do %>
|
9
11
|
<div class="file-field" data-controller="fields--file-field">
|
10
|
-
<%= form.
|
11
|
-
<%= form.file_field method, class: 'file-upload hidden', direct_upload: true, data: {'fields--file-field-target': 'fileField', action: 'change->fields--file-field#handleFileSelected'} %>
|
12
|
+
<%= form.file_field method, class: 'file-upload hidden', multiple: multiple, direct_upload: true, data: {'fields--file-field-target': 'fileField', action: 'change->fields--file-field#handleFileSelected'} %>
|
12
13
|
<div>
|
13
14
|
<% if form.object.send(method).attached? %>
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
15
|
+
<div class="divide-y-2 divide-dashed">
|
16
|
+
<% persisted_files.each do |file| %>
|
17
|
+
<div data-controller="fields--file-item" data-fields--file-item-id-value="<%= file.id %>">
|
18
|
+
<%= form.hidden_field "#{method}_removal".to_sym, multiple: multiple, value: nil, data: {'fields--file-item-target': 'removeFileFlag'} %>
|
19
|
+
<span data-fields--file-item-target="fileName" %>
|
20
|
+
<%= file.blob.filename %>
|
21
|
+
</span>
|
22
|
+
<%= link_to url_for(file), class: 'button download-file mr-3', data: {'fields--file-item-target': 'downloadFileButton'} do %>
|
23
|
+
<i class="leading-none mr-2 text-base ti ti-download"></i>
|
24
|
+
<span><%= t('fields.download_document') %></span>
|
25
|
+
<% end %>
|
26
|
+
<div class="button-alternative cursor-pointer mr-3" data-action="click->fields--file-item#removeFile" data-fields--file-item-target="removeFileButton">
|
27
|
+
<i class="leading-none mr-2 text-base ti ti-trash"></i>
|
28
|
+
<span><%= t('fields.remove_document') %></span>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
<% end %>
|
28
32
|
</div>
|
29
33
|
<% end %>
|
30
34
|
</div>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train-themes-tailwind_css
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|
@@ -81,6 +81,7 @@ files:
|
|
81
81
|
- app/views/themes/tailwind_css/attributes/_attempt.html.erb
|
82
82
|
- app/views/themes/tailwind_css/attributes/_code.html.erb
|
83
83
|
- app/views/themes/tailwind_css/attributes/_file.erb
|
84
|
+
- app/views/themes/tailwind_css/attributes/_files.erb
|
84
85
|
- app/views/themes/tailwind_css/fields/_buttons.html.erb
|
85
86
|
- app/views/themes/tailwind_css/fields/_cloudinary_image.html.erb
|
86
87
|
- app/views/themes/tailwind_css/fields/_color_picker.html.erb
|