hancock_cms 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +23 -0
- data/.rspec +1 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +113 -0
- data/Rakefile +1 -0
- data/app/assets/images/devices/login-bg.jpg +0 -0
- data/app/assets/images/rails-admin/hancock_logo.svg +5 -0
- data/app/assets/javascripts/hancock/app/back_to_top.coffee +24 -0
- data/app/assets/javascripts/hancock/cms.coffee +11 -0
- data/app/assets/javascripts/hancock/cms/flash.coffee +3 -0
- data/app/assets/javascripts/hancock/cms/init.coffee +1 -0
- data/app/assets/javascripts/hancock/cms/map.coffee +22 -0
- data/app/assets/javascripts/hancock/rails_admin/cms.ui.coffee +43 -0
- data/app/assets/javascripts/hancock/rails_admin/custom/ui.coffee +0 -0
- data/app/assets/javascripts/head.load.js +707 -0
- data/app/assets/javascripts/jquery.placeholder.js +157 -0
- data/app/assets/javascripts/rails_admin/custom/ui.coffee +2 -0
- data/app/assets/stylesheets/hancock/cms.sass +9 -0
- data/app/assets/stylesheets/hancock/cms/devise.sass +157 -0
- data/app/assets/stylesheets/hancock/cms/flash.sass +69 -0
- data/app/assets/stylesheets/hancock/cms/mixins.sass +98 -0
- data/app/assets/stylesheets/hancock/cms/normalize.scss +407 -0
- data/app/assets/stylesheets/hancock/cms/powered.sass +18 -0
- data/app/assets/stylesheets/hancock/rails_admin/cms.theming.sass +703 -0
- data/app/assets/stylesheets/hancock/rails_admin/custom/theming.sass +1 -0
- data/app/assets/stylesheets/hancock/toplink/toplink.sass +24 -0
- data/app/assets/stylesheets/rails_admin/custom/theming.sass +4 -0
- data/app/controllers/concerns/hancock/current_user.rb +12 -0
- data/app/controllers/concerns/hancock/decorators/home.rb +12 -0
- data/app/controllers/concerns/hancock/decorators/registrations.rb +5 -0
- data/app/controllers/concerns/hancock/decorators/sessions.rb +5 -0
- data/app/controllers/concerns/hancock/errors.rb +94 -0
- data/app/controllers/concerns/hancock/fancybox.rb +14 -0
- data/app/controllers/concerns/hancock/no_cache.rb +12 -0
- data/app/controllers/hancock/home_controller.rb +10 -0
- data/app/controllers/hancock/registrations_controller.rb +23 -0
- data/app/controllers/hancock/sessions_controller.rb +24 -0
- data/app/helpers/hancock/gzip_helper.rb +27 -0
- data/app/helpers/hancock/home_helper.rb +2 -0
- data/app/helpers/hancock/powered_helper.rb +42 -0
- data/app/models/concerns/hancock/boolean_field.rb +21 -0
- data/app/models/concerns/hancock/cacheable.rb +33 -0
- data/app/models/concerns/hancock/decorators/embedded_element.rb +28 -0
- data/app/models/concerns/hancock/enableable.rb +8 -0
- data/app/models/concerns/hancock/geocodeable.rb +4 -0
- data/app/models/concerns/hancock/hash_field.rb +113 -0
- data/app/models/concerns/hancock/html_field.rb +33 -0
- data/app/models/concerns/hancock/mappable.rb +91 -0
- data/app/models/concerns/hancock/model_localizeable.rb +33 -0
- data/app/models/concerns/hancock/rails_admin_patch.rb +86 -0
- data/app/models/concerns/hancock/sort_field.rb +20 -0
- data/app/models/concerns/hancock/sortable.rb +8 -0
- data/app/models/hancock/embedded_element.rb +17 -0
- data/app/views/blocks/_favicon.html.slim +60 -0
- data/app/views/blocks/_footer.html.slim +1 -0
- data/app/views/blocks/_header.html.slim +3 -0
- data/app/views/devise/passwords/edit.html.slim +29 -0
- data/app/views/devise/passwords/new.html.slim +19 -0
- data/app/views/devise/registrations/edit.html.slim +31 -0
- data/app/views/devise/registrations/new.html.slim +39 -0
- data/app/views/devise/sessions/new.html.slim +39 -0
- data/app/views/devise/shared/_links.html.slim +11 -0
- data/app/views/hancock/errors/_base.html.slim +3 -0
- data/app/views/hancock/errors/error_403.html.slim +1 -0
- data/app/views/hancock/errors/error_404.html.slim +1 -0
- data/app/views/hancock/errors/error_500.html.slim +1 -0
- data/app/views/hancock/home/index.html.slim +1 -0
- data/app/views/hancock/simple_captcha/_simple_captcha.html.slim +13 -0
- data/app/views/hancock/toplink/_toplink.html.slim +2 -0
- data/app/views/layouts/application.html.slim +35 -0
- data/app/views/layouts/hancock/devise/confirmations.html.slim +22 -0
- data/app/views/layouts/hancock/devise/passwords.html.slim +22 -0
- data/app/views/layouts/hancock/devise/registrations.html.slim +22 -0
- data/app/views/layouts/hancock/devise/sessions.html.slim +22 -0
- data/app/views/layouts/hancock/devise/unlocks.html.slim +22 -0
- data/app/views/layouts/rails_admin/_footer.html.slim +2 -0
- data/app/views/layouts/rails_admin/_footer_navigation.html.slim +20 -0
- data/app/views/layouts/rails_admin/_navigation.html.slim +73 -0
- data/app/views/layouts/rails_admin/_secondary_navigation.html.slim +32 -0
- data/app/views/layouts/rails_admin/application.html.haml +68 -0
- data/app/views/layouts/rails_admin/pjax.html.haml +17 -0
- data/app/views/rails_admin/main/_check_boxes.html.slim +27 -0
- data/app/views/rails_admin/main/_enum_check_boxes.html.slim +5 -0
- data/app/views/rails_admin/main/_enum_radio_buttons.html.slim +5 -0
- data/app/views/rails_admin/main/_form_hancock_multiselect.html.slim +48 -0
- data/app/views/rails_admin/main/_form_raw.html.slim +1 -0
- data/app/views/rails_admin/main/_hancock_hash.html.slim +9 -0
- data/app/views/rails_admin/main/_hancock_hash_ml.html.slim +10 -0
- data/app/views/rails_admin/main/_hancock_html.html.slim +16 -0
- data/app/views/rails_admin/main/_hancock_html_ml.html.slim +53 -0
- data/app/views/shared/_admin_link.html.slim +3 -0
- data/app/views/shared/_messages.html.slim +7 -0
- data/config/initializers/embedded_findable.rb +57 -0
- data/config/initializers/hancock_cms.rb +11 -0
- data/config/initializers/simple_captcha.rb +70 -0
- data/config/locales/en.hancock.yml +29 -0
- data/config/locales/en.hancock_admin.yml +6 -0
- data/config/locales/ru.cancan.yml +4 -0
- data/config/locales/ru.devise.yml +65 -0
- data/config/locales/ru.hancock.yml +36 -0
- data/config/locales/ru.hancock_admin.yml +6 -0
- data/config/locales/ru.models.yml +82 -0
- data/config/locales/ru.mongoid.yml +450 -0
- data/config/locales/ru.rails_admin.yml +168 -0
- data/hancock_cms.gemspec +46 -0
- data/lib/filename_to_slug.rb +32 -0
- data/lib/generators/hancock/cms/ability_generator.rb +14 -0
- data/lib/generators/hancock/cms/admin_generator.rb +21 -0
- data/lib/generators/hancock/cms/application_generator.rb +14 -0
- data/lib/generators/hancock/cms/assets_generator.rb +35 -0
- data/lib/generators/hancock/cms/config_generator.rb +13 -0
- data/lib/generators/hancock/cms/controllers/decorators_generator.rb +27 -0
- data/lib/generators/hancock/cms/gemfile_generator.rb +13 -0
- data/lib/generators/hancock/cms/layout_generator.rb +14 -0
- data/lib/generators/hancock/cms/model_generator.rb +39 -0
- data/lib/generators/hancock/cms/models/embedded_element_generator.rb +56 -0
- data/lib/generators/hancock/cms/models/templates/embedded_element.erb +47 -0
- data/lib/generators/hancock/cms/paperclip_optimizer_generator.rb +13 -0
- data/lib/generators/hancock/cms/rack_generator.rb +12 -0
- data/lib/generators/hancock/cms/robots_generator.rb +14 -0
- data/lib/generators/hancock/cms/scripts_generator.rb +31 -0
- data/lib/generators/hancock/cms/templates/Gemfile.erb +69 -0
- data/lib/generators/hancock/cms/templates/ability.erb +49 -0
- data/lib/generators/hancock/cms/templates/admin.erb +74 -0
- data/lib/generators/hancock/cms/templates/application.erb +42 -0
- data/lib/generators/hancock/cms/templates/assets/javascripts/application.coffee.erb +5 -0
- data/lib/generators/hancock/cms/templates/assets/stylesheets/application.sass.erb +88 -0
- data/lib/generators/hancock/cms/templates/hancock_cms.erb +30 -0
- data/lib/generators/hancock/cms/templates/model.erb +42 -0
- data/lib/generators/hancock/cms/templates/paperclip_optimizer.erb +80 -0
- data/lib/generators/hancock/cms/templates/rack.erb +15 -0
- data/lib/generators/hancock/cms/templates/robots.txt.erb +5 -0
- data/lib/generators/hancock/cms/templates/scripts/assets_precompile.sh +3 -0
- data/lib/generators/hancock/cms/templates/scripts/bundle_production.sh +4 -0
- data/lib/generators/hancock/cms/templates/scripts/db_dump.sh.erb +3 -0
- data/lib/generators/hancock/cms/templates/scripts/db_restore.sh +3 -0
- data/lib/generators/hancock/cms/templates/scripts/full_assets_precompile.sh +4 -0
- data/lib/generators/hancock/cms/templates/scripts/restart_thru_kill.sh +3 -0
- data/lib/generators/hancock/cms/templates/scripts/send_hup.sh +3 -0
- data/lib/generators/hancock/cms/templates/scripts/send_usr2.sh +3 -0
- data/lib/generators/hancock/cms/templates/scripts/server.sh +5 -0
- data/lib/generators/hancock/cms/templates/scripts/server_alt.sh +5 -0
- data/lib/generators/hancock/cms/templates/unicorn.erb +57 -0
- data/lib/generators/hancock/cms/templates/unicorn.god.erb +59 -0
- data/lib/generators/hancock/cms/unicorn_god_generator.rb +15 -0
- data/lib/generators/hancock/cms/utils.rb +21 -0
- data/lib/hancock/admin.rb +60 -0
- data/lib/hancock/admin/embedded_element.rb +26 -0
- data/lib/hancock/configuration.rb +48 -0
- data/lib/hancock/controller.rb +30 -0
- data/lib/hancock/engine.rb +48 -0
- data/lib/hancock/migration.rb +15 -0
- data/lib/hancock/model.rb +53 -0
- data/lib/hancock/models/embedded_element.rb +12 -0
- data/lib/hancock/models/mongoid/embedded_element.rb +14 -0
- data/lib/hancock/plugin.rb +25 -0
- data/lib/hancock/plugin_configuration.rb +30 -0
- data/lib/hancock/rails_admin_ext/config.rb +129 -0
- data/lib/hancock/rails_admin_ext/hancock_hash.rb +84 -0
- data/lib/hancock/rails_admin_ext/hancock_html.rb +79 -0
- data/lib/hancock/rails_admin_ext/hancock_multiselect.rb +44 -0
- data/lib/hancock/rails_admin_ext/hancock_slugs.rb +35 -0
- data/lib/hancock/rails_admin_ext/patches/field_patch.rb +14 -0
- data/lib/hancock/rails_admin_ext/patches/group_patch.rb +41 -0
- data/lib/hancock/rails_admin_ext/patches/hancock_cms_group.rb +61 -0
- data/lib/hancock/rails_admin_ext/patches/new_controller_patch.rb +54 -0
- data/lib/hancock/routes.rb +20 -0
- data/lib/hancock/simple_form_patch.rb +12 -0
- data/lib/hancock/tasks.rb +13 -0
- data/lib/hancock/version.rb +3 -0
- data/lib/hancock_cms.rb +130 -0
- data/lib/manual_slug.rb +10 -0
- data/lib/manual_slug/active_record.rb +32 -0
- data/lib/manual_slug/mongoid.rb +40 -0
- data/lib/rails_admin/custom_show_in_app.rb +43 -0
- data/release.sh +12 -0
- data/template.rb +564 -0
- metadata +455 -0
@@ -0,0 +1 @@
|
|
1
|
+
p = Settings.copyright(default: "© Copyright {{year|2016}} | Etc", kind: :html).html_safe
|
@@ -0,0 +1,29 @@
|
|
1
|
+
/ h2 Change your password
|
2
|
+
.devise-box
|
3
|
+
.white-box
|
4
|
+
= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f|
|
5
|
+
= devise_error_messages!
|
6
|
+
h2.title Сменить пароль
|
7
|
+
= f.hidden_field :reset_password_token
|
8
|
+
|
9
|
+
.form-group
|
10
|
+
/ = f.label :password
|
11
|
+
- if @minimum_password_length
|
12
|
+
em= " (Минимум символов: #{@minimum_password_length})".freeze
|
13
|
+
/ .form-control = f.password_field :password, label: I18n.t("shared.password"), autocomplete: "off", placeholder: I18n.t("shared.password")
|
14
|
+
= f.input :password, as: :password, autocomplete: 'off', title: I18n.t("shared.password"), placeholder: I18n.t("shared.password"), label: false, wrapper_html: {class: "form-control"}
|
15
|
+
|
16
|
+
.form-group
|
17
|
+
/ = f.label :password_confirmation
|
18
|
+
/ br
|
19
|
+
/ .form-control = f.password_field :password_confirmation, label: I18n.t("shared.password_confirmation"), autocomplete: "off", placeholder: I18n.t("shared.password_confirmation")
|
20
|
+
= f.input :password_confirmation, as: :password, autocomplete: 'off', title: I18n.t("shared.password_confirmation"), placeholder: I18n.t("shared.password_confirmation"), label: false, wrapper_html: {class: "form-control"}
|
21
|
+
|
22
|
+
|
23
|
+
.form-group.links
|
24
|
+
.link-to-recover.center
|
25
|
+
= render "devise/shared/links"
|
26
|
+
|
27
|
+
.actions
|
28
|
+
= f.submit "Сменить пароль".freeze
|
29
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
/ h2 Forgot your password?
|
2
|
+
.devise-box
|
3
|
+
.white-box
|
4
|
+
= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
|
5
|
+
= devise_error_messages!
|
6
|
+
h2.title Забыли пароль?
|
7
|
+
.form-group
|
8
|
+
/ = f.label :email
|
9
|
+
/ br/
|
10
|
+
/ .form-control = f.email_field :email, autofocus: true, placeholder: I18n.t("shared.email")
|
11
|
+
= f.input :email, as: :email, autocomplete: 'off', title: I18n.t("shared.email"), placeholder: I18n.t("shared.email"), label: false, wrapper_html: {class: "form-control"}
|
12
|
+
|
13
|
+
|
14
|
+
.form-group.links
|
15
|
+
.link-to-recover.center
|
16
|
+
= render "devise/shared/links"
|
17
|
+
|
18
|
+
.actions
|
19
|
+
= f.submit "Выслать инструкции по востановлению пароля".freeze
|
@@ -0,0 +1,31 @@
|
|
1
|
+
/ h2 Редактирование профиля
|
2
|
+
.devise-box
|
3
|
+
.white-box
|
4
|
+
= simple_form_for(resource, as: resource_name, url: user_registration_path) do |f|
|
5
|
+
/ = devise_error_messages!
|
6
|
+
h2.title Редактирование профиля
|
7
|
+
.form-group
|
8
|
+
/ = f.label :email, label: I18n.t("shared.email")
|
9
|
+
/ .form-control = f.email_field :email, autofocus: true, placeholder: I18n.t("shared.email")
|
10
|
+
= f.input :email, as: :email, autofocus: true, title: I18n.t("shared.email"), placeholder: I18n.t("shared.email"), label: false, wrapper_html: {class: "form-control"}
|
11
|
+
|
12
|
+
.form-group
|
13
|
+
/ = f.label :password
|
14
|
+
- if @minimum_password_length
|
15
|
+
em= " (Минимум символов: #{@minimum_password_length})".freeze
|
16
|
+
/ .form-control = f.password_field :password, label: I18n.t("shared.password"), autocomplete: "off", placeholder: I18n.t("shared.password")
|
17
|
+
= f.input :password, as: :password, autocomplete: 'off', title: I18n.t("shared.password"), placeholder: I18n.t("shared.password"), label: false, wrapper_html: {class: "form-control"}
|
18
|
+
|
19
|
+
.form-group
|
20
|
+
/ = f.label :password_confirmation
|
21
|
+
/ br
|
22
|
+
/ .form-control = f.password_field :password_confirmation, label: I18n.t("shared.password_confirmation"), autocomplete: "off", placeholder: I18n.t("shared.password_confirmation")
|
23
|
+
= f.input :password_confirmation, as: :password, autocomplete: 'off', title: I18n.t("shared.password_confirmation"), placeholder: I18n.t("shared.password_confirmation"), label: false, wrapper_html: {class: "form-control"}
|
24
|
+
|
25
|
+
|
26
|
+
.form-group.links
|
27
|
+
.link-to-recover.center
|
28
|
+
= render "devise/shared/links"
|
29
|
+
|
30
|
+
.actions
|
31
|
+
= f.submit "Зарегистрироваться".freeze
|
@@ -0,0 +1,39 @@
|
|
1
|
+
/h2 Регистрация
|
2
|
+
.devise-box
|
3
|
+
.white-box
|
4
|
+
= simple_form_for(resource, as: resource_name, url: user_registration_path) do |f|
|
5
|
+
/ = devise_error_messages!
|
6
|
+
h2.title Регистрация
|
7
|
+
.form-group
|
8
|
+
/ = f.label :email, label: I18n.t("shared.email")
|
9
|
+
/ .form-control = f.email_field :email, autofocus: true, placeholder: I18n.t("shared.email")
|
10
|
+
= f.input :email, as: :email, autofocus: true, title: I18n.t("shared.email"), placeholder: I18n.t("shared.email"), label: false, wrapper_html: {class: "form-control"}
|
11
|
+
|
12
|
+
.form-group
|
13
|
+
/ = f.label :password
|
14
|
+
- if @minimum_password_length
|
15
|
+
em= " (Минимум символов: #{@minimum_password_length})".freeze
|
16
|
+
/ .form-control = f.password_field :password, label: I18n.t("shared.password"), autocomplete: "off", placeholder: I18n.t("shared.password")
|
17
|
+
= f.input :password, as: :password, autocomplete: 'off', title: I18n.t("shared.password"), placeholder: I18n.t("shared.password"), label: false, wrapper_html: {class: "form-control"}
|
18
|
+
|
19
|
+
.form-group
|
20
|
+
/ = f.label :password_confirmation
|
21
|
+
/ br
|
22
|
+
/ .form-control = f.password_field :password_confirmation, label: I18n.t("shared.password_confirmation"), autocomplete: "off", placeholder: I18n.t("shared.password_confirmation")
|
23
|
+
= f.input :password_confirmation, as: :password, autocomplete: 'off', title: I18n.t("shared.password_confirmation"), placeholder: I18n.t("shared.password_confirmation"), label: false, wrapper_html: {class: "form-control"}
|
24
|
+
|
25
|
+
|
26
|
+
.form-group.links
|
27
|
+
.link-to-recover.center
|
28
|
+
= render "devise/shared/links"
|
29
|
+
|
30
|
+
.actions
|
31
|
+
- if Hancock.config.registration_captcha and (!Rails.env.development? or Hancock.config.captcha_on_development)
|
32
|
+
- if Hancock.config.recaptcha_support
|
33
|
+
- unless @recaptcha_error.blank?
|
34
|
+
h4.error= @recaptcha_error
|
35
|
+
= recaptcha_tags
|
36
|
+
- elsif Hancock.config.simple_captcha_support
|
37
|
+
= f.input :captcha, as: :simple_captcha, label: false
|
38
|
+
|
39
|
+
= f.submit I18n.t("shared.registration")
|
@@ -0,0 +1,39 @@
|
|
1
|
+
/ h2= I18n.t("shared.enter_site")
|
2
|
+
.devise-box
|
3
|
+
/ = resource.errors.inspect if resource
|
4
|
+
.white-box
|
5
|
+
= simple_form_for(resource, as: resource_name, url: user_session_path) do |f|
|
6
|
+
/ = devise_error_messages!
|
7
|
+
h2.title = I18n.t("shared.enter_site")
|
8
|
+
.form-group
|
9
|
+
/ label.form-label = f.label :email, I18n.t("shared.email")
|
10
|
+
/ .form-control = f.email_field :email, autofocus: true, title: I18n.t("shared.email"), placeholder: I18n.t("shared.email")
|
11
|
+
= f.input :email, as: :email, autofocus: true, title: I18n.t("shared.email"), placeholder: I18n.t("shared.email"), label: false, wrapper_html: {class: "form-control"}
|
12
|
+
|
13
|
+
.form-group
|
14
|
+
/ label.form-label = f.label :password, title: I18n.t("shared.password")
|
15
|
+
/ .form-control = f.password_field :password, autocomplete: "off", title: I18n.t("shared.password"), placeholder: I18n.t("shared.password")
|
16
|
+
= f.input :password, as: :password, autocomplete: 'off', title: I18n.t("shared.password"), placeholder: I18n.t("shared.password"), label: false, wrapper_html: {class: "form-control"}
|
17
|
+
|
18
|
+
.form-group.links
|
19
|
+
- if devise_mapping.rememberable?
|
20
|
+
/ .checkbox-primary
|
21
|
+
= f.check_box :remember_me, title: I18n.t("shared.remember_me")
|
22
|
+
= f.label :remember_me, I18n.t("shared.remember_me")
|
23
|
+
= f.input :remember_me, as: :boolean, title: I18n.t("shared.remember_me"), label: I18n.t("shared.remember_me"), wrapper_html: {class: "checkbox-primary"}
|
24
|
+
.link-to-recover
|
25
|
+
= render "devise/shared/links"
|
26
|
+
|
27
|
+
|
28
|
+
.actions
|
29
|
+
- if Hancock.config.admin_enter_captcha and (!Rails.env.development? or Hancock.config.captcha_on_development)
|
30
|
+
- if Hancock.config.recaptcha_support
|
31
|
+
- unless @recaptcha_error.blank?
|
32
|
+
h4.error= @recaptcha_error
|
33
|
+
= recaptcha_tags
|
34
|
+
- elsif Hancock.config.simple_captcha_support
|
35
|
+
= f.input :captcha, as: :simple_captcha, label: false
|
36
|
+
|
37
|
+
= f.submit I18n.t("shared.enter")
|
38
|
+
|
39
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
- if controller_name != 'sessions'
|
2
|
+
= link_to I18n.t("shared.enter_site"), new_user_session_path
|
3
|
+
br
|
4
|
+
|
5
|
+
- if devise_mapping.registerable? && controller_name != 'registrations'
|
6
|
+
= link_to I18n.t("shared.registration"), new_user_registration_path
|
7
|
+
br
|
8
|
+
|
9
|
+
- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations'
|
10
|
+
= link_to I18n.t("shared.forget_password"), new_user_password_path
|
11
|
+
br
|
@@ -0,0 +1 @@
|
|
1
|
+
= render 'hancock/errors/base', code: 403, text: t('hancock.errors.access_denied')
|
@@ -0,0 +1 @@
|
|
1
|
+
= render 'hancock/errors/base', code: 404, text: t('hancock.errors.not_found')
|
@@ -0,0 +1 @@
|
|
1
|
+
= render 'hancock/errors/base', code: 500, text: t('hancock.errors.internal_error')
|
@@ -0,0 +1 @@
|
|
1
|
+
div hancock_cms test app
|
@@ -0,0 +1,13 @@
|
|
1
|
+
label.form-label
|
2
|
+
= simple_captcha_options[:label]
|
3
|
+
= simple_captcha_options[:update_captcha]
|
4
|
+
.input_image_block
|
5
|
+
.image
|
6
|
+
= simple_captcha_options[:image]
|
7
|
+
.field
|
8
|
+
= simple_captcha_options[:field]
|
9
|
+
|
10
|
+
- unless simple_captcha_options[:error_messages].blank?
|
11
|
+
.errors_black
|
12
|
+
- simple_captcha_options[:error_messages].each do |m|
|
13
|
+
span.error= m
|
@@ -0,0 +1,35 @@
|
|
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= yield(:title) || page_title
|
7
|
+
= yield :meta
|
8
|
+
= csrf_meta_tags
|
9
|
+
= render partial: 'blocks/favicon'
|
10
|
+
|
11
|
+
- async = false #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
|
+
css:
|
17
|
+
#{Settings.custom_css(default: '', kind: :css, label: "Дополнительный CSS")}
|
18
|
+
javascript:
|
19
|
+
#{Settings.custom_js(default: '', kind: :js, label: "Дополнительный JS")}
|
20
|
+
|
21
|
+
body{class="#{controller_name} #{action_name} #{controller_name}_#{action_name}"}
|
22
|
+
#root role="main"
|
23
|
+
|
24
|
+
header#header
|
25
|
+
= render partial: 'blocks/header'
|
26
|
+
|
27
|
+
= render "shared/messages"
|
28
|
+
|
29
|
+
#content
|
30
|
+
= yield
|
31
|
+
|
32
|
+
footer#footer
|
33
|
+
= render partial: 'blocks/footer'
|
34
|
+
|
35
|
+
= render partial: 'hancock/toplink/toplink'
|
@@ -0,0 +1,22 @@
|
|
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= yield(:title) || page_title
|
7
|
+
= yield :meta
|
8
|
+
= csrf_meta_tags
|
9
|
+
= render partial: 'blocks/favicon'
|
10
|
+
|
11
|
+
- async = false #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
|
+
#preloader
|
19
|
+
#root
|
20
|
+
= render 'shared/messages'
|
21
|
+
#content.devise
|
22
|
+
= yield
|
@@ -0,0 +1,22 @@
|
|
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= yield(:title) || page_title
|
7
|
+
= yield :meta
|
8
|
+
= csrf_meta_tags
|
9
|
+
= render partial: 'blocks/favicon'
|
10
|
+
|
11
|
+
- async = false #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
|
+
#preloader
|
19
|
+
#root
|
20
|
+
= render 'shared/messages'
|
21
|
+
#content.devise
|
22
|
+
= yield
|
@@ -0,0 +1,22 @@
|
|
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= yield(:title) || page_title
|
7
|
+
= yield :meta
|
8
|
+
= csrf_meta_tags
|
9
|
+
= render partial: 'blocks/favicon'
|
10
|
+
|
11
|
+
- async = false #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
|
+
#preloader
|
19
|
+
#root
|
20
|
+
= render 'shared/messages'
|
21
|
+
#content.devise
|
22
|
+
= yield
|
@@ -0,0 +1,22 @@
|
|
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= yield(:title) || page_title
|
7
|
+
= yield :meta
|
8
|
+
= csrf_meta_tags
|
9
|
+
= render partial: 'blocks/favicon'
|
10
|
+
|
11
|
+
- async = false #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
|
+
#preloader
|
19
|
+
#root
|
20
|
+
= render 'shared/messages'
|
21
|
+
#content.devise
|
22
|
+
= yield
|
@@ -0,0 +1,22 @@
|
|
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= yield(:title) || page_title
|
7
|
+
= yield :meta
|
8
|
+
= csrf_meta_tags
|
9
|
+
= render partial: 'blocks/favicon'
|
10
|
+
|
11
|
+
- async = false #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
|
+
#preloader
|
19
|
+
#root
|
20
|
+
= render 'shared/messages'
|
21
|
+
#content.devise
|
22
|
+
= yield
|
@@ -0,0 +1,20 @@
|
|
1
|
+
ul
|
2
|
+
- actions(:root).each do |action|
|
3
|
+
- next if action.action_name.to_s == "dashboard"
|
4
|
+
- data_method = nil if action.http_methods.include?(:get)
|
5
|
+
- data_method = "post" if action.http_methods.include?(:post)
|
6
|
+
- data_method = "put" if action.http_methods.include?(:put)
|
7
|
+
- data_method = "delete" if action.http_methods.include?(:delete)
|
8
|
+
|
9
|
+
li{class="#{action.action_name} footer-nav-link"}
|
10
|
+
= link_to wording_for(:menu, action), {action: action.action_name, controller: 'rails_admin/main'}, class: (action.pjax? ? "pjax" : ""), title: wording_for(:menu, action), data: data_method ? {method: data_method, confirm: t("admin.actions.#{action.action_name}.confirm")} : nil
|
11
|
+
|
12
|
+
- if main_app_root_path = (main_app.root_path rescue false)
|
13
|
+
li.footer-nav-link = link_to main_app_root_path, title: "На сайт".freeze
|
14
|
+
span
|
15
|
+
i.fa.fa-home
|
16
|
+
|
17
|
+
- if logout_path.present?
|
18
|
+
li.footer-nav-link = link_to logout_path, title: "Выйти".freeze, method: logout_method
|
19
|
+
span
|
20
|
+
i.fa.fa-power-off
|
@@ -0,0 +1,73 @@
|
|
1
|
+
/.logo-block
|
2
|
+
/ = link_to dashboard_path, title: "Hancock CMS".freeze, class: "admin-title".freeze
|
3
|
+
/ = image_tag "rails-admin/hancock_logo.svg", title: "Hancock CMS".freeze, alt: "Hancock CMS".freeze, class: "hancock-main-logo"
|
4
|
+
/
|
5
|
+
/.top-nav
|
6
|
+
/ .left-nav
|
7
|
+
/ .top-nav-project = link_to dashboard_path, title: "Административная панель".freeze
|
8
|
+
/ - plugin_name = _get_plugin_name[0] || 'Rails'
|
9
|
+
/ span = "Административная панель: #{plugin_name}".freeze
|
10
|
+
/ .right-nav
|
11
|
+
/ = render partial: "layouts/rails_admin/secondary_navigation"
|
12
|
+
|
13
|
+
|
14
|
+
.navbar-header-brand
|
15
|
+
= link_to dashboard_path, title: "Hancock CMS".freeze, class: "admin-title".freeze
|
16
|
+
= image_tag "rails-admin/hancock_logo.svg", title: "Hancock CMS".freeze, alt: "Hancock CMS".freeze, class: "hancock-main-logo"
|
17
|
+
|
18
|
+
.navbar-container.container-fluid
|
19
|
+
.plugin-name-panel
|
20
|
+
- plugin_name = _get_plugin_name[0] || 'Rails'
|
21
|
+
= "Административная панель:"
|
22
|
+
span = link_to "#{plugin_name}".freeze, dashboard_path, title: "#{plugin_name}".freeze, class: "plugin-name-class"
|
23
|
+
|
24
|
+
.user-panel
|
25
|
+
- if _current_user
|
26
|
+
- if user_link = edit_user_link
|
27
|
+
.current_user
|
28
|
+
.user_icon
|
29
|
+
i.fa.fa-user-circle-o
|
30
|
+
ul.user_info
|
31
|
+
li.user_email = _current_user.email
|
32
|
+
li.user-edit-action
|
33
|
+
- abstract_model = RailsAdmin.config(_current_user.class).abstract_model
|
34
|
+
- edit_action = RailsAdmin::Config::Actions.find(:edit, controller: controller, abstract_model: abstract_model, object: _current_user).try(:authorized?)
|
35
|
+
= link_to rails_admin.url_for(action: :edit, model_name: abstract_model.to_param, id: _current_user.id, controller: 'rails_admin/main')
|
36
|
+
span Редактировать профиль
|
37
|
+
li.user-logout-action
|
38
|
+
= link_to logout_path, title: "Выйти".freeze, method: logout_method
|
39
|
+
span Выйти
|
40
|
+
|
41
|
+
/.user_root_link = edit_user_link
|
42
|
+
|
43
|
+
|
44
|
+
/.app-header.fixed
|
45
|
+
/ .app-header-inner
|
46
|
+
/ .brand-title
|
47
|
+
/ h2 = link_to dashboard_path, title: "Hancock CMS".freeze, class: "admin-title".freeze
|
48
|
+
/ span = image_tag "rails-admin/hancock_logo.svg", title: "Hancock CMS".freeze, alt: "Hancock CMS".freeze
|
49
|
+
/
|
50
|
+
/ .top-nav-left
|
51
|
+
/ .top-nav-project = link_to dashboard_path, title: "Административная панель".freeze
|
52
|
+
/ - plugin_name = _get_plugin_name[0] || 'Rails'
|
53
|
+
/ span = "Административная панель: #{plugin_name}".freeze
|
54
|
+
/ /
|
55
|
+
/ .top-nav-right
|
56
|
+
/ = render partial: "layouts/rails_admin/secondary_navigation"
|
57
|
+
/ ul.nav.navbar-nav.root_links
|
58
|
+
/ - actions(:root).each do |action|
|
59
|
+
/ / li.top-nav-control-panel = link_to "", { action: action.action_name, controller: 'rails_admin/main' }, class: action.pjax? ? "pjax" : ""
|
60
|
+
/ li.top-nav-control-panel = link_to "/admin", title: "Контрольная панель"
|
61
|
+
/ span
|
62
|
+
/ i.fa.fa-server
|
63
|
+
- if main_app_root_path = (main_app.root_path rescue false)
|
64
|
+
li.top-nav-goto-home = link_to main_app_root_path, title: "На главную".freeze
|
65
|
+
span
|
66
|
+
i.fa.fa-home
|
67
|
+
- if _current_user
|
68
|
+
- if user_link = edit_user_link
|
69
|
+
li.top-nav-user_root_link = edit_user_link
|
70
|
+
- if logout_path.present?
|
71
|
+
li.top-nav-logout = link_to logout_path, title: "Выйти".freeze, method: logout_method
|
72
|
+
span
|
73
|
+
i.fa.fa-sign-out
|