enjoy_cms 0.3.7.4 → 0.4.0.beta3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.ruby-version +1 -1
- data/Gemfile.lock +62 -111
- data/app/assets/javascripts/{enjoy_cms → enjoy/cms}/flash.coffee +0 -0
- data/app/assets/javascripts/enjoy/cms/init.coffee +1 -0
- data/app/assets/javascripts/{enjoy_cms → enjoy/cms}/map.coffee +0 -0
- data/app/assets/javascripts/enjoy/cms.coffee +11 -0
- data/app/assets/javascripts/enjoy/rails_admin/cms.ui.coffee +26 -0
- data/app/assets/javascripts/{enjoy_cms → enjoy}/rails_admin/custom/ui.coffee +0 -0
- data/app/assets/javascripts/rails_admin/custom/ui.coffee +2 -2
- data/app/assets/stylesheets/{enjoy_cms → enjoy/cms}/flash.sass +0 -0
- data/app/assets/stylesheets/{enjoy_cms → enjoy/cms}/normalize.scss +0 -0
- data/app/assets/stylesheets/{enjoy_cms → enjoy/cms}/powered.sass +0 -0
- data/app/assets/stylesheets/{enjoy_cms.sass → enjoy/cms.sass} +3 -1
- data/app/assets/stylesheets/enjoy/rails_admin/cms.ui.sass +117 -0
- data/{lib/enjoy/controllers/sitemap_data.rb → app/assets/stylesheets/enjoy/rails_admin/custom/ui.sass} +0 -0
- data/app/assets/stylesheets/rails_admin/custom/theming.sass +2 -0
- data/app/controllers/concerns/enjoy/errors.rb +1 -1
- data/app/controllers/enjoy/registrations_controller.rb +20 -0
- data/app/controllers/enjoy/sessions_controller.rb +19 -0
- data/app/helpers/enjoy/home_helper.rb +2 -0
- data/app/helpers/enjoy/powered_helper.rb +1 -1
- data/app/models/concerns/enjoy/html_field.rb +3 -0
- data/app/views/blocks/_favicon.html.slim +60 -21
- data/app/views/devise/registrations/edit.html.slim +2 -2
- data/app/views/devise/registrations/new.html.slim +9 -3
- data/app/views/devise/sessions/new.html.slim +8 -2
- data/app/views/devise/shared/_links.html.slim +4 -4
- data/app/views/{errors → enjoy/errors}/_base.html.slim +0 -0
- data/app/views/{errors → enjoy/errors}/error_403.html.slim +0 -0
- data/app/views/{errors → enjoy/errors}/error_404.html.slim +0 -0
- data/app/views/{errors → enjoy/errors}/error_500.html.slim +0 -0
- data/app/views/{simple_captcha → enjoy/simple_captcha}/_simple_captcha.html.slim +0 -0
- data/app/views/layouts/application.html.slim +8 -4
- data/app/views/layouts/enjoy/devise/confirmations.html.slim +27 -0
- data/app/views/layouts/enjoy/devise/passwords.html.slim +27 -0
- data/app/views/layouts/enjoy/devise/registrations.html.slim +27 -0
- data/app/views/layouts/enjoy/devise/sessions.html.slim +27 -0
- data/app/views/layouts/enjoy/devise/unlocks.html.slim +27 -0
- data/app/views/rails_admin/main/_setting_value.html.haml +104 -0
- data/app/views/shared/_messages.html.slim +1 -1
- data/config/initializers/simple_captcha.rb +29 -20
- data/config/locales/en.enjoy.yml +1 -1
- data/config/locales/ru.enjoy.yml +0 -7
- data/config/locales/ru.models.yml +2 -39
- data/enjoy_cms.gemspec +7 -20
- data/lib/enjoy/configuration.rb +24 -40
- data/lib/enjoy/controller.rb +5 -3
- data/lib/enjoy/engine.rb +28 -28
- data/lib/enjoy/migration.rb +0 -19
- data/lib/enjoy/model.rb +5 -2
- data/lib/enjoy/rails_admin_ext/config.rb +112 -0
- data/lib/enjoy/rails_admin_ext/enjoy_hash.rb +0 -2
- data/lib/enjoy/rails_admin_ext/enjoy_slugs.rb +31 -0
- data/lib/enjoy/rails_admin_ext/group_patch.rb +2 -1
- data/lib/enjoy/rails_admin_settings_patch.rb +7 -0
- data/lib/enjoy/routes.rb +1 -26
- data/lib/enjoy/version.rb +1 -1
- data/lib/enjoy_cms.rb +25 -71
- data/lib/filename_to_slug.rb +20 -22
- data/lib/generators/enjoy/{ability_generator.rb → cms/ability_generator.rb} +3 -3
- data/lib/generators/enjoy/{admin_generator.rb → cms/admin_generator.rb} +2 -2
- data/lib/generators/enjoy/cms/application_generator.rb +14 -0
- data/lib/generators/enjoy/cms/assets_generator.rb +35 -0
- data/lib/generators/enjoy/{config/install_generator.rb → cms/config_generator.rb} +3 -3
- data/lib/generators/enjoy/cms/gemfile_generator.rb +13 -0
- data/lib/generators/enjoy/{layout_generator.rb → cms/layout_generator.rb} +2 -2
- data/lib/generators/enjoy/cms/paperclip_optimizer_generator.rb +13 -0
- data/lib/generators/enjoy/cms/rack_generator.rb +12 -0
- data/lib/generators/enjoy/cms/robots_generator.rb +12 -0
- data/lib/generators/enjoy/cms/scripts_generator.rb +25 -0
- data/lib/generators/enjoy/cms/templates/Gemfile.erb +69 -0
- data/lib/generators/enjoy/cms/templates/ability.erb +45 -0
- data/lib/generators/enjoy/{templates → cms/templates}/admin.erb +5 -26
- data/lib/generators/enjoy/cms/templates/application.erb +42 -0
- data/lib/generators/enjoy/cms/templates/assets/javascripts/application.coffee.erb +1 -0
- data/lib/generators/enjoy/cms/templates/assets/stylesheets/application.sass.erb +15 -0
- data/lib/generators/enjoy/cms/templates/assets/stylesheets/enjoy/rails_admin/custom/ui.sass.erb +106 -0
- data/lib/generators/enjoy/cms/templates/enjoy_cms.erb +28 -0
- data/lib/generators/enjoy/cms/templates/paperclip_optimizer.erb +80 -0
- data/lib/generators/enjoy/cms/templates/rack.erb +15 -0
- data/lib/generators/enjoy/cms/templates/robots.txt.erb +4 -0
- data/lib/generators/enjoy/cms/templates/scripts/assets_precompile.sh +3 -0
- data/lib/generators/enjoy/cms/templates/scripts/bundle_production.sh +4 -0
- data/lib/generators/enjoy/cms/templates/scripts/db_dump.sh.erb +3 -0
- data/lib/generators/enjoy/cms/templates/scripts/db_restore.sh +3 -0
- data/lib/generators/enjoy/cms/templates/scripts/full_assets_precompile.sh +4 -0
- data/lib/generators/enjoy/cms/templates/scripts/restart_thru_kill.sh +3 -0
- data/lib/generators/enjoy/cms/templates/scripts/send_hup.sh +3 -0
- data/lib/generators/enjoy/cms/templates/scripts/send_usr2.sh +3 -0
- data/lib/generators/enjoy/cms/templates/unicorn.erb +57 -0
- data/lib/generators/enjoy/cms/templates/unicorn.god.erb +59 -0
- data/lib/generators/enjoy/cms/unicorn_god_generator.rb +15 -0
- data/lib/generators/enjoy/{utils.rb → cms/utils.rb} +1 -1
- data/lib/rails_admin/custom_show_in_app.rb +13 -13
- data/template.rb +197 -543
- metadata +73 -325
- data/app/assets/javascripts/enjoy_cms/contacts.coffee +0 -11
- data/app/assets/javascripts/enjoy_cms/rails_admin/cms.ui.coffee +0 -6
- data/app/assets/javascripts/enjoy_cms.coffee +0 -7
- data/app/controllers/concerns/enjoy/blocksetable.rb +0 -37
- data/app/controllers/concerns/enjoy/decorators/contacts.rb +0 -5
- data/app/controllers/concerns/enjoy/decorators/news.rb +0 -5
- data/app/controllers/concerns/enjoy/decorators/pages.rb +0 -5
- data/app/controllers/concerns/enjoy/decorators/search.rb +0 -5
- data/app/controllers/concerns/enjoy/nav_menu.rb +0 -91
- data/app/controllers/concerns/enjoy/seo_pages.rb +0 -90
- data/app/controllers/enjoy/contacts_controller.rb +0 -7
- data/app/controllers/enjoy/news_controller.rb +0 -7
- data/app/controllers/enjoy/pages_controller.rb +0 -7
- data/app/controllers/enjoy/search_controller.rb +0 -8
- data/app/mailers/enjoy/contact_mailer.rb +0 -17
- data/app/models/concerns/enjoy/connectable.rb +0 -36
- data/app/models/concerns/enjoy/decorators/contact_message.rb +0 -5
- data/app/models/concerns/enjoy/decorators/embedded_gallery_image.rb +0 -5
- data/app/models/concerns/enjoy/decorators/gallery.rb +0 -5
- data/app/models/concerns/enjoy/decorators/gallery_image.rb +0 -5
- data/app/models/concerns/enjoy/decorators/menu.rb +0 -5
- data/app/models/concerns/enjoy/decorators/news.rb +0 -5
- data/app/models/concerns/enjoy/decorators/page.rb +0 -5
- data/app/models/concerns/enjoy/decorators/page_block.rb +0 -5
- data/app/models/concerns/enjoy/decorators/page_blockset.rb +0 -5
- data/app/models/concerns/enjoy/decorators/seo.rb +0 -5
- data/app/models/concerns/enjoy/decorators/sitemap_data.rb +0 -5
- data/app/models/concerns/enjoy/mongoid_paperclip.rb +0 -51
- data/app/models/concerns/enjoy/seoable.rb +0 -36
- data/app/models/concerns/enjoy/sitemap_data_field.rb +0 -17
- data/app/models/enjoy/contact_message.rb +0 -16
- data/app/models/enjoy/embedded_gallery_image.rb +0 -16
- data/app/models/enjoy/gallery.rb +0 -13
- data/app/models/enjoy/gallery_image.rb +0 -13
- data/app/models/enjoy/menu.rb +0 -16
- data/app/models/enjoy/news.rb +0 -16
- data/app/models/enjoy/page.rb +0 -16
- data/app/models/enjoy/page_block.rb +0 -13
- data/app/models/enjoy/page_blockset.rb +0 -13
- data/app/models/enjoy/seo.rb +0 -16
- data/app/models/enjoy/sitemap_data.rb +0 -16
- data/app/views/enjoy/contact_mailer/new_message_email.html.slim +0 -15
- data/app/views/enjoy/contacts/_form.html.slim +0 -7
- data/app/views/enjoy/contacts/_form_with_wrapper.html.slim +0 -2
- data/app/views/enjoy/contacts/_success.html.slim +0 -3
- data/app/views/enjoy/contacts/index.html.slim +0 -4
- data/app/views/enjoy/contacts/new.html.slim +0 -4
- data/app/views/enjoy/contacts/sent.html.slim +0 -3
- data/app/views/enjoy/news/index.html.slim +0 -9
- data/app/views/enjoy/news/show.html.slim +0 -8
- data/app/views/enjoy/pages/show.html.slim +0 -1
- data/app/views/enjoy/search/index.html.slim +0 -19
- data/app/views/rails_admin/main/_enjoy_connectable.html.slim +0 -56
- data/config/locales/ru.kaminari.yml +0 -17
- data/config/locales/ru.simple_captcha.yml +0 -3
- data/config/locales/ru.simple_form.yml +0 -9
- data/lib/enjoy/admin/contact_message.rb +0 -42
- data/lib/enjoy/admin/embedded_gallery_image.rb +0 -38
- data/lib/enjoy/admin/gallery.rb +0 -44
- data/lib/enjoy/admin/gallery_image.rb +0 -31
- data/lib/enjoy/admin/menu.rb +0 -27
- data/lib/enjoy/admin/news.rb +0 -89
- data/lib/enjoy/admin/page.rb +0 -96
- data/lib/enjoy/admin/page_block.rb +0 -49
- data/lib/enjoy/admin/page_blockset.rb +0 -50
- data/lib/enjoy/admin/seo.rb +0 -41
- data/lib/enjoy/admin/sitemap_data.rb +0 -29
- data/lib/enjoy/controllers/contacts.rb +0 -86
- data/lib/enjoy/controllers/news.rb +0 -36
- data/lib/enjoy/controllers/pages.rb +0 -22
- data/lib/enjoy/controllers/search.rb +0 -62
- data/lib/enjoy/elastic_search.rb +0 -31
- data/lib/enjoy/models/active_record/contact_message.rb +0 -14
- data/lib/enjoy/models/active_record/menu.rb +0 -17
- data/lib/enjoy/models/active_record/news.rb +0 -26
- data/lib/enjoy/models/active_record/page.rb +0 -20
- data/lib/enjoy/models/active_record/seo.rb +0 -17
- data/lib/enjoy/models/active_record/sitemap_data.rb +0 -11
- data/lib/enjoy/models/contact_message.rb +0 -41
- data/lib/enjoy/models/embedded_gallery_image.rb +0 -13
- data/lib/enjoy/models/gallery.rb +0 -21
- data/lib/enjoy/models/gallery_image.rb +0 -19
- data/lib/enjoy/models/menu.rb +0 -23
- data/lib/enjoy/models/mongoid/contact_message.rb +0 -23
- data/lib/enjoy/models/mongoid/embedded_gallery_image.rb +0 -24
- data/lib/enjoy/models/mongoid/gallery.rb +0 -32
- data/lib/enjoy/models/mongoid/gallery_image.rb +0 -29
- data/lib/enjoy/models/mongoid/menu.rb +0 -20
- data/lib/enjoy/models/mongoid/news.rb +0 -37
- data/lib/enjoy/models/mongoid/page.rb +0 -49
- data/lib/enjoy/models/mongoid/page_block.rb +0 -56
- data/lib/enjoy/models/mongoid/page_blockset.rb +0 -20
- data/lib/enjoy/models/mongoid/seo.rb +0 -35
- data/lib/enjoy/models/mongoid/sitemap_data.rb +0 -25
- data/lib/enjoy/models/news.rb +0 -58
- data/lib/enjoy/models/page.rb +0 -92
- data/lib/enjoy/models/page_block.rb +0 -22
- data/lib/enjoy/models/page_blockset.rb +0 -24
- data/lib/enjoy/models/seo.rb +0 -17
- data/lib/enjoy/models/sitemap_data.rb +0 -17
- data/lib/enjoy/rails_admin_ext/enjoy_connectable.rb +0 -33
- data/lib/enjoy/rails_admin_ext/menu.rb +0 -147
- data/lib/generators/enjoy/capify_generator.rb +0 -39
- data/lib/generators/enjoy/config/templates/enjoy_cms.erb +0 -27
- data/lib/generators/enjoy/migration_generator.rb +0 -18
- data/lib/generators/enjoy/templates/Capfile +0 -17
- data/lib/generators/enjoy/templates/ability.erb +0 -48
- data/lib/generators/enjoy/templates/deploy.erb +0 -47
- data/lib/generators/enjoy/templates/dl.erb +0 -30
- data/lib/generators/enjoy/templates/migration_contact_messages.rb +0 -15
- data/lib/generators/enjoy/templates/migration_news.rb +0 -26
- data/lib/generators/enjoy/templates/migration_pages.rb +0 -45
- data/lib/generators/enjoy/templates/migration_seos.rb +0 -14
- data/lib/generators/enjoy/templates/production.erb +0 -8
- data/lib/generators/enjoy/templates/unicorn.erb +0 -66
@@ -1,21 +1,60 @@
|
|
1
|
-
/
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
= favicon_link_tag '/
|
7
|
-
|
8
|
-
|
9
|
-
= favicon_link_tag '/
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
= favicon_link_tag '/
|
16
|
-
|
17
|
-
|
18
|
-
= favicon_link_tag '/
|
19
|
-
/
|
20
|
-
|
21
|
-
|
1
|
+
/ http://realfavicongenerator.net/faq#.VxlagR8VxCW
|
2
|
+
|
3
|
+
- data = {:rel => 'shortcut icon', :type => 'image/vnd.microsoft.icon'}
|
4
|
+
= favicon_link_tag '/favicon.ico', data
|
5
|
+
- data = {:rel => 'shortcut icon', :type => 'image/png'}
|
6
|
+
= favicon_link_tag '/favicon.png', data
|
7
|
+
|
8
|
+
- data = {:rel => 'shortcut icon', :type => 'image/vnd.microsoft.icon'}
|
9
|
+
= favicon_link_tag '/favicons/favicon.ico', data
|
10
|
+
- data = {:rel => 'shortcut icon', :type => 'image/png', :sizes => '16x16'}
|
11
|
+
= favicon_link_tag '/favicons/favicon-16x16.png', data
|
12
|
+
- data = {:rel => 'shortcut icon', :type => 'image/png', :sizes => '32x32'}
|
13
|
+
= favicon_link_tag '/favicons/favicon-32x32.png', data
|
14
|
+
- data = {:rel => 'shortcut icon', :type => 'image/png', :sizes => '96x96'}
|
15
|
+
= favicon_link_tag '/favicons/favicon-96x96.png', data
|
16
|
+
|
17
|
+
- data = {:rel => 'shortcut icon', :type => 'image/png', :sizes => '36x36'}
|
18
|
+
= favicon_link_tag '/favicons/android-chrome-36x36.png', data
|
19
|
+
- data = {:rel => 'shortcut icon', :type => 'image/png', :sizes => '48x48'}
|
20
|
+
= favicon_link_tag '/favicons/android-chrome-48x48.png', data
|
21
|
+
- data = {:rel => 'shortcut icon', :type => 'image/png', :sizes => '72x72'}
|
22
|
+
= favicon_link_tag '/favicons/android-chrome-72x72.png', data
|
23
|
+
- data = {:rel => 'shortcut icon', :type => 'image/png', :sizes => '96x96'}
|
24
|
+
= favicon_link_tag '/favicons/android-chrome-96x96.png', data
|
25
|
+
- data = {:rel => 'shortcut icon', :type => 'image/png', :sizes => '144x144'}
|
26
|
+
= favicon_link_tag '/favicons/android-chrome-144x144.png', data
|
27
|
+
- data = {:rel => 'shortcut icon', :type => 'image/png', :sizes => '192x192'}
|
28
|
+
= favicon_link_tag '/favicons/android-chrome-192x192.png', data
|
29
|
+
|
30
|
+
- data = {:rel => 'shortcut icon', :type => 'image/png', :sizes => '70x70'}
|
31
|
+
= favicon_link_tag '/favicons/mstile-70x70.png', data
|
32
|
+
- data = {:rel => 'shortcut icon', :type => 'image/png', :sizes => '144x144'}
|
33
|
+
= favicon_link_tag '/favicons/mstile-144x144.png', data
|
34
|
+
- data = {:rel => 'shortcut icon', :type => 'image/png', :sizes => '150x150'}
|
35
|
+
= favicon_link_tag '/favicons/mstile-150x150.png', data
|
36
|
+
- data = {:rel => 'shortcut icon', :type => 'image/png', :sizes => '310x310'}
|
37
|
+
= favicon_link_tag '/favicons/mstile-310x310.png', data
|
38
|
+
- data = {:rel => 'shortcut icon', :type => 'image/png', :sizes => '310x150'}
|
39
|
+
= favicon_link_tag '/favicons/mstile-310x150.png', data
|
40
|
+
|
41
|
+
- data = {:rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '57x57'}
|
42
|
+
= favicon_link_tag '/favicons/apple-touch-icon-57x57-precomposed.png', data
|
43
|
+
- data = {:rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '60x60'}
|
44
|
+
= favicon_link_tag '/favicons/apple-touch-icon-60x60-precomposed.png', data
|
45
|
+
- data = {:rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '72x72'}
|
46
|
+
= favicon_link_tag '/favicons/apple-touch-icon-72x72-precomposed.png', data
|
47
|
+
- data = {:rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '76x76'}
|
48
|
+
= favicon_link_tag '/favicons/apple-touch-icon-76x76-precomposed.png', data
|
49
|
+
- data = {:rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '120x120'}
|
50
|
+
= favicon_link_tag '/favicons/apple-touch-icon-120x120-precomposed.png', data
|
51
|
+
- data = {:rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144'}
|
52
|
+
= favicon_link_tag '/favicons/apple-touch-icon-144x144-precomposed.png', data
|
53
|
+
- data = {:rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '152x152'}
|
54
|
+
= favicon_link_tag '/favicons/apple-touch-icon-152x152-precomposed.png', data
|
55
|
+
- data = {:rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '180x180'}
|
56
|
+
= favicon_link_tag '/favicons/apple-touch-icon-180x180-precomposed.png', data
|
57
|
+
- data = {:rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '57x57'}
|
58
|
+
= favicon_link_tag '/favicons/apple-touch-icon-precomposed.png', data
|
59
|
+
- data = {:rel => 'apple-touch-icon', :type => 'image/png', :sizes => '57x57'}
|
60
|
+
= favicon_link_tag '/favicons/apple-touch-icon.png', data
|
@@ -1,5 +1,5 @@
|
|
1
1
|
h2 Редактирование профиля
|
2
|
-
= simple_form_for(resource, as: resource_name, url:
|
2
|
+
= simple_form_for(resource, as: resource_name, url: user_registration_path) do |f|
|
3
3
|
/= devise_error_messages!
|
4
4
|
.field
|
5
5
|
= f.label :email, I18n.t("shared.email")
|
@@ -18,4 +18,4 @@ h2 Редактирование профиля
|
|
18
18
|
= f.password_field :password_confirmation, I18n.t("shared.password_confirmation"), autocomplete: "off"
|
19
19
|
.actions
|
20
20
|
= f.submit "Зарегистрироваться"
|
21
|
-
= render "devise/shared/links"
|
21
|
+
= render "devise/shared/links"
|
@@ -1,5 +1,5 @@
|
|
1
1
|
h2 Регистрация
|
2
|
-
= simple_form_for(resource, as: resource_name, url:
|
2
|
+
= simple_form_for(resource, as: resource_name, url: user_registration_path) do |f|
|
3
3
|
= devise_error_messages!
|
4
4
|
.field
|
5
5
|
= f.label :email, label: I18n.t("shared.email")
|
@@ -16,6 +16,12 @@ h2 Регистрация
|
|
16
16
|
br
|
17
17
|
= f.password_field :password_confirmation, label: I18n.t("shared.password_confirmation"), autocomplete: "off"
|
18
18
|
.actions
|
19
|
-
|
19
|
+
- if Enjoy.config.registration_captcha
|
20
|
+
- if Enjoy.config.recaptcha_support
|
21
|
+
= recaptcha_tags
|
22
|
+
- elsif Enjoy.config.simple_captcha_support
|
23
|
+
= f.input :captcha, as: :simple_captcha, label: false
|
24
|
+
|
25
|
+
= f.submit I18n.t("shared.registration")
|
20
26
|
br
|
21
|
-
= render "devise/shared/links"
|
27
|
+
= render "devise/shared/links"
|
@@ -1,5 +1,5 @@
|
|
1
1
|
h2= I18n.t("shared.enter_site")
|
2
|
-
= form_for(resource, as: resource_name, url:
|
2
|
+
= form_for(resource, as: resource_name, url: user_session_path) do |f|
|
3
3
|
.field
|
4
4
|
= f.label :email, I18n.t("shared.email")
|
5
5
|
br
|
@@ -16,7 +16,13 @@ h2= I18n.t("shared.enter_site")
|
|
16
16
|
= f.label :remember_me, I18n.t("shared.remember_me")
|
17
17
|
|
18
18
|
.actions
|
19
|
+
- if Enjoy.config.admin_enter_captcha
|
20
|
+
- if Enjoy.config.recaptcha_support
|
21
|
+
= recaptcha_tags
|
22
|
+
- elsif Enjoy.config.simple_captcha_support
|
23
|
+
= f.input :captcha, as: :simple_captcha, label: false
|
24
|
+
|
19
25
|
= f.submit I18n.t("shared.enter")
|
20
26
|
br
|
21
27
|
|
22
|
-
= render "devise/shared/links"
|
28
|
+
= render "devise/shared/links"
|
@@ -1,11 +1,11 @@
|
|
1
1
|
- if controller_name != 'sessions'
|
2
|
-
= link_to I18n.t("shared.enter_site"),
|
2
|
+
= link_to I18n.t("shared.enter_site"), new_user_session_path
|
3
3
|
br
|
4
4
|
|
5
5
|
- if devise_mapping.registerable? && controller_name != 'registrations'
|
6
|
-
= link_to I18n.t("shared.registration"),
|
6
|
+
= link_to I18n.t("shared.registration"), new_user_registration_path
|
7
7
|
br
|
8
8
|
|
9
9
|
- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations'
|
10
|
-
= link_to I18n.t("shared.forget_password"),
|
11
|
-
br
|
10
|
+
= link_to I18n.t("shared.forget_password"), new_user_password_path
|
11
|
+
br
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -6,21 +6,25 @@ html lang="ru"
|
|
6
6
|
title= page_title
|
7
7
|
= yield :meta
|
8
8
|
= csrf_meta_tags
|
9
|
-
= render partial:
|
9
|
+
= render partial: 'blocks/favicon'
|
10
10
|
|
11
|
-
- async = Rails.env == "production"
|
11
|
+
- async = false #Rails.env == "production"
|
12
12
|
= stylesheet_link_tag "application", media: "all", async: async
|
13
13
|
= javascript_include_tag "application", async: async
|
14
14
|
/[if lt IE 9]
|
15
15
|
= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js", async: async
|
16
|
+
css:
|
17
|
+
#{Settings.custom_css(default: '', kind: :css)}
|
18
|
+
javascript:
|
19
|
+
#{Settings.custom_js(default: '', kind: :js)}
|
16
20
|
|
17
21
|
body
|
18
22
|
#root
|
19
23
|
= render 'shared/messages'
|
20
24
|
#sidebar
|
21
|
-
= render_navigation &navigation(:main)
|
25
|
+
/ = render_navigation &navigation(:main)
|
22
26
|
#content
|
23
27
|
= yield
|
24
28
|
#root_footer
|
25
29
|
#footer
|
26
|
-
= render 'blocks/footer'
|
30
|
+
= render partial: 'blocks/footer'
|
@@ -0,0 +1,27 @@
|
|
1
|
+
doctype html
|
2
|
+
html lang="ru"
|
3
|
+
head
|
4
|
+
meta charset="UTF-8"
|
5
|
+
meta name="viewport" content="width=device-width, maximum-scale=1"
|
6
|
+
title= page_title
|
7
|
+
= yield :meta
|
8
|
+
= csrf_meta_tags
|
9
|
+
= render partial: 'blocks/favicon'
|
10
|
+
|
11
|
+
- async = Rails.env == "production"
|
12
|
+
= stylesheet_link_tag "application", media: "all", async: async
|
13
|
+
= javascript_include_tag "application", async: async
|
14
|
+
/[if lt IE 9]
|
15
|
+
= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js", async: async
|
16
|
+
|
17
|
+
body
|
18
|
+
h1 = "CONFIRMATIONS"
|
19
|
+
#root
|
20
|
+
= render 'shared/messages'
|
21
|
+
/ #sidebar
|
22
|
+
/ / = render_navigation &navigation(:main)
|
23
|
+
#content
|
24
|
+
= yield
|
25
|
+
#root_footer
|
26
|
+
#footer
|
27
|
+
= render partial: 'blocks/footer'
|
@@ -0,0 +1,27 @@
|
|
1
|
+
doctype html
|
2
|
+
html lang="ru"
|
3
|
+
head
|
4
|
+
meta charset="UTF-8"
|
5
|
+
meta name="viewport" content="width=device-width, maximum-scale=1"
|
6
|
+
title= page_title
|
7
|
+
= yield :meta
|
8
|
+
= csrf_meta_tags
|
9
|
+
= render partial: 'blocks/favicon'
|
10
|
+
|
11
|
+
- async = Rails.env == "production"
|
12
|
+
= stylesheet_link_tag "application", media: "all", async: async
|
13
|
+
= javascript_include_tag "application", async: async
|
14
|
+
/[if lt IE 9]
|
15
|
+
= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js", async: async
|
16
|
+
|
17
|
+
body
|
18
|
+
h1 = "PASSWORDS"
|
19
|
+
#root
|
20
|
+
= render 'shared/messages'
|
21
|
+
/ #sidebar
|
22
|
+
/ / = render_navigation &navigation(:main)
|
23
|
+
#content
|
24
|
+
= yield
|
25
|
+
#root_footer
|
26
|
+
#footer
|
27
|
+
= render partial: 'blocks/footer'
|
@@ -0,0 +1,27 @@
|
|
1
|
+
doctype html
|
2
|
+
html lang="ru"
|
3
|
+
head
|
4
|
+
meta charset="UTF-8"
|
5
|
+
meta name="viewport" content="width=device-width, maximum-scale=1"
|
6
|
+
title= page_title
|
7
|
+
= yield :meta
|
8
|
+
= csrf_meta_tags
|
9
|
+
= render partial: 'blocks/favicon'
|
10
|
+
|
11
|
+
- async = Rails.env == "production"
|
12
|
+
= stylesheet_link_tag "application", media: "all", async: async
|
13
|
+
= javascript_include_tag "application", async: async
|
14
|
+
/[if lt IE 9]
|
15
|
+
= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js", async: async
|
16
|
+
|
17
|
+
body
|
18
|
+
h1 = "REGISTRATIONS"
|
19
|
+
#root
|
20
|
+
= render 'shared/messages'
|
21
|
+
/ #sidebar
|
22
|
+
/ / = render_navigation &navigation(:main)
|
23
|
+
#content
|
24
|
+
= yield
|
25
|
+
#root_footer
|
26
|
+
#footer
|
27
|
+
= render partial: 'blocks/footer'
|
@@ -0,0 +1,27 @@
|
|
1
|
+
doctype html
|
2
|
+
html lang="ru"
|
3
|
+
head
|
4
|
+
meta charset="UTF-8"
|
5
|
+
meta name="viewport" content="width=device-width, maximum-scale=1"
|
6
|
+
title= page_title
|
7
|
+
= yield :meta
|
8
|
+
= csrf_meta_tags
|
9
|
+
= render partial: 'blocks/favicon'
|
10
|
+
|
11
|
+
- async = Rails.env == "production"
|
12
|
+
= stylesheet_link_tag "application", media: "all", async: async
|
13
|
+
= javascript_include_tag "application", async: async
|
14
|
+
/[if lt IE 9]
|
15
|
+
= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js", async: async
|
16
|
+
|
17
|
+
body
|
18
|
+
h1 = "SESSIONS"
|
19
|
+
#root
|
20
|
+
= render 'shared/messages'
|
21
|
+
/ #sidebar
|
22
|
+
/ / = render_navigation &navigation(:main)
|
23
|
+
#content
|
24
|
+
= yield
|
25
|
+
#root_footer
|
26
|
+
#footer
|
27
|
+
= render partial: 'blocks/footer'
|
@@ -0,0 +1,27 @@
|
|
1
|
+
doctype html
|
2
|
+
html lang="ru"
|
3
|
+
head
|
4
|
+
meta charset="UTF-8"
|
5
|
+
meta name="viewport" content="width=device-width, maximum-scale=1"
|
6
|
+
title= page_title
|
7
|
+
= yield :meta
|
8
|
+
= csrf_meta_tags
|
9
|
+
= render partial: 'blocks/favicon'
|
10
|
+
|
11
|
+
- async = Rails.env == "production"
|
12
|
+
= stylesheet_link_tag "application", media: "all", async: async
|
13
|
+
= javascript_include_tag "application", async: async
|
14
|
+
/[if lt IE 9]
|
15
|
+
= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js", async: async
|
16
|
+
|
17
|
+
body
|
18
|
+
h1 = "UNLOCKS"
|
19
|
+
#root
|
20
|
+
= render 'shared/messages'
|
21
|
+
/ #sidebar
|
22
|
+
/ / = render_navigation &navigation(:main)
|
23
|
+
#content
|
24
|
+
= yield
|
25
|
+
#root_footer
|
26
|
+
#footer
|
27
|
+
= render partial: 'blocks/footer'
|
@@ -0,0 +1,104 @@
|
|
1
|
+
- if ['string', 'integer', 'phone', 'email', 'address', 'url', 'domain'].include?(@object.type)
|
2
|
+
= form.text_field :raw, :value => field.value
|
3
|
+
- if @object.type == 'boolean'
|
4
|
+
= form.check_box :raw, {:value => field.value}, 'true', 'false'
|
5
|
+
- if @object.type == 'color'
|
6
|
+
= form.text_field :raw, :value => field.value, 'data-color' => true, style: "background-color: ##{field.value}"
|
7
|
+
- elsif %w(text yaml phones).include?( @object.type )
|
8
|
+
= form.text_area :raw, :value => field.value, :rows => 10, :cols => 80
|
9
|
+
- elsif @object.type == 'code'
|
10
|
+
:ruby
|
11
|
+
#binding.pry
|
12
|
+
js_data = {
|
13
|
+
csspath: asset_path('ckeditor/plugins/codemirror/css/codemirror.min.css'),
|
14
|
+
jspath: asset_path('ckeditor/plugins/codemirror/js/codemirror.min.js'),
|
15
|
+
options: {
|
16
|
+
mode: 'htmlmixed',
|
17
|
+
theme: 'monokai',
|
18
|
+
lineNumbers: true
|
19
|
+
},
|
20
|
+
locations: {
|
21
|
+
mode: asset_path('ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js'),
|
22
|
+
theme: asset_path('ckeditor/plugins/codemirror/theme/monokai.css')
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
= form.text_area field.method_name, field.html_attributes.reverse_merge(data: { richtext: 'codemirror', options: js_data.to_json }).reverse_merge({ value: field.form_value })
|
27
|
+
- elsif @object.type == 'html' || @object.type == 'sanitized'
|
28
|
+
- if form.respond_to?(:cktext_area)
|
29
|
+
= javascript_include_tag "ckeditor/init"
|
30
|
+
= form.cktext_area :raw, :value => field.value, :rows => 10, :cols => 80
|
31
|
+
- elsif Object.const_defined?('Rich')
|
32
|
+
= form.text_area :raw, :value => field.value, :rows => 10, :cols => 80
|
33
|
+
|
34
|
+
= javascript_include_tag "rich/base.js"
|
35
|
+
:javascript
|
36
|
+
var instance = CKEDITOR.instances['#{form.dom_id(field)}'];
|
37
|
+
if(instance) { CKEDITOR.remove(instance); }
|
38
|
+
CKEDITOR.replace('#{form.dom_id(field)}', #{Rich.options().to_json.html_safe});
|
39
|
+
- else
|
40
|
+
.alert.alert-error
|
41
|
+
= t('admin.settings.no_ckeditor_detected')
|
42
|
+
= form.text_area :raw, :value => field.value, :rows => 10, :cols => 80
|
43
|
+
|
44
|
+
|
45
|
+
- elsif @object.type == 'enum'
|
46
|
+
|
47
|
+
- unless @object.enum_multiple
|
48
|
+
= form.select :raw, @object.enum_collection, { include_blank: true, selected: @object.raw }, { data: { enumeration: true }, placeholder: t('admin.misc.search') }
|
49
|
+
- else
|
50
|
+
:ruby
|
51
|
+
js_data = {
|
52
|
+
xhr: false,
|
53
|
+
sortable: false,
|
54
|
+
cacheAll: true,
|
55
|
+
regional: {
|
56
|
+
chooseAll: t("admin.misc.chose_all"),
|
57
|
+
chosen: t("admin.misc.chosen", name: @object.enum_label),
|
58
|
+
clearAll: t("admin.misc.clear_all"),
|
59
|
+
search: t("admin.misc.search"),
|
60
|
+
up: t("admin.misc.up"),
|
61
|
+
down: t("admin.misc.down")
|
62
|
+
}
|
63
|
+
}
|
64
|
+
= form.select :raw, @object.enum_collection, { selected: @object.raw, object: @object }, {data: { filteringmultiselect: true, options: js_data.to_json }, multiple: true}
|
65
|
+
|
66
|
+
|
67
|
+
- elsif @object.type == 'js'
|
68
|
+
:ruby
|
69
|
+
#binding.pry
|
70
|
+
js_data = {
|
71
|
+
csspath: '/assets/codemirror.css',
|
72
|
+
jspath: '/assets/codemirror.js',
|
73
|
+
options: {
|
74
|
+
mode: 'js',
|
75
|
+
theme: 'night',
|
76
|
+
lineNumbers: true
|
77
|
+
},
|
78
|
+
locations: {
|
79
|
+
mode: '/assets/codemirror/modes/jsx.js',
|
80
|
+
theme: '/assets/codemirror/themes/night.css'
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
= form.text_area field.method_name, field.html_attributes.reverse_merge(data: { richtext: 'codemirror', options: js_data.to_json }).reverse_merge({ value: field.form_value })
|
85
|
+
|
86
|
+
|
87
|
+
- elsif @object.type == 'css'
|
88
|
+
:ruby
|
89
|
+
#binding.pry
|
90
|
+
js_data = {
|
91
|
+
csspath: '/assets/codemirror.css',
|
92
|
+
jspath: '/assets/codemirror.js',
|
93
|
+
options: {
|
94
|
+
mode: 'css',
|
95
|
+
theme: 'night',
|
96
|
+
lineNumbers: true
|
97
|
+
},
|
98
|
+
locations: {
|
99
|
+
mode: '/assets/codemirror/modes/css.js',
|
100
|
+
theme: '/assets/codemirror/themes/night.css'
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
= form.text_area field.method_name, field.html_attributes.reverse_merge(data: { richtext: 'codemirror', options: js_data.to_json }).reverse_merge({ value: field.form_value })
|
@@ -1,29 +1,38 @@
|
|
1
|
-
|
2
|
-
module ViewHelper #:nodoc
|
3
|
-
def show_simple_captcha(options={})
|
4
|
-
key = simple_captcha_key(options[:object])
|
5
|
-
options[:field_value] = set_simple_captcha_data(key, options)
|
1
|
+
if defined?(SimpleCaptcha)
|
6
2
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
}
|
3
|
+
module SimpleCaptcha #:nodoc
|
4
|
+
module ViewHelper #:nodoc
|
5
|
+
def show_simple_captcha(options={})
|
6
|
+
key = simple_captcha_key(options[:object])
|
7
|
+
options[:field_value] = set_simple_captcha_data(key, options)
|
13
8
|
|
14
|
-
|
9
|
+
defaults = {
|
10
|
+
:image => simple_captcha_image(key, options),
|
11
|
+
:label => options[:label] || I18n.t('simple_captcha.label'),
|
12
|
+
:field => simple_captcha_field(options),
|
13
|
+
:error_messages => options[:error_messages]
|
14
|
+
}
|
15
|
+
|
16
|
+
render :partial => 'enjoy/simple_captcha/simple_captcha', :locals => { :simple_captcha_options => defaults }
|
17
|
+
end
|
15
18
|
end
|
16
19
|
end
|
17
|
-
end
|
18
20
|
|
19
|
-
SimpleCaptcha.setup do |sc|
|
20
|
-
|
21
|
-
|
22
|
-
|
21
|
+
SimpleCaptcha.setup do |sc|
|
22
|
+
sc.image_size = "200x50"
|
23
|
+
sc.length = 4
|
24
|
+
sc.charset = "0123456789"
|
23
25
|
|
24
|
-
|
26
|
+
sc.add_image_style("enjoy_cms_style", [
|
27
|
+
"-alpha set",
|
28
|
+
"-fill 'orange'",
|
29
|
+
"-background 'transparent'",
|
30
|
+
"-size 200x50", "xc:transparent"
|
31
|
+
])
|
25
32
|
|
26
|
-
|
33
|
+
sc.image_style = 'enjoy_cms_style'
|
27
34
|
|
28
|
-
|
35
|
+
sc.tmp_path = "tmp/sc"
|
36
|
+
end
|
37
|
+
|
29
38
|
end
|
data/config/locales/en.enjoy.yml
CHANGED
@@ -8,7 +8,7 @@ en:
|
|
8
8
|
with_final_slash: "should begin with a slash"
|
9
9
|
page_url_regex: "Regular expression to check if page is current"
|
10
10
|
final_in_menu: "This link is also displayed in menu"
|
11
|
-
no_contact_info: "
|
11
|
+
no_contact_info: "Please enter your phone or email so we could contact you."
|
12
12
|
map: 'Map'
|
13
13
|
sitemap: 'Sitemap'
|
14
14
|
sitemap_data: 'Sitemap data'
|
data/config/locales/ru.enjoy.yml
CHANGED
@@ -4,22 +4,15 @@ ru:
|
|
4
4
|
cms: "CMS"
|
5
5
|
menu: "Меню"
|
6
6
|
settings: 'Настройки'
|
7
|
-
news: 'Новости'
|
8
7
|
with_final_slash: "c начальным слешем"
|
9
8
|
page_url_regex: "Регулярное выражение, по которому определяется является ли этот пункт активным"
|
10
9
|
final_in_menu: "В меню сразу отдается конечная ссылка"
|
11
|
-
no_contact_info: "^Пожалуйста введите Ваш e-mail или телефон, чтобы мы могли связаться с вами."
|
12
10
|
map: 'Карта'
|
13
11
|
sitemap: 'Карта сайта'
|
14
12
|
sitemap_data: 'Данные для карты сайта'
|
15
13
|
edit: Редактировать
|
16
14
|
send: Отправить
|
17
15
|
format_time: "%d.%m.%Y"
|
18
|
-
m:
|
19
|
-
enabled: 'добавлено в меню "%{menu}"'
|
20
|
-
disabled: 'удалено из меню "%{menu}"'
|
21
|
-
error: "Ошибка: %{err}"
|
22
|
-
no_id: "Не указан ID"
|
23
16
|
errors:
|
24
17
|
title: "Ошибка %{code}"
|
25
18
|
form_expired: "Истекло время на заполение формы"
|
@@ -45,19 +45,6 @@ ru:
|
|
45
45
|
mongoid: &mongoid
|
46
46
|
models:
|
47
47
|
user: Пользователь
|
48
|
-
enjoy/menu: Меню
|
49
|
-
enjoy/page: Страница
|
50
|
-
enjoy/contact_message: Сообщение
|
51
|
-
enjoy/news: Новость
|
52
|
-
|
53
|
-
enjoy/gallery: Фотогалерея
|
54
|
-
enjoy/gallery_image: Фото в фотогалерее
|
55
|
-
enjoy/embeddede_gallery_image: Фото в фотогалерее
|
56
|
-
enjoy/seo: SEO
|
57
|
-
enjoy/sitemap_data: Карта сайта
|
58
|
-
|
59
|
-
enjoy/page_blockset: Блоки
|
60
|
-
enjoy/page_block: Блок
|
61
48
|
attributes:
|
62
49
|
user:
|
63
50
|
email: E-mail
|
@@ -74,38 +61,14 @@ ru:
|
|
74
61
|
first_name: Имя
|
75
62
|
last_name: Фамилия
|
76
63
|
phone: Телефон
|
77
|
-
|
78
|
-
fullpath: URL
|
79
|
-
regexp: Подсветка меню
|
80
|
-
redirect: Редирект
|
81
|
-
image: Картинка
|
82
|
-
hidden: Скрытая
|
83
|
-
menus: Меню
|
84
|
-
connectable: Связанный элемент
|
85
|
-
enjoy/contact_message:
|
86
|
-
name: Ваше имя
|
87
|
-
email: Ваш е-мейл
|
88
|
-
phone: Ваш телефон
|
89
|
-
content: Ваше сообщение
|
90
|
-
enjoy/gallery:
|
91
|
-
enjoy/gallery_image:
|
92
|
-
gallery: Фотогалерея
|
93
|
-
enjoy/embeddeded_gallery_image:
|
94
|
-
enjoy/page_blockset:
|
95
|
-
blocks: Блоки
|
96
|
-
errors:
|
97
|
-
models:
|
98
|
-
contact_message:
|
99
|
-
attributes:
|
100
|
-
email:
|
101
|
-
invalid_email_address: "^Неверный e-mail"
|
64
|
+
|
102
65
|
activerecord:
|
103
66
|
<<: *mongoid
|
104
67
|
|
105
68
|
activemodel:
|
106
69
|
errors:
|
107
70
|
messages:
|
108
|
-
invalid_email_address: "
|
71
|
+
invalid_email_address: "Неверный e-mail"
|
109
72
|
|
110
73
|
admin:
|
111
74
|
scopes:
|