keppler 2.0.2 → 2.0.3
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 +5 -5
- data/.gitignore +8 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile.lock +26 -0
- data/LICENSE.txt +21 -0
- data/README.md +93 -22
- data/Rakefile +6 -0
- data/bin/keppler +6 -2
- data/bin/setup +2 -1
- data/exe/keppler +6 -0
- data/installer/core/.gitignore +87 -0
- data/installer/core/.ruby-version +1 -0
- data/installer/core/Gemfile +6 -4
- data/installer/core/README.md +86 -50
- data/installer/core/app/assets/images/.keep +0 -0
- data/installer/core/app/assets/images/admin/astronauta_keppler.svg +123 -0
- data/installer/core/app/assets/images/admin/avatar_keppler.svg +100 -0
- data/installer/core/app/assets/images/admin/image_default.png +0 -0
- data/installer/core/app/assets/images/app/fondo.svg +19 -0
- data/installer/core/app/assets/javascripts/admin/file_upload.coffee +11 -0
- data/installer/core/app/assets/javascripts/admin/main.coffee +23 -12
- data/installer/core/app/assets/javascripts/admin/preview_template.js +2 -2
- data/installer/core/app/assets/javascripts/admin/sidebar.js +8 -7
- data/installer/core/app/assets/javascripts/admin/swal.js +37 -0
- data/installer/core/app/assets/javascripts/admin/switch.js +6 -0
- data/installer/core/app/assets/javascripts/admin/tooltips.coffee +3 -0
- data/installer/core/app/assets/javascripts/errors/application.js.coffee +1 -0
- data/installer/core/app/assets/javascripts/errors/errors.js +113 -0
- data/installer/core/app/assets/javascripts/keppler_ga_dashboard/view-selector2.js +1 -1
- data/installer/core/app/assets/javascripts/vue_admin/index.js +34 -9
- data/installer/core/app/assets/stylesheets/admin/application.scss +4 -14
- data/installer/core/app/assets/stylesheets/admin/components/navigation/_navbar.scss +4 -5
- data/installer/core/app/assets/stylesheets/admin/components/navigation/_sidebar.scss +26 -17
- data/installer/core/app/assets/stylesheets/admin/pages/_appearance.scss +5 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_customize.scss +21 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_datepicker.scss +1088 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_files.scss +26 -9
- data/installer/core/app/assets/stylesheets/admin/pages/_form.scss +19 -6
- data/installer/core/app/assets/stylesheets/admin/pages/_index.scss +4 -8
- data/installer/core/app/assets/stylesheets/admin/pages/_listing.scss +5 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_navbar.scss +9 -2
- data/installer/core/app/assets/stylesheets/admin/pages/_roles.scss +6 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_search.scss +24 -28
- data/installer/core/app/assets/stylesheets/admin/pages/_sidebar.scss +1 -1
- data/installer/core/app/assets/stylesheets/admin/pages/_switchs.scss +135 -39
- data/installer/core/app/assets/stylesheets/admin/pages/_timepicker.scss +16 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_user.scss +6 -0
- data/installer/core/app/assets/stylesheets/admin/utils/_base.scss +6 -1
- data/installer/core/app/assets/stylesheets/admin/utils/_theme.scss +24 -11
- data/installer/core/app/assets/stylesheets/admin/utils/_variables.scss +1 -1
- data/installer/core/app/assets/stylesheets/app/pages/_front.sass +70 -56
- data/installer/core/app/assets/stylesheets/errors/errors.scss +161 -120
- data/installer/core/app/assets/stylesheets/vendor/admin-lte/_skin-blue.scss +1 -1
- data/installer/core/app/controllers/admin/admin_controller.rb +1 -1
- data/installer/core/app/controllers/admin/customizes_controller.rb +6 -8
- data/installer/core/app/controllers/admin/meta_tags_controller.rb +14 -18
- data/installer/core/app/controllers/admin/roles_controller.rb +176 -0
- data/installer/core/app/controllers/admin/scripts_controller.rb +14 -33
- data/installer/core/app/controllers/admin/settings_controller.rb +26 -27
- data/installer/core/app/controllers/admin/users_controller.rb +35 -29
- data/installer/core/app/controllers/app/app_controller.rb +27 -4
- data/installer/core/app/controllers/application_controller.rb +39 -1
- data/installer/core/app/controllers/concerns/.keep +0 -0
- data/installer/core/app/helpers/admin_helper.rb +5 -0
- data/installer/core/app/helpers/application_helper.rb +9 -0
- data/installer/core/app/helpers/roles_helper.rb +2 -0
- data/installer/core/app/inputs/file_material_input.rb +4 -2
- data/installer/core/app/inputs/keppler_boolean_input.rb +74 -0
- data/installer/core/app/inputs/keppler_file_input.rb +70 -0
- data/installer/core/app/mailers/.keep +0 -0
- data/installer/core/app/mailers/application_mailer.rb +13 -13
- data/installer/core/app/models/.keep +0 -0
- data/installer/core/app/models/appearance.rb +2 -0
- data/installer/core/app/models/application_record.rb +3 -0
- data/installer/core/app/models/concerns/.keep +0 -0
- data/installer/core/app/models/concerns/downloadable.rb +13 -0
- data/installer/core/app/models/concerns/sortable.rb +9 -0
- data/installer/core/app/models/concerns/uploadable.rb +10 -0
- data/installer/core/app/models/customize.rb +8 -6
- data/installer/core/app/models/front.rb +3 -0
- data/installer/core/app/models/google_analytics_setting.rb +2 -0
- data/installer/core/app/models/meta_tag.rb +27 -14
- data/installer/core/app/models/permission.rb +3 -0
- data/installer/core/app/models/role.rb +62 -5
- data/installer/core/app/models/script.rb +6 -15
- data/installer/core/app/models/setting.rb +2 -0
- data/installer/core/app/models/smtp_setting.rb +2 -0
- data/installer/core/app/models/social_account.rb +2 -0
- data/installer/core/app/models/user.rb +17 -1
- data/installer/core/app/policies/application_policy.rb +4 -4
- data/installer/core/app/policies/controller_policy.rb +15 -11
- data/installer/core/app/policies/role_policy.rb +25 -0
- data/installer/core/app/policies/user_policy.rb +1 -1
- data/installer/core/app/uploaders/attachment_uploader.rb +18 -1
- data/installer/core/app/views/admin/customizes/_description.html.haml +4 -4
- data/installer/core/app/views/admin/customizes/_form.html.haml +4 -4
- data/installer/core/app/views/admin/customizes/_listing.html.haml +1 -1
- data/installer/core/app/views/admin/customizes/_switch_default_template.html.haml +8 -13
- data/installer/core/app/views/admin/customizes/_switch_template.html.haml +8 -11
- data/installer/core/app/views/admin/customizes/index.html.haml +9 -9
- data/installer/core/app/views/admin/layouts/_head.html.haml +3 -3
- data/installer/core/app/views/admin/layouts/_keppler_boolean_script.haml +12 -0
- data/installer/core/app/views/admin/layouts/_navigation.html.haml +17 -16
- data/installer/core/app/views/admin/layouts/_sidebar.html.haml +27 -36
- data/installer/core/app/views/admin/layouts/application.html.haml +1 -0
- data/installer/core/app/views/admin/layouts/index/remote_messages.js.haml +6 -6
- data/installer/core/app/views/admin/meta_tags/_index_show.html.haml +2 -2
- data/installer/core/app/views/admin/meta_tags/_listing.html.haml +6 -6
- data/installer/core/app/views/admin/meta_tags/index.html.haml +15 -29
- data/installer/core/app/views/admin/meta_tags/show.html.haml +7 -8
- data/installer/core/app/views/admin/roles/_description.html.haml +13 -0
- data/installer/core/app/views/admin/roles/_form.html.haml +27 -0
- data/installer/core/app/views/admin/roles/_index_show.html.haml +24 -0
- data/installer/core/app/views/admin/roles/_listing.html.haml +46 -0
- data/installer/core/app/views/admin/roles/_switch.html.haml +20 -0
- data/installer/core/app/views/admin/roles/add_permissions.html.haml +60 -0
- data/installer/core/app/views/admin/roles/create_permissions.html.haml +0 -0
- data/installer/core/app/views/admin/roles/create_permissions.js.erb +1 -0
- data/installer/core/app/views/admin/roles/edit.html.haml +1 -0
- data/installer/core/app/views/admin/roles/index.html.haml +80 -0
- data/installer/core/app/views/admin/roles/new.html.haml +1 -0
- data/installer/core/app/views/admin/roles/reload.js.haml +5 -0
- data/installer/core/app/views/admin/roles/show.html.haml +32 -0
- data/installer/core/app/views/admin/roles/show.js.haml +4 -0
- data/installer/core/app/views/admin/roles/show_description.js.erb +2 -0
- data/installer/core/app/views/admin/scripts/_index_show.html.haml +2 -2
- data/installer/core/app/views/admin/scripts/_listing.html.haml +13 -13
- data/installer/core/app/views/admin/scripts/index.html.haml +12 -26
- data/installer/core/app/views/admin/scripts/show.html.haml +4 -4
- data/installer/core/app/views/admin/settings/components/_preview.html.haml +1 -1
- data/installer/core/app/views/admin/settings/fields/_appearance.html.haml +25 -17
- data/installer/core/app/views/admin/settings/fields/_basic_information.html.haml +13 -7
- data/installer/core/app/views/admin/settings/fields/_email_setting.html.haml +16 -16
- data/installer/core/app/views/admin/settings/fields/_google_analytics_setting.html.haml +1 -1
- data/installer/core/app/views/admin/settings/fields/_social_accounts.html.haml +39 -39
- data/installer/core/app/views/admin/users/_form.html.haml +18 -25
- data/installer/core/app/views/admin/users/_index_show.html.haml +2 -2
- data/installer/core/app/views/admin/users/_listing.html.haml +6 -6
- data/installer/core/app/views/admin/users/delete_avatar.js.haml +3 -0
- data/installer/core/app/views/admin/users/filter_by_role.js.erb +9 -0
- data/installer/core/app/views/admin/users/index.html.haml +22 -22
- data/installer/core/app/views/admin/users/show.html.haml +10 -12
- data/installer/core/app/views/app/front/index.html.haml +137 -87
- data/installer/core/app/views/app/layouts/_footer.html.haml +2 -2
- data/installer/core/app/views/app/layouts/_head.html.haml +4 -12
- data/installer/core/app/views/app/layouts/_meta_tags.html.haml +38 -6
- data/installer/core/app/views/app/layouts/application.html.haml +8 -8
- data/installer/core/app/views/devise/sessions/new.html.haml +32 -28
- data/installer/core/app/views/errors/internal_server_error.html.haml +50 -7
- data/installer/core/app/views/errors/not_authorized.html.haml +75 -6
- data/installer/core/app/views/errors/not_found.html.haml +101 -7
- data/installer/core/app/views/errors/unprocessable.html.haml +50 -7
- data/installer/core/bin/update +31 -0
- data/installer/core/bin/yarn +11 -0
- data/installer/core/config/application.rb +1 -1
- data/installer/core/config/environments/production.rb +1 -1
- data/installer/core/config/initializers/carrierwave.rb +12 -0
- data/installer/core/config/initializers/mime_types.rb +2 -2
- data/installer/core/config/initializers/simple_form_bootstrap.rb +20 -1
- data/installer/core/config/initializers/simple_form_components.rb +61 -0
- data/installer/core/config/locales/en.yml +29 -6
- data/installer/core/config/locales/es.yml +32 -5
- data/installer/core/config/locales/simple_form.en.yml +1 -0
- data/installer/core/config/locales/simple_form.es.yml +3 -2
- data/installer/core/config/menu.yml +34 -8
- data/installer/core/config/permissions.yml +21 -0
- data/installer/core/config/routes.rb +56 -14
- data/installer/core/db/migrate/20140812210925_rolify_create_roles.rb +2 -0
- data/installer/core/db/migrate/20160128131802_create_scripts.rb +1 -0
- data/installer/core/db/migrate/20180503174351_create_permissions.rb +11 -0
- data/installer/core/db/seeds.rb +12 -6
- data/installer/core/lib/generators/keppler_front/templates/views/template.html.haml +222 -177
- data/installer/core/lib/generators/keppler_relation/keppler_relation_generator.rb +1 -1
- data/installer/core/lib/generators/keppler_scaffold/keppler_scaffold_generator.rb +57 -40
- data/installer/core/lib/generators/keppler_scaffold/templates/controllers/controller.rb +29 -30
- data/installer/core/lib/generators/keppler_scaffold/templates/models/model.rb +14 -20
- data/installer/core/lib/generators/keppler_scaffold/templates/views/_form.html.haml +24 -35
- data/installer/core/lib/generators/keppler_scaffold/templates/views/_index_show.html.haml +12 -11
- data/installer/core/lib/generators/keppler_scaffold/templates/views/_listing.html.haml +7 -7
- data/installer/core/lib/generators/keppler_scaffold/templates/views/index.html.haml +17 -33
- data/installer/core/lib/generators/keppler_scaffold/templates/views/show.html.haml +23 -24
- data/installer/core/plugins/keppler_ga_dashboard/app/assets/images/keppler_ga_dashboard/.keep +0 -0
- data/installer/core/plugins/keppler_ga_dashboard/config/permissions.yml +4 -0
- data/installer/core/plugins/keppler_ga_dashboard/keppler_ga_dashboard.gemspec +1 -1
- data/installer/core/test/controllers/.keep +0 -0
- data/installer/core/test/controllers/roles_controller_test.rb +48 -0
- data/installer/core/test/fixtures/.keep +0 -0
- data/installer/core/test/fixtures/permissions.yml +9 -0
- data/installer/core/test/helpers/.keep +0 -0
- data/installer/core/test/integration/.keep +0 -0
- data/installer/core/test/mailers/.keep +0 -0
- data/installer/core/test/models/.keep +0 -0
- data/installer/core/test/models/permission_test.rb +7 -0
- data/installer/core/test/system/roles_test.rb +43 -0
- data/installer/core/vendor/assets/javascripts/.keep +0 -0
- data/installer/core/vendor/assets/stylesheets/.keep +0 -0
- data/installer/plugins/concerns/commons.rb +47 -0
- data/installer/plugins/concerns/destroy_multiple.rb +33 -0
- data/installer/plugins/concerns/history.rb +24 -0
- data/installer/plugins/config/locales/en.yml +104 -0
- data/installer/plugins/config/locales/es.yml +139 -0
- data/installer/plugins/config/menu.yml +12 -0
- data/installer/plugins/config/permissions.yml +1 -0
- data/installer/plugins/generators/keppler_scaffold/keppler_scaffold_generator.rb +203 -0
- data/installer/plugins/generators/keppler_scaffold/templates/controllers/controller.rb +171 -0
- data/installer/plugins/generators/keppler_scaffold/templates/models/model.rb +41 -0
- data/installer/plugins/generators/keppler_scaffold/templates/policies/policy.rb +11 -0
- data/installer/plugins/generators/keppler_scaffold/templates/views/_description.html.haml +13 -0
- data/installer/plugins/generators/keppler_scaffold/templates/views/_form.html.haml +49 -0
- data/installer/plugins/generators/keppler_scaffold/templates/views/_index_show.html.haml +26 -0
- data/installer/plugins/generators/keppler_scaffold/templates/views/_listing.html.haml +65 -0
- data/installer/plugins/generators/keppler_scaffold/templates/views/edit.html.haml +1 -0
- data/installer/plugins/generators/keppler_scaffold/templates/views/index.html.haml +97 -0
- data/installer/plugins/generators/keppler_scaffold/templates/views/new.html.haml +1 -0
- data/installer/plugins/generators/keppler_scaffold/templates/views/reload.js.haml +5 -0
- data/installer/plugins/generators/keppler_scaffold/templates/views/show.html.haml +66 -0
- data/installer/plugins/generators/keppler_scaffold/templates/views/show.js.haml +4 -0
- data/installer/plugins/install.rb +156 -0
- data/installer/plugins/layouts/_navigation.html.haml +47 -0
- data/installer/plugins/layouts/application.html.haml +24 -0
- data/keppler.gemspec +35 -0
- data/lib/keppler.rb +0 -1
- data/lib/keppler/add.rb +13 -0
- data/lib/keppler/cli.rb +134 -5
- data/lib/keppler/delete.rb +13 -0
- data/lib/keppler/version.rb +1 -1
- metadata +117 -23
- data/installer/core/app/assets/images/admin/space.png +0 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_header.scss +0 -34
- data/installer/core/app/assets/stylesheets/admin/pages/_pageslide.scss +0 -125
- data/installer/core/db/schema.rb +0 -172
- data/installer/lib/conf.rb +0 -31
- data/installer/lib/scaffold.rb +0 -10
- data/installer/run.sh +0 -17
- data/installer/scripts/bin.sh +0 -61
- data/lib/keppler/cli/generate.rb +0 -19
@@ -0,0 +1,21 @@
|
|
1
|
+
modules:
|
2
|
+
scripts:
|
3
|
+
name: Script
|
4
|
+
actions: [
|
5
|
+
'index', 'create', 'update',
|
6
|
+
'destroy', 'upload', 'download',
|
7
|
+
'clone'
|
8
|
+
]
|
9
|
+
meta_tags:
|
10
|
+
name: MetaTag
|
11
|
+
actions: [
|
12
|
+
'index', 'create', 'update',
|
13
|
+
'destroy', 'upload', 'download',
|
14
|
+
'clone'
|
15
|
+
]
|
16
|
+
users:
|
17
|
+
name: User
|
18
|
+
actions: [
|
19
|
+
'index', 'create', 'update',
|
20
|
+
'destroy', 'download'
|
21
|
+
]
|
@@ -5,24 +5,56 @@ Rails.application.routes.draw do
|
|
5
5
|
root to: 'app/front#index'
|
6
6
|
|
7
7
|
devise_for :users, skip: KepplerConfiguration.skip_module_devise
|
8
|
+
post '/filter', to: 'admin/users#filter_by_role', as: :filter_by_role
|
8
9
|
|
9
10
|
namespace :admin do
|
10
11
|
root to: 'admin#root'
|
11
12
|
|
13
|
+
resources :roles do
|
14
|
+
get '(page/:page)', action: :index, on: :collection, as: ''
|
15
|
+
get '/clone', action: 'clone'
|
16
|
+
post '/upload', action: 'upload', as: :upload
|
17
|
+
post '/show_description/:module/:action_name', action: 'show_description', as: :show_description
|
18
|
+
get(
|
19
|
+
'/add_permissions',
|
20
|
+
action: 'add_permissions',
|
21
|
+
as: :add_permissions
|
22
|
+
)
|
23
|
+
post(
|
24
|
+
'/create_permissions',
|
25
|
+
action: 'create_permissions',
|
26
|
+
as: :create_permissions
|
27
|
+
)
|
28
|
+
get '/download', action: 'download', as: :download
|
29
|
+
post(
|
30
|
+
'/sort',
|
31
|
+
action: :sort,
|
32
|
+
on: :collection,
|
33
|
+
)
|
34
|
+
get(
|
35
|
+
'/reload',
|
36
|
+
action: :reload,
|
37
|
+
on: :collection,
|
38
|
+
)
|
39
|
+
delete(
|
40
|
+
'/destroy_multiple',
|
41
|
+
action: :destroy_multiple,
|
42
|
+
on: :collection,
|
43
|
+
as: :destroy_multiple
|
44
|
+
)
|
45
|
+
end
|
46
|
+
|
12
47
|
resources :customizes do
|
13
48
|
get '(page/:page)', action: :index, on: :collection, as: ''
|
14
49
|
get '/clone', action: 'clone'
|
15
|
-
post '/
|
50
|
+
post '/upload', action: 'upload', as: :upload
|
16
51
|
post '/install_default', action: 'install_default'
|
17
|
-
# delete(
|
18
|
-
# action: :destroy_multiple,
|
19
|
-
# on: :collection,
|
20
|
-
# as: :destroy_multiple
|
21
|
-
# )
|
22
52
|
end
|
23
53
|
|
54
|
+
|
24
55
|
resources :users do
|
25
56
|
get '(page/:page)', action: :index, on: :collection, as: ''
|
57
|
+
get '/delete_avatar', action: :delete_avatar
|
26
58
|
get(
|
27
59
|
'/reload',
|
28
60
|
action: :reload,
|
@@ -36,16 +68,19 @@ Rails.application.routes.draw do
|
|
36
68
|
)
|
37
69
|
end
|
38
70
|
|
39
|
-
post '/sorting', to: 'meta_tags#sort', as: :sorting_meta_tags
|
40
71
|
resources :meta_tags do
|
41
72
|
get '(page/:page)', action: :index, on: :collection, as: ''
|
42
73
|
get '/clone', action: 'clone'
|
43
|
-
post '/
|
44
|
-
|
74
|
+
post '/upload', action: 'upload', as: :upload
|
75
|
+
post(
|
76
|
+
'/sort',
|
77
|
+
action: :sort,
|
78
|
+
on: :collection,
|
79
|
+
)
|
45
80
|
get(
|
46
81
|
'/reload',
|
47
82
|
action: :reload,
|
48
|
-
on: :collection
|
83
|
+
on: :collection,
|
49
84
|
)
|
50
85
|
delete(
|
51
86
|
'/destroy_multiple',
|
@@ -58,12 +93,16 @@ Rails.application.routes.draw do
|
|
58
93
|
resources :scripts do
|
59
94
|
get '(page/:page)', action: :index, on: :collection, as: ''
|
60
95
|
get '/clone', action: 'clone'
|
61
|
-
post '/
|
62
|
-
|
96
|
+
post '/upload', action: 'upload', as: :upload
|
97
|
+
post(
|
98
|
+
'/sort',
|
99
|
+
action: :sort,
|
100
|
+
on: :collection,
|
101
|
+
)
|
63
102
|
get(
|
64
103
|
'/reload',
|
65
104
|
action: :reload,
|
66
|
-
on: :collection
|
105
|
+
on: :collection,
|
67
106
|
)
|
68
107
|
delete(
|
69
108
|
'/destroy_multiple',
|
@@ -88,7 +127,10 @@ Rails.application.routes.draw do
|
|
88
127
|
match '/422', to: 'errors#unprocessable', via: :all
|
89
128
|
match '/500', to: 'errors#internal_server_error', via: :all
|
90
129
|
|
91
|
-
# Dashboard
|
130
|
+
# Dashboard routes engine
|
92
131
|
mount KepplerGaDashboard::Engine, at: 'admin/dashboard', as: 'dashboard'
|
93
132
|
|
133
|
+
# Ckeditor routes engine
|
134
|
+
mount Ckeditor::Engine => '/ckeditor'
|
135
|
+
|
94
136
|
end
|
data/installer/core/db/seeds.rb
CHANGED
@@ -10,19 +10,19 @@
|
|
10
10
|
# user = CreateAdminService.new.call
|
11
11
|
# puts 'CREATED ADMIN USER: ' << user.email
|
12
12
|
|
13
|
-
[
|
13
|
+
%i[keppler_admin admin client].each do |name|
|
14
14
|
Role.create name: name
|
15
15
|
puts "Role #{name} has been created"
|
16
16
|
end
|
17
17
|
|
18
18
|
User.create(
|
19
|
-
name: 'Keppler Admin', email: 'admin@keppler.
|
20
|
-
password_confirmation: '12345678', role_ids: '1'
|
19
|
+
name: 'Keppler Admin', email: 'admin@keppler.io', password: '+12345678+',
|
20
|
+
password_confirmation: '+12345678+', role_ids: '1'
|
21
21
|
)
|
22
22
|
|
23
|
-
puts 'admin@keppler.
|
23
|
+
puts 'admin@keppler.io has been created'
|
24
24
|
|
25
|
-
Customize.create(file:
|
25
|
+
Customize.create(file: '', installed: true)
|
26
26
|
puts 'Keppler Template has been created'
|
27
27
|
# Create setting deafult
|
28
28
|
setting = Setting.create(
|
@@ -42,4 +42,10 @@ setting.appearance = Appearance.new(theme_name: 'keppler')
|
|
42
42
|
setting.save
|
43
43
|
puts 'Setting default has been created'
|
44
44
|
|
45
|
-
|
45
|
+
if defined?(KepplerContactUs) && KepplerContactUs.is_a?(Class)
|
46
|
+
KepplerContactUs::MessageSetting.create(
|
47
|
+
mailer_from: 'contacto@slicegroup.xyz',
|
48
|
+
mailer_to: 'contacto@slicegroup.xyz'
|
49
|
+
)
|
50
|
+
puts 'KepplerContactUs mailer_to and mailer_from has been created'
|
51
|
+
end
|
@@ -1,180 +1,225 @@
|
|
1
1
|
!!!
|
2
2
|
%html
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
rails g keppler_scaffold [module_name] [attributes] -f
|
156
|
-
|
157
|
-
%p Luego crea la tabla en base de datos.
|
158
|
-
|
159
|
-
%pre
|
160
|
-
%code.shell
|
161
|
-
rake db:migrate
|
162
|
-
|
163
|
-
%h3 Plugins (Módulos)
|
164
|
-
|
165
|
-
%p
|
166
|
-
La plataforma permite la adaptación de módulos con facil instalación,
|
167
|
-
algunos de los módulos desarrollados son:
|
168
|
-
|
169
|
-
%ul
|
170
|
-
%li
|
171
|
-
= link_to 'Keppler google analytics dashboard', 'https://github.com/SliceDevelopers/keppler_ga_dashboard'
|
172
|
-
%strong ya viene integrado
|
173
|
-
%li
|
174
|
-
= link_to 'Keppler blog', 'https://github.com/SliceDevelopers/keppler_blog'
|
175
|
-
%li
|
176
|
-
= link_to 'Keppler catalogs', 'https://github.com/inyxtech/keppler_catalogs'
|
177
|
-
%li
|
178
|
-
= link_to 'Keppler contact', 'https://github.com/SliceDevelopers/keppler_contact_us'
|
3
|
+
%header
|
4
|
+
= render 'app/layouts/head'
|
5
|
+
%body
|
6
|
+
%header
|
7
|
+
= #render 'app/layouts/navigation'
|
8
|
+
%main#keppler{:role => "main"}
|
9
|
+
= #render 'app/layouts/messages'
|
10
|
+
.front
|
11
|
+
.front-logo
|
12
|
+
= image_tag "app/keppler-front.png", class: "img-responsive"
|
13
|
+
|
14
|
+
.front-social
|
15
|
+
%ul
|
16
|
+
%li
|
17
|
+
= link_to "https://twitter.com/slicegroupxyz", target: '_blank' do
|
18
|
+
= icon 'fab', 'twitter'
|
19
|
+
%li
|
20
|
+
= link_to "https://www.facebook.com/slicegroupxyz/", target: '_blank' do
|
21
|
+
= icon 'fab', 'facebook'
|
22
|
+
%li
|
23
|
+
= link_to "https://www.instagram.com/slicegroupxyz/", target: '_blank' do
|
24
|
+
= icon 'fab', 'instagram'
|
25
|
+
%li
|
26
|
+
= link_to "https://github.com/SliceDevelopers", target: '_blank' do
|
27
|
+
= icon 'fab', 'github'
|
28
|
+
.mouse-scroll
|
29
|
+
.mouse
|
30
|
+
.scroll
|
31
|
+
%footer.front-footer
|
32
|
+
= render 'app/layouts/footer'
|
33
|
+
|
34
|
+
|
35
|
+
%section#documentation
|
36
|
+
%h3 KEPPLER ADMIN
|
37
|
+
|
38
|
+
%p
|
39
|
+
KEPPLER ADMIN es un CMS con un entorno de desarrollo que cuenta con
|
40
|
+
una base de gemas ya integradas, de tal forma que acelerará el
|
41
|
+
desarrollo de aplicaciones de vanguardia bajo la plataforma de Ruby
|
42
|
+
on Rails.
|
43
|
+
|
44
|
+
%h3 Características
|
45
|
+
|
46
|
+
%ul
|
47
|
+
%li
|
48
|
+
Base de datos por defecto PostreSQL
|
49
|
+
%li
|
50
|
+
Integración para autenticación de usuarios con
|
51
|
+
= link_to 'Devise', 'https://github.com/plataformatec/devise', target: '_blank'
|
52
|
+
%li
|
53
|
+
Integración para roles de usuarios con
|
54
|
+
= link_to 'Rolify', 'https://github.com/RolifyCommunity/rolify', target: '_blank'
|
55
|
+
%li
|
56
|
+
Integración para autorizaciones con
|
57
|
+
= link_to 'Pundit', 'https://github.com/varvet/pundit', target: '_blank'
|
58
|
+
%li
|
59
|
+
Inegración para el manejo de de paginación con
|
60
|
+
= link_to 'Kaminari', 'https://github.com/amatsuda/kaminari', target: '_blank'
|
61
|
+
%li
|
62
|
+
Integración para helpers de formularios con
|
63
|
+
= link_to 'SimpleForm', 'https://github.com/RolifyCommunity/rolify', target: '_blank'
|
64
|
+
%li
|
65
|
+
Integración para búsquedas full-text con
|
66
|
+
= link_to 'Ransack', 'https://github.com/activerecord-hackery/ransack', target: '_blank'
|
67
|
+
%li
|
68
|
+
Integración con framework fronte-end para el administrativo con
|
69
|
+
= link_to 'AdminLTE', 'https://adminlte.io', target: '_blank'
|
70
|
+
%li
|
71
|
+
Integración con framework javascript
|
72
|
+
= link_to 'VueJS', 'https://vuejs.org/', target: '_blank'
|
73
|
+
%li
|
74
|
+
Integración sitemap dinamicos con
|
75
|
+
= link_to 'Sitemap Generator', 'https://github.com/kjvarga/sitemap_generator', target: '_blank'
|
76
|
+
|
77
|
+
%h3 Gema de Keppler
|
78
|
+
|
79
|
+
%h4 Instalación
|
80
|
+
|
81
|
+
%p Una de las novedades de Keppler Admin v2.0 es el lanzamiento de una gema que nos
|
82
|
+
permite el fácil y rápido manejo de las funcionalidades del CMS. Para instalarlo
|
83
|
+
necesitamos ejecutar el siguiente comando desde la consola:
|
84
|
+
|
85
|
+
%pre
|
86
|
+
%code.ruby
|
87
|
+
gem install keppler
|
88
|
+
|
89
|
+
%h4 Lista de comandos
|
90
|
+
|
91
|
+
%p Para verificar que está instalada la gema correctamente y ver una lista de los posibles comandos
|
92
|
+
que podemos utilizar, ejecutamos:
|
93
|
+
|
94
|
+
%pre
|
95
|
+
%code.ruby
|
96
|
+
keppler
|
97
|
+
|
98
|
+
%h4 Nuevo Proyecto
|
99
|
+
|
100
|
+
%p Para crear un nuevo proyecto en Ruby on Rails con Keppler Admin, podemos ejecutar:
|
101
|
+
|
102
|
+
%pre
|
103
|
+
%code.ruby
|
104
|
+
keppler new NuevoProyecto
|
105
|
+
|
106
|
+
%h4 Creación del archivo secrets.yml
|
107
|
+
|
108
|
+
%p Si detienes el proceso a la mitad o aún no tienes configurado un archivo secrets.yml con la configuración de
|
109
|
+
la base de datos y otros inicializadores, puedes crear la base de datos ejecutando:
|
110
|
+
|
111
|
+
%pre
|
112
|
+
%code.ruby
|
113
|
+
keppler db_conf
|
114
|
+
|
115
|
+
%h4 Instalación de las dependencias
|
116
|
+
|
117
|
+
%p Antes de poder iniciar con un proyecto nuevo, primero debemos instalar todas las gemas
|
118
|
+
instanciadas en el Gemfile, ubicado en la raíz del proyecto, con el comando:
|
119
|
+
|
120
|
+
%pre
|
121
|
+
%code.ruby
|
122
|
+
keppler dep
|
123
|
+
|
124
|
+
%h3 Keppler Scaffolds
|
125
|
+
|
126
|
+
%p Keppler ofrece la posibilidad de realizar tareas de scaffolds totalmente
|
127
|
+
configurados para adaptarse al administrativo. Para crear un nuevo
|
128
|
+
módulo sólo debes llamar al siguiente comando desde la consola:
|
129
|
+
|
130
|
+
%pre
|
131
|
+
%code.ruby
|
132
|
+
keppler add module ModuleName attribute:type
|
133
|
+
|
134
|
+
%p Por ejemplo, crearemos un scaffold de productos con diversos campos y tipos de datos:
|
135
|
+
|
136
|
+
%pre
|
137
|
+
%code.ruby
|
138
|
+
keppler add module Product title:string description:text quantity:integer price:float arrival_date:date arrival_time:time available:boolean user:references
|
139
|
+
|
140
|
+
%p Luego debemos migrar la tabla a la base de datos con:
|
141
|
+
|
142
|
+
%pre
|
143
|
+
%code.ruby
|
144
|
+
keppler migrate
|
145
|
+
|
146
|
+
%p Si luego deseamos borrar, crear, migrar y llenar la base de datos desde cero,
|
147
|
+
podemos realizarlo ejecutando el comando:
|
148
|
+
|
149
|
+
%pre
|
150
|
+
%code.ruby
|
151
|
+
keppler reset
|
152
|
+
|
153
|
+
%p Por último, si todo ha sido ejecutado debida y correctamente, podemos iniciar
|
154
|
+
el proyecto ejecutando en la consola:
|
179
155
|
|
180
|
-
|
156
|
+
%pre
|
157
|
+
%code.ruby
|
158
|
+
keppler server
|
159
|
+
|
160
|
+
%h3 SimpleForm con Bootstrap
|
161
|
+
|
162
|
+
%p
|
163
|
+
Se ofrece una integración por defecto entre SimpleForm y Bootstrap, usted tiene la posibilidad de cambiar su funcionalidad en
|
164
|
+
%pre
|
165
|
+
%code.ruby
|
166
|
+
config/initializers/simple_form_bootstrap.rb
|
167
|
+
|
168
|
+
|
169
|
+
%p Aquí algunos ejemplos para la creación de inputs:
|
170
|
+
|
171
|
+
%pre
|
172
|
+
%code.haml
|
173
|
+
:preserve
|
174
|
+
# Inputs de tipo string o textarea
|
175
|
+
= f.input :name
|
176
|
+
|
177
|
+
# Inputs de tipo CKEditor
|
178
|
+
= f.input :description, as: :ckeditor, input_html: { ckeditor: { toolbar: 'mini'} }
|
179
|
+
|
180
|
+
# Inputs de tipo boolean
|
181
|
+
= f.input :public, as: :keppler_boolean
|
182
|
+
|
183
|
+
# Inputs de tipo file
|
184
|
+
= f.input :image, as: :keppler_file
|
185
|
+
|
186
|
+
# Inputs de tipo select
|
187
|
+
= f.input :role_ids, collection: Role.all, label: false, include_blank: "Seleccione un rol"
|
188
|
+
|
189
|
+
# Inputs de tipo radio buttons
|
190
|
+
= f.collection_radio_buttons :option, [['vegan', 'vegan'] ,['vegetarian', 'vegetarian']], :first, :last
|
191
|
+
|
192
|
+
# Inputs de tipo check_boxes
|
193
|
+
= f.collection_check_boxes :options, [['vegan', 'vegan'] ,['vegetarian', 'vegetarian']], :first, :last
|
194
|
+
|
195
|
+
# Inputs de tipo date
|
196
|
+
= f.input :date, input_html: { class: 'datepicker' }
|
197
|
+
|
198
|
+
%strong
|
199
|
+
Nota:
|
200
|
+
%p
|
201
|
+
Puede revisar la documentación de
|
202
|
+
= link_to 'AdminLTE', 'https://adminlte.io'
|
203
|
+
para agregar nuevas integraciones para sus formularios a través de los
|
204
|
+
= link_to 'Wrappers', 'https://github.com/plataformatec/simple_form/wiki/Custom-Wrappers'
|
205
|
+
de simpleform.
|
206
|
+
|
207
|
+
-# %h3 Plugins (Módulos)
|
208
|
+
-#
|
209
|
+
-# %p
|
210
|
+
-# La plataforma permite la adaptación de módulos con facil instalación,
|
211
|
+
-# algunos de los módulos desarrollados son:
|
212
|
+
-#
|
213
|
+
-# %ul
|
214
|
+
-# %li
|
215
|
+
-# = link_to 'Keppler Google Analytics Dashboard', 'https://github.com/slicegroup/keppler_ga_dashboard'
|
216
|
+
-# -
|
217
|
+
-# %strong ya viene integrado
|
218
|
+
-# %li
|
219
|
+
-# = link_to 'Keppler Blog', 'https://github.com/slicegroup/keppler_blog'
|
220
|
+
-# %li
|
221
|
+
-# = link_to 'Keppler Catalogs', 'https://github.com/slicegroup/keppler_catalogs'
|
222
|
+
-# %li
|
223
|
+
-# = link_to 'Keppler Contact', 'https://github.com/slicegroup/keppler_contact_us'
|
224
|
+
|
225
|
+
%script{ src: '/assets/app/front.js' }
|