lesli 5.0.1 → 5.0.2

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 (120) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/lesli_manifest.js +7 -4
  3. data/app/assets/fonts/lesli/Domine/Domine-VariableFont_wght.ttf +0 -0
  4. data/app/assets/fonts/lesli/Domine/OFL.txt +2 -0
  5. data/app/assets/javascripts/lesli/users/passwords.js +776 -0
  6. data/app/assets/javascripts/lesli/users/registrations.js +776 -0
  7. data/app/assets/javascripts/lesli/users/sessions.js +776 -1
  8. data/app/assets/stylesheets/lesli/users/passwords.scss +5 -6
  9. data/app/assets/stylesheets/lesli/users/registrations.scss +5 -6
  10. data/app/assets/stylesheets/lesli/users/sessions.scss +5 -10
  11. data/app/controllers/lesli/application_lesli_controller.rb +0 -1
  12. data/app/controllers/lesli/interfaces/application/logger.rb +9 -9
  13. data/app/controllers/lesli/roles_controller.rb +43 -0
  14. data/{lib/sass/lesli/devise/registrations.scss.erb → app/controllers/lesli/users_controller.rb} +18 -23
  15. data/app/controllers/users/registrations_controller.rb +137 -58
  16. data/app/helpers/lesli/assets_helper.rb +2 -2
  17. data/app/helpers/lesli/general_helper.rb +1 -1
  18. data/app/helpers/lesli/navigation_helper.rb +7 -10
  19. data/app/helpers/lesli/system_helper.rb +1 -1
  20. data/app/lib/lesli/system.rb +7 -3
  21. data/app/mailers/lesli/application_lesli_mailer.rb +199 -0
  22. data/app/mailers/lesli/application_mailer.rb +7 -0
  23. data/app/mailers/lesli/devise_mailer.rb +33 -0
  24. data/app/models/concerns/user_guard.rb +3 -4
  25. data/app/models/lesli/account.rb +29 -0
  26. data/{lib/sass/lesli/pages/passes.scss → app/models/lesli/descriptor.rb} +14 -8
  27. data/app/models/lesli/role.rb +90 -0
  28. data/app/models/lesli/system_controller.rb +1 -0
  29. data/app/models/lesli/user/detail.rb +55 -0
  30. data/{lib/sass/lesli/pages/otps.scss → app/models/lesli/user/role.rb} +13 -9
  31. data/app/models/lesli/user.rb +4 -3
  32. data/app/services/lesli/role_service.rb +45 -0
  33. data/app/services/lesli/user_service.rb +69 -0
  34. data/app/views/devise/passwords/new.html.erb +72 -12
  35. data/app/views/devise/registrations/new.html.erb +146 -28
  36. data/app/views/devise/sessions/new.html.erb +11 -78
  37. data/app/views/devise/shared/_links.html.erb +96 -25
  38. data/app/views/lesli/emails/devise_mailer/confirmation_instructions.html.erb +23 -0
  39. data/app/views/lesli/emails/user_mailer/invitation.html.erb +23 -0
  40. data/app/views/lesli/layouts/application-devise.html.erb +1 -1
  41. data/app/views/lesli/layouts/application-public.html.erb +2 -2
  42. data/app/views/lesli/layouts/mailer.html.erb +13 -0
  43. data/app/views/lesli/layouts/mailer.text.erb +1 -0
  44. data/app/views/lesli/partials/_application-lesli-header.html.erb +27 -41
  45. data/app/views/lesli/partials/_application-lesli-javascript.html.erb +10 -6
  46. data/app/views/lesli/partials/_application-public-javascript.html.erb +12 -8
  47. data/{lib/sass/lesli/devise/confirmations.scss.erb → app/views/lesli/wrappers/_application-devise-simple.erb} +30 -46
  48. data/app/views/lesli/wrappers/{_application-auth.html.erb → _application-devise.html.erb} +15 -0
  49. data/config/initializers/{lesli_defaults.rb → lesli.rb} +4 -2
  50. data/config/locales/translations.en.yml +7 -0
  51. data/config/locales/translations.es.yml +7 -0
  52. data/config/routes.rb +22 -17
  53. data/db/migrate/v1.0/0010000210_create_lesli_roles.rb +1 -1
  54. data/db/{tables/0010003010_create_user_details.rb → migrate/v1.0/0010003010_create_lesli_user_details.rb} +6 -6
  55. data/db/{tables/0010003510_create_user_roles.rb → migrate/v1.0/0010003410_create_lesli_user_roles.rb} +4 -4
  56. data/db/{tables/0010005010_create_descriptors.rb → migrate/v1.0/0010005010_create_lesli_descriptors.rb} +5 -6
  57. data/db/{tables/0010005110_create_descriptor_privileges.rb → migrate/v1.0/0010005110_create_lesli_descriptor_privileges.rb} +8 -7
  58. data/db/{tables/0010005210_create_descriptor_activities.rb → migrate/v1.0/0010005210_create_lesli_descriptor_activities.rb} +6 -8
  59. data/db/seeds.rb +0 -2
  60. data/lib/lesli/engine.rb +25 -2
  61. data/lib/lesli/routing.rb +26 -0
  62. data/lib/lesli/version.rb +2 -2
  63. data/lib/lesli.rb +1 -0
  64. data/lib/{sass/lesli/pages/mfas.scss → mailer_previews/devise_mailer_preview.rb} +12 -6
  65. data/lib/sass/lesli/bulma/loader.scss +3 -0
  66. data/lib/sass/lesli/elements/header.scss +1 -1
  67. data/lib/sass/lesli/fonts/families.scss +3 -3
  68. data/lib/sass/lesli/layouts/application-container.scss +4 -0
  69. data/lib/sass/lesli/{devise/passwords.scss.erb → pages/devise-simple.scss} +38 -38
  70. data/lib/sass/lesli/{templates → pages}/devise.scss +4 -26
  71. data/lib/sass/lesli/settings/variables.scss +1 -1
  72. data/lib/sass/lesli/templates/application.scss +8 -4
  73. data/lib/sass/lesli/templates/dashboards.scss +8 -0
  74. data/lib/sass/lesli/templates/public.scss +2 -3
  75. data/lib/tasks/lesli/controllers.rake +33 -0
  76. data/lib/tasks/lesli/db.rake +88 -0
  77. data/lib/tasks/lesli/git.rake +74 -0
  78. data/lib/tasks/lesli_tasks.rake +70 -20
  79. data/lib/vue/devise/registrations.js +10 -15
  80. data/lib/vue/layouts/application-container.vue +10 -2
  81. data/lib/vue/layouts/application-header.vue +10 -3
  82. data/lib/vue/stores/account.js +113 -0
  83. data/lib/vue/stores/role.js +243 -0
  84. data/lib/vue/stores/translations.json +86 -0
  85. data/lib/vue/stores/user.js +102 -0
  86. data/lib/{sass/lesli/devise/sessions.scss → vue/translation.js} +14 -5
  87. data/lib/webpack/base.js +2 -2
  88. data/lib/webpack/core.js +2 -0
  89. data/readme.md +74 -55
  90. metadata +196 -51
  91. data/app/assets/fonts/lesli/Domine/Domine-Bold.ttf +0 -0
  92. data/app/assets/fonts/lesli/Domine/Domine-Regular.ttf +0 -0
  93. data/app/assets/stylesheets/lesli/users/devise.scss +0 -32
  94. data/app/controllers/lesli/profiles_controller.rb +0 -60
  95. data/app/helpers/lesli/profiles_helper.rb +0 -4
  96. data/app/models/lesli/profile.rb +0 -4
  97. data/app/views/lesli/devise/sessions/_form.html.erb +0 -17
  98. data/app/views/lesli/devise/sessions/_session.html.erb +0 -2
  99. data/app/views/lesli/devise/sessions/edit.html.erb +0 -10
  100. data/app/views/lesli/devise/sessions/index.html.erb +0 -14
  101. data/app/views/lesli/devise/sessions/new.html.erb +0 -9
  102. data/app/views/lesli/devise/sessions/show.html.erb +0 -10
  103. data/app/views/lesli/profiles/_form.html.erb +0 -17
  104. data/app/views/lesli/profiles/_profile.html.erb +0 -2
  105. data/app/views/lesli/profiles/edit.html.erb +0 -10
  106. data/app/views/lesli/profiles/index.html.erb +0 -14
  107. data/app/views/lesli/profiles/new.html.erb +0 -9
  108. data/app/views/lesli/profiles/show.html.erb +0 -10
  109. data/lib/sass/lesli/pages/dashboards.scss +0 -57
  110. data/lib/tasks/db.rb +0 -76
  111. data/lib/vue/stores/profile.js +0 -90
  112. data/lib/vue/stores/workflow2.js +0 -345
  113. data/lib/vue/stores/workflows/actions.js +0 -327
  114. data/lib/vue/stores/workflows/associations.js +0 -130
  115. data/lib/vue/stores/workflows/checks.js +0 -210
  116. /data/lib/vue/stores/{announcements.js → entities/announcements.js} +0 -0
  117. /data/lib/vue/stores/{dashboard.js → entities/dashboard.js} +0 -0
  118. /data/lib/vue/stores/{workflow.js → entities/workflow.js} +0 -0
  119. /data/lib/vue/stores/{cloud-bell → panels}/notification.js +0 -0
  120. /data/lib/vue/stores/{firebase.js → services/firebase.js} +0 -0
@@ -0,0 +1,23 @@
1
+ <!doctype html><html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><title></title><!--[if !mso]><!--><meta http-equiv="X-UA-Compatible" content="IE=edge"><!--<![endif]--><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><style type="text/css">#outlook a { padding:0; }
2
+ body { margin:0;padding:0;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%; }
3
+ table, td { border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt; }
4
+ img { border:0;height:auto;line-height:100%; outline:none;text-decoration:none;-ms-interpolation-mode:bicubic; }
5
+ p { display:block;margin:13px 0; }</style><!--[if mso]>
6
+ <noscript>
7
+ <xml>
8
+ <o:OfficeDocumentSettings>
9
+ <o:AllowPNG/>
10
+ <o:PixelsPerInch>96</o:PixelsPerInch>
11
+ </o:OfficeDocumentSettings>
12
+ </xml>
13
+ </noscript>
14
+ <![endif]--><!--[if lte mso 11]>
15
+ <style type="text/css">
16
+ .mj-outlook-group-fix { width:100% !important; }
17
+ </style>
18
+ <![endif]--><!--[if !mso]><!--><link href="https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700" rel="stylesheet" type="text/css"><style type="text/css">@import url(https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700);</style><!--<![endif]--><style type="text/css">@media only screen and (min-width:480px) {
19
+ .mj-column-per-100 { width:100% !important; max-width: 100%; }
20
+ }</style><style media="screen and (min-width:480px)">.moz-text-html .mj-column-per-100 { width:100% !important; max-width: 100%; }</style><style type="text/css">@media only screen and (max-width:479px) {
21
+ table.mj-full-width-mobile { width: 100% !important; }
22
+ td.mj-full-width-mobile { width: auto !important; }
23
+ }</style><style type="text/css"></style></head><body style="word-spacing:normal;background-color:#ebecf0;"><div style="background-color:#ebecf0;"><!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="margin:0px auto;max-width:600px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"><tbody><tr><td align="center" style="font-size:0px;padding:0px;padding-top:60px;padding-bottom:0px;padding-left:5px;word-break:break-word;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;"><tbody><tr><td style="width:125px;"><img src="https://cdn.lesli.tech/leslicloud/brand/app-logo.png" style="border:0;display:block;outline:none;text-decoration:none;height:auto;width:100%;font-size:13px;" width="125" height="auto"></td></tr></tbody></table></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--><div style="height:5px;line-height:5px;">&#8202;</div><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:center;color:#4a5056;"><h1>Welcome to The Lesli Family!</h1></div><!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" bgcolor="#ffffff" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="background:#ffffff;background-color:#ffffff;margin:0px auto;border-radius:15px;max-width:600px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#ffffff;background-color:#ffffff;width:100%;border-radius:15px;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:40px;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:520px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"><tbody><tr><td align="center" style="font-size:0px;padding:0px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:center;color:#4a5056;"><h2><raw><% name = @data.dig(:user, :full_name) %></raw><raw><%= !name.blank? ? "Hi #{name.strip}." : nil %></raw></h2></div></td></tr><tr><td style="background:#95a3ab;font-size:0px;word-break:break-word;"><div style="height:2px;line-height:2px;">&#8202;</div></td></tr><tr><td style="font-size:0px;word-break:break-word;"><div style="height:5px;line-height:5px;">&#8202;</div></td></tr><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:18px;line-height:1.4;text-align:center;color:#4a5056;"><p>You have been invitated to Lesli, please confirm your email address by clicking the button below:</p></div></td></tr><tr><td align="center" vertical-align="middle" style="font-size:0px;padding:10px 25px;word-break:break-word;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:separate;line-height:100%;"><tbody><tr><td align="center" bgcolor="#eef6fc" role="presentation" style="border:1px solid #209cee;border-radius:5px;cursor:auto;mso-padding-alt:10px;background:#eef6fc;" valign="middle"><a href="<%= url_for(@app[:host] + @data[:url]) %>" style="display:inline-block;background:#eef6fc;color:#209cee;font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:17px;font-weight:normal;line-height:120%;margin:0;text-decoration:none;text-transform:none;padding:10px;mso-padding-alt:0px;border-radius:5px;" target="_blank">Confirm my account</a></td></tr></tbody></table></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--><div style="height:30px;line-height:30px;">&#8202;</div><!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="margin:0px auto;max-width:600px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"><tbody><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:18px;font-weight:600;line-height:1;text-align:center;color:#444444;">¡Siguenos!</div></td></tr><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><table cellpadding="0" cellspacing="0" width="300" border="0" style="color:#000000;font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:22px;table-layout:auto;width:300px;border:none;"><tr><td align="center"><img width="45px" alt="Facebook" src="https://cdn.lesli.tech/leslicloud/emails/social-facebook.png"></td><td align="center"><img width="45px" alt="Twitter" src="https://cdn.lesli.tech/leslicloud/emails/social-twitter.png"></td><td align="center"><img width="45px" alt="Instagram" src="https://cdn.lesli.tech/leslicloud/emails/social-instagram.png"></td><td align="center"><img width="45px" alt="Linkedin" src="https://cdn.lesli.tech/leslicloud/emails/social-linkedin.png"></td></tr></table></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="margin:0px auto;max-width:600px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"><tbody><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:18px;font-weight:600;line-height:1;text-align:center;color:#444444;">Download our app</div></td></tr><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><table cellpadding="0" cellspacing="0" width="100%" border="0" style="color:#000000;font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:22px;table-layout:auto;width:100%;border:none;"><tr><td style="text-align: right; padding: 5px;"><a target="blank" href="https://apps.apple.com/us/app/lesli/id1595893730"><img width="130px" alt="Appstore badge" src="https://cdn.lesli.tech/leslicloud/emails/appstore.png"></a></td><td style="text-align: left; padding: 5px;"><a target="blank" href="https://apps.apple.com/us/app/lesli/id1595893730"><img width="130px" alt="Playstore badge" src="https://cdn.lesli.tech/leslicloud/emails/playstore.png"></a></td></tr></table></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--><div style="height:10px;line-height:10px;">&#8202;</div><!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="margin:0px auto;max-width:600px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"><tbody><tr><td align="center" style="font-size:0px;padding:4px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:center;color:#666666;">Copyright &copy; <%= Time.new.year %> LesliTech</div></td></tr><tr><td align="center" style="font-size:0px;padding:4px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:center;color:#666666;">Ciudad de Guatemala, Guatemala.</div></td></tr><tr><td align="center" style="font-size:0px;padding:4px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:center;color:#666666;">All rights reserved.</div></td></tr><tr><td align="center" style="font-size:0px;padding:4px;padding-top:20px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:center;color:#666666;">The Lesli Team</div></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></div></body></html>
@@ -49,7 +49,7 @@ Building a better future, one line of code at a time.
49
49
  </script>
50
50
  <% end %>
51
51
  </head>
52
- <body class="<%#= application_body_class() %>">
52
+ <body class="<%= application_body_class() %>">
53
53
  <%#= yield :application_public_custom_header %>
54
54
  <%= yield %>
55
55
  <%= render partial: "lesli/partials/application-public-javascript" %>
@@ -49,10 +49,10 @@ Building a better future, one line of code at a time.
49
49
  </script>
50
50
  <% end %>
51
51
  </head>
52
- <body class="<%#= application_body_class() %>">
52
+ <body class="<%= application_body_class() %>">
53
53
  <%#= yield :application_public_custom_header %>
54
54
  <h1>public layout</h1>
55
- <%= yield %>
55
+ <%#= yield %>
56
56
  <%= render partial: "lesli/partials/application-public-javascript" %>
57
57
  <%#= render partial: "lesli/partials/application-analytics" %>
58
58
  </body>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <style>
6
+ /* Email styles need to be inline */
7
+ </style>
8
+ </head>
9
+
10
+ <body>
11
+ <%= yield %>
12
+ </body>
13
+ </html>
@@ -0,0 +1 @@
1
+ <%= yield %>
@@ -32,48 +32,34 @@ Building a better future, one line of code at a time.
32
32
  =end
33
33
  %>
34
34
 
35
- <%# check if custom header partial exists in the builder engine %>
36
- <% custom_header_path = "layouts/#{lesli_engine.dig(:code)}/partials/application-header" %>
35
+ <lesli-application-header
36
+ <%= "show-bell" if defined?(CloudBell) %>
37
+ <%= "show-announcements" if defined?(CloudBell) %>
38
+ <%= "show-focus" if defined?(CloudFocus) %>
39
+ <%= "show-tickets" if defined?(CloudHelp) %>
40
+ :show-engines="true">
37
41
 
38
- <%# validate the path to be sure the partial exists when trying to render it %>
39
- <% custom_header_exists = lookup_context.exists?(custom_header_path, nil, true) %>
40
-
41
- <%# render custom header from builder engine if exists %>
42
- <%= render( partial: custom_header_path) if custom_header_exists %>
43
-
44
- <%# if custom header does not exists, use the main from core %>
45
- <% unless custom_header_exists %>
46
- <lesli-application-header
47
- <%= "show-bell" if defined?(CloudBell) %>
48
- <%= "show-announcements" if defined?(CloudBell) %>
49
- <%= "show-focus" if defined?(CloudFocus) %>
50
- <%= "show-tickets" if defined?(CloudHelp) %>
51
- :show-engines="true">
52
-
53
- <%# language selector %>
54
- <% if I18n.available_locales.length > 1 && params[:controller] == 'profiles' %>
55
- <div class="dropdown is-hoverable header-language-selector">
56
- <div class="dropdown-trigger">
57
- <button class="button" aria-haspopup="true" aria-controls="dropdown-menu">
58
- <span class="icon has-text-grey-light">
59
- <%= flag_icon(language_flag(I18n.locale)) %>
60
- </span>
61
- </button>
62
- </div>
63
- <div class="dropdown-menu" id="dropdown-menu" role="menu">
64
- <div class="dropdown-content">
65
- <% I18n.available_locales.each do |locale| %>
66
- <% next if locale == I18n.locale %>
67
- <%= link_to language_url(locale), { :class => "dropdown-item" } do %>
68
- <span class="icon has-text-grey-light">
69
- <%= flag_icon(language_flag(locale)) %>
70
- </span>
71
- <span><%= language_name(locale) %></span>
72
- <% end %>
42
+ <%# language selector %>
43
+ <% if I18n.available_locales.length > 1 %>
44
+ <div class="dropdown is-hoverable header-language-selector">
45
+ <div class="dropdown-trigger">
46
+ <span class="icon has-text-link">
47
+ <%= flag_icon(language_flag(locale)) %>
48
+ </span>
49
+ </div>
50
+ <div class="dropdown-menu" id="dropdown-menu-locale" role="menu">
51
+ <div class="dropdown-content">
52
+ <% I18n.available_locales.each do |locale| %>
53
+ <% next if locale == I18n.locale %>
54
+ <%= link_to language_url(locale), { :class => "dropdown-item" } do %>
55
+ <span class="icon has-text-grey-light">
56
+ <%= flag_icon(language_flag(locale)) %>
57
+ </span>
58
+ <span><%= language_name(locale) %></span>
73
59
  <% end %>
74
- </div>
60
+ <% end %>
75
61
  </div>
76
62
  </div>
77
- <% end %>
78
- </lesli-application-header >
79
- <% end %>
63
+ </div>
64
+ <% end %>
65
+ </lesli-application-header>
@@ -32,17 +32,21 @@ Building a better future, one line of code at a time.
32
32
  =end
33
33
  %>
34
34
 
35
- <%# translation_timestamp = File.mtime(Rails.root.join("public", "javascripts", "translations.js")).to_i %>
35
+ <%# Temporary to avoid reference errors %>
36
36
  <%= javascript_include_tag "lesli/i18n" %>
37
- <%#= javascript_include_tag "pdf", skip_pipeline: true %>
38
- <%#= javascript_include_tag "translations?#{translation_timestamp}", skip_pipeline: true %>
39
37
 
38
+
39
+ <%# Including main Lesli application %>
40
+ <%= javascript_include_tag(lesli_application_javascript_path()) %>
41
+
42
+
43
+ <%# Set language for JavaScript apps %>
40
44
  <script>
41
- // Set language for JavaScript apps
42
- // I18n.locale = '<%= I18n.locale %>'
45
+ if (typeof i18n !== "undefined") {
46
+ i18n.locale = "<%= I18n.locale %>"
47
+ }
43
48
  </script>
44
49
 
45
- <%= javascript_include_tag(lesli_application_javascript_path()) %>
46
50
 
47
51
  <%#
48
52
  <script src="https://js.honeybadger.io/v3.2/honeybadger.min.js" type="text/javascript"></script>
@@ -32,20 +32,24 @@ Building a better future, one line of code at a time.
32
32
  =end
33
33
  %>
34
34
 
35
- <%# translation_timestamp = File.mtime(Rails.root.join("public", "javascripts", "translations.js")).to_i %>
36
- <%#= javascript_include_tag "i18n", skip_pipeline: true %>
37
- <%#= javascript_include_tag "translations?#{translation_timestamp}", skip_pipeline: true %>
35
+ <%# Temporary to avoid reference errors %>
36
+ <%= javascript_include_tag "lesli/i18n" %>
38
37
 
39
38
 
40
- <%# Set language for JavaScripts apps %>
41
- <script>
42
- <%# I18n.locale = "<%= I18n.locale % >"; %>
43
- </script>
44
-
45
39
  <% is_devise = controller_path.split('/')[0] == "users" %>
46
40
 
41
+
47
42
  <%# Load specific javascript files for devise actions (login,register,etc) %>
48
43
  <%= javascript_include_tag("lesli/#{controller_path}") if is_devise %>
49
44
 
45
+
50
46
  <%# Load standard files %>
51
47
  <%#= javascript_include_tag(application_javascript_path()) unless is_devise %>
48
+
49
+
50
+ <%# Set language for JavaScript apps %>
51
+ <script>
52
+ if (typeof i18n !== "undefined") {
53
+ i18n.locale = "<%= I18n.locale %>"
54
+ }
55
+ </script>
@@ -1,4 +1,5 @@
1
- /*
1
+ <%
2
+ =begin
2
3
 
3
4
  Lesli
4
5
 
@@ -27,49 +28,32 @@ Building a better future, one line of code at a time.
27
28
  @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
29
 
29
30
  // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
- // ·
31
-
32
- */
33
-
34
-
35
- // ·
36
- @import "templates/public";
37
- //@import "lesli/settings/icons.scss";
38
-
39
-
40
31
  // ·
41
- .container {
42
-
43
- img {
44
- max-width: 180px;
45
- margin-bottom: 2rem;
46
- }
47
-
48
- div.content {
49
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
50
- max-width: 800px;
51
- padding: 2rem 1rem 1.4rem;
52
- margin: 0 auto;
53
-
54
- svg {
55
- max-width: 90px;
56
- fill: lesli-css-color(lime, 300);
57
- }
58
-
59
- h2 {
60
- font-weight: 100;
61
- font-size: 2rem;
62
- }
63
-
64
- }
65
-
66
- .redirection {
67
- padding: 2rem 0;
68
-
69
- a {
70
- font-size: 0.8rem;
71
- }
72
-
73
- }
74
-
75
- }
32
+ =end
33
+ %>
34
+
35
+ <% title = defined?(title) ? title : "" %>
36
+
37
+ <main id="lesli-application">
38
+ <section class="hero is-fullheight">
39
+ <div class="hero-head has-text-centered">
40
+ <%# Logo container %>
41
+ <div class="logo mb-4">
42
+ <%= image_tag(
43
+ "#{lesli_instance_code}/brand/app-auth.svg", # dynamic path to the instance main logo
44
+ :class => "#{lesli_instance_code}-logo", # dynamic class according to the instance
45
+ :alt => "Main logo")
46
+ %>
47
+ <h1 class="title has-text-primary">
48
+ <%#= I18n.t("core.users/sessions.view_text_welcome") %>
49
+ <%= title %>
50
+ </h1>
51
+ </div>
52
+ </div>
53
+ <div class="hero-body">
54
+
55
+ <%= yield %>
56
+
57
+ </div>
58
+ </section>
59
+ </main>
@@ -32,6 +32,7 @@ Building a better future, one line of code at a time.
32
32
  =end
33
33
  %>
34
34
 
35
+ <% title = defined?(title) ? title : "" %>
35
36
  <% back_to_login = defined?(back_to_login) ? back_to_login : false %>
36
37
  <% custom_app_page_clas = "#{ lesli_instance_code }-session".downcase %>
37
38
 
@@ -53,6 +54,20 @@ Building a better future, one line of code at a time.
53
54
  <% end %>
54
55
  <div class="hero-body is-flex-direction-column is-justify-content-center">
55
56
 
57
+
58
+ <%# Logo container %>
59
+ <div class="logo has-text-centered mb-4">
60
+ <%= image_tag(
61
+ "#{lesli_instance_code}/brand/app-auth.svg", # dynamic path to the instance main logo
62
+ :class => "#{lesli_instance_code}-logo", # dynamic class according to the instance
63
+ :alt => "Main logo")
64
+ %>
65
+ <h1 class="has-text-primary">
66
+ <%#= I18n.t("core.users/sessions.view_text_welcome") %>
67
+ <%= title %>
68
+ </h1>
69
+ </div>
70
+
56
71
  <%= yield %>
57
72
 
58
73
  </div>
@@ -30,9 +30,11 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
- # ·
34
33
  Lesli.configure do |config|
35
34
 
35
+ # Installation identifier
36
+ config.instance = "Lesli"
37
+
36
38
 
37
39
  # Information about the main account in the platform
38
40
  config.company = {
@@ -44,7 +46,7 @@ Lesli.configure do |config|
44
46
 
45
47
  # Available languages globally (Requires LesliBabel)
46
48
  config.locales = {
47
- en: "English", # English
49
+ :en => "English", # English
48
50
  # :de => "Deutsch", # Deutsch/German
49
51
  # :pl => "Polski", # Polski/Polish/Poland
50
52
  # :nl => "Dutch", # Dutch/Nederlands/Netherlands
@@ -0,0 +1,7 @@
1
+ ---
2
+ :en:
3
+ lesli:
4
+ shared:
5
+ title_lesli: ":lesli.shared.title_lesli:"
6
+ users:
7
+ title_users: Users
@@ -0,0 +1,7 @@
1
+ ---
2
+ :es:
3
+ lesli:
4
+ shared:
5
+ title_lesli: 'Lesli en español '
6
+ users:
7
+ title_users: Usuarios
data/config/routes.rb CHANGED
@@ -30,23 +30,28 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
+
34
+ # Mount the devise at the deefault path
35
+ # TODO:
36
+ # The user can define the mount path for the auth framework
37
+ # using: "Lesli::Routing.mount_login_at('auth')" so, later
38
+ # we will must to check if devise is already mounted before
39
+ # to call this method.
40
+ Lesli::Routing.mount_login
41
+
42
+
43
+ # Mount the necessary resources Lesli needs to work properly
33
44
  Lesli::Engine.routes.draw do
34
45
 
35
- devise_for :users, class_name: "Lesli::User", module: :devise,
36
- :path => "",
37
- :path_names => {
38
- :sign_in => "login",
39
- :sign_out => "logout",
40
- :sign_up => "register",
41
- :password => "password",
42
- :confirmation => "confirmation"
43
- },
44
- :controllers => {
45
- :registrations => "users/registrations",
46
- :confirmations => "users/confirmations",
47
- :passwords => "users/passwords",
48
- :sessions => "users/sessions"
49
- }
50
-
51
- # resource :profile, only: []
46
+ resources :users, only: [] do
47
+ collection do
48
+ get :list
49
+ end
50
+ end
51
+
52
+ resources :roles, only: [] do
53
+ collection do
54
+ get :list
55
+ end
56
+ end
52
57
  end
@@ -17,7 +17,7 @@ GNU General Public License for more details.
17
17
  You should have received a copy of the GNU General Public License
18
18
  along with this program. If not, see http://www.gnu.org/licenses/.
19
19
 
20
- Lesli · Ruby on Rails SaaS development platform.
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
21
 
22
22
  Made with ♥ by https://www.lesli.tech
23
23
  Building a better future, one line of code at a time.
@@ -17,7 +17,7 @@ GNU General Public License for more details.
17
17
  You should have received a copy of the GNU General Public License
18
18
  along with this program. If not, see http://www.gnu.org/licenses/.
19
19
 
20
- Lesli · Ruby on Rails Development Platform.
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
21
 
22
22
  Made with ♥ by https://www.lesli.tech
23
23
  Building a better future, one line of code at a time.
@@ -27,12 +27,12 @@ Building a better future, one line of code at a time.
27
27
  @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
28
 
29
29
  // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
- // ·
30
+ // ·
31
31
  =end
32
32
 
33
- class CreateUserDetails < ActiveRecord::Migration[6.0]
33
+ class CreateLesliUserDetails < ActiveRecord::Migration[6.0]
34
34
  def change
35
- create_table :user_details do |t|
35
+ create_table :lesli_user_details do |t|
36
36
  t.string :title
37
37
  t.string :address
38
38
 
@@ -43,7 +43,7 @@ class CreateUserDetails < ActiveRecord::Migration[6.0]
43
43
  t.datetime :deleted_at, index: true
44
44
  t.timestamps
45
45
  end
46
- add_reference(:user_details, :user, foreign_key: { to_table: :users })
47
- add_reference(:user_details, :account_location, foreign_key: { to_table: :account_locations })
46
+ add_reference(:lesli_user_details, :user, foreign_key: { to_table: :lesli_users })
47
+ #add_reference(:lesli_user_details, :account_location, foreign_key: { to_table: :account_locations })
48
48
  end
49
49
  end
@@ -30,14 +30,14 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
- class CreateUserRoles < ActiveRecord::Migration[6.0]
33
+ class CreateLesliUserRoles < ActiveRecord::Migration[6.0]
34
34
  def change
35
- create_table :user_roles do |t|
35
+ create_table :lesli_user_roles do |t|
36
36
  t.datetime :deleted_at, index: true
37
37
  t.timestamps
38
38
  end
39
39
 
40
- add_reference(:user_roles, :user, foreign_key: { to_table: :users })
41
- add_reference(:user_roles, :role, foreign_key: { to_table: :roles })
40
+ add_reference(:lesli_user_roles, :user, foreign_key: { to_table: :lesli_users })
41
+ add_reference(:lesli_user_roles, :role, foreign_key: { to_table: :lesli_roles })
42
42
  end
43
43
  end
@@ -17,7 +17,7 @@ GNU General Public License for more details.
17
17
  You should have received a copy of the GNU General Public License
18
18
  along with this program. If not, see http://www.gnu.org/licenses/.
19
19
 
20
- Lesli · Ruby on Rails SaaS development platform.
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
21
 
22
22
  Made with ♥ by https://www.lesli.tech
23
23
  Building a better future, one line of code at a time.
@@ -27,19 +27,18 @@ Building a better future, one line of code at a time.
27
27
  @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
28
 
29
29
  // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
- // ·
30
+ // ·
31
31
  =end
32
32
 
33
- class CreateDescriptors < ActiveRecord::Migration[7.0]
33
+ class CreateLesliDescriptors < ActiveRecord::Migration[7.0]
34
34
  def change
35
- create_table :descriptors do |t|
35
+ create_table :lesli_descriptors do |t|
36
36
  t.string :name
37
37
  t.string :category
38
38
  t.datetime :deleted_at, index: true
39
39
  t.timestamps
40
40
  end
41
41
 
42
- # add_reference(:descriptors, :system_controller, foreign_key: { to_table: :system_controllers })
43
- add_reference(:descriptors, :account, foreign_key: { to_table: :accounts })
42
+ add_reference(:lesli_descriptors, :account, foreign_key: { to_table: :lesli_accounts })
44
43
  end
45
44
  end
@@ -17,7 +17,7 @@ GNU General Public License for more details.
17
17
  You should have received a copy of the GNU General Public License
18
18
  along with this program. If not, see http://www.gnu.org/licenses/.
19
19
 
20
- Lesli · Ruby on Rails SaaS development platform.
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
21
 
22
22
  Made with ♥ by https://www.lesli.tech
23
23
  Building a better future, one line of code at a time.
@@ -27,18 +27,19 @@ Building a better future, one line of code at a time.
27
27
  @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
28
 
29
29
  // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
- // ·
30
+ // ·
31
31
  =end
32
32
 
33
- class CreateDescriptorPrivileges < ActiveRecord::Migration[7.0]
33
+ class CreateLesliDescriptorPrivileges < ActiveRecord::Migration[7.0]
34
34
  def change
35
- create_table :descriptor_privileges do |t|
35
+ create_table :lesli_descriptor_privileges do |t|
36
36
  t.datetime :deleted_at, index: true
37
37
  t.timestamps
38
38
  end
39
39
 
40
- add_reference(:descriptor_privileges, :descriptor, foreign_key: { to_table: :descriptors })
41
- add_reference(:descriptor_privileges, :system_controller_action,
42
- foreign_key: { to_table: :system_controller_actions }, index: { name: "descriptor_privileges_controller_actions" })
40
+ add_reference(:lesli_descriptor_privileges, :descriptor, foreign_key: { to_table: :lesli_descriptors })
41
+ add_reference(:lesli_descriptor_privileges, :action,
42
+ foreign_key: { to_table: :lesli_system_controller_actions },
43
+ index: { name: "descriptor_privileges_controller_actions" })
43
44
  end
44
45
  end
@@ -17,7 +17,7 @@ GNU General Public License for more details.
17
17
  You should have received a copy of the GNU General Public License
18
18
  along with this program. If not, see http://www.gnu.org/licenses/.
19
19
 
20
- Lesli · Ruby on Rails SaaS development platform.
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
21
 
22
22
  Made with ♥ by https://www.lesli.tech
23
23
  Building a better future, one line of code at a time.
@@ -27,17 +27,15 @@ Building a better future, one line of code at a time.
27
27
  @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
28
 
29
29
  // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
- // ·
30
+ // ·
31
31
  =end
32
32
 
33
- class CreateDescriptorActivities < ActiveRecord::Migration[7.0]
33
+ class CreateLesliDescriptorActivities < ActiveRecord::Migration[7.0]
34
34
  def change
35
- # table_base_structure = JSON.parse(File.read(Rails.root.join('db','structure','00000004_activities.json')))
36
-
37
- gem_path = Lesli::System.engine("lesli")
35
+ gem_path = Lesli::System.engine("lesli", "dir")
38
36
  table_base_structure = JSON.parse(File.read(File.join(gem_path, "db", "structure", "00000004_activities.json")))
39
37
 
40
- create_table :descriptor_activities do |t|
38
+ create_table :lesli_descriptor_activities do |t|
41
39
  table_base_structure.each do |column|
42
40
  t.send(
43
41
  column["type"].parameterize.underscore.to_sym,
@@ -46,6 +44,6 @@ class CreateDescriptorActivities < ActiveRecord::Migration[7.0]
46
44
  end
47
45
  t.timestamps
48
46
  end
49
- add_reference(:descriptor_activities, :descriptor, foreign_key: { to_table: :descriptors })
47
+ add_reference(:lesli_descriptor_activities, :descriptor, foreign_key: { to_table: :lesli_descriptors })
50
48
  end
51
49
  end
data/db/seeds.rb CHANGED
@@ -30,8 +30,6 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
- L2.br(4)
34
-
35
33
 
36
34
  # including tools for seeders
37
35
  load Lesli::Engine.root.join("db", "seed", "tools.rb")