cd2_catton_cms 1.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Rakefile +37 -0
- data/app/assets/config/c_manifest.js +2 -0
- data/app/assets/images/c/drag_handle.gif +0 -0
- data/app/assets/images/c/login_background.jpg +0 -0
- data/app/assets/images/c/main_application/hero.jpg +0 -0
- data/app/assets/images/c/main_application/search.png +0 -0
- data/app/assets/images/c/placeholder_product_image.png +0 -0
- data/app/assets/images/c/select_arrow_down_blk.png +0 -0
- data/app/assets/images/c/small_icon.png +0 -0
- data/app/assets/images/c/vendor/chosen-sprite.png +0 -0
- data/app/assets/javascripts/c/application.js +59 -0
- data/app/assets/javascripts/c/change_tag.js +49 -0
- data/app/assets/javascripts/c/chosen.js +2 -0
- data/app/assets/javascripts/c/confirm_delete.js +55 -0
- data/app/assets/javascripts/c/draggable_tree.js +223 -0
- data/app/assets/javascripts/c/dropzone_init.js +98 -0
- data/app/assets/javascripts/c/fake_table.js +87 -0
- data/app/assets/javascripts/c/master_form2/collection.js +180 -0
- data/app/assets/javascripts/c/master_form2/eu_cookie.js +1 -0
- data/app/assets/javascripts/c/master_form2/jrecord.js +116 -0
- data/app/assets/javascripts/c/master_form2/master_form.coffee +4 -0
- data/app/assets/javascripts/c/split_buttons.js.erb +15 -0
- data/app/assets/javascripts/c/things_to_be_done.js +138 -0
- data/app/assets/javascripts/c/unloadevent.js +35 -0
- data/app/assets/stylesheets/c/_core.sass +237 -0
- data/app/assets/stylesheets/c/_engine.sass +4 -0
- data/app/assets/stylesheets/c/_variables.sass +32 -0
- data/app/assets/stylesheets/c/_vendor.sass +6 -0
- data/app/assets/stylesheets/c/application/checkout/_cart.sass +85 -0
- data/app/assets/stylesheets/c/application/checkout/_checkout.sass +87 -0
- data/app/assets/stylesheets/c/application/elements/buttons.sass +34 -0
- data/app/assets/stylesheets/c/application/elements/forms.sass +135 -0
- data/app/assets/stylesheets/c/application/elements/shadows.sass +23 -0
- data/app/assets/stylesheets/c/application/partials/_breadcrumbs.sass +10 -0
- data/app/assets/stylesheets/c/application/partials/_categories_sidebars/_1.sass +53 -0
- data/app/assets/stylesheets/c/application/partials/_categories_sidebars/_2.sass +77 -0
- data/app/assets/stylesheets/c/application/partials/_footer.sass +43 -0
- data/app/assets/stylesheets/c/application/partials/_header.sass +317 -0
- data/app/assets/stylesheets/c/engine/_draggable_trees.sass +68 -0
- data/app/assets/stylesheets/c/engine/_form_pages.sass +153 -0
- data/app/assets/stylesheets/c/engine/_header_bar.sass +29 -0
- data/app/assets/stylesheets/c/engine/_index_header.sass +17 -0
- data/app/assets/stylesheets/c/engine/_layout.sass +15 -0
- data/app/assets/stylesheets/c/engine/_login.sass +38 -0
- data/app/assets/stylesheets/c/engine/_navbar.sass +19 -0
- data/app/assets/stylesheets/c/engine/_pagination.sass +16 -0
- data/app/assets/stylesheets/c/engine/_settings.sass +5 -0
- data/app/assets/stylesheets/c/engine/_sidebar.sass +20 -0
- data/app/assets/stylesheets/c/engine/_tables.sass +76 -0
- data/app/assets/stylesheets/c/engine/flash_messages.sass +2 -0
- data/app/assets/stylesheets/c/print_application.sass +167 -0
- data/app/assets/stylesheets/c/vendor/_flex_mixins.scss +394 -0
- data/app/assets/stylesheets/c/vendor/_normalize.sass +340 -0
- data/app/controllers/c/admin/blogs_controller.rb +57 -0
- data/app/controllers/c/admin/devise/passwords_controller.rb +5 -0
- data/app/controllers/c/admin/devise/sessions_controller.rb +5 -0
- data/app/controllers/c/admin/documents_controller.rb +50 -0
- data/app/controllers/c/admin/enquiries_controller.rb +22 -0
- data/app/controllers/c/admin/images_controller.rb +21 -0
- data/app/controllers/c/admin/locations_controller.rb +63 -0
- data/app/controllers/c/admin/menu_items_controller.rb +49 -0
- data/app/controllers/c/admin/pages_controller.rb +94 -0
- data/app/controllers/c/admin/projects_controller.rb +55 -0
- data/app/controllers/c/admin/redirects_controller.rb +55 -0
- data/app/controllers/c/admin/roles_controller.rb +49 -0
- data/app/controllers/c/admin/slides_controller.rb +50 -0
- data/app/controllers/c/admin/slideshows_controller.rb +34 -0
- data/app/controllers/c/admin/team_members_controller.rb +61 -0
- data/app/controllers/c/admin/testimonials_controller.rb +43 -0
- data/app/controllers/c/admin/users_controller.rb +51 -0
- data/app/controllers/c/admin_controller.rb +43 -0
- data/app/controllers/c/application_controller.rb +15 -0
- data/app/controllers/c/errors_controller.rb +12 -0
- data/app/controllers/c/front/devise/passwords_controller.rb +6 -0
- data/app/controllers/c/front/devise/registrations_controller.rb +32 -0
- data/app/controllers/c/front/devise/sessions_controller.rb +27 -0
- data/app/controllers/c/front/mailchimp_controller.rb +32 -0
- data/app/controllers/c/front_controller.rb +7 -0
- data/app/controllers/c/front_end/blogs_controller.rb +21 -0
- data/app/controllers/c/front_end/enquiries_controller.rb +32 -0
- data/app/controllers/c/front_end/pages_controller.rb +19 -0
- data/app/controllers/c/main_application_controller.rb +22 -0
- data/app/helpers/c/application_helper.rb +51 -0
- data/app/helpers/c/blogs_helper.rb +113 -0
- data/app/helpers/c/c_form_builder.rb +43 -0
- data/app/helpers/c/link_to_helper.rb +25 -0
- data/app/helpers/c/navigation_helper.rb +28 -0
- data/app/helpers/c/pages_helper.rb +27 -0
- data/app/helpers/c/storefront_helper.rb +63 -0
- data/app/mailers/c/application_mailer.rb +7 -0
- data/app/mailers/c/enquiries_mailer.rb +10 -0
- data/app/models/c/ability.rb +21 -0
- data/app/models/c/application_record.rb +6 -0
- data/app/models/c/author_record.rb +13 -0
- data/app/models/c/blog.rb +43 -0
- data/app/models/c/document.rb +17 -0
- data/app/models/c/enquiry.rb +95 -0
- data/app/models/c/image.rb +11 -0
- data/app/models/c/location.rb +18 -0
- data/app/models/c/menu_item.rb +35 -0
- data/app/models/c/non_delete.rb +10 -0
- data/app/models/c/page.rb +48 -0
- data/app/models/c/page_info.rb +16 -0
- data/app/models/c/permission.rb +9 -0
- data/app/models/c/permission_subject.rb +12 -0
- data/app/models/c/project.rb +20 -0
- data/app/models/c/redirect.rb +33 -0
- data/app/models/c/role.rb +18 -0
- data/app/models/c/slide.rb +16 -0
- data/app/models/c/slideshow.rb +23 -0
- data/app/models/c/team_member.rb +33 -0
- data/app/models/c/testimonial.rb +42 -0
- data/app/models/c/user.rb +42 -0
- data/app/models/c/user_role.rb +7 -0
- data/app/models/c/weight.rb +10 -0
- data/app/models/concerns/c/authorable.rb +18 -0
- data/app/models/concerns/c/documentable.rb +18 -0
- data/app/models/concerns/c/imageable.rb +49 -0
- data/app/models/concerns/c/non_deletable.rb +30 -0
- data/app/models/concerns/c/orderable.rb +30 -0
- data/app/models/concerns/c/previewable.rb +20 -0
- data/app/models/concerns/c/site_page.rb +89 -0
- data/app/uploaders/c/file_uploader.rb +9 -0
- data/app/uploaders/c/image_uploader.rb +39 -0
- data/app/views/c/admin/_background_jobs_dropdown.html.haml +18 -0
- data/app/views/c/admin/_bread_crumbs.html.haml +7 -0
- data/app/views/c/admin/_ebay_categories.html.haml +20 -0
- data/app/views/c/admin/_flash_messages.html.haml +5 -0
- data/app/views/c/admin/_header_bar.html.haml +18 -0
- data/app/views/c/admin/_index_table.html.haml +113 -0
- data/app/views/c/admin/_index_table_data.html.haml +17 -0
- data/app/views/c/admin/_navigation_bar.html.haml +1 -0
- data/app/views/c/admin/_preview_image.html.haml +2 -0
- data/app/views/c/admin/_preview_upload.html.haml +18 -0
- data/app/views/c/admin/_seo.html.haml +11 -0
- data/app/views/c/admin/_side_menu.html.haml +26 -0
- data/app/views/c/admin/_uploaded_images_new.html.haml +13 -0
- data/app/views/c/admin/blogs/_form.html.haml +58 -0
- data/app/views/c/admin/blogs/index.html.haml +9 -0
- data/app/views/c/admin/confirm_destroy.html.haml +6 -0
- data/app/views/c/admin/confirm_mass_destroy.html.haml +10 -0
- data/app/views/c/admin/documents/_form.html.haml +8 -0
- data/app/views/c/admin/documents/index.html.haml +9 -0
- data/app/views/c/admin/edit.html.haml +15 -0
- data/app/views/c/admin/enquiries/index.html.haml +14 -0
- data/app/views/c/admin/locations/_form.html.haml +58 -0
- data/app/views/c/admin/locations/index.html.haml +9 -0
- data/app/views/c/admin/menu_items/_form.html.haml +44 -0
- data/app/views/c/admin/menu_items/_menu_item_list_item.html.haml +10 -0
- data/app/views/c/admin/menu_items/index.html.haml +10 -0
- data/app/views/c/admin/new.html.haml +8 -0
- data/app/views/c/admin/pages/_form.html.haml +93 -0
- data/app/views/c/admin/pages/_page_list_item.html.haml +10 -0
- data/app/views/c/admin/pages/dashboard.html.erb +0 -0
- data/app/views/c/admin/pages/index.html.haml +11 -0
- data/app/views/c/admin/projects/_form.html.haml +46 -0
- data/app/views/c/admin/projects/index.html.haml +9 -0
- data/app/views/c/admin/quick_edit.js.erb +6 -0
- data/app/views/c/admin/redirects/_form.html.haml +14 -0
- data/app/views/c/admin/redirects/index.html.haml +9 -0
- data/app/views/c/admin/reload_images.js.erb +2 -0
- data/app/views/c/admin/roles/_form.html.haml +42 -0
- data/app/views/c/admin/roles/index.html.haml +17 -0
- data/app/views/c/admin/set_preview_image.js.erb +1 -0
- data/app/views/c/admin/show.html.haml +1 -0
- data/app/views/c/admin/slides/_form.html.haml +19 -0
- data/app/views/c/admin/slideshows/_form.html.haml +25 -0
- data/app/views/c/admin/slideshows/index.html.haml +8 -0
- data/app/views/c/admin/team_members/_form.html.haml +20 -0
- data/app/views/c/admin/team_members/index.html.haml +10 -0
- data/app/views/c/admin/testimonials/_form.html.haml +13 -0
- data/app/views/c/admin/testimonials/index.html.haml +8 -0
- data/app/views/c/admin/users/_form.html.haml +17 -0
- data/app/views/c/admin/users/index.html.haml +12 -0
- data/app/views/c/enquiries_mailer/new_enquiry.html.haml +14 -0
- data/app/views/c/enquiries_mailer/new_enquiry.text.haml +9 -0
- data/app/views/c/errors/404.html.haml +5 -0
- data/app/views/c/errors/500.html.haml +5 -0
- data/app/views/c/front/application/_category_item.html.haml +2 -0
- data/app/views/c/front/application/_menu_item.html.haml +4 -0
- data/app/views/c/front/application/_sales_highlight.html.haml +1 -0
- data/app/views/c/front/application/_slide.html.haml +6 -0
- data/app/views/c/front/blogs/_archive_filter_month.html.haml +2 -0
- data/app/views/c/front/blogs/_archive_filter_year.html.haml +1 -0
- data/app/views/c/front/blogs/_menu_item.html.haml +2 -0
- data/app/views/c/front_end/enquiries/new.html.haml +23 -0
- data/app/views/c/front_end/enquiries/thanks.html.haml +5 -0
- data/app/views/c/front_end/pages/_sales_highlight.html.haml +7 -0
- data/app/views/c/front_end/pages/about.html.haml +8 -0
- data/app/views/c/front_end/pages/home.html.haml +19 -0
- data/app/views/c/front_end/pages/search.html.haml +16 -0
- data/app/views/c/front_end/pages/show.html.haml +7 -0
- data/app/views/c/front_end/pages/sitemap.xml.builder +25 -0
- data/app/views/c/mailchimp/_signup_newsletter.html.haml +4 -0
- data/app/views/c/main_application/_application_bar.html.haml +22 -0
- data/app/views/c/main_application/_breadcrumbs.html.haml +7 -0
- data/app/views/c/main_application/_contact_info.html.haml +5 -0
- data/app/views/c/main_application/_footer.html.haml +49 -0
- data/app/views/c/main_application/_front_head_tags.html.haml +3 -0
- data/app/views/c/main_application/_header.html.haml +55 -0
- data/app/views/c/main_application/_site_search.html.haml +3 -0
- data/app/views/c/main_application/_yield.html.haml +5 -0
- data/app/views/devise/confirmations/new.html.erb +16 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/password_change.html.erb +3 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/devise/passwords/edit.html.haml +26 -0
- data/app/views/devise/passwords/new.html.haml +14 -0
- data/app/views/devise/registrations/edit.html.haml +40 -0
- data/app/views/devise/registrations/new.html.haml +24 -0
- data/app/views/devise/sessions/new.html.haml +20 -0
- data/app/views/devise/shared/_links.html.erb +25 -0
- data/app/views/devise/unlocks/new.html.erb +16 -0
- data/app/views/layouts/c/application.html.haml +18 -0
- data/app/views/layouts/c/cms_login_layout.html.haml +18 -0
- data/app/views/layouts/c/mailer.html.erb +245 -0
- data/app/views/layouts/c/mailer.text.erb +3 -0
- data/app/views/layouts/c/main_application.html.haml +13 -0
- data/config/environment.rb +0 -0
- data/config/initializers/carrierwave.rb +18 -0
- data/config/initializers/devise.rb +283 -0
- data/config/initializers/rack_profiler.rb +8 -0
- data/config/locales/devise.en.yml +62 -0
- data/config/locales/en.yml +17 -0
- data/config/routes.rb +150 -0
- data/db/migrate/20160819000000_migrate_schema.rb +273 -0
- data/db/seed_data/countries.txt +227 -0
- data/lib/c/engine.rb +38 -0
- data/lib/c/version.rb +4 -0
- data/lib/cd2_catton_cms.rb +51 -0
- data/lib/tasks/c_tasks.rake +28 -0
- data/spec/dummy/Gemfile +4 -0
- data/spec/dummy/Gemfile.lock +20 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/config/manifest.js +5 -0
- data/spec/dummy/app/assets/images/placeholder.png +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +26 -0
- data/spec/dummy/app/assets/javascripts/cable.js +13 -0
- data/spec/dummy/app/assets/javascripts/pages.coffee +3 -0
- data/spec/dummy/app/assets/stylesheets/application.sass +13 -0
- data/spec/dummy/app/assets/stylesheets/c/application.sass +2 -0
- data/spec/dummy/app/controllers/application_controller.rb +10 -0
- data/spec/dummy/app/controllers/blogs_controller.rb +11 -0
- data/spec/dummy/app/controllers/pages_controller.rb +13 -0
- data/spec/dummy/app/models/application_record.rb +4 -0
- data/spec/dummy/app/models/page.rb +3 -0
- data/spec/dummy/bin/bundle +4 -0
- data/spec/dummy/bin/rails +5 -0
- data/spec/dummy/bin/rake +5 -0
- data/spec/dummy/bin/setup +35 -0
- data/spec/dummy/bin/update +30 -0
- data/spec/dummy/config/application.rb +17 -0
- data/spec/dummy/config/boot.rb +6 -0
- data/spec/dummy/config/cable.yml +9 -0
- data/spec/dummy/config/database.travis.yml +3 -0
- data/spec/dummy/config/database.yml +85 -0
- data/spec/dummy/config/environment.rb +6 -0
- data/spec/dummy/config/environments/development.rb +61 -0
- data/spec/dummy/config/environments/production.rb +87 -0
- data/spec/dummy/config/environments/test.rb +43 -0
- data/spec/dummy/config/initializers/application_controller_renderer.rb +7 -0
- data/spec/dummy/config/initializers/assets.rb +21 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +8 -0
- data/spec/dummy/config/initializers/carrierwave.rb +15 -0
- data/spec/dummy/config/initializers/commercity.rb +4 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +6 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +5 -0
- data/spec/dummy/config/initializers/inflections.rb +17 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/new_framework_defaults.rb +25 -0
- data/spec/dummy/config/initializers/session_store.rb +4 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +15 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/puma.rb +48 -0
- data/spec/dummy/config/routes.rb +4 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/config/sidekiq.yml +6 -0
- data/spec/dummy/config/spring.rb +7 -0
- data/spec/dummy/config.ru +5 -0
- data/spec/dummy/db/schema.rb +1110 -0
- data/spec/dummy/lib/tasks/reprocess_images.rake +12 -0
- data/spec/dummy/lib/tasks/reset_all.rake +44 -0
- data/spec/dummy/lib/tasks/seeds/seed_blogs.rake +8 -0
- data/spec/dummy/lib/tasks/seeds/seed_pages.rake +24 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/spec/dummy/public/apple-touch-icon.png +0 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/seed/highlight1.png +0 -0
- data/spec/dummy/seed/highlight2.png +0 -0
- data/spec/dummy/seed/images/1/main.jpg +0 -0
- data/spec/dummy/seed/images/1/thumb.JPG +0 -0
- data/spec/dummy/seed/images/1/thumb2.jpg +0 -0
- data/spec/dummy/seed/images/2/main.jpeg +0 -0
- data/spec/dummy/seed/images/2/thumb.JPG +0 -0
- data/spec/dummy/seed/images/2/thumb2.JPG +0 -0
- data/spec/dummy/spec/models/redirect_spec.rb +57 -0
- data/spec/dummy/spec/support/factory_girl.rb +8 -0
- data/spec/dummy/spec/support/seed/images/product_image.png +0 -0
- data/spec/rails_helper.rb +49 -0
- data/spec/spec_helper.rb +52 -0
- metadata +734 -0
@@ -0,0 +1,283 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Use this hook to configure devise mailer, warden hooks and so forth.
|
4
|
+
# Many of these configuration options can be set straight in your model.
|
5
|
+
Devise.setup do |config|
|
6
|
+
# The secret key used by Devise. Devise uses this key to generate
|
7
|
+
# random tokens. Changing this key will render invalid all existing
|
8
|
+
# confirmation, reset password and unlock tokens in the database.
|
9
|
+
# Devise will use the `secret_key_base` as its `secret_key`
|
10
|
+
# by default. You can change it below and use your own secret key.
|
11
|
+
# config.secret_key = '1b2310a05871a564e038bd9808b36979387cab876ee84c03d3b2cd11cfef450d4de56df1e5aed0c2fad7a702ea881b2c97bd96eba6b9beaab066f26eb07fd006'
|
12
|
+
config.secret_key = '300fa74007ae7c4c4e91176a8f676074478d627eab4825c38640a0453ce2654e2182113325b57582a1f1affdb00b4436c0a1b3cf1246c234c0de6544747147c7'
|
13
|
+
|
14
|
+
# ==> Mailer Configuration
|
15
|
+
# Configure the e-mail address which will be shown in Devise::Mailer,
|
16
|
+
# note that it will be overwritten if you use your own mailer class
|
17
|
+
# with default "from" parameter.
|
18
|
+
config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
|
19
|
+
|
20
|
+
# Configure the class responsible to send e-mails.
|
21
|
+
# config.mailer = 'Devise::Mailer'
|
22
|
+
|
23
|
+
# Configure the parent class responsible to send e-mails.
|
24
|
+
# config.parent_mailer = 'ActionMailer::Order'
|
25
|
+
|
26
|
+
# ==> ORM configuration
|
27
|
+
# Load and configure the ORM. Supports :active_record (default) and
|
28
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
29
|
+
# available as additional gems.
|
30
|
+
require 'devise/orm/active_record'
|
31
|
+
|
32
|
+
# ==> Configuration for any authentication mechanism
|
33
|
+
# Configure which keys are used when authenticating a user. The default is
|
34
|
+
# just :email. You can configure it to use [:username, :subdomain], so for
|
35
|
+
# authenticating a user, both parameters are required. Remember that those
|
36
|
+
# parameters are used only when authenticating and not when retrieving from
|
37
|
+
# session. If you need permissions, you should implement that in a before filter.
|
38
|
+
# You can also supply a hash where the value is a boolean determining whether
|
39
|
+
# or not authentication should be aborted when the value is not present.
|
40
|
+
# config.authentication_keys = [:email]
|
41
|
+
|
42
|
+
# Configure parameters from the request object used for authentication. Each entry
|
43
|
+
# given should be a request method and it will automatically be passed to the
|
44
|
+
# find_for_authentication method and considered in your model lookup. For instance,
|
45
|
+
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
|
46
|
+
# The same considerations mentioned for authentication_keys also apply to request_keys.
|
47
|
+
# config.request_keys = []
|
48
|
+
|
49
|
+
# Configure which authentication keys should be case-insensitive.
|
50
|
+
# These keys will be downcased upon creating or modifying a user and when used
|
51
|
+
# to authenticate or find a user. Default is :email.
|
52
|
+
config.case_insensitive_keys = [:email]
|
53
|
+
|
54
|
+
# Configure which authentication keys should have whitespace stripped.
|
55
|
+
# These keys will have whitespace before and after removed upon creating or
|
56
|
+
# modifying a user and when used to authenticate or find a user. Default is :email.
|
57
|
+
config.strip_whitespace_keys = [:email]
|
58
|
+
|
59
|
+
# Tell if authentication through request.params is enabled. True by default.
|
60
|
+
# It can be set to an array that will enable params authentication only for the
|
61
|
+
# given strategies, for example, `config.params_authenticatable = [:database]` will
|
62
|
+
# enable it only for database (email + password) authentication.
|
63
|
+
# config.params_authenticatable = true
|
64
|
+
|
65
|
+
# Tell if authentication through HTTP Auth is enabled. False by default.
|
66
|
+
# It can be set to an array that will enable http authentication only for the
|
67
|
+
# given strategies, for example, `config.http_authenticatable = [:database]` will
|
68
|
+
# enable it only for database authentication. The supported strategies are:
|
69
|
+
# :database = Support basic authentication with authentication key + password
|
70
|
+
# config.http_authenticatable = false
|
71
|
+
|
72
|
+
# If 401 status code should be returned for AJAX requests. True by default.
|
73
|
+
# config.http_authenticatable_on_xhr = true
|
74
|
+
|
75
|
+
# The realm used in Http Basic Authentication. 'Application' by default.
|
76
|
+
# config.http_authentication_realm = 'Application'
|
77
|
+
|
78
|
+
# It will change confirmation, password recovery and other workflows
|
79
|
+
# to behave the same regardless if the e-mail provided was right or wrong.
|
80
|
+
# Does not affect registerable.
|
81
|
+
# config.paranoid = true
|
82
|
+
|
83
|
+
# By default Devise will store the user in session. You can skip storage for
|
84
|
+
# particular strategies by setting this option.
|
85
|
+
# Notice that if you are skipping storage for all authentication paths, you
|
86
|
+
# may want to disable generating routes to Devise's sessions controller by
|
87
|
+
# passing skip: :sessions to `devise_for` in your config/routes.rb
|
88
|
+
config.skip_session_storage = [:http_auth]
|
89
|
+
|
90
|
+
# By default, Devise cleans up the CSRF token on authentication to
|
91
|
+
# avoid CSRF token fixation attacks. This means that, when using AJAX
|
92
|
+
# requests for sign in and sign up, you need to get a new CSRF token
|
93
|
+
# from the server. You can disable this option at your own risk.
|
94
|
+
# config.clean_up_csrf_token_on_authentication = true
|
95
|
+
|
96
|
+
# When false, Devise will not attempt to reload routes on eager load.
|
97
|
+
# This can reduce the time taken to boot the app but if your application
|
98
|
+
# requires the Devise mappings to be loaded during boot time the application
|
99
|
+
# won't boot properly.
|
100
|
+
# config.reload_routes = true
|
101
|
+
|
102
|
+
# ==> Configuration for :database_authenticatable
|
103
|
+
# For bcrypt, this is the cost for hashing the password and defaults to 11. If
|
104
|
+
# using other algorithms, it sets how many times you want the password to be hashed.
|
105
|
+
#
|
106
|
+
# Limiting the stretches to just one in testing will increase the performance of
|
107
|
+
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
|
108
|
+
# a value less than 10 in other environments. Note that, for bcrypt (the default
|
109
|
+
# algorithm), the cost increases exponentially with the number of stretches (e.g.
|
110
|
+
# a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
|
111
|
+
config.stretches = Rails.env.test? ? 1 : 11
|
112
|
+
|
113
|
+
# Set up a pepper to generate the hashed password.
|
114
|
+
# config.pepper = '0931c772da2e6c63908dd0157fbc07fc86f5198f29ca326c1207e4b1e541875370c7895e757a5486c12b9a0a44a40978bb8c8ab237787010be9253904d2cf789'
|
115
|
+
|
116
|
+
# Send a notification email when the user's password is changed
|
117
|
+
# config.send_password_change_notification = false
|
118
|
+
|
119
|
+
# ==> Configuration for :confirmable
|
120
|
+
# A period that the user is allowed to access the website even without
|
121
|
+
# confirming their account. For instance, if set to 2.days, the user will be
|
122
|
+
# able to access the website for two days without confirming their account,
|
123
|
+
# access will be blocked just in the third day. Default is 0.days, meaning
|
124
|
+
# the user cannot access the website without confirming their account.
|
125
|
+
# config.allow_unconfirmed_access_for = 2.days
|
126
|
+
|
127
|
+
# A period that the user is allowed to confirm their account before their
|
128
|
+
# token becomes invalid. For example, if set to 3.days, the user can confirm
|
129
|
+
# their account within 3 days after the mail was sent, but on the fourth day
|
130
|
+
# their account can't be confirmed with the token any more.
|
131
|
+
# Default is nil, meaning there is no restriction on how long a user can take
|
132
|
+
# before confirming their account.
|
133
|
+
# config.confirm_within = 3.days
|
134
|
+
|
135
|
+
# If true, requires any email changes to be confirmed (exactly the same way as
|
136
|
+
# initial account confirmation) to be applied. Requires additional unconfirmed_email
|
137
|
+
# db field (see migrations). Until confirmed, new email is stored in
|
138
|
+
# unconfirmed_email column, and copied to email column on successful confirmation.
|
139
|
+
config.reconfirmable = true
|
140
|
+
|
141
|
+
# Defines which key will be used when confirming an account
|
142
|
+
# config.confirmation_keys = [:email]
|
143
|
+
|
144
|
+
# ==> Configuration for :rememberable
|
145
|
+
# The time the user will be remembered without asking for credentials again.
|
146
|
+
# config.remember_for = 2.weeks
|
147
|
+
|
148
|
+
# Invalidates all the remember me tokens when the user signs out.
|
149
|
+
config.expire_all_remember_me_on_sign_out = true
|
150
|
+
|
151
|
+
# If true, extends the user's remember period when remembered via cookie.
|
152
|
+
# config.extend_remember_period = false
|
153
|
+
|
154
|
+
# Options to be passed to the created cookie. For instance, you can set
|
155
|
+
# secure: true in order to force SSL only cookies.
|
156
|
+
# config.rememberable_options = {}
|
157
|
+
|
158
|
+
# ==> Configuration for :validatable
|
159
|
+
# Range for password length.
|
160
|
+
config.password_length = 6..128
|
161
|
+
|
162
|
+
# Email regex used to validate email formats. It simply asserts that
|
163
|
+
# one (and only one) @ exists in the given string. This is mainly
|
164
|
+
# to give user feedback and not to assert the e-mail validity.
|
165
|
+
config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
|
166
|
+
|
167
|
+
# ==> Configuration for :timeoutable
|
168
|
+
# The time you want to timeout the user session without activity. After this
|
169
|
+
# time the user will be asked for credentials again. Default is 30 minutes.
|
170
|
+
# config.timeout_in = 30.minutes
|
171
|
+
|
172
|
+
# ==> Configuration for :lockable
|
173
|
+
# Defines which strategy will be used to lock an account.
|
174
|
+
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
175
|
+
# :none = No lock strategy. You should handle locking by yourself.
|
176
|
+
# config.lock_strategy = :failed_attempts
|
177
|
+
|
178
|
+
# Defines which key will be used when locking and unlocking an account
|
179
|
+
# config.unlock_keys = [:email]
|
180
|
+
|
181
|
+
# Defines which strategy will be used to unlock an account.
|
182
|
+
# :email = Sends an unlock link to the user email
|
183
|
+
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
184
|
+
# :both = Enables both strategies
|
185
|
+
# :none = No unlock strategy. You should handle unlocking by yourself.
|
186
|
+
# config.unlock_strategy = :both
|
187
|
+
|
188
|
+
# Number of authentication tries before locking an account if lock_strategy
|
189
|
+
# is failed attempts.
|
190
|
+
# config.maximum_attempts = 20
|
191
|
+
|
192
|
+
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
193
|
+
# config.unlock_in = 1.hour
|
194
|
+
|
195
|
+
# Warn on the last attempt before the account is locked.
|
196
|
+
# config.last_attempt_warning = true
|
197
|
+
|
198
|
+
# ==> Configuration for :recoverable
|
199
|
+
#
|
200
|
+
# Defines which key will be used when recovering the password for an account
|
201
|
+
# config.reset_password_keys = [:email]
|
202
|
+
|
203
|
+
# Time interval you can reset your password with a reset password key.
|
204
|
+
# Don't put a too small interval or your users won't have the time to
|
205
|
+
# change their passwords.
|
206
|
+
config.reset_password_within = 6.hours
|
207
|
+
|
208
|
+
# When set to false, does not sign a user in automatically after their password is
|
209
|
+
# reset. Defaults to true, so a user is signed in automatically after a reset.
|
210
|
+
# config.sign_in_after_reset_password = true
|
211
|
+
|
212
|
+
# ==> Configuration for :encryptable
|
213
|
+
# Allow you to use another hashing or encryption algorithm besides bcrypt (default).
|
214
|
+
# You can use :sha1, :sha512 or algorithms from others authentication tools as
|
215
|
+
# :clearance_sha1, :authlogic_sha512 (then you should set stretches above to 20
|
216
|
+
# for default behavior) and :restful_authentication_sha1 (then you should set
|
217
|
+
# stretches to 10, and copy REST_AUTH_SITE_KEY to pepper).
|
218
|
+
#
|
219
|
+
# Require the `devise-encryptable` gem when using anything other than bcrypt
|
220
|
+
# config.encryptor = :sha512
|
221
|
+
|
222
|
+
# ==> Scopes configuration
|
223
|
+
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
224
|
+
# "users/sessions/new". It's turned off by default because it's slower if you
|
225
|
+
# are using only default views.
|
226
|
+
# config.scoped_views = false
|
227
|
+
|
228
|
+
# Configure the default scope given to Warden. By default it's the first
|
229
|
+
# devise role declared in your routes (usually :user).
|
230
|
+
# config.default_scope = :user
|
231
|
+
|
232
|
+
# Set this configuration to false if you want /users/sign_out to sign out
|
233
|
+
# only the current scope. By default, Devise signs out all scopes.
|
234
|
+
config.sign_out_all_scopes = false
|
235
|
+
|
236
|
+
# ==> Navigation configuration
|
237
|
+
# Lists the formats that should be treated as navigational. Formats like
|
238
|
+
# :html, should redirect to the sign in page when the user does not have
|
239
|
+
# access, but formats like :xml or :json, should return 401.
|
240
|
+
#
|
241
|
+
# If you have any extra navigational formats, like :iphone or :mobile, you
|
242
|
+
# should add them to the navigational formats lists.
|
243
|
+
#
|
244
|
+
# The "*/*" below is required to match Internet Explorer requests.
|
245
|
+
# config.navigational_formats = ['*/*', :html]
|
246
|
+
|
247
|
+
# The default HTTP method used to sign out a resource. Default is :delete.
|
248
|
+
config.sign_out_via = :delete
|
249
|
+
|
250
|
+
# ==> OmniAuth
|
251
|
+
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
252
|
+
# up on your models and hooks.
|
253
|
+
# config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
|
254
|
+
|
255
|
+
# ==> Warden configuration
|
256
|
+
# If you want to use other strategies, that are not supported by Devise, or
|
257
|
+
# change the failure app, you can configure them inside the config.warden block.
|
258
|
+
#
|
259
|
+
# config.warden do |manager|
|
260
|
+
# manager.intercept_401 = false
|
261
|
+
# manager.default_strategies(scope: :user).unshift :some_external_strategy
|
262
|
+
# end
|
263
|
+
|
264
|
+
# ==> Mountable engine configurations
|
265
|
+
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
|
266
|
+
# is mountable, there are some extra configurations to be taken into account.
|
267
|
+
# The following options are available, assuming the engine is mounted as:
|
268
|
+
#
|
269
|
+
# mount MyEngine, at: '/my_engine'
|
270
|
+
#
|
271
|
+
# The router that invoked `devise_for`, in the example above, would be:
|
272
|
+
config.router_name = :c
|
273
|
+
#
|
274
|
+
# When using OmniAuth, Devise cannot automatically set OmniAuth path,
|
275
|
+
# so you need to do it manually. For the users scope, it would be:
|
276
|
+
# config.omniauth_path_prefix = '/my_engine/users/auth'
|
277
|
+
|
278
|
+
config.parent_controller = 'C::ApplicationController'
|
279
|
+
|
280
|
+
# config.warden do |manager|
|
281
|
+
# manager.failure_app = CustomFailure
|
282
|
+
# end
|
283
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
|
2
|
+
|
3
|
+
en:
|
4
|
+
devise:
|
5
|
+
confirmations:
|
6
|
+
confirmed: "Your email address has been successfully confirmed."
|
7
|
+
send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
|
8
|
+
send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
|
9
|
+
failure:
|
10
|
+
already_authenticated: "You are already signed in."
|
11
|
+
inactive: "Your account is not activated yet."
|
12
|
+
invalid: "Invalid %{authentication_keys} or password."
|
13
|
+
locked: "Your account is locked."
|
14
|
+
last_attempt: "You have one more attempt before your account is locked."
|
15
|
+
not_found_in_database: "Invalid %{authentication_keys} or password."
|
16
|
+
timeout: "Your session expired. Please sign in again to continue."
|
17
|
+
unauthenticated: "You need to sign in or sign up before continuing."
|
18
|
+
unconfirmed: "You have to confirm your email address before continuing."
|
19
|
+
mailer:
|
20
|
+
confirmation_instructions:
|
21
|
+
subject: "Confirmation instructions"
|
22
|
+
reset_password_instructions:
|
23
|
+
subject: "Reset password instructions"
|
24
|
+
unlock_instructions:
|
25
|
+
subject: "Unlock instructions"
|
26
|
+
password_change:
|
27
|
+
subject: "Password Changed"
|
28
|
+
omniauth_callbacks:
|
29
|
+
failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
|
30
|
+
success: "Successfully authenticated from %{kind} account."
|
31
|
+
passwords:
|
32
|
+
no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
|
33
|
+
send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
|
34
|
+
send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
|
35
|
+
updated: "Your password has been changed successfully. You are now signed in."
|
36
|
+
updated_not_active: "Your password has been changed successfully."
|
37
|
+
registrations:
|
38
|
+
destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon."
|
39
|
+
signed_up: "Welcome! You have signed up successfully."
|
40
|
+
signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
|
41
|
+
signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
|
42
|
+
signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account."
|
43
|
+
update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirm link to confirm your new email address."
|
44
|
+
updated: "Your account has been updated successfully."
|
45
|
+
sessions:
|
46
|
+
signed_in: "Signed in successfully."
|
47
|
+
signed_out: "Signed out successfully."
|
48
|
+
already_signed_out: "Signed out successfully."
|
49
|
+
unlocks:
|
50
|
+
send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes."
|
51
|
+
send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
|
52
|
+
unlocked: "Your account has been unlocked successfully. Please sign in to continue."
|
53
|
+
errors:
|
54
|
+
messages:
|
55
|
+
already_confirmed: "was already confirmed, please try signing in"
|
56
|
+
confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
|
57
|
+
expired: "has expired, please request a new one"
|
58
|
+
not_found: "not found"
|
59
|
+
not_locked: "was not locked"
|
60
|
+
not_saved:
|
61
|
+
one: "1 error prohibited this %{resource} from being saved:"
|
62
|
+
other: "%{count} errors prohibited this %{resource} from being saved:"
|
@@ -0,0 +1,17 @@
|
|
1
|
+
en:
|
2
|
+
cart:
|
3
|
+
add_named_item: 'Add %{item_name} to cart.'
|
4
|
+
add_item: 'Add Item to cart.'
|
5
|
+
remove_item: 'Remove Item from cart.'
|
6
|
+
|
7
|
+
item_count_plural: '%{count} items in cart'
|
8
|
+
item_count_single: '1 item in cart'
|
9
|
+
item_count_zero: 'Sorry, no items in your cart.'
|
10
|
+
|
11
|
+
date:
|
12
|
+
formats:
|
13
|
+
default: "%d/%m/%Y"
|
14
|
+
|
15
|
+
time:
|
16
|
+
formats:
|
17
|
+
default: "%d/%m/%Y %H:%M"
|
data/config/routes.rb
ADDED
@@ -0,0 +1,150 @@
|
|
1
|
+
|
2
|
+
# frozen_string_literal: true
|
3
|
+
C::Engine.routes.draw do
|
4
|
+
|
5
|
+
post '/tinymce_assets', to: 'admin/images#create'
|
6
|
+
scope module: :admin, path: C.admin_mount do
|
7
|
+
root 'pages#dashboard'
|
8
|
+
|
9
|
+
devise_for :users, class_name: 'C::User', module: 'c/admin/devise'
|
10
|
+
|
11
|
+
resources :users, except: [:show] do
|
12
|
+
get :confirm_destroy, on: :member
|
13
|
+
collection do
|
14
|
+
resources :roles, except: [:show] do
|
15
|
+
member do
|
16
|
+
get :confirm_destroy
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
resources :pages, except: [:show] do
|
23
|
+
collection do
|
24
|
+
post :sort
|
25
|
+
patch :update_order
|
26
|
+
end
|
27
|
+
member do
|
28
|
+
get :confirm_destroy
|
29
|
+
|
30
|
+
post :dropzone_image
|
31
|
+
post :reload_images
|
32
|
+
post :destroy_image
|
33
|
+
post :set_preview_image
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
resources :projects, except: [:show] do
|
38
|
+
collection do
|
39
|
+
post :sort
|
40
|
+
patch :update_order
|
41
|
+
end
|
42
|
+
member do
|
43
|
+
get :confirm_destroy
|
44
|
+
end
|
45
|
+
end
|
46
|
+
resources :testimonials, except: [:show] do
|
47
|
+
collection do
|
48
|
+
post :sort
|
49
|
+
patch :update_order
|
50
|
+
end
|
51
|
+
member do
|
52
|
+
get :confirm_destroy
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
resources :blogs, except: [:show] do
|
57
|
+
collection do
|
58
|
+
post :sort
|
59
|
+
end
|
60
|
+
member do
|
61
|
+
get :confirm_destroy
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
resources :locations, except: [:show] do
|
66
|
+
member do
|
67
|
+
get :confirm_destroy
|
68
|
+
end
|
69
|
+
collection do
|
70
|
+
post :sort
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
resources :team_members, except: [:show] do
|
75
|
+
collection do
|
76
|
+
post :sort
|
77
|
+
end
|
78
|
+
member do
|
79
|
+
get :confirm_destroy
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
resources :documents, only: [:index, :new, :create, :edit, :update, :destroy] do
|
84
|
+
collection do
|
85
|
+
post :bulk_upload
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
resources :menu_items, except: [:show] do
|
90
|
+
collection do
|
91
|
+
patch :update_order
|
92
|
+
end
|
93
|
+
member do
|
94
|
+
get :confirm_destroy
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
resources :redirects, except: :show do
|
99
|
+
post :bulk_actions, on: :collection
|
100
|
+
member do
|
101
|
+
get :confirm_destroy
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
resources :enquiries, only: [:show, :index, :destroy] do
|
106
|
+
get :confirm_destroy, on: :member
|
107
|
+
end
|
108
|
+
|
109
|
+
resources :slideshows, only: [:new, :create, :index, :edit, :update] do
|
110
|
+
resources :slides, only: [:new, :edit, :create, :update, :destroy] do
|
111
|
+
collection do
|
112
|
+
post :sort
|
113
|
+
end
|
114
|
+
member do
|
115
|
+
get :confirm_destroy
|
116
|
+
end
|
117
|
+
end
|
118
|
+
member do
|
119
|
+
get :confirm_destroy
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
end # END OF ADMIN SCOPE
|
124
|
+
|
125
|
+
%w(404 422 500 401).each do |code|
|
126
|
+
get code, to: 'errors#show', code: code
|
127
|
+
end
|
128
|
+
|
129
|
+
## FRONT END ROUTES
|
130
|
+
# These define the patterns for all routes on the main site
|
131
|
+
# You can create individual routes in the main applications when necessary
|
132
|
+
namespace :front_end, path: '/' do
|
133
|
+
match '/sitemap', to: 'pages#sitemap', via: 'get'
|
134
|
+
|
135
|
+
get '/contact-us', to: 'enquiries#new'
|
136
|
+
resources :enquiries, path: 'contact-us', only: [:new, :create] do
|
137
|
+
collection do
|
138
|
+
get :thanks
|
139
|
+
end
|
140
|
+
end
|
141
|
+
resources :blogs, only: [:index, :show]
|
142
|
+
resources :pages, only: [:show], path: '/' do
|
143
|
+
collection do
|
144
|
+
get :search
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
root 'pages#show'
|
149
|
+
end
|
150
|
+
end
|