keppler 2.0.0
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 +7 -0
- data/Gemfile +6 -0
- data/README.md +43 -0
- data/Rakefile +2 -0
- data/bin/console +15 -0
- data/bin/keppler +5 -0
- data/bin/setup +7 -0
- data/installer/core/Gemfile +113 -0
- data/installer/core/Guardfile +18 -0
- data/installer/core/README.md +87 -0
- data/installer/core/Rakefile +6 -0
- data/installer/core/_config.yml +1 -0
- data/installer/core/app/assets/images/admin/favicon.png +0 -0
- data/installer/core/app/assets/images/admin/logo.png +0 -0
- data/installer/core/app/assets/images/admin/logo2.png +0 -0
- data/installer/core/app/assets/images/admin/profile-menu.jpg +0 -0
- data/installer/core/app/assets/images/admin/search.png +0 -0
- data/installer/core/app/assets/images/admin/slice-icon-orange.png +0 -0
- data/installer/core/app/assets/images/admin/slice-icon.png +0 -0
- data/installer/core/app/assets/images/admin/slice.png +0 -0
- data/installer/core/app/assets/images/admin/slice_white.png +0 -0
- data/installer/core/app/assets/images/admin/space.png +0 -0
- data/installer/core/app/assets/images/app/Home_Keppler.png +0 -0
- data/installer/core/app/assets/images/app/Home_Keppler2.png +0 -0
- data/installer/core/app/assets/images/app/keppler-front.png +0 -0
- data/installer/core/app/assets/images/app/slice-front.png +0 -0
- data/installer/core/app/assets/javascripts/admin/application.coffee +15 -0
- data/installer/core/app/assets/javascripts/admin/dropdown_top.js +7 -0
- data/installer/core/app/assets/javascripts/admin/file_upload.coffee +21 -0
- data/installer/core/app/assets/javascripts/admin/img_preview.js +18 -0
- data/installer/core/app/assets/javascripts/admin/main.coffee +42 -0
- data/installer/core/app/assets/javascripts/admin/notification.js +11 -0
- data/installer/core/app/assets/javascripts/admin/preview_template.js +21 -0
- data/installer/core/app/assets/javascripts/admin/sidebar.js +20 -0
- data/installer/core/app/assets/javascripts/admin/sort.coffee +8 -0
- data/installer/core/app/assets/javascripts/app/application.js.coffee +5 -0
- data/installer/core/app/assets/javascripts/app/front.js +129 -0
- data/installer/core/app/assets/javascripts/app/google_analytics.js.coffee +5 -0
- data/installer/core/app/assets/javascripts/ckeditor/config.js +130 -0
- data/installer/core/app/assets/javascripts/keppler_ga_dashboard/view-selector2.js +196 -0
- data/installer/core/app/assets/javascripts/vue_admin/index.js +87 -0
- data/installer/core/app/assets/stylesheets/admin/application.scss +43 -0
- data/installer/core/app/assets/stylesheets/admin/components/layouts/_footer.scss +5 -0
- data/installer/core/app/assets/stylesheets/admin/components/layouts/_settings.scss +35 -0
- data/installer/core/app/assets/stylesheets/admin/components/module/_show.scss +0 -0
- data/installer/core/app/assets/stylesheets/admin/components/navigation/_navbar.scss +79 -0
- data/installer/core/app/assets/stylesheets/admin/components/navigation/_sidebar.scss +91 -0
- data/installer/core/app/assets/stylesheets/admin/components/paginator/_paginator.scss +53 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_devise.scss +162 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_files.scss +83 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_form.scss +163 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_header.scss +34 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_index.scss +331 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_listing.scss +29 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_navbar.scss +36 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_pageslide.scss +125 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_preloader.scss +283 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_search.scss +220 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_show.scss +17 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_sidebar.scss +64 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_switchs.scss +47 -0
- data/installer/core/app/assets/stylesheets/admin/pages/_themes.scss +74 -0
- data/installer/core/app/assets/stylesheets/admin/utils/_base.scss +66 -0
- data/installer/core/app/assets/stylesheets/admin/utils/_mixins.scss +26 -0
- data/installer/core/app/assets/stylesheets/admin/utils/_theme.scss +94 -0
- data/installer/core/app/assets/stylesheets/admin/utils/_variables.scss +79 -0
- data/installer/core/app/assets/stylesheets/app/application.scss +29 -0
- data/installer/core/app/assets/stylesheets/app/base/_base_project.scss +17 -0
- data/installer/core/app/assets/stylesheets/app/base/_typography.scss +1 -0
- data/installer/core/app/assets/stylesheets/app/components/_buttons.scss +0 -0
- data/installer/core/app/assets/stylesheets/app/components/_inputs.scss +0 -0
- data/installer/core/app/assets/stylesheets/app/components/_navbar.scss +21 -0
- data/installer/core/app/assets/stylesheets/app/layout/_container.scss +0 -0
- data/installer/core/app/assets/stylesheets/app/layout/_footer.scss +15 -0
- data/installer/core/app/assets/stylesheets/app/layout/_header.scss +0 -0
- data/installer/core/app/assets/stylesheets/app/pages/_front.sass +58 -0
- data/installer/core/app/assets/stylesheets/app/plugins/_bootstrap_override.scss +37 -0
- data/installer/core/app/assets/stylesheets/app/plugins/_font_awesome.scss +2 -0
- data/installer/core/app/assets/stylesheets/app/plugins/_keppler.scss +54 -0
- data/installer/core/app/assets/stylesheets/app/plugins/_npogress.scss +2 -0
- data/installer/core/app/assets/stylesheets/app/utils/_mixins.scss +18 -0
- data/installer/core/app/assets/stylesheets/app/utils/_variables.scss +28 -0
- data/installer/core/app/assets/stylesheets/errors/application.scss +3 -0
- data/installer/core/app/assets/stylesheets/errors/errors.scss +120 -0
- data/installer/core/app/assets/stylesheets/vendor/admin-lte/_skin-blue.scss +141 -0
- data/installer/core/app/controllers/admin/admin_controller.rb +72 -0
- data/installer/core/app/controllers/admin/customizes_controller.rb +109 -0
- data/installer/core/app/controllers/admin/meta_tags_controller.rb +124 -0
- data/installer/core/app/controllers/admin/scripts_controller.rb +131 -0
- data/installer/core/app/controllers/admin/settings_controller.rb +111 -0
- data/installer/core/app/controllers/admin/users_controller.rb +119 -0
- data/installer/core/app/controllers/app/app_controller.rb +23 -0
- data/installer/core/app/controllers/app/front_controller.rb +10 -0
- data/installer/core/app/controllers/application_controller.rb +96 -0
- data/installer/core/app/controllers/devise/sessions_controller.rb +104 -0
- data/installer/core/app/controllers/errors_controller.rb +28 -0
- data/installer/core/app/helpers/admin_helper.rb +117 -0
- data/installer/core/app/helpers/application_helper.rb +21 -0
- data/installer/core/app/helpers/customizes_helper.rb +2 -0
- data/installer/core/app/helpers/fronts_helper.rb +2 -0
- data/installer/core/app/helpers/scaffolds_helper.rb +2 -0
- data/installer/core/app/inputs/checkbox_material_input.rb +75 -0
- data/installer/core/app/inputs/file_material_input.rb +33 -0
- data/installer/core/app/mailers/application_mailer.rb +28 -0
- data/installer/core/app/models/appearance.rb +5 -0
- data/installer/core/app/models/application_record.rb +3 -0
- data/installer/core/app/models/concerns/activity_history.rb +9 -0
- data/installer/core/app/models/concerns/clone_record.rb +12 -0
- data/installer/core/app/models/customize.rb +154 -0
- data/installer/core/app/models/front.rb +2 -0
- data/installer/core/app/models/google_analytics_setting.rb +4 -0
- data/installer/core/app/models/meta_tag.rb +41 -0
- data/installer/core/app/models/role.rb +11 -0
- data/installer/core/app/models/script.rb +30 -0
- data/installer/core/app/models/setting.rb +17 -0
- data/installer/core/app/models/smtp_setting.rb +5 -0
- data/installer/core/app/models/social_account.rb +4 -0
- data/installer/core/app/models/user.rb +44 -0
- data/installer/core/app/policies/application_policy.rb +16 -0
- data/installer/core/app/policies/controller_policy.rb +53 -0
- data/installer/core/app/policies/customize_policy.rb +9 -0
- data/installer/core/app/policies/meta_tag_policy.rb +9 -0
- data/installer/core/app/policies/script_policy.rb +9 -0
- data/installer/core/app/policies/setting_policy.rb +9 -0
- data/installer/core/app/policies/user_policy.rb +17 -0
- data/installer/core/app/uploaders/attachment_uploader.rb +44 -0
- data/installer/core/app/uploaders/ckeditor_attachment_file_uploader.rb +36 -0
- data/installer/core/app/uploaders/ckeditor_picture_uploader.rb +47 -0
- data/installer/core/app/uploaders/template_uploader.rb +44 -0
- data/installer/core/app/views/admin/customizes/_description.html.haml +13 -0
- data/installer/core/app/views/admin/customizes/_form.html.haml +33 -0
- data/installer/core/app/views/admin/customizes/_listing.html.haml +15 -0
- data/installer/core/app/views/admin/customizes/_switch_default_template.html.haml +16 -0
- data/installer/core/app/views/admin/customizes/_switch_template.html.haml +22 -0
- data/installer/core/app/views/admin/customizes/index.html.haml +38 -0
- data/installer/core/app/views/admin/customizes/new.html.haml +4 -0
- data/installer/core/app/views/admin/layouts/_footer.html.haml +8 -0
- data/installer/core/app/views/admin/layouts/_head.html.haml +8 -0
- data/installer/core/app/views/admin/layouts/_header.html.haml +7 -0
- data/installer/core/app/views/admin/layouts/_listing_preloader.haml +5 -0
- data/installer/core/app/views/admin/layouts/_messages.html.haml +4 -0
- data/installer/core/app/views/admin/layouts/_navigation.html.haml +46 -0
- data/installer/core/app/views/admin/layouts/_preloader.html.haml +9 -0
- data/installer/core/app/views/admin/layouts/_search.html.haml +8 -0
- data/installer/core/app/views/admin/layouts/_sidebar.html.haml +63 -0
- data/installer/core/app/views/admin/layouts/application.html.haml +23 -0
- data/installer/core/app/views/admin/layouts/index/remote_messages.js.haml +9 -0
- data/installer/core/app/views/admin/meta_tags/_description.html.haml +13 -0
- data/installer/core/app/views/admin/meta_tags/_form.html.haml +57 -0
- data/installer/core/app/views/admin/meta_tags/_index_show.html.haml +26 -0
- data/installer/core/app/views/admin/meta_tags/_listing.html.haml +39 -0
- data/installer/core/app/views/admin/meta_tags/edit.html.haml +2 -0
- data/installer/core/app/views/admin/meta_tags/index.html.haml +80 -0
- data/installer/core/app/views/admin/meta_tags/new.html.haml +2 -0
- data/installer/core/app/views/admin/meta_tags/reload.js.haml +5 -0
- data/installer/core/app/views/admin/meta_tags/show.html.haml +29 -0
- data/installer/core/app/views/admin/meta_tags/show.js.haml +4 -0
- data/installer/core/app/views/admin/scripts/_description.html.haml +13 -0
- data/installer/core/app/views/admin/scripts/_form.html.haml +31 -0
- data/installer/core/app/views/admin/scripts/_index_show.html.haml +26 -0
- data/installer/core/app/views/admin/scripts/_listing.html.haml +42 -0
- data/installer/core/app/views/admin/scripts/edit.html.haml +1 -0
- data/installer/core/app/views/admin/scripts/index.html.haml +82 -0
- data/installer/core/app/views/admin/scripts/new.html.haml +1 -0
- data/installer/core/app/views/admin/scripts/reload.js.haml +5 -0
- data/installer/core/app/views/admin/scripts/show.html.haml +29 -0
- data/installer/core/app/views/admin/scripts/show.js.haml +4 -0
- data/installer/core/app/views/admin/settings/_form.html.haml +9 -0
- data/installer/core/app/views/admin/settings/components/_preview.html.haml +30 -0
- data/installer/core/app/views/admin/settings/edit.html.haml +4 -0
- data/installer/core/app/views/admin/settings/fields/_appearance.html.haml +62 -0
- data/installer/core/app/views/admin/settings/fields/_basic_information.html.haml +48 -0
- data/installer/core/app/views/admin/settings/fields/_email_setting.html.haml +17 -0
- data/installer/core/app/views/admin/settings/fields/_google_analytics_setting.html.haml +28 -0
- data/installer/core/app/views/admin/settings/fields/_social_accounts.html.haml +42 -0
- data/installer/core/app/views/admin/users/_description.html.haml +13 -0
- data/installer/core/app/views/admin/users/_form.html.haml +59 -0
- data/installer/core/app/views/admin/users/_index_show.html.haml +24 -0
- data/installer/core/app/views/admin/users/_listing.html.haml +49 -0
- data/installer/core/app/views/admin/users/edit.html.haml +1 -0
- data/installer/core/app/views/admin/users/index.html.haml +72 -0
- data/installer/core/app/views/admin/users/new.html.haml +1 -0
- data/installer/core/app/views/admin/users/reload.js.haml +5 -0
- data/installer/core/app/views/admin/users/show.html.haml +36 -0
- data/installer/core/app/views/admin/users/show.js.haml +4 -0
- data/installer/core/app/views/app/front/index.html.haml +180 -0
- data/installer/core/app/views/app/layouts/_footer.html.haml +3 -0
- data/installer/core/app/views/app/layouts/_google_analytics.html.haml +14 -0
- data/installer/core/app/views/app/layouts/_head.html.haml +22 -0
- data/installer/core/app/views/app/layouts/_messages.html.haml +6 -0
- data/installer/core/app/views/app/layouts/_meta_tags.html.haml +9 -0
- data/installer/core/app/views/app/layouts/_navigation.html.haml +13 -0
- data/installer/core/app/views/app/layouts/_navigation_links.html.haml +6 -0
- data/installer/core/app/views/app/layouts/application.html.haml +10 -0
- data/installer/core/app/views/application_mailer/testing.html.haml +1 -0
- data/installer/core/app/views/devise/mailer/reset_password_instructions.html.haml +6 -0
- data/installer/core/app/views/devise/passwords/edit.html.haml +27 -0
- data/installer/core/app/views/devise/passwords/new.html.haml +22 -0
- data/installer/core/app/views/devise/registrations/edit.html.erb +48 -0
- data/installer/core/app/views/devise/registrations/new.html.erb +19 -0
- data/installer/core/app/views/devise/sessions/new.html.haml +30 -0
- data/installer/core/app/views/errors/internal_server_error.html.haml +7 -0
- data/installer/core/app/views/errors/not_authorized.html.haml +7 -0
- data/installer/core/app/views/errors/not_found.html.haml +7 -0
- data/installer/core/app/views/errors/unprocessable.html.haml +7 -0
- data/installer/core/app/views/kaminari/_first_page.html.haml +11 -0
- data/installer/core/app/views/kaminari/_gap.html.haml +8 -0
- data/installer/core/app/views/kaminari/_last_page.html.haml +11 -0
- data/installer/core/app/views/kaminari/_next_page.html.haml +11 -0
- data/installer/core/app/views/kaminari/_page.html.haml +10 -0
- data/installer/core/app/views/kaminari/_paginator.html.haml +18 -0
- data/installer/core/app/views/kaminari/_prev_page.html.haml +11 -0
- data/installer/core/app/views/keppler_ga_dashboard/dashboard/analytics.html.haml +600 -0
- data/installer/core/app/views/layouts/errors/_head.html.haml +3 -0
- data/installer/core/app/views/layouts/errors/application.html.haml +11 -0
- data/installer/core/app/views/layouts/mailers/mailer.html.haml +3 -0
- data/installer/core/app/views/layouts/mailers/mailer.text.haml +1 -0
- data/installer/core/app/views/layouts/templates/application.html.haml +1 -0
- data/installer/core/app/views/public_activity/layout/_create.html.haml +45 -0
- data/installer/core/app/views/public_activity/layout/_destroy.html.haml +15 -0
- data/installer/core/app/views/public_activity/layout/_update.html.haml +45 -0
- data/installer/core/app/views/public_activity/session/_create.html.haml +13 -0
- data/installer/core/app/views/public_activity/session/_destroy.html.haml +13 -0
- data/installer/core/app/views/templates/kaminari/_first_page.html.haml +9 -0
- data/installer/core/app/views/templates/kaminari/_gap.html.haml +8 -0
- data/installer/core/app/views/templates/kaminari/_last_page.html.haml +9 -0
- data/installer/core/app/views/templates/kaminari/_next_page.html.haml +9 -0
- data/installer/core/app/views/templates/kaminari/_page.html.haml +10 -0
- data/installer/core/app/views/templates/kaminari/_paginator.html.haml +18 -0
- data/installer/core/app/views/templates/kaminari/_prev_page.html.haml +9 -0
- data/installer/core/bin/bundle +3 -0
- data/installer/core/bin/rails +4 -0
- data/installer/core/bin/rake +4 -0
- data/installer/core/bin/setup +29 -0
- data/installer/core/bin/spring +15 -0
- data/installer/core/config.ru +4 -0
- data/installer/core/config/application.rb +46 -0
- data/installer/core/config/boot.rb +7 -0
- data/installer/core/config/database.yml +25 -0
- data/installer/core/config/environment.rb +10 -0
- data/installer/core/config/environments/development.rb +57 -0
- data/installer/core/config/environments/production.rb +105 -0
- data/installer/core/config/environments/test.rb +44 -0
- data/installer/core/config/gaAuth/gauth_key.p12 +0 -0
- data/installer/core/config/initializers/assets.rb +14 -0
- data/installer/core/config/initializers/cookies_serializer.rb +3 -0
- data/installer/core/config/initializers/date_formats.rb +2 -0
- data/installer/core/config/initializers/devise.rb +259 -0
- data/installer/core/config/initializers/filter_parameter_logging.rb +5 -0
- data/installer/core/config/initializers/inflections.rb +16 -0
- data/installer/core/config/initializers/keppler_configuration.rb +9 -0
- data/installer/core/config/initializers/mime_types.rb +6 -0
- data/installer/core/config/initializers/paginate_kaminari_configuration.rb +12 -0
- data/installer/core/config/initializers/rolify.rb +10 -0
- data/installer/core/config/initializers/route_traslator.rb +3 -0
- data/installer/core/config/initializers/session_store.rb +5 -0
- data/installer/core/config/initializers/simple_form.rb +170 -0
- data/installer/core/config/initializers/simple_form_bootstrap.rb +155 -0
- data/installer/core/config/initializers/time_formats.rb +2 -0
- data/installer/core/config/initializers/wrap_parameters.rb +15 -0
- data/installer/core/config/locales/devise.en.yml +61 -0
- data/installer/core/config/locales/devise.es.yml +62 -0
- data/installer/core/config/locales/en.yml +380 -0
- data/installer/core/config/locales/es.yml +420 -0
- data/installer/core/config/locales/routes.en.yml +4 -0
- data/installer/core/config/locales/routes.es.yml +5 -0
- data/installer/core/config/locales/simple_form.en.yml +45 -0
- data/installer/core/config/locales/simple_form.es.yml +95 -0
- data/installer/core/config/locales/social_share_button.es.yml +10 -0
- data/installer/core/config/menu.yml +53 -0
- data/installer/core/config/puma.rb +56 -0
- data/installer/core/config/routes.rb +94 -0
- data/installer/core/config/sitemap.rb +27 -0
- data/installer/core/config/spring.rb +6 -0
- data/installer/core/db/migrate/20140812203549_devise_create_users.rb +50 -0
- data/installer/core/db/migrate/20140812210925_rolify_create_roles.rb +19 -0
- data/installer/core/db/migrate/20151221173228_create_activities.rb +23 -0
- data/installer/core/db/migrate/20160122201215_create_settings.rb +15 -0
- data/installer/core/db/migrate/20160126141856_create_smtp_settings.rb +14 -0
- data/installer/core/db/migrate/20160128131802_create_scripts.rb +11 -0
- data/installer/core/db/migrate/20160128151351_create_google_analytics_settings.rb +12 -0
- data/installer/core/db/migrate/20160128193740_create_social_accounts.rb +25 -0
- data/installer/core/db/migrate/20160201134918_create_meta_tags.rb +13 -0
- data/installer/core/db/migrate/20160201210520_create_appearances.rb +11 -0
- data/installer/core/db/migrate/20170603145521_create_customizes.rb +10 -0
- data/installer/core/db/migrate/20171225023933_create_scaffolds.rb +10 -0
- data/installer/core/db/schema.rb +172 -0
- data/installer/core/db/seeds.rb +45 -0
- data/installer/core/lib/generators/keppler_front/keppler_front_generator.rb +139 -0
- data/installer/core/lib/generators/keppler_front/templates/controllers/controller.rb +17 -0
- data/installer/core/lib/generators/keppler_front/templates/views/template.html.haml +180 -0
- data/installer/core/lib/generators/keppler_relation/keppler_relation_generator.rb +219 -0
- data/installer/core/lib/generators/keppler_scaffold/keppler_scaffold_generator.rb +240 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/controllers/controller.rb +143 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/models/model.rb +41 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/policies/policy.rb +9 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/views/_description.html.haml +13 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/views/_form.html.haml +60 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/views/_index_show.html.haml +24 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/views/_listing.html.haml +64 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/views/edit.html.haml +1 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/views/index.html.haml +97 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/views/new.html.haml +1 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/views/reload.js.haml +5 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/views/show.html.haml +65 -0
- data/installer/core/lib/generators/keppler_scaffold/templates/views/show.js.haml +4 -0
- data/installer/core/lib/keppler_configuration.rb +12 -0
- data/installer/core/lib/templates/haml/scaffold/_form.html.haml +10 -0
- data/installer/core/plugins/keppler_ga_dashboard/Gemfile +15 -0
- data/installer/core/plugins/keppler_ga_dashboard/MIT-LICENSE +20 -0
- data/installer/core/plugins/keppler_ga_dashboard/README.md +51 -0
- data/installer/core/plugins/keppler_ga_dashboard/Rakefile +37 -0
- data/installer/core/plugins/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/active-users.js +64 -0
- data/installer/core/plugins/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/active-users.js.map +1 -0
- data/installer/core/plugins/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/dashboard.coffee +13 -0
- data/installer/core/plugins/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/date-range-selector.js +2 -0
- data/installer/core/plugins/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/date-range-selector.js.map +1 -0
- data/installer/core/plugins/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/view-selector2.js +196 -0
- data/installer/core/plugins/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/view-selector2.js.map +1 -0
- data/installer/core/plugins/keppler_ga_dashboard/app/assets/stylesheets/dashboard.scss +83 -0
- data/installer/core/plugins/keppler_ga_dashboard/app/controllers/keppler_ga_dashboard/dashboard_controller.rb +48 -0
- data/installer/core/plugins/keppler_ga_dashboard/app/helpers/keppler_ga_dashboard/application_helper.rb +4 -0
- data/installer/core/plugins/keppler_ga_dashboard/app/helpers/keppler_ga_dashboard/dashboard_helper.rb +14 -0
- data/installer/core/plugins/keppler_ga_dashboard/app/views/keppler_ga_dashboard/dashboard/analytics.html.haml +359 -0
- data/installer/core/plugins/keppler_ga_dashboard/bin/rails +12 -0
- data/installer/core/plugins/keppler_ga_dashboard/config/menu.yml +6 -0
- data/installer/core/plugins/keppler_ga_dashboard/config/routes.rb +3 -0
- data/installer/core/plugins/keppler_ga_dashboard/keppler_ga_dashboard.gemspec +22 -0
- data/installer/core/plugins/keppler_ga_dashboard/lib/keppler_ga_dashboard.rb +10 -0
- data/installer/core/plugins/keppler_ga_dashboard/lib/keppler_ga_dashboard/engine.rb +5 -0
- data/installer/core/plugins/keppler_ga_dashboard/lib/keppler_ga_dashboard/tasks/install.rb +58 -0
- data/installer/core/plugins/keppler_ga_dashboard/lib/keppler_ga_dashboard/version.rb +3 -0
- data/installer/core/plugins/keppler_ga_dashboard/lib/tasks/keppler_ga_dashboard_tasks.rake +13 -0
- data/installer/core/public/favicon.ico +0 -0
- data/installer/core/public/humans.txt +20 -0
- data/installer/core/public/robots.txt +5 -0
- data/installer/core/test/controllers/admin_controller_test.rb +11 -0
- data/installer/core/test/controllers/errors_controller_test.rb +24 -0
- data/installer/core/test/controllers/frontend_controller_test.rb +9 -0
- data/installer/core/test/controllers/fronts_controller_test.rb +49 -0
- data/installer/core/test/controllers/meta_tags_controller_test.rb +49 -0
- data/installer/core/test/controllers/scaffolds_controller_test.rb +49 -0
- data/installer/core/test/controllers/scripts_controller_test.rb +49 -0
- data/installer/core/test/controllers/settings_controller_test.rb +49 -0
- data/installer/core/test/controllers/users_controller_test.rb +18 -0
- data/installer/core/test/fixtures/appearances.yml +11 -0
- data/installer/core/test/fixtures/caches.yml +7 -0
- data/installer/core/test/fixtures/fronts.yml +7 -0
- data/installer/core/test/fixtures/google_adwords.yml +13 -0
- data/installer/core/test/fixtures/google_analytics_settings.yml +13 -0
- data/installer/core/test/fixtures/meta_tags.yml +13 -0
- data/installer/core/test/fixtures/roles.yml +11 -0
- data/installer/core/test/fixtures/scaffolds.yml +9 -0
- data/installer/core/test/fixtures/scripts.yml +11 -0
- data/installer/core/test/fixtures/settings.yml +13 -0
- data/installer/core/test/fixtures/smtp_settings.yml +17 -0
- data/installer/core/test/fixtures/social_accounts.yml +39 -0
- data/installer/core/test/fixtures/users.yml +10 -0
- data/installer/core/test/helpers/admin_helper_test.rb +4 -0
- data/installer/core/test/helpers/frontend_helper_test.rb +4 -0
- data/installer/core/test/mailers/application_mailer_test.rb +7 -0
- data/installer/core/test/mailers/previews/application_mailer_preview.rb +4 -0
- data/installer/core/test/models/apparence_test.rb +7 -0
- data/installer/core/test/models/cache_test.rb +7 -0
- data/installer/core/test/models/front_test.rb +7 -0
- data/installer/core/test/models/google_analytics_setting_test.rb +7 -0
- data/installer/core/test/models/meta_tag_test.rb +7 -0
- data/installer/core/test/models/role_test.rb +7 -0
- data/installer/core/test/models/scaffold_test.rb +7 -0
- data/installer/core/test/models/script_test.rb +7 -0
- data/installer/core/test/models/setting_test.rb +7 -0
- data/installer/core/test/models/smtp_setting_test.rb +7 -0
- data/installer/core/test/models/social_account_test.rb +7 -0
- data/installer/core/test/models/user_test.rb +7 -0
- data/installer/core/test/test_helper.rb +16 -0
- data/installer/core/vendor/assets/javascripts/bounce.min.js +5 -0
- data/installer/db_conf/conf.yml +50 -0
- data/installer/lib/conf.rb +31 -0
- data/installer/lib/scaffold.rb +10 -0
- data/installer/run.sh +19 -0
- data/installer/scripts/bin.sh +61 -0
- data/lib/keppler.rb +7 -0
- data/lib/keppler/cli.rb +12 -0
- data/lib/keppler/cli/generate.rb +19 -0
- data/lib/keppler/version.rb +3 -0
- metadata +497 -0
@@ -0,0 +1,23 @@
|
|
1
|
+
module App
|
2
|
+
# AppController -> Controller out the back-office
|
3
|
+
class AppController < ::ApplicationController
|
4
|
+
layout 'app/layouts/application'
|
5
|
+
before_action :set_metas
|
6
|
+
before_action :set_analytics
|
7
|
+
|
8
|
+
def set_metas
|
9
|
+
@setting = Setting.first
|
10
|
+
@title = @setting.name
|
11
|
+
@description = @setting.description
|
12
|
+
@favicon = @setting.favicon
|
13
|
+
@meta = MetaTag.get_by_url(request.url)
|
14
|
+
@social = SocialAccount.last
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def set_analytics
|
20
|
+
@scripts = Script.all
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,96 @@
|
|
1
|
+
# ApplicationControlller -> Controller base this application
|
2
|
+
class ApplicationController < ActionController::Base
|
3
|
+
# Prevent CSRF attacks by raising an exception.
|
4
|
+
# For APIs, you may want to use :null_session instead.
|
5
|
+
layout :layout_by_resource
|
6
|
+
before_action :configure_permitted_parameters, if: :devise_controller?
|
7
|
+
before_action :appearance
|
8
|
+
before_action :set_apparience_colors
|
9
|
+
before_action :set_sidebar
|
10
|
+
skip_around_action :set_locale_from_url
|
11
|
+
include Pundit
|
12
|
+
include PublicActivity::StoreController
|
13
|
+
include AdminHelper
|
14
|
+
|
15
|
+
rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized
|
16
|
+
# rescue_from Faraday::ConnectionFailed do |error|
|
17
|
+
# redirect_to main_app.admin_users_path, notice: "Sin conexión a internet"
|
18
|
+
# end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def user_not_authorized
|
23
|
+
flash[:alert] = "No tienes permiso para realizar esa acción"
|
24
|
+
redirect_to(request.referrer || root_path)
|
25
|
+
end
|
26
|
+
# block access dashboard
|
27
|
+
def dashboard_access
|
28
|
+
roles = Role.all.map {|x| x.name}
|
29
|
+
unless !user_signed_in? || roles.include?(current_user.rol)
|
30
|
+
raise CanCan::AccessDenied.new(
|
31
|
+
t('keppler.messages.not_authorized_page'), :index, :dashboard
|
32
|
+
)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def set_sidebar
|
37
|
+
@sidebar = YAML.load_file(
|
38
|
+
"#{Rails.root}/config/menu.yml"
|
39
|
+
).values.each(&:symbolize_keys!)
|
40
|
+
modules = Dir[File.join("#{Rails.root}/plugins", '*')]
|
41
|
+
modules.each do |m|
|
42
|
+
module_menu = YAML.load_file(
|
43
|
+
"#{m}/config/menu.yml"
|
44
|
+
).values.each(&:symbolize_keys!)
|
45
|
+
@sidebar[0] = @sidebar[0].merge(module_menu[0])
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def appearance
|
50
|
+
@appearance = Setting.first.appearance
|
51
|
+
end
|
52
|
+
|
53
|
+
def set_apparience_colors
|
54
|
+
variables_file = File.readlines(style_file)
|
55
|
+
@color = ""
|
56
|
+
variables_file.each { |line| @color = line[15..21] if line.include?('$keppler-color') }
|
57
|
+
end
|
58
|
+
|
59
|
+
def style_file
|
60
|
+
"#{Rails.root}/app/assets/stylesheets/admin/utils/_variables.scss"
|
61
|
+
end
|
62
|
+
|
63
|
+
def get_history(model)
|
64
|
+
@activities = PublicActivity::Activity.where(
|
65
|
+
trackable_type: model.to_s
|
66
|
+
).order('created_at desc').limit(50)
|
67
|
+
end
|
68
|
+
|
69
|
+
protected
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
def configure_permitted_parameters
|
74
|
+
RUBY_VERSION < "2.2.0" ? devise_old : devise_new
|
75
|
+
end
|
76
|
+
|
77
|
+
def layout_by_resource
|
78
|
+
'admin/layouts/application' if devise_controller?
|
79
|
+
end
|
80
|
+
|
81
|
+
def devise_new
|
82
|
+
devise_parameter_sanitizer.permit(:sign_up, keys: [:name, :email, :password, :password_confirmation])
|
83
|
+
devise_parameter_sanitizer.permit(:account_update, keys: [:name, :email, :password, :password_confirmation])
|
84
|
+
end
|
85
|
+
|
86
|
+
def devise_old
|
87
|
+
devise_parameter_sanitizer.for(:sign_up) do |u|
|
88
|
+
u.permit(:name, :email, :password, :password_confirmation)
|
89
|
+
end
|
90
|
+
devise_parameter_sanitizer.for(:account_update) do |u|
|
91
|
+
u.permit(:name, :email, :password, :password_confirmation,
|
92
|
+
:current_password)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
end
|
@@ -0,0 +1,104 @@
|
|
1
|
+
# Devise module authenticate
|
2
|
+
module Devise
|
3
|
+
# SessionsController
|
4
|
+
class SessionsController < DeviseController
|
5
|
+
prepend_before_action :require_no_authentication, only: [:new, :create]
|
6
|
+
prepend_before_action :allow_params_authentication!, only: :create
|
7
|
+
prepend_before_action :verify_signed_out_user, only: :destroy
|
8
|
+
prepend_before_action :session_history, only: [:create, :destroy]
|
9
|
+
prepend_before_action only: [:create, :destroy] do
|
10
|
+
request.env['devise.skip_timeout'] = true
|
11
|
+
end
|
12
|
+
|
13
|
+
# GET /resource/sign_in
|
14
|
+
def new
|
15
|
+
self.resource = resource_class.new(sign_in_params)
|
16
|
+
clean_up_passwords(resource)
|
17
|
+
yield resource if block_given?
|
18
|
+
respond_with(resource, serialize_options(resource))
|
19
|
+
end
|
20
|
+
|
21
|
+
# POST /resource/sign_in
|
22
|
+
def create
|
23
|
+
self.resource = warden.authenticate!(auth_options)
|
24
|
+
set_flash_message(:notice, :signed_in) if is_flashing_format?
|
25
|
+
sign_in(resource_name, resource)
|
26
|
+
yield resource if block_given?
|
27
|
+
respond_with resource, location: after_sign_in_path_for(resource)
|
28
|
+
end
|
29
|
+
|
30
|
+
# DELETE /resource/sign_out
|
31
|
+
def destroy
|
32
|
+
signed_out =
|
33
|
+
(Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name))
|
34
|
+
if signed_out && is_flashing_format?
|
35
|
+
set_flash_message :notice, :signed_out
|
36
|
+
end
|
37
|
+
yield if block_given?
|
38
|
+
respond_to_on_destroy
|
39
|
+
end
|
40
|
+
|
41
|
+
protected
|
42
|
+
|
43
|
+
def sign_in_params
|
44
|
+
devise_parameter_sanitizer.sanitize(:sign_in)
|
45
|
+
end
|
46
|
+
|
47
|
+
def serialize_options(resource)
|
48
|
+
methods = resource_class.authentication_keys.dup
|
49
|
+
methods = methods.keys if methods.is_a?(Hash)
|
50
|
+
methods << :password if resource.respond_to?(:password)
|
51
|
+
{ methods: methods, only: [:password] }
|
52
|
+
end
|
53
|
+
|
54
|
+
def auth_options
|
55
|
+
{ scope: resource_name, recall: "#{controller_path}#new" }
|
56
|
+
end
|
57
|
+
|
58
|
+
def translation_scope
|
59
|
+
'devise.sessions'
|
60
|
+
end
|
61
|
+
|
62
|
+
private
|
63
|
+
|
64
|
+
# Check if there is no signed in user before doing the sign out.
|
65
|
+
#
|
66
|
+
# If there is no signed in user, it will set the flash message and redirect
|
67
|
+
# to the after_sign_out path.
|
68
|
+
def verify_signed_out_user
|
69
|
+
if all_signed_out?
|
70
|
+
set_flash_message :notice, :already_signed_out if is_flashing_format?
|
71
|
+
|
72
|
+
respond_to_on_destroy
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
def all_signed_out?
|
77
|
+
users = Devise.mappings.keys.map do |s|
|
78
|
+
warden.user(scope: s, run_callbacks: false)
|
79
|
+
end
|
80
|
+
|
81
|
+
users.all?(&:blank?)
|
82
|
+
end
|
83
|
+
|
84
|
+
# Create history to session
|
85
|
+
def session_history
|
86
|
+
PublicActivity::Activity.create(
|
87
|
+
trackable_type: controller_name.singularize.humanize,
|
88
|
+
key: "#{controller_name.singularize.downcase}.#{action_name}",
|
89
|
+
owner: current_user
|
90
|
+
)
|
91
|
+
end
|
92
|
+
|
93
|
+
def respond_to_on_destroy
|
94
|
+
# We actually need to hardcode this as Rails default responder doesn't
|
95
|
+
# support returning empty response on GET request
|
96
|
+
respond_to do |format|
|
97
|
+
format.all { head :no_content }
|
98
|
+
format.any(*navigational_formats) do
|
99
|
+
redirect_to after_sign_out_path_for(resource_name)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# ErrorsController -> Controller to redirect error pages
|
2
|
+
class ErrorsController < ApplicationController
|
3
|
+
layout 'errors/application'
|
4
|
+
def not_authorized
|
5
|
+
respond_error 'errors/not_authorized', 403
|
6
|
+
end
|
7
|
+
|
8
|
+
def not_found
|
9
|
+
respond_error 'errors/not_found', 404
|
10
|
+
end
|
11
|
+
|
12
|
+
def unprocessable
|
13
|
+
respond_error 'errors/unprocessable', 422
|
14
|
+
end
|
15
|
+
|
16
|
+
def internal_server_error
|
17
|
+
respond_error 'errors/internal_server_error', 500
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def respond_error(template, status)
|
23
|
+
respond_to do |format|
|
24
|
+
format.html { render template: template, status: status }
|
25
|
+
format.all { render nothing: true, status: status }
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,117 @@
|
|
1
|
+
# AdminHelper Backoffice
|
2
|
+
module AdminHelper
|
3
|
+
def preloader
|
4
|
+
render "admin/layouts/preloader"
|
5
|
+
end
|
6
|
+
|
7
|
+
# Header information dinamic in keppler back-office
|
8
|
+
def header_information(&block)
|
9
|
+
content_for(:header_information) { capture(&block) }
|
10
|
+
end
|
11
|
+
|
12
|
+
# True if the index action of keppler
|
13
|
+
def listing?
|
14
|
+
action_name.to_sym.eql?(:index)
|
15
|
+
end
|
16
|
+
|
17
|
+
# True if the setting controller of keppler
|
18
|
+
def settings_path?
|
19
|
+
controller_name.eql?('settings')
|
20
|
+
end
|
21
|
+
|
22
|
+
# Classify a model from a controller
|
23
|
+
def model
|
24
|
+
klass = controller_path.include?('admin') ? controller_name : controller_path
|
25
|
+
klass.classify.constantize
|
26
|
+
end
|
27
|
+
|
28
|
+
# Underscore class_name from a object
|
29
|
+
def underscore(object)
|
30
|
+
object.class.to_s.underscore
|
31
|
+
end
|
32
|
+
|
33
|
+
# Messages for the crud actions
|
34
|
+
def actions_messages(object)
|
35
|
+
t("keppler.messages.successfully.#{action_convert_to_locale}",
|
36
|
+
model: t("keppler.models.singularize.#{underscore(object)}").humanize)
|
37
|
+
end
|
38
|
+
|
39
|
+
def entries(total, objects)
|
40
|
+
unless total.zero?
|
41
|
+
content_tag :div, class: 'badge objects-counter', style: "margin-bottom: 0 10px" do
|
42
|
+
content_tag :span, class: 'span' do
|
43
|
+
message(total, objects)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def search_model
|
50
|
+
klass = controller_path.split('/')
|
51
|
+
klass.delete("admin")
|
52
|
+
klass = klass.join('/')
|
53
|
+
klass.classify.constantize.search_field
|
54
|
+
end
|
55
|
+
|
56
|
+
private
|
57
|
+
|
58
|
+
# ------------ preload
|
59
|
+
def spinner_layer(_color)
|
60
|
+
content_tag :div, class: 'spinner-layer spinner-#{color}' do
|
61
|
+
clipper('left') + gap_path + clipper('right')
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def clipper(direction)
|
66
|
+
content_tag(
|
67
|
+
:div,
|
68
|
+
content_tag(:div, nil, class: 'circle'),
|
69
|
+
class: "circle-clipper #{direction}"
|
70
|
+
)
|
71
|
+
end
|
72
|
+
|
73
|
+
def gap_path
|
74
|
+
content_tag(
|
75
|
+
:div,
|
76
|
+
content_tag(:div, nil, class: 'circle'),
|
77
|
+
class: 'gap-path'
|
78
|
+
)
|
79
|
+
end
|
80
|
+
# ------------ preload
|
81
|
+
|
82
|
+
# ------------ action_message
|
83
|
+
def action_convert_to_locale
|
84
|
+
case action_name
|
85
|
+
when 'create' then 'created'
|
86
|
+
when 'update' then 'updated'
|
87
|
+
when 'destroy' then 'deleted'
|
88
|
+
when 'destroy_multiple' then 'removed'
|
89
|
+
end
|
90
|
+
end
|
91
|
+
# ------------ action_message
|
92
|
+
|
93
|
+
# ------------ entries
|
94
|
+
def message(total, objects)
|
95
|
+
if objects.first_page?
|
96
|
+
t('keppler.messages.record_msg', from: 1, to: objects.size, total: total)
|
97
|
+
elsif objects.last_page?
|
98
|
+
t('keppler.messages.record_msg',
|
99
|
+
from: from(objects), to: total, total: total)
|
100
|
+
else
|
101
|
+
t('keppler.messages.record_msg',
|
102
|
+
from: from(objects), to: to(objects), total: total)
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
# Calculate number that begins the page
|
107
|
+
def from(objects)
|
108
|
+
((objects.current_page * objects.default_per_page) -
|
109
|
+
objects.default_per_page) + 1
|
110
|
+
end
|
111
|
+
|
112
|
+
# Calculate the number that ends the page
|
113
|
+
def to(objects)
|
114
|
+
objects.current_page * objects.default_per_page
|
115
|
+
end
|
116
|
+
# ------------ entries
|
117
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# ApplicationHelper -> Helpers base
|
2
|
+
module ApplicationHelper
|
3
|
+
# Title dinamic in all keppler
|
4
|
+
def title(page_title)
|
5
|
+
content_for(:title) { page_title }
|
6
|
+
end
|
7
|
+
|
8
|
+
# Meta Descriotion dinamic in all keppler
|
9
|
+
def meta_description(page_description)
|
10
|
+
content_for(:description) { page_description }
|
11
|
+
end
|
12
|
+
|
13
|
+
# True if a user is logged
|
14
|
+
def loggedin?
|
15
|
+
current_user
|
16
|
+
end
|
17
|
+
|
18
|
+
def landing?
|
19
|
+
controller_name.eql?('front') && action_name.eql?('index')
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# CheckboxMaterialInput
|
2
|
+
class CheckboxMaterialInput < SimpleForm::Inputs::Base
|
3
|
+
def input(wrapper_options = nil)
|
4
|
+
merged_input_options =
|
5
|
+
merge_wrapper_options(input_html_options, wrapper_options)
|
6
|
+
|
7
|
+
if nested_boolean_style?
|
8
|
+
build_hidden_field_for_checkbox +
|
9
|
+
build_check_box_without_hidden_field(merged_input_options) +
|
10
|
+
inline_label
|
11
|
+
else
|
12
|
+
build_check_box(unchecked_value, merged_input_options)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
# Build a checkbox tag using default unchecked value. This allows us to
|
19
|
+
# reuse the method for nested boolean style, but with no unchecked value,
|
20
|
+
# which won't generate the hidden checkbox. This is the default functionality
|
21
|
+
# in Rails > 3.2.1, and is backported in SimpleForm AV helpers.
|
22
|
+
def build_check_box(unchecked_value, options)
|
23
|
+
@builder.check_box(attribute_name, options, checked_value, unchecked_value)
|
24
|
+
end
|
25
|
+
|
26
|
+
# Build a checkbox without generating the hidden field. See
|
27
|
+
# #build_hidden_field_for_checkbox for more info.
|
28
|
+
def build_check_box_without_hidden_field(options)
|
29
|
+
build_check_box(nil, options)
|
30
|
+
end
|
31
|
+
|
32
|
+
# Create a hidden field for the current checkbox, so we can simulate Rails
|
33
|
+
# functionality with hidden + checkbox, but under a nested context, where
|
34
|
+
# we need the hidden field to be *outside* the label (otherwise it
|
35
|
+
# generates invalid html - html5 only).
|
36
|
+
def build_hidden_field_for_checkbox
|
37
|
+
options = {
|
38
|
+
value: unchecked_value,
|
39
|
+
id: nil,
|
40
|
+
disabled: input_html_options[:disabled]
|
41
|
+
}
|
42
|
+
|
43
|
+
options[:name] = input_html_options[:name] if input_html_options.key?(:name)
|
44
|
+
|
45
|
+
@builder.hidden_field(attribute_name, options)
|
46
|
+
end
|
47
|
+
|
48
|
+
def inline_label?
|
49
|
+
nested_boolean_style? && options[:inline_label]
|
50
|
+
end
|
51
|
+
|
52
|
+
def inline_label
|
53
|
+
inline_option = options[:inline_label]
|
54
|
+
|
55
|
+
if inline_option
|
56
|
+
label = inline_option == true ? label_text : html_escape(inline_option)
|
57
|
+
" #{label}".html_safe
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# Booleans are not required by default because in most of the cases
|
62
|
+
# it makes no sense marking them as required. The only exception is
|
63
|
+
# Terms of Use usually presented at most sites sign up screen.
|
64
|
+
def required_by_default?
|
65
|
+
false
|
66
|
+
end
|
67
|
+
|
68
|
+
def checked_value
|
69
|
+
options.fetch(:checked_value, '1')
|
70
|
+
end
|
71
|
+
|
72
|
+
def unchecked_value
|
73
|
+
options.fetch(:unchecked_value, '0')
|
74
|
+
end
|
75
|
+
end
|