optimacms_options 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +20 -20
- data/Rakefile +37 -37
- data/app/assets/javascripts/optimacms_options/application.js +13 -13
- data/app/assets/stylesheets/optimacms_options/application.css +15 -15
- data/app/controllers/optimacms_options/admin/options_controller.rb +161 -161
- data/app/helpers/optimacms_options/application_helper.rb +4 -4
- data/app/helpers/optimacms_options/filter_helper.rb +17 -17
- data/app/views/layouts/optimacms_options/application.html.erb +14 -14
- data/app/views/optimacms_options/admin/options/_form.html.haml +16 -16
- data/app/views/optimacms_options/admin/options/edit.html.haml +2 -2
- data/app/views/optimacms_options/admin/options/index.html.haml +41 -41
- data/app/views/optimacms_options/admin/options/new.html.haml +2 -2
- data/config/routes.rb +13 -13
- data/db/migrate/20160125141700_optimacms_options.rb +16 -16
- data/lib/optimacms/admin_menu/admin_menu.rb +22 -22
- data/lib/optimacms_options.rb +6 -6
- data/lib/optimacms_options/engine.rb +38 -38
- data/lib/optimacms_options/version.rb +3 -3
- data/lib/tasks/optimacms_options_tasks.rake +4 -4
- data/spec/dummy/README.rdoc +28 -28
- data/spec/dummy/Rakefile +6 -6
- data/spec/dummy/app/assets/javascripts/application.js +13 -13
- data/spec/dummy/app/assets/stylesheets/application.css +15 -15
- data/spec/dummy/app/controllers/application_controller.rb +5 -5
- data/spec/dummy/app/controllers/debug_controller.rb +38 -38
- data/spec/dummy/app/helpers/application_helper.rb +2 -2
- data/spec/dummy/app/models/concerns/option_concern.rb +11 -11
- data/spec/dummy/app/views/layouts/application.html.erb +14 -14
- data/spec/dummy/bin/bundle +3 -3
- data/spec/dummy/bin/rails +4 -4
- data/spec/dummy/bin/rake +4 -4
- data/spec/dummy/bin/setup +29 -29
- data/spec/dummy/config.ru +4 -4
- data/spec/dummy/config/application.rb +36 -36
- data/spec/dummy/config/boot.rb +5 -5
- data/spec/dummy/config/database.yml +43 -43
- data/spec/dummy/config/environment.rb +5 -5
- data/spec/dummy/config/environments/development.rb +41 -41
- data/spec/dummy/config/environments/production.rb +79 -79
- data/spec/dummy/config/environments/test.rb +42 -42
- data/spec/dummy/config/initializers/assets.rb +11 -11
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -7
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -3
- data/spec/dummy/config/initializers/devise.rb +265 -265
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -4
- data/spec/dummy/config/initializers/inflections.rb +16 -16
- data/spec/dummy/config/initializers/kaminari_config.rb +10 -10
- data/spec/dummy/config/initializers/mime_types.rb +4 -4
- data/spec/dummy/config/initializers/redis.rb +1 -1
- data/spec/dummy/config/initializers/session_store.rb +3 -3
- data/spec/dummy/config/initializers/simple_form.rb +166 -166
- data/spec/dummy/config/initializers/simple_form_bootstrap.rb +136 -136
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -14
- data/spec/dummy/config/locales/devise.en.yml +62 -62
- data/spec/dummy/config/locales/en.yml +23 -23
- data/spec/dummy/config/routes.rb +18 -18
- data/spec/dummy/config/secrets.yml +25 -25
- data/spec/dummy/db/schema.rb +176 -176
- data/spec/dummy/lib/optimacms/admin_menu/admin_menu.rb +22 -22
- data/spec/dummy/public/404.html +67 -67
- data/spec/dummy/public/422.html +67 -67
- data/spec/dummy/public/500.html +66 -66
- metadata +49 -297
- data/spec/dummy/log/development.log +0 -1747
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_alerts.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_badges.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_breadcrumbs.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_button-groups.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_buttons.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_carousel.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_close.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_code.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_component-animations.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_dropdowns.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_forms.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_glyphicons.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_grid.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_input-groups.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_jumbotron.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_labels.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_list-group.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_media.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_mixins.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_modals.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_navbar.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_navs.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_normalize.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_pager.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_pagination.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_panels.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_popovers.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_print.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_progress-bars.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_responsive-embed.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_responsive-utilities.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_scaffolding.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_tables.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_thumbnails.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_tooltip.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_type.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_utilities.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_variables.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/11fce54630aed915261742acbd0ef3a1c7b4161a/_wells.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_alerts.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_background-variant.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_border-radius.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_buttons.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_center-block.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_clearfix.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_forms.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_gradients.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_grid-framework.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_grid.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_hide-text.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_image.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_labels.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_list-group.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_nav-divider.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_nav-vertical-align.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_opacity.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_pagination.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_panels.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_progress-bar.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_reset-filter.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_resize.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_responsive-visibility.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_size.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_tab-focus.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_table-row.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_text-emphasis.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_text-overflow.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6c7690d238f175bfb8aa999e56e1f4350201abb4/_vendor-prefixes.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/6ed128e433a3e2eab57ed9ae5f432cbab6ca4167/font-awesome.css.erbc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/a47a571d26f40d72e4497e6da07dd683983a63b9/noskin.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c45ecb3d10649195657aa8f13c46899f656eedcf/admin.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c45ecb3d10649195657aa8f13c46899f656eedcf/admin_tpl.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c45ecb3d10649195657aa8f13c46899f656eedcf/bootstrap_and_overrides.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c45ecb3d10649195657aa8f13c46899f656eedcf/bootstrap_custom.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c45ecb3d10649195657aa8f13c46899f656eedcf/bootstrap_variables.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c45ecb3d10649195657aa8f13c46899f656eedcf/colors.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c45ecb3d10649195657aa8f13c46899f656eedcf/tpl.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0096b3abe9e696ba1341fdf5fc943c43 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/036aa2938b562b210d90b02a48a2cbbf +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/053f826d1ea01a2fac355de0755e5c40 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/15445a0686472faa0d404f3919935868 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2a215b5ed77dc9f1cdf1e93604bb281f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/322158d4d6be6b20fdcd9adaeb41f1b0 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/3240ef40c1dc9d13156bbd790ec2651a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4d46ce1560a6be13a9a86127383a6c42 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4fabda5d21695272630e1d224064b588 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/529a74a4530de52f6c3ebbf107ffe9f2 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/599b9a466c30f973de55b377f6dcb8a6 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/5ed2698a8f2e14313e56bf216cfc9e7c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/620684c8c287dfd4094c2d0fa732e283 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/648b944dea9bf325c0b7b1fb075d5e96 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6a506ac52ade0ada16f4ecd5d70b66dd +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6cdbd6f171a27a578bcb07dd5bfa83a2 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6f943f22c610e6417422e4a13e0bcc0d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/721d6e4f84789fa4fb35457b69eb67e5 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/7bcf8e631c4c6ef1a9309400ed610ae1 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/894825d33594984b9a26a8f644e96e35 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8956737a82f17db48d50e13f133aeefc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8b5a7992567ebbeb9a882d074778f8c8 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8fb08f5d6d8bcb39342d301caa95dd87 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/91dc3111b0d2d688aba1712ab9c878e4 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/936470113fbeb58b0a37b52fdb9f3c95 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/96ef3c76fae58b20328b26b5761ca751 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/99e8d6370ba85ec4a61d953f5ed261af +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9f98a530db67f63b82a81de07801a697 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a64dbcf0e4afe0985b1abd3e209d17cd +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/aa58fb159780a7200a1bc4c6844cc5c4 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ab7af7f8d44858097315fccf3f3a76bb +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/abee703ecf82928fbab34c8117189711 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b1e06f52048dca656cfc1545c6da0e98 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b7aa181369305785a973d277de1e9a53 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b84b563223b407a2d395e45b8bc15177 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b9e034dd819b5d19e1f00e65f18a4148 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ba9859d0d2b7d4d7d5b03ff3a71ed478 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/bcf32667baee4291094d671b6525f7bf +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c0218f3ef5e0a446b2092df205929cf4 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c9a04033390864f7e3a7896cd11e069e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/db10255455c9ddf7ba65c112e8e4ccac +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e3dd086dd858b5bff9cfd60a031c2091 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e826b33ffd3a105771116e5fe8794059 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e9004898ce4a96e3ffdef8248b6f634a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/fa7a436598a15595baac05d3bc35c469 +0 -0
- data/spec/dummy/tmp/pids/server.pid +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfced2a1eb6cba4ad3cc58f3b06970288201f859
|
4
|
+
data.tar.gz: eb8ebf52c3321f3c2c09a5d37757ff7761ea00bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bac9bd2902a35773f1a6135cd3e7a6f2b135326f4cfdf6b98ee10fcdedcea3329b0e2fa252e99d17eacd9f8799a675cae1b57fb11a430b5a4d773832fb6b84a
|
7
|
+
data.tar.gz: 7d13ad227e0ba61adff23bb4981b266cb9b8e1f8b64cc812d57101b0d21cc1d4079cbbeec282a09b302183b2784a65da60564abc233c8bc9fae9bbd8c69faa1c
|
data/MIT-LICENSE
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
Copyright 2016 Max Ivak
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
-
a copy of this software and associated documentation files (the
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be
|
12
|
-
included in all copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1
|
+
Copyright 2016 Max Ivak
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
CHANGED
@@ -1,37 +1,37 @@
|
|
1
|
-
begin
|
2
|
-
require 'bundler/setup'
|
3
|
-
rescue LoadError
|
4
|
-
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
-
end
|
6
|
-
|
7
|
-
require 'rdoc/task'
|
8
|
-
|
9
|
-
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
-
rdoc.rdoc_dir = 'rdoc'
|
11
|
-
rdoc.title = 'OptimacmsOptions'
|
12
|
-
rdoc.options << '--line-numbers'
|
13
|
-
rdoc.rdoc_files.include('README.rdoc')
|
14
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
-
end
|
16
|
-
|
17
|
-
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
|
18
|
-
load 'rails/tasks/engine.rake'
|
19
|
-
|
20
|
-
|
21
|
-
load 'rails/tasks/statistics.rake'
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
Bundler::GemHelper.install_tasks
|
26
|
-
|
27
|
-
require 'rake/testtask'
|
28
|
-
|
29
|
-
Rake::TestTask.new(:test) do |t|
|
30
|
-
t.libs << 'lib'
|
31
|
-
t.libs << 'test'
|
32
|
-
t.pattern = 'test/**/*_test.rb'
|
33
|
-
t.verbose = false
|
34
|
-
end
|
35
|
-
|
36
|
-
|
37
|
-
task default: :test
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rdoc/task'
|
8
|
+
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
11
|
+
rdoc.title = 'OptimacmsOptions'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.rdoc')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
end
|
16
|
+
|
17
|
+
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
|
18
|
+
load 'rails/tasks/engine.rake'
|
19
|
+
|
20
|
+
|
21
|
+
load 'rails/tasks/statistics.rake'
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
Bundler::GemHelper.install_tasks
|
26
|
+
|
27
|
+
require 'rake/testtask'
|
28
|
+
|
29
|
+
Rake::TestTask.new(:test) do |t|
|
30
|
+
t.libs << 'lib'
|
31
|
+
t.libs << 'test'
|
32
|
+
t.pattern = 'test/**/*_test.rb'
|
33
|
+
t.verbose = false
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
task default: :test
|
@@ -1,13 +1,13 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
-
// listed below.
|
3
|
-
//
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
-
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
|
-
//
|
7
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// compiled file.
|
9
|
-
//
|
10
|
-
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
|
-
// about supported directives.
|
12
|
-
//
|
13
|
-
//= require_tree .
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require_tree .
|
@@ -1,15 +1,15 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
-
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
-
* file per style scope.
|
12
|
-
*
|
13
|
-
*= require_tree .
|
14
|
-
*= require_self
|
15
|
-
*/
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
+
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
+
* file per style scope.
|
12
|
+
*
|
13
|
+
*= require_tree .
|
14
|
+
*= require_self
|
15
|
+
*/
|
@@ -1,161 +1,161 @@
|
|
1
|
-
class OptimacmsOptions::Admin::OptionsController < Optimacms::Admin::AdminBaseController
|
2
|
-
|
3
|
-
#include FilterHelper
|
4
|
-
|
5
|
-
# search
|
6
|
-
search_filter :index, {save_session: true, search_method: :post_and_redirect, url: :admin_options_url, search_url: :search_admin_options_url} do
|
7
|
-
default_order "id", 'desc'
|
8
|
-
|
9
|
-
# fields
|
10
|
-
field :name, :string, :text, {label: 'name', default_value: '', condition: :like_full, input_html: {style: "width: 240px"}}
|
11
|
-
end
|
12
|
-
|
13
|
-
|
14
|
-
def index
|
15
|
-
@items = Option.by_filter(@filter)
|
16
|
-
end
|
17
|
-
|
18
|
-
def new
|
19
|
-
@option = Option.new
|
20
|
-
end
|
21
|
-
|
22
|
-
def edit
|
23
|
-
@option = Option.find(params[:id])
|
24
|
-
end
|
25
|
-
|
26
|
-
def create
|
27
|
-
# input
|
28
|
-
@option = Option.new(option_params)
|
29
|
-
|
30
|
-
@res = @option.save
|
31
|
-
|
32
|
-
respond_to do |format|
|
33
|
-
if @res
|
34
|
-
|
35
|
-
format.html {
|
36
|
-
#redirect_to @user, notice: 'User was successfully created.'
|
37
|
-
redirect_to admin_options_path, notice: 'Congratulations! You just create option!'
|
38
|
-
}
|
39
|
-
|
40
|
-
else
|
41
|
-
format.html {
|
42
|
-
render :new
|
43
|
-
}
|
44
|
-
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
def update
|
50
|
-
@id = params[:id]
|
51
|
-
|
52
|
-
@option = Option.find(@id)
|
53
|
-
|
54
|
-
@res = @option.update(option_params)
|
55
|
-
|
56
|
-
respond_to do |format|
|
57
|
-
if @res
|
58
|
-
format.html {
|
59
|
-
redirect_to admin_options_path, notice: 'Congratulations! You just edit option!'
|
60
|
-
}
|
61
|
-
#format.json { render :show, status: :ok, location: @user }
|
62
|
-
else
|
63
|
-
format.html { render :edit }
|
64
|
-
#format.json { render json: @user.errors, status: :unprocessable_entity }
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
private
|
70
|
-
|
71
|
-
def option_params
|
72
|
-
params.require(:option).permit(:name, :description, :title, :is_changed, :category, :value, :option_type)
|
73
|
-
end
|
74
|
-
#####################
|
75
|
-
|
76
|
-
=begin
|
77
|
-
def model
|
78
|
-
return Option
|
79
|
-
end
|
80
|
-
|
81
|
-
def model_list
|
82
|
-
Option
|
83
|
-
end
|
84
|
-
|
85
|
-
def url_list
|
86
|
-
options_url
|
87
|
-
end
|
88
|
-
|
89
|
-
def sym_model
|
90
|
-
return :option
|
91
|
-
end
|
92
|
-
|
93
|
-
def index
|
94
|
-
|
95
|
-
# get
|
96
|
-
@items = model_list.all
|
97
|
-
|
98
|
-
end
|
99
|
-
|
100
|
-
def show
|
101
|
-
id = params[:id].to_i || 0
|
102
|
-
@item = model_list.find(id)
|
103
|
-
|
104
|
-
end
|
105
|
-
|
106
|
-
def new
|
107
|
-
@item = model_list.new
|
108
|
-
|
109
|
-
respond_to do |format|
|
110
|
-
format.html {
|
111
|
-
#render 'new'
|
112
|
-
}
|
113
|
-
format.json {
|
114
|
-
render json: @item
|
115
|
-
}
|
116
|
-
end
|
117
|
-
end
|
118
|
-
|
119
|
-
def edit
|
120
|
-
id = params[:id].to_i || 0
|
121
|
-
@item = model_list.find(id)
|
122
|
-
end
|
123
|
-
|
124
|
-
def create
|
125
|
-
@item = model_list.new(params[sym_model])
|
126
|
-
|
127
|
-
respond_to do |format|
|
128
|
-
#flash[:notice] = 'Saved'
|
129
|
-
|
130
|
-
if @item.save
|
131
|
-
format.html {
|
132
|
-
redirect_to url_list, notice:'Saved'
|
133
|
-
}
|
134
|
-
format.json {
|
135
|
-
render json: @item, status: :created, location: url_list
|
136
|
-
}
|
137
|
-
else
|
138
|
-
format.html { render action: "new" }
|
139
|
-
format.json { render json: @item.errors, status: :unprocessable_entity }
|
140
|
-
end
|
141
|
-
end
|
142
|
-
end
|
143
|
-
|
144
|
-
def update
|
145
|
-
id = params[:id].to_i || 0
|
146
|
-
@item = model_list.find(id)
|
147
|
-
|
148
|
-
if @item.update_attributes(params[sym_model])
|
149
|
-
redirect_to url_list, notice: 'Saved'
|
150
|
-
else
|
151
|
-
render action: "edit"
|
152
|
-
end
|
153
|
-
end
|
154
|
-
|
155
|
-
def destroy
|
156
|
-
model_list.find(params[:id]).destroy
|
157
|
-
redirect_to url_list, :flash => { :success => "Deleted" }
|
158
|
-
end
|
159
|
-
=end
|
160
|
-
end
|
161
|
-
|
1
|
+
class OptimacmsOptions::Admin::OptionsController < Optimacms::Admin::AdminBaseController
|
2
|
+
|
3
|
+
#include FilterHelper
|
4
|
+
|
5
|
+
# search
|
6
|
+
search_filter :index, {save_session: true, search_method: :post_and_redirect, url: :admin_options_url, search_url: :search_admin_options_url} do
|
7
|
+
default_order "id", 'desc'
|
8
|
+
|
9
|
+
# fields
|
10
|
+
field :name, :string, :text, {label: 'name', default_value: '', condition: :like_full, input_html: {style: "width: 240px"}}
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
def index
|
15
|
+
@items = Option.by_filter(@filter)
|
16
|
+
end
|
17
|
+
|
18
|
+
def new
|
19
|
+
@option = Option.new
|
20
|
+
end
|
21
|
+
|
22
|
+
def edit
|
23
|
+
@option = Option.find(params[:id])
|
24
|
+
end
|
25
|
+
|
26
|
+
def create
|
27
|
+
# input
|
28
|
+
@option = Option.new(option_params)
|
29
|
+
|
30
|
+
@res = @option.save
|
31
|
+
|
32
|
+
respond_to do |format|
|
33
|
+
if @res
|
34
|
+
|
35
|
+
format.html {
|
36
|
+
#redirect_to @user, notice: 'User was successfully created.'
|
37
|
+
redirect_to admin_options_path, notice: 'Congratulations! You just create option!'
|
38
|
+
}
|
39
|
+
|
40
|
+
else
|
41
|
+
format.html {
|
42
|
+
render :new
|
43
|
+
}
|
44
|
+
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def update
|
50
|
+
@id = params[:id]
|
51
|
+
|
52
|
+
@option = Option.find(@id)
|
53
|
+
|
54
|
+
@res = @option.update(option_params)
|
55
|
+
|
56
|
+
respond_to do |format|
|
57
|
+
if @res
|
58
|
+
format.html {
|
59
|
+
redirect_to admin_options_path, notice: 'Congratulations! You just edit option!'
|
60
|
+
}
|
61
|
+
#format.json { render :show, status: :ok, location: @user }
|
62
|
+
else
|
63
|
+
format.html { render :edit }
|
64
|
+
#format.json { render json: @user.errors, status: :unprocessable_entity }
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
private
|
70
|
+
|
71
|
+
def option_params
|
72
|
+
params.require(:option).permit(:name, :description, :title, :is_changed, :category, :value, :option_type)
|
73
|
+
end
|
74
|
+
#####################
|
75
|
+
|
76
|
+
=begin
|
77
|
+
def model
|
78
|
+
return Option
|
79
|
+
end
|
80
|
+
|
81
|
+
def model_list
|
82
|
+
Option
|
83
|
+
end
|
84
|
+
|
85
|
+
def url_list
|
86
|
+
options_url
|
87
|
+
end
|
88
|
+
|
89
|
+
def sym_model
|
90
|
+
return :option
|
91
|
+
end
|
92
|
+
|
93
|
+
def index
|
94
|
+
|
95
|
+
# get
|
96
|
+
@items = model_list.all
|
97
|
+
|
98
|
+
end
|
99
|
+
|
100
|
+
def show
|
101
|
+
id = params[:id].to_i || 0
|
102
|
+
@item = model_list.find(id)
|
103
|
+
|
104
|
+
end
|
105
|
+
|
106
|
+
def new
|
107
|
+
@item = model_list.new
|
108
|
+
|
109
|
+
respond_to do |format|
|
110
|
+
format.html {
|
111
|
+
#render 'new'
|
112
|
+
}
|
113
|
+
format.json {
|
114
|
+
render json: @item
|
115
|
+
}
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
def edit
|
120
|
+
id = params[:id].to_i || 0
|
121
|
+
@item = model_list.find(id)
|
122
|
+
end
|
123
|
+
|
124
|
+
def create
|
125
|
+
@item = model_list.new(params[sym_model])
|
126
|
+
|
127
|
+
respond_to do |format|
|
128
|
+
#flash[:notice] = 'Saved'
|
129
|
+
|
130
|
+
if @item.save
|
131
|
+
format.html {
|
132
|
+
redirect_to url_list, notice:'Saved'
|
133
|
+
}
|
134
|
+
format.json {
|
135
|
+
render json: @item, status: :created, location: url_list
|
136
|
+
}
|
137
|
+
else
|
138
|
+
format.html { render action: "new" }
|
139
|
+
format.json { render json: @item.errors, status: :unprocessable_entity }
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
def update
|
145
|
+
id = params[:id].to_i || 0
|
146
|
+
@item = model_list.find(id)
|
147
|
+
|
148
|
+
if @item.update_attributes(params[sym_model])
|
149
|
+
redirect_to url_list, notice: 'Saved'
|
150
|
+
else
|
151
|
+
render action: "edit"
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
def destroy
|
156
|
+
model_list.find(params[:id]).destroy
|
157
|
+
redirect_to url_list, :flash => { :success => "Deleted" }
|
158
|
+
end
|
159
|
+
=end
|
160
|
+
end
|
161
|
+
|