bullet_train-themes-tailwind_css 1.7.17 → 1.7.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/views/themes/tailwind_css/attributes/_file.erb +1 -1
- data/app/views/themes/tailwind_css/attributes/_files.erb +1 -1
- data/app/views/themes/tailwind_css/fields/_active_storage_image.html.erb +34 -5
- data/app/views/themes/tailwind_css/fields/_file_field.html.erb +34 -5
- data/config/locales/en/fields.en.yml +9 -0
- data/lib/bullet_train/themes/tailwind_css/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1eabb46a10aa96409d7a2f52eae865325685fe63fe0b5a71f2f308b8f8a6454a
|
4
|
+
data.tar.gz: 1b166ff6e1564ea5329c6ae0d2e44d8f26280dfb4cf9625a5b9364334ba819a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c5c58dc5b54f38e0e11972c3b63ac015f6922726392acf97096f7c7cef3d8e330720e056e2a9db345a57288effb77799402bbb112d2da8125373392fbfd5985
|
7
|
+
data.tar.gz: ef90973359fb21e83c7ea8fed0f4bd029d2de5cdbd891877a94f4bbadb0cde57ac2a2089045c80a72eda3f7baab217b17238646b80d541ecbd7ed92d94439813
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<%= render 'shared/attributes/attribute', object: object, attribute: attribute, strategy: strategy, url: url do %>
|
7
7
|
<%= link_to url_for(object.public_send(attribute)), class: 'button download-file' do %>
|
8
8
|
<i class="leading-none mr-2 text-base ti ti-download"></i>
|
9
|
-
<span><%= t("global.file_fields.download") %></span>
|
9
|
+
<span><%= t("global.file_fields.download") %> - <%= object.public_send(attribute).filename %></span>
|
10
10
|
<% end %>
|
11
11
|
<% end %>
|
12
12
|
<% end %>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<% object.send(attribute).each do |file| %>
|
7
7
|
<%= link_to url_for(file), class: 'button download-file' do %>
|
8
8
|
<i class="leading-none mr-2 text-base ti ti-download"></i>
|
9
|
-
<span
|
9
|
+
<span><%= t("global.file_fields.download") %> - <%= file.filename %></span>
|
10
10
|
<% end %>
|
11
11
|
<% end %>
|
12
12
|
<% end %>
|
@@ -27,15 +27,15 @@ options[:height] ||= 100
|
|
27
27
|
|
28
28
|
<%= render 'shared/fields/field', form: form, method: method, helper: :file_field, options: options, other_options: other_options do %>
|
29
29
|
<% content_for :field do %>
|
30
|
-
<div class="file-field" data-controller="fields--file-field">
|
30
|
+
<div class="file-field" data-controller="fields--file-field" data-fields--file-field-select-different-file-value="<%= t('fields.select_different_file') %>">
|
31
31
|
<%= form.file_field method, class: 'file-upload hidden', multiple: options[:multiple], direct_upload: true, data: {'fields--file-field-target': 'fileField', action: 'change->fields--file-field#handleFileSelected'} %>
|
32
32
|
<div>
|
33
33
|
<% if form.object.send(method).attached? %>
|
34
34
|
<div class="divide-y-2 divide-dashed">
|
35
35
|
<% persisted_files.each do |file| %>
|
36
|
-
<div data-controller="fields--file-item" data-fields--file-item-id-value="<%= file.id %>">
|
36
|
+
<div data-controller="fields--file-item" data-fields--file-item-id-value="<%= file.id %>" class="py-1 flex flex-wrap items-center">
|
37
37
|
<%= form.hidden_field "#{method}_removal".to_sym, multiple: options[:multiple], value: nil, data: {'fields--file-item-target': 'removeFileFlag'} %>
|
38
|
-
<%= image_tag photo_url_for_active_storage_attachment(file, options), class: 'mb-1.5', data: {'fields--file-item-target': "fileName"} %>
|
38
|
+
<%= image_tag photo_url_for_active_storage_attachment(file, options), class: 'mb-1.5 mr-auto', data: {'fields--file-item-target': "fileName"} %>
|
39
39
|
|
40
40
|
<%= link_to url_for(file), class: 'button download-file mr-3', data: {'fields--file-item-target': 'downloadFileButton'} do %>
|
41
41
|
<i class="leading-none mr-2 text-base ti ti-download"></i>
|
@@ -45,15 +45,44 @@ options[:height] ||= 100
|
|
45
45
|
<i class="leading-none mr-2 text-base ti ti-trash"></i>
|
46
46
|
<span><%= t('fields.remove_image') %></span>
|
47
47
|
</div>
|
48
|
+
<div class="button-alternative cursor-pointer mr-3 hidden" data-action="click->fields--file-item#cancelRemoveFile" data-fields--file-item-target="cancelRemoveFileButton">
|
49
|
+
<i class="leading-none mr-2 text-base ti ti-na"></i>
|
50
|
+
<span><%= t('fields.cancel_remove_image') %></span>
|
51
|
+
</div>
|
48
52
|
</div>
|
49
53
|
<% end %>
|
50
54
|
</div>
|
51
55
|
<% end %>
|
52
56
|
</div>
|
53
57
|
<div class="mt-2">
|
58
|
+
<div data-fields--file-field-target="selectedFileListContainer" class="hidden mb-2">
|
59
|
+
<div class="dark:text-white mb-1">
|
60
|
+
To upload:
|
61
|
+
</div>
|
62
|
+
<div data-fields--file-field-target="selectedFileList" class="divide-y-2 divide-dashed">
|
63
|
+
</div>
|
64
|
+
<template data-fields--file-field-target="selectedFileRowTemplate">
|
65
|
+
<div class="py-1 flex flex-wrap items-center">
|
66
|
+
<div>@FILENAME@</div>
|
67
|
+
<span data-action="click->fields--file-field#cancelFileUpload" data-filename="@FILENAME@" class="button-alternative cursor-pointer ml-auto">
|
68
|
+
<%= t('global.buttons.cancel') %>
|
69
|
+
</span>
|
70
|
+
</div>
|
71
|
+
</template>
|
72
|
+
</div>
|
54
73
|
<div class="button-alternative cursor-pointer" data-action="click->fields--file-field#uploadFile" data-fields--file-field-target="selectFileButton">
|
55
|
-
<i class="leading-none mr-2 text-base ti ti-upload dark:text-white"></i>
|
56
|
-
<span class="dark:text-white"
|
74
|
+
<i class="leading-none mr-2 text-base ti ti-upload dark:text-white" data-fields--file-field-target="selectFileButtonIcon"></i>
|
75
|
+
<span class="dark:text-white" data-fields--file-field-target="selectFileButtonText">
|
76
|
+
<% if form.object.send(method).attached? && !options[:multiple] %>
|
77
|
+
<%= t('fields.replace_image') %>
|
78
|
+
<% elsif form.object.send(method).attached? && options[:multiple] %>
|
79
|
+
<%= t('fields.add_another_image') %>
|
80
|
+
<% elsif options[:multiple] %>
|
81
|
+
<%= t('fields.upload_images') %>
|
82
|
+
<% else %>
|
83
|
+
<%= t('fields.upload_image') %>
|
84
|
+
<% end %>
|
85
|
+
</span>
|
57
86
|
</div>
|
58
87
|
<div class="mt-2 hidden overflow-hidden text-xs rounded bg-slate-100 shadow-inner relative">
|
59
88
|
<div data-fields--file-field-target="progressBar" aria-valuemax="100" aria-valuemin="0" aria-valuenow="0" class="absolute top-0 left-0 whitespace-nowrap overflow-hidden animate-pulse bg-primary-500 dark:bg-slate-800 rounded" role="progressbar" style="width: 0%;"> </div>
|
@@ -23,15 +23,15 @@ persisted_files = options[:multiple] ? form.object.send(method) : [form.object.s
|
|
23
23
|
|
24
24
|
<%= render 'shared/fields/field', form: form, method: method, helper: :file_field, options: options, other_options: other_options do %>
|
25
25
|
<% content_for :field do %>
|
26
|
-
<div class="file-field" data-controller="fields--file-field">
|
26
|
+
<div class="file-field" data-controller="fields--file-field" data-fields--file-field-select-different-file-value="<%= t('fields.select_different_file') %>">
|
27
27
|
<%= form.file_field method, options %>
|
28
28
|
<div>
|
29
29
|
<% if form.object.send(method).attached? %>
|
30
30
|
<div class="divide-y-2 divide-dashed">
|
31
31
|
<% persisted_files.each do |file| %>
|
32
|
-
<div data-controller="fields--file-item" data-fields--file-item-id-value="<%= file.id %>">
|
32
|
+
<div data-controller="fields--file-item" data-fields--file-item-id-value="<%= file.id %>" class="py-1 flex flex-wrap items-center">
|
33
33
|
<%= form.hidden_field "#{method}_removal".to_sym, multiple: options[:multiple], value: nil, data: {'fields--file-item-target': 'removeFileFlag'} %>
|
34
|
-
<span data-fields--file-item-target="fileName" %>
|
34
|
+
<span data-fields--file-item-target="fileName" class="mr-auto"%>
|
35
35
|
<%= file.blob.filename %>
|
36
36
|
</span>
|
37
37
|
<%= link_to url_for(file), class: 'button download-file mr-3', data: {'fields--file-item-target': 'downloadFileButton'} do %>
|
@@ -42,15 +42,44 @@ persisted_files = options[:multiple] ? form.object.send(method) : [form.object.s
|
|
42
42
|
<i class="leading-none mr-2 text-base ti ti-trash"></i>
|
43
43
|
<span><%= t('fields.remove_document') %></span>
|
44
44
|
</div>
|
45
|
+
<div class="button-alternative cursor-pointer mr-3 hidden" data-action="click->fields--file-item#cancelRemoveFile" data-fields--file-item-target="cancelRemoveFileButton">
|
46
|
+
<i class="leading-none mr-2 text-base ti ti-na"></i>
|
47
|
+
<span><%= t('fields.cancel_remove_document') %></span>
|
48
|
+
</div>
|
45
49
|
</div>
|
46
50
|
<% end %>
|
47
51
|
</div>
|
48
52
|
<% end %>
|
49
53
|
</div>
|
50
54
|
<div class="mt-2">
|
55
|
+
<div data-fields--file-field-target="selectedFileListContainer" class="hidden mb-2">
|
56
|
+
<div class="dark:text-white mb-1">
|
57
|
+
To upload:
|
58
|
+
</div>
|
59
|
+
<div data-fields--file-field-target="selectedFileList" class="divide-y-2 divide-dashed">
|
60
|
+
</div>
|
61
|
+
<template data-fields--file-field-target="selectedFileRowTemplate">
|
62
|
+
<div class="py-1 flex flex-wrap items-center">
|
63
|
+
<div>@FILENAME@</div>
|
64
|
+
<span data-action="click->fields--file-field#cancelFileUpload" data-filename="@FILENAME@" class="button-alternative cursor-pointer ml-auto">
|
65
|
+
<%= t('global.buttons.cancel') %>
|
66
|
+
</span>
|
67
|
+
</div>
|
68
|
+
</template>
|
69
|
+
</div>
|
51
70
|
<div class="button-alternative cursor-pointer" data-action="click->fields--file-field#uploadFile" data-fields--file-field-target="selectFileButton">
|
52
|
-
<i class="leading-none mr-2 text-base ti ti-upload dark:text-white"></i>
|
53
|
-
<span class="dark:text-white"
|
71
|
+
<i class="leading-none mr-2 text-base ti ti-upload dark:text-white" data-fields--file-field-target="selectFileButtonIcon"></i>
|
72
|
+
<span class="dark:text-white" data-fields--file-field-target="selectFileButtonText">
|
73
|
+
<% if form.object.send(method).attached? && !options[:multiple] %>
|
74
|
+
<%= t('fields.replace_document') %>
|
75
|
+
<% elsif form.object.send(method).attached? && options[:multiple] %>
|
76
|
+
<%= t('fields.add_another_document') %>
|
77
|
+
<% elsif options[:multiple] %>
|
78
|
+
<%= t('fields.upload_documents') %>
|
79
|
+
<% else %>
|
80
|
+
<%= t('fields.upload_document') %>
|
81
|
+
<% end %>
|
82
|
+
</span>
|
54
83
|
</div>
|
55
84
|
<div class="mt-2 hidden overflow-hidden text-xs rounded bg-slate-100 shadow-inner relative">
|
56
85
|
<div data-fields--file-field-target="progressBar" aria-valuemax="100" aria-valuemin="0" aria-valuenow="0" class="absolute top-0 left-0 whitespace-nowrap overflow-hidden animate-pulse bg-primary-500 dark:bg-slate-800 rounded" role="progressbar" style="width: 0%;"> </div>
|
@@ -2,7 +2,16 @@ en:
|
|
2
2
|
fields:
|
3
3
|
download_document: Download Current Document
|
4
4
|
upload_document: Upload New Document
|
5
|
+
upload_documents: Upload New Documents
|
6
|
+
add_another_document: Add Another Document
|
7
|
+
replace_document: Replace Document
|
5
8
|
remove_document: Remove Current Document
|
9
|
+
cancel_remove_document: Cancel Removal
|
6
10
|
download_image: Download Current Image
|
7
11
|
upload_image: Upload New Image
|
12
|
+
upload_images: Upload New Images
|
13
|
+
add_another_image: Add Another Image
|
14
|
+
replace_image: Replace Image
|
8
15
|
remove_image: Remove Current Image
|
16
|
+
cancel_remove_image: Cancel Removal
|
17
|
+
select_different_file: Select A Different File
|
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.7.
|
4
|
+
version: 1.7.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|