lesli_shield 1.1.7 → 1.1.9

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 (102) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/lesli_shield/application.css +1036 -32
  3. data/app/assets/stylesheets/lesli_shield/confirmations.css +89 -557
  4. data/app/assets/stylesheets/lesli_shield/invitations.css +544 -0
  5. data/app/assets/stylesheets/lesli_shield/passwords.css +76 -542
  6. data/app/assets/stylesheets/lesli_shield/registrations.css +66 -539
  7. data/app/assets/stylesheets/lesli_shield/sessions.css +98 -564
  8. data/app/controllers/lesli_shield/invites_controller.rb +100 -49
  9. data/app/controllers/lesli_shield/profiles_controller.rb +9 -3
  10. data/app/controllers/lesli_shield/role/actions_controller.rb +134 -38
  11. data/app/controllers/lesli_shield/roles_controller.rb +114 -141
  12. data/app/controllers/lesli_shield/users_controller.rb +11 -4
  13. data/app/controllers/users/confirmations_controller.rb +2 -2
  14. data/app/controllers/users/invitations_controller.rb +101 -0
  15. data/app/controllers/users/passwords_controller.rb +1 -1
  16. data/app/controllers/users/registrations_controller.rb +2 -2
  17. data/app/controllers/users/sessions_controller.rb +3 -1
  18. data/app/jobs/lesli_shield/invitation_delivery_job.rb +123 -0
  19. data/app/mailers/lesli_shield/devise_mailer.rb +3 -3
  20. data/app/mailers/lesli_shield/invitation_mailer.rb +58 -0
  21. data/app/models/concerns/lesli_shield/role_management.rb +70 -0
  22. data/app/models/concerns/lesli_shield/user_security.rb +22 -19
  23. data/app/models/lesli_shield/invite.rb +183 -12
  24. data/app/services/lesli_shield/invitation_audit.rb +34 -0
  25. data/app/services/lesli_shield/invitation_email_policy.rb +64 -0
  26. data/app/services/lesli_shield/invitation_service.rb +405 -0
  27. data/app/services/lesli_shield/invite_service.rb +34 -5
  28. data/app/services/lesli_shield/profile_service.rb +1 -0
  29. data/app/services/lesli_shield/role_action_service.rb +37 -92
  30. data/app/services/lesli_shield/role_audit.rb +42 -0
  31. data/app/services/lesli_shield/role_permission_service.rb +347 -0
  32. data/app/services/lesli_shield/role_privilege_deployment_service.rb +79 -0
  33. data/app/services/lesli_shield/role_privilege_service.rb +69 -105
  34. data/app/services/lesli_shield/role_service.rb +431 -0
  35. data/app/services/lesli_shield/user_registration_service.rb +1 -1
  36. data/app/services/lesli_shield/user_validator_service.rb +9 -9
  37. data/app/views/devise/confirmations/new.html.erb +6 -6
  38. data/app/views/devise/confirmations/show.html.erb +6 -6
  39. data/app/views/devise/passwords/edit.html.erb +8 -8
  40. data/app/views/devise/passwords/new.html.erb +9 -9
  41. data/app/views/devise/registrations/new.html.erb +16 -16
  42. data/app/views/devise/sessions/new.html.erb +9 -9
  43. data/app/views/devise/shared/_application-devise-simple.erb +1 -1
  44. data/app/views/devise/shared/_application-devise.html.erb +4 -4
  45. data/app/views/devise/shared/_demo.html.erb +5 -5
  46. data/app/views/devise/shared/_error_messages.html.erb +5 -5
  47. data/app/views/devise/shared/_links.html.erb +12 -15
  48. data/app/views/lesli_shield/invites/_form.html.erb +64 -7
  49. data/app/views/lesli_shield/invites/_invite.html.erb +55 -2
  50. data/app/views/lesli_shield/invites/_invite_actions.html.erb +34 -0
  51. data/app/views/lesli_shield/invites/_status_badge.html.erb +13 -0
  52. data/app/views/lesli_shield/invites/index.html.erb +119 -63
  53. data/app/views/lesli_shield/invites/new.html.erb +11 -36
  54. data/app/views/lesli_shield/invites/show.html.erb +13 -52
  55. data/app/views/lesli_shield/profiles/_information-form.html.erb +11 -0
  56. data/app/views/lesli_shield/profiles/_password-form.html.erb +1 -1
  57. data/app/views/lesli_shield/profiles/show.html.erb +1 -4
  58. data/app/views/lesli_shield/role/actions/_custom_actions.html.erb +24 -0
  59. data/app/views/lesli_shield/role/actions/_deployment_status.html.erb +14 -0
  60. data/app/views/lesli_shield/role/actions/_matrix.html.erb +69 -0
  61. data/app/views/lesli_shield/role/actions/_permissions.html.erb +95 -0
  62. data/app/views/lesli_shield/role/actions/_toggle.html.erb +34 -0
  63. data/app/views/lesli_shield/role/actions/index.html.erb +13 -10
  64. data/app/views/lesli_shield/roles/_deployment_badge.html.erb +15 -0
  65. data/app/views/lesli_shield/roles/_empty_state.html.erb +20 -0
  66. data/app/views/lesli_shield/roles/_field_errors.html.erb +5 -0
  67. data/app/views/lesli_shield/roles/_filters.html.erb +66 -0
  68. data/app/views/lesli_shield/roles/_form.html.erb +149 -18
  69. data/app/views/lesli_shield/roles/_management_menu.html.erb +37 -0
  70. data/app/views/lesli_shield/roles/_pagination.html.erb +43 -0
  71. data/app/views/lesli_shield/roles/_role_list.html.erb +116 -0
  72. data/app/views/lesli_shield/roles/_status_badge.html.erb +11 -0
  73. data/app/views/lesli_shield/roles/_type_badge.html.erb +9 -0
  74. data/app/views/lesli_shield/roles/index.html.erb +15 -38
  75. data/app/views/lesli_shield/roles/new.html.erb +11 -0
  76. data/app/views/lesli_shield/roles/show.html.erb +79 -7
  77. data/app/views/lesli_shield/users/_information-card.html.erb +3 -3
  78. data/app/views/lesli_shield/users/_information-form.html.erb +6 -0
  79. data/app/views/lesli_shield/users/_management-privileges.html.erb +2 -2
  80. data/app/views/users/invitations/show.html.erb +142 -0
  81. data/app/views/users/invitations/unavailable.html.erb +19 -0
  82. data/config/locales/devise.en.yml +8 -0
  83. data/config/locales/devise.es.yml +8 -0
  84. data/config/locales/translations.en.yml +313 -78
  85. data/config/locales/translations.es.yml +313 -78
  86. data/config/routes.rb +10 -3
  87. data/db/migrate/v1/0801120110_create_lesli_shield_invites.rb +40 -6
  88. data/lib/lesli_shield/engine.rb +4 -0
  89. data/lib/lesli_shield/router.rb +10 -0
  90. data/lib/lesli_shield/version.rb +2 -2
  91. data/lib/tasks/lesli_shield_tasks.rake +1 -1
  92. data/readme.md +13 -1
  93. metadata +35 -11
  94. data/app/assets/stylesheets/lesli_shield/confirmations.tailwind.css +0 -918
  95. data/app/assets/stylesheets/lesli_shield/devise/oauth.css +0 -33
  96. data/app/assets/stylesheets/lesli_shield/passwords.tailwind.css +0 -873
  97. data/app/assets/stylesheets/lesli_shield/registrations.tailwind.css +0 -908
  98. data/app/assets/stylesheets/lesli_shield/sessions.tailwind.css +0 -984
  99. data/app/assets/stylesheets/lesli_shield/users.css +0 -31
  100. data/app/mailers/lesli_shield/invitation.html.erb +0 -23
  101. data/app/views/lesli_shield/invites/edit.html.erb +0 -12
  102. data/app/views/lesli_shield/role/actions/_form.html.erb +0 -75
@@ -1,31 +0,0 @@
1
- @charset "UTF-8";
2
- /*
3
- Lesli
4
-
5
- Copyright (c) 2023, 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 https://www.lesli.tech
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
- */
@@ -1,23 +0,0 @@
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>
@@ -1,12 +0,0 @@
1
- <% content_for :title, "Editing invite" %>
2
-
3
- <h1>Editing invite</h1>
4
-
5
- <%= render "form", invite: @invite %>
6
-
7
- <br>
8
-
9
- <div>
10
- <%= link_to "Show this invite", @invite %> |
11
- <%= link_to "Back to invites", invites_path %>
12
- </div>
@@ -1,75 +0,0 @@
1
-
2
- <%
3
- columns = [{
4
- label: "Controller"
5
- }, {
6
- label: "Index"
7
- }, {
8
- label: "Show"
9
- }, {
10
- label: "Create"
11
- }, {
12
- label: "Update"
13
- }, {
14
- label: "Destroy"
15
- }]
16
- %>
17
-
18
-
19
- <style>
20
- .mini-toggle {
21
- position: relative;
22
- width: 40px;
23
- height: 20px;
24
- background: #ccc;
25
- border-radius: 9999px;
26
- border: none;
27
- cursor: pointer;
28
- padding: 0;
29
- transition: background 0.25s ease;
30
- display: inline-block;
31
- }
32
-
33
- .mini-toggle.active {
34
- background: #22c55e; /* green */
35
- background: var(--lesli-color-primary)
36
- }
37
-
38
- .mini-toggle-slider {
39
- position: absolute;
40
- top: 2px;
41
- left: 2px;
42
- width: 16px;
43
- height: 16px;
44
- background: white;
45
- border-radius: 50%;
46
- transition: transform 0.25s ease;
47
- }
48
-
49
- .mini-toggle.active .mini-toggle-slider {
50
- transform: translateX(20px);
51
- }
52
- </style>
53
-
54
- <section id="shield-role-actions-form">
55
- <%= render(LesliView::Elements::Table.new(:columns => columns)) do |table| %>
56
- <% @role_actions.each do |controller_name, actions| %>
57
- <% table.with_row do |row| %>
58
- <% row.with_cell do %>
59
- <%= controller_name %>
60
- <% end %>
61
- <% actions.each do |action_name, action| %>
62
- <% row.with_cell do %>
63
- <% if action %>
64
- <%= button_to role_action_path(action),
65
- class: "mini-toggle #{'active' if action[:active] == 1}",
66
- method: (action[:active] == 1 ? :delete : :patch) do %>
67
- <span class="mini-toggle-slider"></span>
68
- <% end %>
69
- <% end %>
70
- <% end %>
71
- <% end %>
72
- <% end %>
73
- <% end %>
74
- <% end %>
75
- </section>