lesli 5.1.13 → 5.1.15

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.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/lesli/application.css +527 -10
  3. data/app/controllers/lesli/application_lesli_controller.rb +27 -0
  4. data/app/controllers/lesli/items/attachments_controller.rb +3 -3
  5. data/app/controllers/lesli/items/discussions_controller.rb +2 -2
  6. data/app/controllers/lesli/items/tasks_controller.rb +2 -2
  7. data/app/controllers/lesli/roles_controller.rb +1 -6
  8. data/app/controllers/lesli/users_controller.rb +1 -5
  9. data/app/helpers/lesli/html_helper.rb +5 -5
  10. data/app/helpers/lesli/navigation_helper.rb +5 -5
  11. data/app/interfaces/lesli/customization_interface.rb +11 -31
  12. data/app/interfaces/lesli/responder_interface.rb +11 -4
  13. data/app/models/concerns/lesli/account_initializer.rb +5 -45
  14. data/app/models/concerns/lesli/user_extensions.rb +4 -2
  15. data/app/models/lesli/items/attachment.rb +3 -3
  16. data/app/models/lesli/role.rb +14 -2
  17. data/app/models/lesli/user.rb +7 -0
  18. data/app/operators/lesli/account_operator.rb +84 -0
  19. data/app/operators/lesli/resource_operator.rb +123 -0
  20. data/app/services/lesli/application_lesli_service.rb +33 -116
  21. data/app/services/lesli/resource_service.rb +12 -159
  22. data/app/services/lesli/role_service.rb +11 -229
  23. data/app/services/lesli/user_service.rb +37 -117
  24. data/app/views/lesli/abouts/welcome.html.erb +4 -4
  25. data/app/views/lesli/apps/show.html.erb +1 -1
  26. data/app/views/lesli/errors/not_found.html.erb +9 -16
  27. data/app/views/lesli/errors/unauthorized.html.erb +19 -28
  28. data/app/views/lesli/layouts/application-devise.html.erb +1 -0
  29. data/app/views/lesli/layouts/application-lesli.html.erb +1 -1
  30. data/app/views/lesli/partials/_application-lesli-announcements.html.erb +18 -0
  31. data/app/views/lesli/partials/_application-lesli-assets.html.erb +16 -19
  32. data/app/views/lesli/partials/_application-lesli-header.html.erb +45 -100
  33. data/app/views/lesli/partials/_application-lesli-notifications.html.erb +2 -27
  34. data/app/views/lesli/partials/_application-lesli-turbo.html.erb +5 -0
  35. data/app/views/lesli/shared/dashboards/edit.html.erb +1 -1
  36. data/app/views/lesli/shared/dashboards/show.html.erb +1 -1
  37. data/config/initializers/lesli.rb +7 -2
  38. data/config/locales/translations.en.yml +56 -48
  39. data/config/locales/translations.es.yml +54 -45
  40. data/db/migrate/v1/0000000210_create_lesli_users.rb +1 -0
  41. data/db/seed/xyz.rb +1 -3
  42. data/lib/generators/lesli/base_generator.rb +41 -3
  43. data/lib/generators/lesli/controller/controller_generator.rb +1 -1
  44. data/lib/generators/lesli/controller/templates/controller.rb.tt +12 -7
  45. data/lib/generators/lesli/model/model_generator.rb +1 -1
  46. data/lib/generators/lesli/resource/resource_generator.rb +290 -0
  47. data/lib/generators/lesli/resource/templates/controller.rb.tt +99 -0
  48. data/lib/generators/lesli/resource/templates/locale.en.yml.tt +13 -0
  49. data/lib/generators/lesli/resource/templates/migration.rb.tt +28 -0
  50. data/lib/generators/lesli/resource/templates/model.rb.tt +38 -0
  51. data/lib/generators/lesli/resource/templates/operator.rb.tt +15 -0
  52. data/lib/generators/lesli/resource/templates/service.rb.tt +52 -0
  53. data/lib/generators/lesli/resource/templates/tests/controller_test.rb.tt +14 -0
  54. data/lib/generators/lesli/resource/templates/tests/model_test.rb.tt +24 -0
  55. data/lib/generators/lesli/resource/templates/tests/operator_test.rb.tt +15 -0
  56. data/lib/generators/lesli/resource/templates/tests/service_test.rb.tt +17 -0
  57. data/lib/generators/lesli/resource/templates/views/_form.html.erb.tt +17 -0
  58. data/lib/generators/lesli/resource/templates/views/edit.html.erb.tt +4 -0
  59. data/lib/generators/lesli/resource/templates/views/index.html.erb.tt +22 -0
  60. data/lib/generators/lesli/resource/templates/views/new.html.erb.tt +4 -0
  61. data/lib/generators/lesli/resource/templates/views/show.html.erb.tt +17 -0
  62. data/lib/generators/lesli/scaffold/scaffold_generator.rb +4 -39
  63. data/lib/generators/lesli/service/service_generator.rb +1 -1
  64. data/lib/generators/lesli/service/templates/service.rb.tt +15 -7
  65. data/lib/generators/lesli/views/views_generator.rb +1 -1
  66. data/lib/generators/lesli_generator.rb +11 -0
  67. data/lib/lesli/courier.rb +66 -34
  68. data/lib/lesli/database_tasks.rb +145 -0
  69. data/lib/lesli/version.rb +2 -2
  70. data/lib/tasks/lesli/db.rake +16 -93
  71. data/lib/tasks/lesli/resources.rake +1 -1
  72. data/readme.md +3 -1
  73. metadata +23 -4
  74. data/app/views/lesli/partials/_application-lesli-footer.html.erb +0 -82
  75. data/app/views/lesli/partials/_application-lesli-sidebar.html.erb +0 -50
@@ -0,0 +1,145 @@
1
+ =begin
2
+
3
+ Lesli
4
+
5
+ Copyright (c) 2026, Lesli Technologies, S. A.
6
+
7
+ This program is free software: you can redistribute it and/or modify
8
+ it under the terms of the GNU General Public License as published by
9
+ the Free Software Foundation, either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ This program is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with this program. If not, see http://www.gnu.org/licenses/.
19
+
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
+
22
+ Made with ♥ by LesliTech
23
+ Building a better future, one line of code at a time.
24
+
25
+ @contact hello@lesli.tech
26
+ @website https://www.lesli.tech
27
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
+
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
31
+ =end
32
+
33
+ module Lesli
34
+ class DatabaseTasks
35
+
36
+ # Rails calls this object when db:prepare creates a new database. Its
37
+ # intentionally empty implementation keeps preparation separate from seeds.
38
+ class SeedlessLoader
39
+ def load_seed
40
+ end
41
+ end
42
+ private_constant :SeedlessLoader
43
+
44
+ def rebuild
45
+ reset_database
46
+ seed_database
47
+ configure_database
48
+ print_status
49
+ end
50
+
51
+ def build
52
+ prepare_database
53
+ seed_database
54
+ configure_database
55
+ print_status
56
+ end
57
+
58
+ def prepare
59
+ prepare_database
60
+ configure_database
61
+ print_status
62
+ end
63
+
64
+ def seed
65
+ seed_database
66
+ configure_database
67
+ print_status
68
+ end
69
+
70
+ private
71
+
72
+ def reset_database
73
+ unless Rails.env.development? || Rails.env.test?
74
+ raise "lesli:db:rebuild can only run in development or test"
75
+ end
76
+
77
+ Termline.m("Rebuild the Lesli database from migrations (development and test only)")
78
+
79
+ Rake::Task["db:migrate:reset"].invoke
80
+ Termline.info("Databases rebuilt from the available migrations")
81
+ end
82
+
83
+ def prepare_database
84
+ Termline.info("Prepare the Lesli database")
85
+
86
+ database_tasks = ActiveRecord::Tasks::DatabaseTasks
87
+ original_seed_loader = database_tasks.seed_loader
88
+
89
+ database_tasks.seed_loader = SeedlessLoader.new
90
+ Rake::Task["db:prepare"].invoke
91
+ ensure
92
+ database_tasks.seed_loader = original_seed_loader if database_tasks
93
+ end
94
+
95
+ def seed_database
96
+ Termline.info("Seed the Lesli database")
97
+
98
+ LesliSystem.engines.each_key do |engine|
99
+ next if engine == "Root"
100
+
101
+ engine.constantize::Engine.load_seed
102
+ end
103
+
104
+ Termline.info("Loading seeds for: Main app")
105
+ Rake::Task["db:seed"].invoke
106
+ Termline.br(2)
107
+ end
108
+
109
+ def configure_database
110
+ Termline.info("Configure the Lesli database")
111
+
112
+ build_resources
113
+ initialize_accounts
114
+ synchronize_privileges
115
+ synchronize_translations
116
+ end
117
+
118
+ def build_resources
119
+ Rake::Task["lesli:resources:build"].invoke
120
+ end
121
+
122
+ def initialize_accounts
123
+ Lesli::Account.find_each do |account|
124
+ operator = Lesli::AccountOperator.new(account: account)
125
+ operator.initialize_roles!
126
+ operator.initialize_engines!
127
+ end
128
+ end
129
+
130
+ def synchronize_privileges
131
+ Rake::Task["lesli_shield:privileges"].invoke if defined?(::LesliShield)
132
+ end
133
+
134
+ def synchronize_translations
135
+ return unless defined?(::LesliBabel)
136
+
137
+ Rake::Task["lesli_babel:scan"].invoke
138
+ Rake::Task["lesli_babel:import"].invoke(true)
139
+ end
140
+
141
+ def print_status
142
+ Rake::Task["lesli:status"].invoke
143
+ end
144
+ end
145
+ end
data/lib/lesli/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Lesli
2
- VERSION = "5.1.13"
3
- BUILD = "1792716699"
2
+ VERSION = "5.1.15"
3
+ BUILD = "1795131688"
4
4
  end
@@ -30,107 +30,30 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
- # ·
34
- namespace :lesli do
33
+ # ·
34
+ require "lesli/database_tasks"
35
+
36
+ namespace :lesli do
35
37
  namespace :db do
36
38
 
37
- desc "Drop, create, migrate, seed & configure the Lesli database (development only)"
38
- task :rebuild => :environment do |task, args|
39
- drop()
40
- prepare()
41
- seed()
42
- configure()
43
- status()
39
+ desc "Drop, create, migrate, seed & configure the Lesli database (development and test only)"
40
+ task rebuild: :environment do
41
+ Lesli::DatabaseTasks.new.rebuild
44
42
  end
45
43
 
46
-
47
- desc "Migrate, configure && user the Lesli database"
48
- task :prepare => :environment do |task, args|
49
- prepare()
50
- configure()
51
- status()
44
+ desc "Create, migrate, seed & configure the Lesli database"
45
+ task build: :environment do
46
+ Lesli::DatabaseTasks.new.build
52
47
  end
53
48
 
54
- desc "Seed & configure Lesli database"
55
- task :seed => :environment do |task, args|
56
- seed()
57
- status()
49
+ desc "Migrate and configure the Lesli database"
50
+ task prepare: :environment do
51
+ Lesli::DatabaseTasks.new.prepare
58
52
  end
59
- end
60
-
61
- # Drop the Lesli database (development only)
62
- def drop
63
53
 
64
- # do not execute this task if we are at production level
65
- raise "Cannot drop database in production" if Rails.env.production?
66
-
67
- # print a message to let the users show the action running
68
- Termline.m("Drop the Lesli database (development only)")
69
-
70
- Rake::Task['db:drop'].invoke
71
- Termline.info("Databases deleted")
72
-
73
- schema_file = Rails.root.join('db', 'schema.rb')
74
- if File.exist?(schema_file)
75
- File.delete(schema_file)
76
- Termline.info("Schema.rb file deleted")
54
+ desc "Seed and configure the Lesli database"
55
+ task seed: :environment do
56
+ Lesli::DatabaseTasks.new.seed
77
57
  end
78
58
  end
79
-
80
- # Create the Lesli database (development only)
81
- def prepare
82
-
83
- # print a message to let the users show the action running
84
- Termline.info("Prepare the Lesli database")
85
-
86
- Rake::Task['db:prepare'].invoke
87
- end
88
-
89
- def seed
90
-
91
- # print a message to let the users show the action running
92
- Termline.info("Seed the Lesli database")
93
-
94
- # load Lesli* gems seeders
95
- LesliSystem.engines.each do |engine, data|
96
- next if engine == "Root"
97
- engine.constantize::Engine.load_seed
98
- end
99
-
100
- # load main app seeders
101
- Rake::Task['db:seed'].invoke
102
- Termline.info("Loading seeds for: Main app")
103
- Termline.br(2)
104
- end
105
-
106
- def configure
107
-
108
- # print a message to let the users show the action running
109
- Termline.info("Setup the Lesli database")
110
-
111
- # scan rails routes to build the controllers index
112
- Rake::Task['lesli:resources:build'].invoke
113
-
114
- Lesli::Account.find_each do |account|
115
- account.initialize_account
116
- account.initialize_engines
117
- end
118
-
119
- # scan rails routes to build the controllers index
120
- Rake::Task['lesli_shield:privileges'].invoke if defined?(LesliShield)
121
-
122
- if defined?(LesliBabel)
123
-
124
- # scan rails routes to build the base of translations
125
- Rake::Task['lesli_babel:scan'].invoke
126
-
127
- # import local translations into LesliBabel
128
- Rake::Task['lesli_babel:import'].invoke
129
- end
130
- end
131
-
132
- def status
133
- # print the lesli status
134
- Rake::Task['lesli:status'].invoke
135
- end
136
59
  end
@@ -36,7 +36,7 @@ namespace :lesli do
36
36
 
37
37
  desc "Scan new routes added and create role privileges"
38
38
  task build: :environment do
39
- Lesli::ResourceService.new.build
39
+ Lesli::ResourceOperator.new.register!
40
40
  Termline.success("Lesli: Registering engines, controllers and actions")
41
41
  end
42
42
  end
data/readme.md CHANGED
@@ -113,8 +113,10 @@ bin/rails lesli:db:prepare
113
113
  bin/rails lesli:status
114
114
  ```
115
115
 
116
+ Use `bin/rails lesli:db:build` when the environment also needs the engine and host application seed data. It prepares, seeds, and configures the database without dropping existing data.
117
+
116
118
  > [!WARNING]
117
- > `bin/rails lesli:db:rebuild` drops the database, deletes `db/schema.rb`, prepares and seeds the database, configures Lesli accounts, and prints the system status. It is blocked in production; use it only when you intentionally want to replace the current development data.
119
+ > `bin/rails lesli:db:rebuild` drops the database, rebuilds it from the migrations currently provided by the host and installed engines, regenerates the schema, loads seeds, configures Lesli accounts, and prints the system status. It runs only in the Rails development and test environments; use it only when you intentionally want to replace disposable data.
118
120
 
119
121
  ### Start the server
120
122
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lesli
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.13
4
+ version: 5.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Lesli Development Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-23 00:00:00.000000000 Z
11
+ date: 2026-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -206,6 +206,8 @@ files:
206
206
  - app/models/lesli/shared/catalog.rb
207
207
  - app/models/lesli/shared/dashboard.rb
208
208
  - app/models/lesli/user.rb
209
+ - app/operators/lesli/account_operator.rb
210
+ - app/operators/lesli/resource_operator.rb
209
211
  - app/services/lesli/application_lesli_service.rb
210
212
  - app/services/lesli/resource_service.rb
211
213
  - app/services/lesli/role_service.rb
@@ -220,15 +222,14 @@ files:
220
222
  - app/views/lesli/layouts/mailer.html.erb
221
223
  - app/views/lesli/layouts/mailer.text.erb
222
224
  - app/views/lesli/partials/_application-lesli-analytics.html.erb
225
+ - app/views/lesli/partials/_application-lesli-announcements.html.erb
223
226
  - app/views/lesli/partials/_application-lesli-assets.html.erb
224
227
  - app/views/lesli/partials/_application-lesli-content.html.erb
225
228
  - app/views/lesli/partials/_application-lesli-data.html.erb
226
- - app/views/lesli/partials/_application-lesli-footer.html.erb
227
229
  - app/views/lesli/partials/_application-lesli-head.html.erb
228
230
  - app/views/lesli/partials/_application-lesli-header.html.erb
229
231
  - app/views/lesli/partials/_application-lesli-navigation.html.erb
230
232
  - app/views/lesli/partials/_application-lesli-notifications.html.erb
231
- - app/views/lesli/partials/_application-lesli-sidebar.html.erb
232
233
  - app/views/lesli/partials/_application-lesli-turbo.html.erb
233
234
  - app/views/lesli/partials/turbo/_redirection.html.erb
234
235
  - app/views/lesli/shared/dashboards/edit.html.erb
@@ -255,6 +256,22 @@ files:
255
256
  - lib/generators/lesli/install/templates/lesli.rb
256
257
  - lib/generators/lesli/model/model_generator.rb
257
258
  - lib/generators/lesli/model/templates/model.rb.tt
259
+ - lib/generators/lesli/resource/resource_generator.rb
260
+ - lib/generators/lesli/resource/templates/controller.rb.tt
261
+ - lib/generators/lesli/resource/templates/locale.en.yml.tt
262
+ - lib/generators/lesli/resource/templates/migration.rb.tt
263
+ - lib/generators/lesli/resource/templates/model.rb.tt
264
+ - lib/generators/lesli/resource/templates/operator.rb.tt
265
+ - lib/generators/lesli/resource/templates/service.rb.tt
266
+ - lib/generators/lesli/resource/templates/tests/controller_test.rb.tt
267
+ - lib/generators/lesli/resource/templates/tests/model_test.rb.tt
268
+ - lib/generators/lesli/resource/templates/tests/operator_test.rb.tt
269
+ - lib/generators/lesli/resource/templates/tests/service_test.rb.tt
270
+ - lib/generators/lesli/resource/templates/views/_form.html.erb.tt
271
+ - lib/generators/lesli/resource/templates/views/edit.html.erb.tt
272
+ - lib/generators/lesli/resource/templates/views/index.html.erb.tt
273
+ - lib/generators/lesli/resource/templates/views/new.html.erb.tt
274
+ - lib/generators/lesli/resource/templates/views/show.html.erb.tt
258
275
  - lib/generators/lesli/scaffold/scaffold_generator.rb
259
276
  - lib/generators/lesli/service/service_generator.rb
260
277
  - lib/generators/lesli/service/templates/service.rb.tt
@@ -263,9 +280,11 @@ files:
263
280
  - lib/generators/lesli/views/templates/new.html.erb.tt
264
281
  - lib/generators/lesli/views/templates/show.html.erb.tt
265
282
  - lib/generators/lesli/views/views_generator.rb
283
+ - lib/generators/lesli_generator.rb
266
284
  - lib/lesli.rb
267
285
  - lib/lesli/configuration.rb
268
286
  - lib/lesli/courier.rb
287
+ - lib/lesli/database_tasks.rb
269
288
  - lib/lesli/engine.rb
270
289
  - lib/lesli/router.rb
271
290
  - lib/lesli/version.rb
@@ -1,82 +0,0 @@
1
- <%
2
- =begin
3
-
4
- Lesli
5
-
6
- Copyright (c) 2023, Lesli Technologies, S. A.
7
-
8
- This program is free software: you can redistribute it and/or modify
9
- it under the terms of the GNU General Public License as published by
10
- the Free Software Foundation, either version 3 of the License, or
11
- (at your option) any later version.
12
-
13
- This program is distributed in the hope that it will be useful,
14
- but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- GNU General Public License for more details.
17
-
18
- You should have received a copy of the GNU General Public License
19
- along with this program. If not, see http://www.gnu.org/licenses/.
20
-
21
- Lesli · Ruby on Rails SaaS development platform.
22
-
23
- Made with ♥ by https://www.lesli.tech
24
- Building a better future, one line of code at a time.
25
-
26
- @contact hello@lesli.tech
27
- @website https://www.lesli.tech
28
- @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
29
-
30
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
31
- // ·
32
- =end
33
- %>
34
-
35
-
36
- <% custom_footer_partial_path = "layouts/#{lesli_instance_code}/partials/application-footer" %>
37
- <% custom_footer_partial_exists = lookup_context.exists?(custom_footer_partial_path, nil, true) %>
38
-
39
-
40
-
41
- <%# render custom partial in builder module %>
42
- <% if custom_footer_partial_exists %>
43
- <%= render partial: custom_footer_partial_path %>
44
- <% end %>
45
-
46
-
47
-
48
- <%# core footer partial %>
49
- <% unless custom_footer_partial_exists %>
50
-
51
- <application-component-footer title="<%= @account[:company][:name] %> &bull; <%= @account[:company][:tag_line] %>">
52
-
53
- <template v-slot:navbar-end>
54
- <%# Show standard footer links for LesliClou %>
55
- <% if defined?(LesliCloud) %>
56
-
57
- <a class="navbar-item has-text-grey" href="#">
58
- Support
59
- </a>
60
- <span class="navbar-item has-text-grey-light">|</span>
61
- <a class="navbar-item has-text-grey" href="#">
62
- Privacy
63
- </a>
64
- <span class="navbar-item has-text-grey-light">|</span>
65
- <a class="navbar-item has-text-grey" href="#">
66
- About
67
- </a>
68
-
69
- <% else %>
70
-
71
- <%# Show platform version for custom instances %>
72
- <span class="navbar-item has-text-grey">
73
- version <%= @account[:revision][:version] %> -
74
- build <%= @account[:revision][:build] %>
75
- </span>
76
-
77
- <% end %>
78
- </template>
79
-
80
- </application-component-footer>
81
-
82
- <% end %>
@@ -1,50 +0,0 @@
1
- <%
2
- =begin
3
-
4
- Lesli
5
-
6
- Copyright (c) 2023, Lesli Technologies, S. A.
7
-
8
- This program is free software: you can redistribute it and/or modify
9
- it under the terms of the GNU General Public License as published by
10
- the Free Software Foundation, either version 3 of the License, or
11
- (at your option) any later version.
12
-
13
- This program is distributed in the hope that it will be useful,
14
- but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- GNU General Public License for more details.
17
-
18
- You should have received a copy of the GNU General Public License
19
- along with this program. If not, see http://www.gnu.org/licenses/.
20
-
21
- Lesli · Ruby on Rails SaaS development platform.
22
-
23
- Made with ♥ by https://www.lesli.tech
24
- Building a better future, one line of code at a time.
25
-
26
- @contact hello@lesli.tech
27
- @website https://www.lesli.tech
28
- @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
29
-
30
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
31
- // ·
32
- =end
33
- %>
34
-
35
- <%# check if custom navigation partial exists, getting the path from application helper %>
36
- <% custom_sidebar_path = "#{lesli_engine.dig(:code)}/partials/sidebar" %>
37
-
38
- <%# validate the path to be sure the partial exists when trying to render it %>
39
- <% custom_sidebar_exists = lookup_context.exists?(custom_sidebar_path, nil, true) %>
40
-
41
- <%# render navigation partial %>
42
- <% if custom_sidebar_exists %>
43
- <aside class="flex w-[50px] shrink-0 flex-col pt-12 pl-12 transition-all duration-200 ease-linear min-[769px]:w-[100px] min-[1024px]:w-[200px] min-[1216px]:w-[225px] min-[1408px]:w-[328px]">
44
- <nav class="overflow-y-scroll rounded-lg bg-white pt-[.8rem] pb-4 pl-4 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden" aria-label="Module navigation">
45
- <ul>
46
- <%= render partial: custom_sidebar_path %>
47
- </ul>
48
- </nav>
49
- </aside>
50
- <% end %>