lesli 5.0.11 → 5.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/config/lesli_manifest.js +0 -13
- data/app/assets/icons/lesli/engine-security.svg +1 -0
- data/app/assets/icons/lesli/engine-shield.svg +1 -0
- data/app/assets/images/lesli/brand/app-logo.png +0 -0
- data/app/assets/images/lesli/lesli-logo.svg +4 -0
- data/app/assets/javascripts/lesli/templates/application.js +14 -0
- data/app/assets/javascripts/lesli/templates/public.js +14 -0
- data/app/assets/stylesheets/lesli/templates/application.css +1365 -293
- data/app/assets/stylesheets/lesli/templates/public.css +1 -1
- data/app/controllers/lesli/abouts_controller.rb +12 -18
- data/app/controllers/lesli/application_controller.rb +26 -25
- data/app/controllers/lesli/application_lesli_controller.rb +5 -6
- data/app/controllers/lesli/interfaces/application/authorization.rb +2 -2
- data/app/controllers/lesli/interfaces/application/customization.rb +1 -1
- data/app/controllers/lesli/interfaces/application/requester.rb +2 -2
- data/app/controllers/lesli/interfaces/application/responder.rb +8 -8
- data/app/controllers/lesli/interfaces/controllers/actions.rb +250 -0
- data/app/controllers/lesli/interfaces/controllers/activities.rb +215 -0
- data/app/controllers/lesli/interfaces/controllers/discussions.rb +270 -0
- data/app/controllers/lesli/interfaces/controllers/files.rb +467 -0
- data/app/controllers/lesli/interfaces/controllers/subscribers.rb +234 -0
- data/app/helpers/lesli/assets_helper.rb +26 -8
- data/app/helpers/lesli/navigation_helper.rb +53 -92
- data/app/lib/date2.rb +8 -0
- data/app/lib/lesli/system.rb +17 -4
- data/app/models/concerns/account_initializer.rb +46 -42
- data/app/models/concerns/user_extensions.rb +6 -0
- data/{lib/scss/devise/registrations.scss → app/models/lesli/account/detail.rb} +7 -3
- data/app/models/lesli/account.rb +12 -5
- data/app/models/lesli/cloud_object/action.rb +70 -0
- data/app/models/lesli/cloud_object/activity.rb +311 -0
- data/app/models/lesli/cloud_object/custom_field.rb +158 -0
- data/app/models/lesli/cloud_object/discussion.rb +219 -0
- data/app/models/lesli/cloud_object/subscriber.rb +186 -0
- data/app/models/lesli/shared/dashboard.rb +16 -5
- data/app/models/lesli/user/session.rb +0 -2
- data/app/models/lesli/user.rb +13 -13
- data/app/operators/lesli/controller_operator.rb +4 -1
- data/app/operators/lesli/user_registration_operator.rb +3 -3
- data/app/services/lesli/user_service.rb +1 -1
- data/app/views/lesli/layouts/application-devise.html.erb +6 -6
- data/app/views/lesli/layouts/application-lesli.html.erb +3 -1
- data/app/views/lesli/partials/_application-data.html.erb +5 -4
- data/app/views/lesli/partials/_application-lesli-engines.html.erb +14 -39
- data/app/views/lesli/partials/_application-lesli-header.html.erb +50 -25
- data/app/views/lesli/partials/_application-lesli-icons.html.erb +1 -1
- data/app/views/lesli/partials/_application-lesli-javascript.html.erb +2 -2
- data/app/views/lesli/partials/_application-lesli-navigation.html.erb +8 -1
- data/app/views/lesli/partials/_application-lesli-panels.html.erb +7 -7
- data/app/views/lesli/partials/_application-lesli-scss.html.erb +2 -2
- data/app/views/lesli/wrappers/_application-devise-simple.erb +1 -1
- data/app/views/lesli/wrappers/_application-devise.html.erb +5 -7
- data/config/initializers/devise.rb +335 -335
- data/config/initializers/lesli.rb +9 -2
- data/config/locales/translations.en.yml +9 -3
- data/config/locales/translations.es.yml +9 -3
- data/config/locales/translations.fr.yml +30 -0
- data/config/locales/translations.it.yml +30 -0
- data/config/locales/translations.pt.yml +30 -0
- data/config/routes.rb +1 -10
- data/db/migrate/{v1.0/0010003010_create_lesli_user_details.rb → v1/0010000110_create_lesli_accounts.rb} +19 -13
- data/db/migrate/{v1.0/0010000110_create_lesli_accounts.rb → v1/0010001010_create_lesli_account_details.rb} +5 -7
- data/db/migrate/{v1.0/0010001010_create_lesli_account_settings.rb → v1/0010001110_create_lesli_account_settings.rb} +2 -2
- data/db/seed/development/accounts.rb +10 -7
- data/db/seed/development/users.rb +20 -20
- data/db/seed/production/accounts.rb +10 -7
- data/lib/generators/application_lesli_generator.rb +164 -0
- data/lib/generators/lesli/spec/USAGE +8 -0
- data/lib/generators/lesli/spec/spec_generator.rb +25 -0
- data/lib/generators/lesli/spec/templates/spec-factory.template +17 -0
- data/lib/generators/lesli/spec/templates/spec-model.template +70 -0
- data/lib/lesli/configuration.rb +1 -1
- data/lib/lesli/engine.rb +3 -14
- data/lib/{scss/devise/passwords.scss → lesli/r_spec.rb} +12 -5
- data/lib/lesli/routing.rb +51 -20
- data/lib/lesli/version.rb +2 -2
- data/lib/lesli.rb +1 -0
- data/lib/scss/cloud-objects/discussion.scss +8 -5
- data/lib/scss/layouts/application-component.scss +1 -1
- data/lib/scss/{devise/sessions.scss → layouts/application-content.scss} +4 -4
- data/lib/scss/layouts/application-header.scss +38 -108
- data/lib/scss/layouts/{application-navbar.scss → application-navigation.scss} +23 -5
- data/lib/scss/layouts/application-search.scss +1 -1
- data/lib/scss/{elements/msg.scss → overrides/notification.scss} +16 -18
- data/lib/scss/pages/devise-simple.scss +4 -2
- data/lib/scss/pages/devise.scss +111 -107
- data/lib/scss/panels/panel-notification.scss +1 -1
- data/lib/scss/panels/{panel-ticket.scss → panel-support-ticket.scss} +3 -4
- data/lib/scss/settings/variables.scss +1 -1
- data/lib/scss/templates/application.scss +14 -41
- data/lib/scss/templates/public.scss +6 -4
- data/lib/tasks/lesli/controllers.rake +1 -1
- data/lib/tasks/lesli/db.rake +24 -12
- data/lib/tasks/lesli_tasks.rake +7 -7
- data/lib/vue/application.js +18 -15
- data/lib/vue/{refactor/shared/cloudobjects → cloudobjects}/discussion/content.vue +10 -8
- data/lib/vue/cloudobjects/discussion/element.vue +170 -0
- data/lib/vue/{refactor/shared/cloudobjects → cloudobjects}/discussion/filters.vue +1 -1
- data/lib/vue/{refactor/shared/cloudobjects → cloudobjects}/discussion/new.vue +20 -16
- data/lib/vue/{refactor/shared/cloudobjects → cloudobjects}/discussion.vue +25 -24
- data/lib/vue/{refactor/stores/cloudobjects → cloudobjects/stores}/discussion.js +7 -16
- data/lib/vue/layouts/application-component.vue +2 -2
- data/lib/vue/layouts/application-header.vue +109 -88
- data/lib/vue/panels/{panel-notifications.vue → panel-bell-notifications.vue} +15 -19
- data/lib/vue/panels/panel-support-tickets.vue +163 -0
- data/lib/vue/panels/stores/bell-notifications.js +46 -0
- data/lib/vue/panels/stores/support-tickets.js +103 -0
- data/lib/vue/shared/dashboards/apps/edit.vue +10 -10
- data/lib/vue/shared/dashboards/components/form.vue +31 -40
- data/lib/vue/shared/stores/dashboard.js +2 -0
- data/lib/vue/shared/stores/layout.js +2 -1
- data/lib/{scss/devise/confirmations.scss → vue/shared/stores/users.js} +22 -21
- data/lib/vue/stores/translations.json +119 -2
- data/lib/webpack/base.js +18 -12
- data/lib/webpack/core.js +16 -12
- data/lib/webpack/engines.js +3 -1
- data/lib/webpack/root.js +105 -0
- data/lib/webpack/version.js +37 -0
- data/readme.md +16 -15
- metadata +58 -92
- data/app/assets/icons/lesli/engine-guard.svg +0 -1
- data/app/assets/javascripts/lesli/users/sessions.js +0 -1
- data/app/assets/stylesheets/lesli/users/sessions.css +0 -1
- data/app/controllers/users/confirmations_controller.rb +0 -66
- data/app/controllers/users/omniauth_callbacks_controller.rb +0 -30
- data/app/controllers/users/passwords_controller.rb +0 -71
- data/app/controllers/users/registrations_controller.rb +0 -141
- data/app/controllers/users/sessions_controller.rb +0 -141
- data/app/controllers/users/unlocks_controller.rb +0 -30
- data/app/views/devise/confirmations/new.html.erb +0 -2
- data/app/views/devise/confirmations/show.html.erb +0 -63
- data/app/views/devise/mailer/confirmation_instructions.html.erb +0 -5
- data/app/views/devise/mailer/email_changed.html.erb +0 -7
- data/app/views/devise/mailer/password_change.html.erb +0 -3
- data/app/views/devise/mailer/reset_password_instructions.html.erb +0 -8
- data/app/views/devise/mailer/unlock_instructions.html.erb +0 -7
- data/app/views/devise/passwords/edit.html.erb +0 -79
- data/app/views/devise/passwords/new.html.erb +0 -75
- data/app/views/devise/registrations/edit.html.erb +0 -43
- data/app/views/devise/registrations/new.html.erb +0 -147
- data/app/views/devise/sessions/new.html.erb +0 -114
- data/app/views/devise/shared/_demo.html.erb +0 -7
- data/app/views/devise/shared/_error_messages.html.erb +0 -15
- data/app/views/devise/shared/_links.html.erb +0 -96
- data/app/views/devise/unlocks/new.html.erb +0 -16
- data/db/migrate/v1.0/0010000210_create_lesli_roles.rb +0 -59
- data/db/migrate/v1.0/0010000310_create_lesli_users.rb +0 -97
- data/db/migrate/v1.0/0010003110_create_lesli_user_settings.rb +0 -44
- data/db/migrate/v1.0/0010003210_create_lesli_user_sessions.rb +0 -55
- data/db/migrate/v1.0/0010003410_create_lesli_user_powers.rb +0 -43
- data/db/migrate/v1.0/0010004010_create_lesli_user_logs.rb +0 -45
- data/db/migrate/v1.0/0010005010_create_lesli_descriptors.rb +0 -44
- data/db/migrate/v1.0/0010005110_create_lesli_descriptor_privileges.rb +0 -45
- data/db/migrate/v1.0/0010005210_create_lesli_descriptor_activities.rb +0 -49
- data/db/migrate/v1.0/0010005510_create_lesli_role_powers.rb +0 -51
- data/db/migrate/v1.0/0010005710_create_lesli_role_privileges.rb +0 -45
- data/lib/scss/bulma/loader.scss +0 -92
- data/lib/scss/components/editor-richtext.scss +0 -88
- data/lib/scss/devise/oauth.scss +0 -34
- data/lib/scss/elements/avatar.scss +0 -48
- data/lib/scss/elements/calendar.scss +0 -47
- data/lib/scss/elements/toggle.scss +0 -102
- data/lib/vue/devise/confirmations.js +0 -33
- data/lib/vue/devise/passwords.js +0 -137
- data/lib/vue/devise/registrations.js +0 -157
- data/lib/vue/devise/sessions.js +0 -148
- data/lib/vue/panels/panel-tickets.vue +0 -181
- data/lib/vue/refactor/shared/cloudobjects/discussion/element.vue +0 -132
- data/lib/vue/shared/stores/account.js +0 -113
- /data/app/assets/icons/lesli/{engine-driver.svg → engine-calendar.svg} +0 -0
- /data/db/migrate/{v1.0 → v1}/0010000610_create_lesli_system_controllers.rb +0 -0
- /data/db/migrate/{v1.0 → v1}/0010000710_create_lesli_system_controller_actions.rb +0 -0
- /data/db/migrate/{v1.0 → v1}/0010001210_create_lesli_account_activities.rb +0 -0
- /data/db/migrate/{v1.0 → v1}/0010001410_create_lesli_account_logs.rb +0 -0
|
@@ -18,9 +18,9 @@ GNU General Public License for more details.
|
|
|
18
18
|
You should have received a copy of the GNU General Public License
|
|
19
19
|
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
20
20
|
|
|
21
|
-
Lesli · Ruby on Rails SaaS
|
|
21
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
|
22
22
|
|
|
23
|
-
Made with ♥ by
|
|
23
|
+
Made with ♥ by LesliTech
|
|
24
24
|
Building a better future, one line of code at a time.
|
|
25
25
|
|
|
26
26
|
@contact hello@lesli.tech
|
|
@@ -32,14 +32,15 @@ Building a better future, one line of code at a time.
|
|
|
32
32
|
=end
|
|
33
33
|
%>
|
|
34
34
|
|
|
35
|
+
<% devise_controller = controller_path.split('/')[1] %>
|
|
36
|
+
|
|
35
37
|
<!DOCTYPE html>
|
|
36
38
|
<html>
|
|
37
39
|
<head>
|
|
38
40
|
<script>const Lesli = <%= @lesli.to_json.html_safe %></script>
|
|
39
41
|
<%= render partial: "lesli/partials/application-head" %>
|
|
40
42
|
<%# render partial: "lesli/partials/application-data" %>
|
|
41
|
-
<%=
|
|
42
|
-
<%= yield :application_custom_assets %>
|
|
43
|
+
<%= stylesheet_link_tag("lesli_shield/#{devise_controller}", media: "all") %>
|
|
43
44
|
<%# Disable back button in browser after Logout using JavaScript %>
|
|
44
45
|
<% if flash[:logout] == true %>
|
|
45
46
|
<script>
|
|
@@ -51,9 +52,8 @@ Building a better future, one line of code at a time.
|
|
|
51
52
|
<% end %>
|
|
52
53
|
</head>
|
|
53
54
|
<body class="<%= application_body_class() %>">
|
|
54
|
-
<%#= yield :application_public_custom_header %>
|
|
55
55
|
<%= yield %>
|
|
56
|
-
<%=
|
|
56
|
+
<%= javascript_include_tag("lesli_shield/#{devise_controller}") %>
|
|
57
57
|
<%= render partial: "lesli/partials/application-analytics" %>
|
|
58
58
|
</body>
|
|
59
59
|
</html>
|
|
@@ -44,10 +44,12 @@ Building a better future, one line of code at a time.
|
|
|
44
44
|
<%= render partial: "lesli/partials/application-lesli-header" %>
|
|
45
45
|
<%= render partial: "lesli/partials/application-lesli-navigation" %>
|
|
46
46
|
<%#= render partial: "lesli/partials/application-lesli-notices" %>
|
|
47
|
+
<section class="lesli-application-content">
|
|
47
48
|
<%= render partial: "lesli/partials/application-lesli-sidebar" %>
|
|
48
49
|
<%= render partial: "lesli/partials/application-lesli-content" %>
|
|
50
|
+
</section>
|
|
49
51
|
<%= render partial: "lesli/partials/application-lesli-engines" %>
|
|
50
|
-
|
|
52
|
+
<%= render partial: "lesli/partials/application-lesli-panels" %>
|
|
51
53
|
<%#= render partial: "lesli/partials/application-lesli-footer" %>
|
|
52
54
|
</main>
|
|
53
55
|
<%= render partial: "lesli/partials/application-lesli-javascript" %>
|
|
@@ -18,9 +18,9 @@ GNU General Public License for more details.
|
|
|
18
18
|
You should have received a copy of the GNU General Public License
|
|
19
19
|
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
20
20
|
|
|
21
|
-
Lesli · Ruby on Rails SaaS
|
|
21
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
|
22
22
|
|
|
23
|
-
Made with ♥ by
|
|
23
|
+
Made with ♥ by LesliTech
|
|
24
24
|
Building a better future, one line of code at a time.
|
|
25
25
|
|
|
26
26
|
@contact hello@lesli.tech
|
|
@@ -38,7 +38,7 @@ Building a better future, one line of code at a time.
|
|
|
38
38
|
|
|
39
39
|
# add company information (account)
|
|
40
40
|
@lesli[:company] = {
|
|
41
|
-
name: current_user.account.
|
|
41
|
+
name: current_user.account.name,
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
# set user information
|
|
@@ -52,12 +52,13 @@ Building a better future, one line of code at a time.
|
|
|
52
52
|
@lesli[:instance] = Rails.application.credentials.dig(:instance) || lesli_instance_code
|
|
53
53
|
@lesli[:engine] = lesli_engine.dig(:code) # use into url plugin to for dynamic search
|
|
54
54
|
@lesli[:url] = request.base_url.to_s # use as base for url plugin
|
|
55
|
-
|
|
55
|
+
|
|
56
56
|
%>
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
<%
|
|
60
60
|
# Dynamic build the engines mouted path
|
|
61
|
+
@lesli[:engine_paths] = {}
|
|
61
62
|
Lesli::System.engines.each do |engine, engine_info|
|
|
62
63
|
@lesli[:engine_paths][engine] = engine_info[:path]
|
|
63
64
|
end
|
|
@@ -20,11 +20,11 @@ along with this program. If not, see http://www.gnu.org/licenses/.
|
|
|
20
20
|
|
|
21
21
|
Lesli · Ruby on Rails SaaS Development Framework.
|
|
22
22
|
|
|
23
|
-
Made with ♥ by
|
|
23
|
+
Made with ♥ by LesliTech
|
|
24
24
|
Building a better future, one line of code at a time.
|
|
25
25
|
|
|
26
26
|
@contact hello@lesli.tech
|
|
27
|
-
@website https://www.lesli.
|
|
27
|
+
@website https://www.lesli.tech
|
|
28
28
|
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
29
29
|
|
|
30
30
|
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
@@ -35,49 +35,24 @@ Building a better future, one line of code at a time.
|
|
|
35
35
|
<%# Standard module selector %>
|
|
36
36
|
<lesli-application-engines>
|
|
37
37
|
|
|
38
|
-
<%#
|
|
38
|
+
<%# 01. Administration %>
|
|
39
39
|
<%= navigation_engine_admin %>
|
|
40
40
|
|
|
41
|
-
<%#
|
|
42
|
-
<%=
|
|
43
|
-
|
|
44
|
-
<%# Sales & marketing %>
|
|
45
|
-
<%= navigation_engine_house %>
|
|
46
|
-
<%= navigation_engine_word %>
|
|
47
|
-
<%= navigation_engine_mailer %>
|
|
48
|
-
<%= navigation_engine_proposal %>
|
|
49
|
-
|
|
50
|
-
<%# Productivity & teamwork %>
|
|
51
|
-
<%= navigation_engine_driver %>
|
|
52
|
-
<%= navigation_engine_letter %>
|
|
53
|
-
<%= navigation_engine_work %>
|
|
54
|
-
<%= navigation_engine_focus %>
|
|
55
|
-
<%= navigation_engine_social %>
|
|
41
|
+
<%# 03. Productivity & Teamwork%>
|
|
42
|
+
<%= navigation_engine_calendar %>
|
|
56
43
|
<%= navigation_engine_bell %>
|
|
57
|
-
<%= navigation_engine_time %>
|
|
58
|
-
<%= navigation_engine_talk %>
|
|
59
|
-
<%= navigation_engine_storage %>
|
|
60
|
-
|
|
61
|
-
<%# Finance %>
|
|
62
|
-
<%= navigation_engine_things %>
|
|
63
|
-
<%= navigation_engine_realty %>
|
|
64
|
-
|
|
65
|
-
<%# IT & Help desk %>
|
|
66
|
-
<%= navigation_engine_kb %>
|
|
67
|
-
<%= navigation_engine_portal %>
|
|
68
|
-
<%= navigation_engine_shared %>
|
|
69
|
-
<%= navigation_engine_support %>
|
|
70
44
|
|
|
71
|
-
<%#
|
|
45
|
+
<%# 05. Analytics %>
|
|
72
46
|
<%= navigation_engine_audit %>
|
|
73
|
-
<%= navigation_engine_guard %>
|
|
74
47
|
|
|
75
|
-
<%#
|
|
76
|
-
<%=
|
|
77
|
-
<%= navigation_engine_federation %>
|
|
78
|
-
<%= navigation_engine_development %>
|
|
48
|
+
<%# 07. IT & Help Desk %>
|
|
49
|
+
<%= navigation_engine_support %>
|
|
79
50
|
|
|
80
|
-
<%#
|
|
81
|
-
<%=
|
|
51
|
+
<%# 08. Security & Privacy %>
|
|
52
|
+
<%= navigation_engine_shield %>
|
|
53
|
+
<%= navigation_engine_security %>
|
|
54
|
+
|
|
55
|
+
<%# 09. Integrations %>
|
|
56
|
+
<%= navigation_engine_babel %>
|
|
82
57
|
|
|
83
58
|
</lesli-application-engines>
|
|
@@ -18,7 +18,7 @@ GNU General Public License for more details.
|
|
|
18
18
|
You should have received a copy of the GNU General Public License
|
|
19
19
|
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
20
20
|
|
|
21
|
-
Lesli · Ruby on Rails SaaS
|
|
21
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
|
22
22
|
|
|
23
23
|
Made with ♥ by https://www.lesli.tech
|
|
24
24
|
Building a better future, one line of code at a time.
|
|
@@ -32,41 +32,66 @@ Building a better future, one line of code at a time.
|
|
|
32
32
|
=end
|
|
33
33
|
%>
|
|
34
34
|
|
|
35
|
+
<%# check if custom navigation partial exists, getting the path from application helper %>
|
|
36
|
+
<% custom_navigation_path = "partials/application-lesli-header" %>
|
|
37
|
+
|
|
38
|
+
<%# validate the path to be sure the partial exists when trying to render it %>
|
|
39
|
+
<% custom_navigation_exists = lookup_context.exists?(custom_navigation_path, nil, true) %>
|
|
40
|
+
|
|
41
|
+
<%# render navigation partial %>
|
|
42
|
+
<% if custom_navigation_exists %>
|
|
43
|
+
|
|
44
|
+
<%= render partial: custom_navigation_path %>
|
|
45
|
+
|
|
46
|
+
<% else %>
|
|
47
|
+
|
|
35
48
|
<lesli-application-header
|
|
36
|
-
|
|
37
|
-
<%= "show-bell" if defined?(LesliBell) %>
|
|
49
|
+
engine-path="<%= "/dashboard" if defined?(LesliDashboard) %>"
|
|
38
50
|
<%= "show-focus" if defined?(LesliFocus) %>
|
|
39
|
-
|
|
40
|
-
|
|
51
|
+
show-profile
|
|
52
|
+
show-engines
|
|
53
|
+
show-bell
|
|
54
|
+
show-support>
|
|
41
55
|
|
|
42
56
|
<template v-slot:brand>
|
|
43
|
-
<%= customization_instance_logo_tag(logo: "app-icon", options: { alt: "
|
|
44
|
-
<%= customization_instance_logo_tag(logo: "app-logo", options: { alt: "
|
|
57
|
+
<%= customization_instance_logo_tag(logo: "app-icon", options: { alt: "Lesli app logo", class: "is-hidden-desktop" }) %>
|
|
58
|
+
<%= customization_instance_logo_tag(logo: "app-logo", options: { alt: "Lesli app logo", class: "is-hidden-touch" }) %>
|
|
45
59
|
</template>
|
|
46
60
|
|
|
47
|
-
<template>
|
|
61
|
+
<template v-slot:end>
|
|
62
|
+
|
|
48
63
|
<%# language selector %>
|
|
49
|
-
<% if I18n.available_locales.length > 1 %>
|
|
50
|
-
<div class="
|
|
51
|
-
<div class="dropdown-
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
<% if Lesli.config.layout.dig(:locale) && I18n.available_locales.length > 1 %>
|
|
65
|
+
<div class="navbar-item">
|
|
66
|
+
<div class="dropdown is-hoverable">
|
|
67
|
+
<div class="dropdown-trigger">
|
|
68
|
+
<button
|
|
69
|
+
class="button is-ghost"
|
|
70
|
+
aria-haspopup="true"
|
|
71
|
+
aria-controls="dropdown-menu"
|
|
72
|
+
@click="storeLayout.showProfile = true">
|
|
73
|
+
<span class="icon is-size-5">
|
|
74
|
+
<%= lesli_svg("locale-#{locale}") %>
|
|
75
|
+
</span>
|
|
76
|
+
</button>
|
|
77
|
+
</div>
|
|
78
|
+
<div class="dropdown-menu" id="dropdown-menu-locale" role="menu">
|
|
79
|
+
<div class="dropdown-content">
|
|
80
|
+
<% I18n.available_locales.each do |locale| %>
|
|
81
|
+
<% next if locale == I18n.locale %>
|
|
82
|
+
<%= link_to language_url(locale), { :class => "dropdown-item" } do %>
|
|
83
|
+
<span class="icon has-text-grey-light">
|
|
84
|
+
<%= lesli_svg("locale-#{locale}") %>
|
|
85
|
+
</span>
|
|
86
|
+
<span><%= language_name(locale) %></span>
|
|
87
|
+
<% end %>
|
|
65
88
|
<% end %>
|
|
66
|
-
|
|
89
|
+
</div>
|
|
67
90
|
</div>
|
|
68
91
|
</div>
|
|
69
92
|
</div>
|
|
70
93
|
<% end %>
|
|
71
94
|
</template>
|
|
72
95
|
</lesli-application-header>
|
|
96
|
+
|
|
97
|
+
<% end %>
|