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
@@ -1,9 +1,9 @@
|
|
1
1
|
var notification = function(msg) {noty({text: msg,layout: 'bottomRight',type: 'alert',dismissQueue: true,animation: {open: 'animated tada',close: 'bounceOutRight',easing: 'swing',speed: 500},timeout: 5000,callback: {afterShow: function() {$.noty.closeAll()}}})};
|
2
2
|
|
3
3
|
- case action_name
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
- when "create"
|
5
|
+
notification("#{controller_name.humanize.singularize} creado satisfactoriamente.")
|
6
|
+
- when "update"
|
7
|
+
notification("#{controller_name.humanize.singularize} actualizado satisfactoriamente.")
|
8
|
+
- when "destroy"
|
9
|
+
notification("#{controller_name.humanize.singularize} eliminado satisfactoriamente.")
|
@@ -1,10 +1,10 @@
|
|
1
1
|
.tab-content
|
2
2
|
%h6.actions
|
3
|
-
- if
|
3
|
+
- if can?(MetaTag).update?
|
4
4
|
= link_to edit_admin_meta_tag_path(@meta_tag), title: t("keppler.actions.edit"), class: 'pull-left' do
|
5
5
|
%i.icon-pencil
|
6
6
|
%span= t('keppler.actions.edit')
|
7
|
-
- if
|
7
|
+
- if can?(MetaTag).destroy?
|
8
8
|
= link_to admin_meta_tag_path(@meta_tag), class: 'new-menu', title: 'Delete', method: :delete, data: { confirm: t("keppler.messages.data_confirm") } do
|
9
9
|
%i.icon-trash
|
10
10
|
%span= t('keppler.actions.delete')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
- objects.each do |meta_tag|
|
2
2
|
%tr{ id: "row-#{meta_tag.id}" }
|
3
3
|
%td.item-check{ style: 'width: 10%' }
|
4
|
-
- if
|
4
|
+
- if can?(MetaTag).destroy_multiple?
|
5
5
|
.checkbox
|
6
6
|
%label{ for: "checkbox-#{meta_tag.id}" }
|
7
7
|
%input{ type:"checkbox", id: "checkbox-#{meta_tag.id}", 'checklist-model' => 'check', 'checklist-value' => "#{meta_tag.id}", 'ng-click' => "selectByCheck(#{@objects.size})", '@click' => "listDelete(#{meta_tag.id})"}
|
@@ -17,22 +17,22 @@
|
|
17
17
|
%a.action-btn.pull-right{:id => "menu-#{meta_tag.id}", 'aria-expanded' => 'false', 'aria-haspopup' => 'true', 'data-toggle' => 'dropdown'}
|
18
18
|
%i.icon-options-vertical
|
19
19
|
%ul.actions.dropdown-menu{ 'aria-labelledby' => "menu-#{meta_tag.id}"}
|
20
|
-
- if
|
20
|
+
- if can?(MetaTag).show?
|
21
21
|
%li
|
22
22
|
= link_to admin_meta_tag_path(meta_tag), class: 'new-menu', title: t('keppler.actions.show') do
|
23
23
|
%i.icon-eye
|
24
24
|
= t('keppler.actions.show')
|
25
|
-
- if
|
25
|
+
- if can?(MetaTag).update?
|
26
26
|
%li
|
27
27
|
= link_to edit_admin_meta_tag_path(meta_tag), class: 'new-menu', title: t('keppler.actions.edit') do
|
28
28
|
%i.icon-pencil
|
29
29
|
= t('keppler.actions.edit')
|
30
|
-
- if
|
30
|
+
- if can?(MetaTag).clone?
|
31
31
|
%li
|
32
|
-
= link_to
|
32
|
+
= link_to admin_meta_tag_clone_path(meta_tag), class: 'new-menu', title: t('keppler.actions.clone') do
|
33
33
|
%i.icon-docs
|
34
34
|
= t('keppler.actions.clone')
|
35
|
-
- if
|
35
|
+
- if can?(MetaTag).destroy?
|
36
36
|
%li
|
37
37
|
= link_to admin_meta_tag_path(meta_tag), class: 'new-menu', title: t('keppler.actions.delete'), method: :delete, data: { confirm: t("keppler.messages.data_confirm") } do
|
38
38
|
%i.icon-trash
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#index-container{ :
|
1
|
+
#index-container{ controller: 'meta_tags' }
|
2
2
|
.container
|
3
3
|
.row
|
4
4
|
.listing.col-lg-12.col-xs-12
|
@@ -7,18 +7,18 @@
|
|
7
7
|
= t("keppler.modules.#{controller_path.underscore}")
|
8
8
|
= entries(@total, @objects)
|
9
9
|
.toolbar
|
10
|
-
- if
|
10
|
+
- if can?(MetaTag).download?
|
11
11
|
.toolbar-item
|
12
|
-
= link_to
|
12
|
+
= link_to admin_meta_tags_path(format: :csv), class: 'tool-btn', title: t('keppler.actions.download_records') do
|
13
13
|
%i.icon-cloud-download
|
14
|
-
- if
|
14
|
+
- if can?(MetaTag).upload?
|
15
15
|
.toolbar-item
|
16
|
-
= link_to
|
16
|
+
= link_to '#', class: 'tool-btn', title: t('keppler.actions.upload_records'), id: 'upload' do
|
17
17
|
%i.icon-cloud-upload
|
18
18
|
.toolbar-item
|
19
|
-
= link_to reload_admin_meta_tags_path, class:
|
19
|
+
= link_to reload_admin_meta_tags_path, class: 'tool-btn', remote: true do
|
20
20
|
%i.icon-reload
|
21
|
-
- if
|
21
|
+
- if can?(MetaTag).destroy_multiple?
|
22
22
|
.toolbar-item
|
23
23
|
.checkbox
|
24
24
|
%label{ for: 'checkbox-all' }
|
@@ -26,11 +26,11 @@
|
|
26
26
|
%span.cr
|
27
27
|
%i.cr-icon.glyphicon.glyphicon-ok
|
28
28
|
.toolbar-item
|
29
|
-
%a.tool-btn{
|
29
|
+
%a.tool-btn{ 'data-confirm' => '¿Estás seguro?', 'data-method' => 'delete', 'v-bind:href' => 'link', rel: 'nofollow', ':class' => '{disabled: !checks}' }
|
30
30
|
%i.icon-trash
|
31
31
|
.hide
|
32
|
-
= form_tag
|
33
|
-
= file_field_tag :file, id:
|
32
|
+
= form_tag admin_meta_tag_upload_path(@objects), id: 'upload_form', multipart: true, method: :post do
|
33
|
+
= file_field_tag :file, id: 'upload_file'
|
34
34
|
%ol.breadcrumb
|
35
35
|
%li
|
36
36
|
%a{ href: '#' }
|
@@ -45,36 +45,22 @@
|
|
45
45
|
- if @objects.size.zero?
|
46
46
|
%tr
|
47
47
|
%th{style: 'text-align: center;'}
|
48
|
-
%h6= t('keppler.messages.not_found_records', model: t(
|
48
|
+
%h6= t('keppler.messages.not_found_records', model: t('keppler.models.pluralize.meta_tags'))
|
49
49
|
- else
|
50
50
|
%tr
|
51
51
|
%td
|
52
52
|
%th= t('activerecord.attributes.title')
|
53
53
|
%th= t('activerecord.attributes.url')
|
54
54
|
%th
|
55
|
-
|
56
|
-
%tbody#objects-container{ "data-update-url" => "#{admin_sorting_meta_tags_path}" }
|
55
|
+
%tbody#objects-container{ 'data-update-url' => "#{sort_admin_meta_tags_path}" }
|
57
56
|
= render 'admin/layouts/listing_preloader'
|
58
57
|
= render 'listing', objects: @objects
|
59
58
|
%center#paginator-module
|
60
59
|
= paginate @objects, window: 1
|
61
60
|
.listing-show.col.l3.m12.hide-on-small-and-down.hide-on-med-and-down
|
62
|
-
= render
|
61
|
+
= render 'description'
|
63
62
|
%aside#index-show.control-sidebar
|
64
|
-
- if
|
63
|
+
- if can?(MetaTag).create?
|
65
64
|
.mixed-btn
|
66
|
-
= link_to new_admin_meta_tag_path, class:
|
65
|
+
= link_to new_admin_meta_tag_path, class: 'btn-float' do
|
67
66
|
+
|
68
|
-
|
69
|
-
|
70
|
-
:javascript
|
71
|
-
$(document).ready(function(){
|
72
|
-
$('#meta_tag').click(function(e) {
|
73
|
-
e.preventDefault()
|
74
|
-
$('#import_file_meta_tag').click()
|
75
|
-
$('#import_file_meta_tag').change(function() {
|
76
|
-
$('.waiting').css('display', 'block')
|
77
|
-
$('#import_form_meta_tag').submit()
|
78
|
-
})
|
79
|
-
});
|
80
|
-
});
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.container
|
2
2
|
.row
|
3
3
|
.col-lg-2
|
4
|
-
= link_to admin_meta_tags_path,
|
4
|
+
= link_to admin_meta_tags_path, 'data-position' => 'bottom', 'data-tooltip' => t('keppler.actions.back') do
|
5
5
|
.arrow-back.btn.btn-default
|
6
6
|
%i.fa.fa-angle-left
|
7
7
|
= t('keppler.actions.back')
|
@@ -11,19 +11,18 @@
|
|
11
11
|
.col-lg-12
|
12
12
|
.box.slice-box
|
13
13
|
.box-header.with-border
|
14
|
-
%h3.box-title
|
14
|
+
%h3.box-title= t 'keppler.sidebar-menu.seo-submenu.title-metas'
|
15
15
|
.box-tools.pull-right
|
16
|
-
- if
|
16
|
+
- if can?(MetaTag).update?
|
17
17
|
= link_to edit_admin_meta_tag_path(@meta_tag), class: "btn btn-box-tool", title: "#{t('keppler.actions.edit') }" do
|
18
18
|
%i.icon-pencil
|
19
|
-
- if
|
19
|
+
- if can?(MetaTag).destroy?
|
20
20
|
= link_to admin_meta_tag_path(@meta_tag), class: "btn btn-box-tool", title: "#{t('keppler.actions.delete')}", method: :delete, data: { confirm: t("keppler.messages.data_confirm") } do
|
21
21
|
%i.icon-trash
|
22
|
-
/ /.box-header
|
23
22
|
.box-body.box-body-no-padding
|
24
23
|
%table.table.table-striped
|
25
24
|
%tbody
|
26
|
-
- @meta_tag.as_json(only: [
|
25
|
+
- @meta_tag.as_json(only: ['id', 'title', 'description', 'meta_tags', 'url', 'created_at']).each do |attribute, value|
|
27
26
|
%tr.list-row
|
28
|
-
%th.display-label= t("activerecord.attributes
|
29
|
-
%td.display-value.fs-body-1.tc-black-2= value
|
27
|
+
%th.display-label= t("activerecord.attributes.#{attribute}")
|
28
|
+
%td.display-value.fs-body-1.tc-black-2= value
|
@@ -0,0 +1,13 @@
|
|
1
|
+
%aside.control-sidebar.control-sidebar-light
|
2
|
+
.tab-content
|
3
|
+
%p.control-sidebar-heading
|
4
|
+
= @activities.empty? ? t('keppler.messages.no_events') : t("keppler.titles.history")
|
5
|
+
%ul.timeline
|
6
|
+
- @activities.each do |activity|
|
7
|
+
- if activity.trackable_type.eql? "Session"
|
8
|
+
%li
|
9
|
+
= render partial: "public_activity/session/#{activity.key.split(".").second}", locals: { activity: activity, method: "id" }
|
10
|
+
- else
|
11
|
+
%li
|
12
|
+
= render partial: "public_activity/layout/#{activity.key.split(".").second}", locals: { activity: activity, method: "id" }
|
13
|
+
.control-sidebar-bg
|
@@ -0,0 +1,27 @@
|
|
1
|
+
= simple_form_for [:admin, @role] do |f|
|
2
|
+
.container
|
3
|
+
.row
|
4
|
+
.col-lg-2
|
5
|
+
= link_to admin_roles_path, class: "", "data-position" => "bottom", "data-tooltip" => t("keppler.actions.back") do
|
6
|
+
.arrow-back.btn.btn-default
|
7
|
+
%i.fa.fa-angle-left
|
8
|
+
= t('keppler.actions.back')
|
9
|
+
|
10
|
+
.row
|
11
|
+
.col-lg-12
|
12
|
+
.box.slice-box
|
13
|
+
.box-header.with-border
|
14
|
+
%h3.box-title= t("keppler.modules.#{action_name.underscore}")
|
15
|
+
.box-tools.pull-right
|
16
|
+
%a.btn.btn-box-tool{"data-widget" => "collapse", :type => "button"}
|
17
|
+
%i.fa.fa-minus
|
18
|
+
.box-body
|
19
|
+
%table.table.table-bordered
|
20
|
+
%tbody
|
21
|
+
.form-padding
|
22
|
+
.col-xs-12
|
23
|
+
= f.input :name
|
24
|
+
.col-xs-12
|
25
|
+
.pull-right
|
26
|
+
= f.button :submit, t("keppler.actions.save"), name: '_save', class: "btn-primary"
|
27
|
+
= f.button :submit, t("keppler.actions.save_and_add_another"), name: '_add_other'
|
@@ -0,0 +1,24 @@
|
|
1
|
+
.tab-content
|
2
|
+
%h6.actions
|
3
|
+
- if can?(Role).update?
|
4
|
+
= link_to edit_admin_role_path(@role), title: t("keppler.actions.edit"), class: 'pull-left' do
|
5
|
+
%i.icon-pencil
|
6
|
+
%span= t('keppler.actions.edit')
|
7
|
+
%a#close-index-show.pull-right
|
8
|
+
%i.icon-close
|
9
|
+
%h3.control-sidebar-heading
|
10
|
+
= t("keppler.modules.#{controller_path.underscore}")
|
11
|
+
%ul.timeline
|
12
|
+
- @role.as_json(only: ["name"]).each do |attribute, value|
|
13
|
+
%li.list-row
|
14
|
+
.timeline-item
|
15
|
+
%h6.timeline-header.no-border
|
16
|
+
%small
|
17
|
+
%strong.display-value= t("activerecord.attributes.#{attribute}")
|
18
|
+
- if @attachments.include?(attribute)
|
19
|
+
.display-label= image_tag value
|
20
|
+
- else
|
21
|
+
%p.display-label= value
|
22
|
+
:coffee
|
23
|
+
$('#close-index-show').click ->
|
24
|
+
$('#index-show').css 'right', -$('#index-show').outerWidth()
|
@@ -0,0 +1,46 @@
|
|
1
|
+
- objects.each do |role|
|
2
|
+
- unless role.name.eql?('keppler_admin')
|
3
|
+
%tr{ id: "row-#{role.id}" }
|
4
|
+
%td.item-check{ style: 'width: 10%' }
|
5
|
+
- if can?(Role).destroy_multiple?
|
6
|
+
.checkbox
|
7
|
+
%label{ for: "checkbox-#{role.id}" }
|
8
|
+
%input{ type:"checkbox", id: "checkbox-#{role.id}", 'checklist-model' => 'check', 'checklist-value' => "#{role.id}", '@click' => "listDelete(#{role.id})"}
|
9
|
+
%span.cr
|
10
|
+
%i.cr-icon.glyphicon.glyphicon-ok
|
11
|
+
%td
|
12
|
+
= link_to admin_role_path(role, search: @query), remote: true, class: 'show-row' do
|
13
|
+
%span
|
14
|
+
= role.name
|
15
|
+
%td{ style: 'width: 15px;padding-right:15px;' }
|
16
|
+
- unless role.id.eql?(1)
|
17
|
+
= link_to admin_role_add_permissions_path(role.id) , class: "action-btn.pull-right" do
|
18
|
+
%i.icon-settings
|
19
|
+
%td{ style: 'width: 15px;padding-right:15px;' }
|
20
|
+
%a.action-btn.pull-right{:id => "menu-#{role.id}", "aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown"}
|
21
|
+
%i.icon-options-vertical
|
22
|
+
%ul.actions.dropdown-menu{"aria-labelledby" => "menu-#{role.id}" }
|
23
|
+
- if can?(Role).show?
|
24
|
+
%li
|
25
|
+
= link_to admin_role_path(role), class: 'new-menu', title: t('keppler.actions.show') do
|
26
|
+
%i.icon-eye
|
27
|
+
= t('keppler.actions.show')
|
28
|
+
- if can?(Role).update?
|
29
|
+
%li
|
30
|
+
= link_to edit_admin_role_path(role), class: 'new-menu', title: t('keppler.actions.edit') do
|
31
|
+
%i.icon-pencil
|
32
|
+
= t('keppler.actions.edit')
|
33
|
+
- if can?(Role).clone?
|
34
|
+
%li
|
35
|
+
= link_to admin_role_clone_path(role), class: 'new-menu', title: t('keppler.actions.clone') do
|
36
|
+
%i.icon-docs
|
37
|
+
= t('keppler.actions.clone')
|
38
|
+
- if can?(Role).destroy?
|
39
|
+
%li
|
40
|
+
= link_to admin_role_path(role), class: 'new-menu', title: t('keppler.actions.delete'), method: :delete, data: { confirm: t("keppler.messages.data_confirm") } do
|
41
|
+
%i.icon-trash
|
42
|
+
= t('keppler.actions.delete')
|
43
|
+
|
44
|
+
%td{:style => 'width: 5%;'}
|
45
|
+
%a.drop{:href=>"#"}
|
46
|
+
%i.icon-cursor-move
|
@@ -0,0 +1,20 @@
|
|
1
|
+
= simple_form_for @role, url: admin_role_create_permissions_path(role), method: :post, remote: true do |f|
|
2
|
+
%label
|
3
|
+
- if !role.have_action?(module_name, action)
|
4
|
+
%label.switch
|
5
|
+
%input{name: "role[module]", type: "hidden", value: module_name}
|
6
|
+
%input{name: "role[action]", type: "hidden", value: action}
|
7
|
+
%input{id: "switch-#{module_name.split('::').join('')}-#{action}", :type => "checkbox"}/
|
8
|
+
%span.slider.round{onclick: "sendPermission('#{module_name}', '#{action}')"}
|
9
|
+
|
10
|
+
- else
|
11
|
+
%label.switch
|
12
|
+
%input{name: "role[module]", type: "hidden", value: module_name}
|
13
|
+
%input{name: "role[action]", type: "hidden", value: action}
|
14
|
+
%input.active{id: "switch-#{module_name.split('::').join('')}-#{action}", :type => "checkbox", checked: "checked"}/
|
15
|
+
%span.slider.round{onclick: "sendPermission('#{module_name}', '#{action}')"}
|
16
|
+
|
17
|
+
:javascript
|
18
|
+
function sendPermission(module_name, action) {
|
19
|
+
$('#switch-'+module_name.split('::').join('')+'-'+action).parent().parent().parent().submit()
|
20
|
+
}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
.container
|
2
|
+
.row
|
3
|
+
.col-lg-2
|
4
|
+
= link_to admin_roles_path, class: "", "data-position" => "bottom", "data-tooltip" => t("keppler.actions.back") do
|
5
|
+
.arrow-back.btn.btn-default
|
6
|
+
%i.fa.fa-angle-left
|
7
|
+
= t('keppler.actions.back')
|
8
|
+
.row
|
9
|
+
.col-lg-12
|
10
|
+
%section.content-header.index-header
|
11
|
+
%h1{ style: 'display: inline-block; margin-left: 15px' }
|
12
|
+
Role:
|
13
|
+
= @role.name
|
14
|
+
.col-lg-6
|
15
|
+
- @modules.each do |module_name|
|
16
|
+
- module_name.each do |key, value|
|
17
|
+
- unless module_name[key]["name"].eql?('dashboard')
|
18
|
+
.col-lg-12
|
19
|
+
.box.slice-box.collapsed-box
|
20
|
+
.box-header.with-border
|
21
|
+
%h4.box-title= t("keppler.sidebar-menu.#{module_name[key]["name"].parameterize.pluralize}")
|
22
|
+
.box-tools.pull-right
|
23
|
+
%a.btn.btn-box-tool{"data-widget" => "collapse", :type => "button"}
|
24
|
+
%i.fa.fa-plus
|
25
|
+
.box-body
|
26
|
+
%table.table.table-bordered
|
27
|
+
%tbody
|
28
|
+
- module_name[key]["actions"].each do |action|
|
29
|
+
%tr
|
30
|
+
%td.row-selectable.table-data
|
31
|
+
= link_to admin_role_show_description_path(@role, module_name[key]["name"].split('::').join(''), action), method: :post, remote: true do
|
32
|
+
.pull-left
|
33
|
+
%h4= t("keppler.permissions.#{action}")
|
34
|
+
.pull-right.switch-div
|
35
|
+
= render "admin/roles/switch", role: @role, module_name: module_name[key]["name"], action: action, children: false
|
36
|
+
|
37
|
+
.col-lg-6.hidden-xs
|
38
|
+
%div{style: "width: 43%; height: 100%; position: fixed; right: 0px"}
|
39
|
+
.col-lg-12
|
40
|
+
.box.slice-box
|
41
|
+
.box-header.with-border
|
42
|
+
%h4.box-title= t("activerecord.attributes.description")
|
43
|
+
|
44
|
+
.box-body{style: "min-height: 100px"}
|
45
|
+
%table.table.table-bordered
|
46
|
+
%tbody
|
47
|
+
#description-list
|
48
|
+
- @modules.each do |module_name|
|
49
|
+
- module_name.each do |key, value|
|
50
|
+
- unless module_name[key]["name"].eql?('dashboard')
|
51
|
+
- module_name[key]["actions"].each do |action|
|
52
|
+
%div.no-visible{id: "description-#{module_name[key]["name"].split('::').join('')}-#{action}"}
|
53
|
+
%h5
|
54
|
+
%strong Modulo:
|
55
|
+
= module_name[key]["name"].pluralize
|
56
|
+
%h5
|
57
|
+
%strong Acción:
|
58
|
+
= t("keppler.permissions.#{action}").camelize
|
59
|
+
%hr
|
60
|
+
%h5= t("keppler.permissions.descriptions.#{action}")
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
$("#switch-<%= @module.split('::').join('') %>-<%= @action %>").toggleClass('active');
|
@@ -0,0 +1 @@
|
|
1
|
+
= render 'form'
|
@@ -0,0 +1,80 @@
|
|
1
|
+
#index-container{ :controller => "roles" }
|
2
|
+
.container
|
3
|
+
.row
|
4
|
+
.listing.col-lg-12.col-xs-12
|
5
|
+
%section.content-header.index-header
|
6
|
+
%h1{ style: 'display: inline-block' }
|
7
|
+
= t("keppler.modules.#{controller_path.underscore}")
|
8
|
+
= entries(@total, @objects)
|
9
|
+
.toolbar
|
10
|
+
- if can?(Role).download?
|
11
|
+
.toolbar-item
|
12
|
+
= link_to admin_role_download_path(Role, :format => :xls), class: "tool-btn", title: t('keppler.actions.download_records') do
|
13
|
+
%i.icon-cloud-download
|
14
|
+
- if can?(Role).upload?
|
15
|
+
.toolbar-item
|
16
|
+
= link_to "", class: "tool-btn", title: t('keppler.actions.upload_records'), id: "role" do
|
17
|
+
%i.icon-cloud-upload
|
18
|
+
.toolbar-item
|
19
|
+
= link_to reload_admin_roles_path, class: "tool-btn", remote: true do
|
20
|
+
%i.icon-reload
|
21
|
+
- if can?(Role).destroy_multiple?
|
22
|
+
.toolbar-item
|
23
|
+
.checkbox
|
24
|
+
%label{ for: 'checkbox-all' }
|
25
|
+
%input{ type: 'checkbox', id: 'checkbox-all', ':disabled' => 'checkItems ? disabled : ""', '@click' => 'selectAll()' }
|
26
|
+
%span.cr
|
27
|
+
%i.cr-icon.glyphicon.glyphicon-ok
|
28
|
+
.toolbar-item
|
29
|
+
%a.tool-btn{"data-confirm" => "¿Estás seguro?", "data-method" => "delete", "v-bind:href" => "link", :rel => "nofollow", ":class" => "{disabled: !checks}" }
|
30
|
+
%i.icon-trash
|
31
|
+
.hide
|
32
|
+
= form_tag admin_role_upload_path(@objects), id: "upload_form_roles", multipart: true, method: :post do
|
33
|
+
= file_field_tag :file, id: "upload_file_role"
|
34
|
+
%ol.breadcrumb
|
35
|
+
%li
|
36
|
+
%a{ href: '#' }
|
37
|
+
%i.icon-directions
|
38
|
+
= t("keppler.modules.#{action_name.underscore}")
|
39
|
+
|
40
|
+
.box.slice-box
|
41
|
+
.box-body.no-padding
|
42
|
+
|
43
|
+
%table.table
|
44
|
+
%thead
|
45
|
+
- if @objects.size.zero?
|
46
|
+
%tr
|
47
|
+
%th{style: 'text-align: center;'}
|
48
|
+
%h6= t('keppler.messages.not_found_records', model: t("keppler.models.pluralize.roles"))
|
49
|
+
- else
|
50
|
+
%tr
|
51
|
+
%th
|
52
|
+
%th.hidden-xs= t('activerecord.attributes.name')
|
53
|
+
%th.center Menu
|
54
|
+
%th
|
55
|
+
%tbody#objects-container{ "data-update-url" => "#{sort_admin_roles_path}" }
|
56
|
+
= render 'admin/layouts/listing_preloader'
|
57
|
+
= render 'listing', objects: @roles
|
58
|
+
%center#paginator-module
|
59
|
+
= paginate @objects, window: 1
|
60
|
+
%aside.control-sidebar
|
61
|
+
= render "description"
|
62
|
+
%aside#index-show.control-sidebar
|
63
|
+
|
64
|
+
.mixed-btn
|
65
|
+
- if can?(Role).create?
|
66
|
+
= link_to new_admin_role_path, class: "btn-float" do
|
67
|
+
+
|
68
|
+
|
69
|
+
:javascript
|
70
|
+
$(document).ready(function(){
|
71
|
+
$('#role').click(function() {
|
72
|
+
$('#upload_file_role').click()
|
73
|
+
$('#upload_file_role').change(function() {
|
74
|
+
$('.waiting').css('display', 'block')
|
75
|
+
$('#upload_form_role').submit()
|
76
|
+
})
|
77
|
+
});
|
78
|
+
|
79
|
+
renderImg();
|
80
|
+
});
|