tybo 0.3.4 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/components/icons/dashboard_component.html.erb +5 -0
- data/app/components/icons/dashboard_component.rb +6 -0
- data/app/components/icons/trash_component.html.erb +1 -1
- data/app/components/index_header_add_component.html.erb +2 -2
- data/lib/generators/bo/bo_generator.rb +1 -1
- data/lib/generators/bo/templates/_form.html.erb +1 -1
- data/lib/generators/bo/templates/_search_bar.html.erb +1 -0
- data/lib/generators/bo/templates/index.html.erb +9 -9
- data/lib/tybo/version.rb +1 -1
- metadata +12 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74fa667d39f65ff4a807cfcec3f8dd1080e93642b849c911359ccc4ee347e574
|
4
|
+
data.tar.gz: d7f5f977ddc9c4ebbfe322f28d5401ee3f6e5aa20e324d3ba163a4535ac9e934
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5137191ee8a0dea3642ae28da38e3a3c18af93a9742905db8ae8abd2fa0e5b4db7fe84c94b284b7562c70ebbc01c88d851b5b415539cafda4d3ef5788a6a93e
|
7
|
+
data.tar.gz: 20084dbeeea3ef9e661ff40beaf5ec611109ee00d4f88f5aa2976f385c3a99ef52f93c92b0730ff709aeec7b51ee7d3bc91748cfa0c2f8cfcc5dca33b494b8fc
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="flex-shrink-0 w-6 h-6 mr-3 text-white text-sidebar-50">
|
2
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M10.5 6a7.5 7.5 0 107.5 7.5h-7.5V6z" />
|
3
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M13.5 10.5H21A7.5 7.5 0 0013.5 3v7.5z" />
|
4
|
+
</svg>
|
5
|
+
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<svg class="
|
1
|
+
<svg class="flex w-6 h-6 text-red-alert" xmlns="http://www.w3.org/2000/svg" className="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
|
2
2
|
<path strokeLinecap="round" strokeLinejoin="round" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
|
3
3
|
</svg>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<div class="mt-4
|
2
|
-
<%= link_to '
|
1
|
+
<div class="mt-4 sm:flex-none">
|
2
|
+
<%= link_to I18n.t('bo.add_ressource_btn'), @path, class: "inline-flex items-center justify-center rounded-md border border-transparent bg-tybo px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-tybo-700 focus:outline-none focus:ring-2 focus:ring-tybo-500 focus:ring-offset-2 sm:w-auto" %>
|
3
3
|
</div>
|
@@ -73,7 +73,7 @@ class BoGenerator < Rails::Generators::NamedBase
|
|
73
73
|
end
|
74
74
|
|
75
75
|
def excluded_columns
|
76
|
-
%i[id created_at updated_at encrypted_password]
|
76
|
+
%i[id created_at updated_at encrypted_password reset_password_token reset_password_sent_at remember_created_at remember_token confirmation_token]
|
77
77
|
end
|
78
78
|
|
79
79
|
def permited_params
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<%- end -%>
|
15
15
|
<!-- RichText Associations -->
|
16
16
|
<%- rich_text_assoc.each do |association| -%>
|
17
|
-
<label class="block my-5
|
17
|
+
<label class="block my-5 text-sm font-medium text-gray-600 text-gray-700 string optional">
|
18
18
|
<%%= I18n.t('bo.<%= class_name.underscore %>.attributes.<%=- association.name.to_s.singularize.to_s.remove('rich_text_') -%>') %>
|
19
19
|
</label>
|
20
20
|
<%%= f.rich_text_area :<%= association.name.to_s.singularize.to_s.remove('rich_text_')%> %>
|
@@ -12,6 +12,7 @@
|
|
12
12
|
<!-- columns -->
|
13
13
|
<%- bo_model.columns.group_by(&:type).each do |type| -%>
|
14
14
|
<%- type.second.sort_by(&:type).each do |col| -%>
|
15
|
+
<%- next if excluded_columns.include?(col.name.to_sym) || bo_model.reflect_on_all_associations.map(&:foreign_key).include?(col.name) -%>
|
15
16
|
<%- next if bo_model.reflect_on_all_associations.map(&:foreign_key).include?(col.name) -%>
|
16
17
|
<%- if col.type == :string || col.type == :text -%>
|
17
18
|
<%%= render(Forms::SearchInputComponent.new(label: I18n.t('bo.<%= class_name.underscore %>.attributes.<%= col.name %>'))) do %>
|
@@ -1,17 +1,17 @@
|
|
1
1
|
<%%= render(IndexComponent.new) do |index| %>
|
2
2
|
<!-- Header -->
|
3
|
-
<%%=
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
3
|
+
<%%= turbo_frame_tag "<%= class_name.underscore.pluralize %>", target: '_top' do %>
|
4
|
+
<%%= index.with_header(
|
5
|
+
title: I18n.t('bo.<%= class_name.underscore %>.others').capitalize,
|
6
|
+
subtitle: I18n.t('bo.<%= class_name.underscore %>.subtitle').capitalize,
|
7
|
+
) do |header| %>
|
8
|
+
<%%= header.with_add_button(path: <%="new_#{options[:namespace]}_#{class_name.underscore}_path" %>) %>
|
9
|
+
<%%= header.with_export_button(path: <%= "export_csv_#{options[:namespace]}_#{class_name.pluralize.underscore}_path(format: :csv, params: {q: params.permit!['q']})"%>)%>
|
10
|
+
<%% end %>
|
10
11
|
|
11
12
|
<!-- Search Bar -->
|
12
|
-
|
13
|
+
<%%= render('search_bar') %>
|
13
14
|
<!-- Table -->
|
14
|
-
<%%= turbo_frame_tag "<%= class_name.underscore.pluralize %>", target: '_top', class: "shadow overflow-hidden rounded border-b border-gray-200" do %>
|
15
15
|
<%%= render('table') %>
|
16
16
|
<div class="py-2">
|
17
17
|
<%%== render partial: 'shared/pagination', locals: { pagy: @pagy } %>
|
data/lib/tybo/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tybo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michel Delpierre
|
8
8
|
- Julien Camblan
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-11-
|
12
|
+
date: 2023-11-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -57,16 +57,16 @@ dependencies:
|
|
57
57
|
name: ransack
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- - "
|
60
|
+
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version:
|
62
|
+
version: 3.2.1
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- - "
|
67
|
+
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
69
|
+
version: 3.2.1
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: pagy
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -153,6 +153,8 @@ files:
|
|
153
153
|
- app/components/forms/title_component.rb
|
154
154
|
- app/components/icons/collection_component.html.erb
|
155
155
|
- app/components/icons/collection_component.rb
|
156
|
+
- app/components/icons/dashboard_component.html.erb
|
157
|
+
- app/components/icons/dashboard_component.rb
|
156
158
|
- app/components/icons/home_component.html.erb
|
157
159
|
- app/components/icons/home_component.rb
|
158
160
|
- app/components/icons/mic_component.html.erb
|
@@ -275,7 +277,7 @@ licenses:
|
|
275
277
|
- MIT
|
276
278
|
metadata:
|
277
279
|
homepage_uri: https://rubygems.org/gems/tybo
|
278
|
-
post_install_message:
|
280
|
+
post_install_message:
|
279
281
|
rdoc_options: []
|
280
282
|
require_paths:
|
281
283
|
- lib
|
@@ -290,8 +292,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
290
292
|
- !ruby/object:Gem::Version
|
291
293
|
version: '0'
|
292
294
|
requirements: []
|
293
|
-
rubygems_version: 3.3.
|
294
|
-
signing_key:
|
295
|
+
rubygems_version: 3.0.3.1
|
296
|
+
signing_key:
|
295
297
|
specification_version: 4
|
296
298
|
summary: A tailwind custom admin engine for Ruby on Rails
|
297
299
|
test_files: []
|