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,340 @@
|
|
1
|
+
/*! normalize.css v3.0.2 | MIT License | git.io/normalize
|
2
|
+
|
3
|
+
/**
|
4
|
+
* 1. Set default font family to sans-serif.
|
5
|
+
* 2. Prevent iOS text size adjust after orientation change, without disabling
|
6
|
+
* user zoom.
|
7
|
+
|
8
|
+
html
|
9
|
+
font-family: sans-serif
|
10
|
+
/* 1
|
11
|
+
-ms-text-size-adjust: 100%
|
12
|
+
/* 2
|
13
|
+
-webkit-text-size-adjust: 100%
|
14
|
+
/* 2
|
15
|
+
|
16
|
+
/**
|
17
|
+
* Remove default margin.
|
18
|
+
|
19
|
+
body
|
20
|
+
margin: 0
|
21
|
+
|
22
|
+
/* HTML5 display definitions
|
23
|
+
* ==========================================================================
|
24
|
+
|
25
|
+
/**
|
26
|
+
* Correct `block` display not defined for any HTML5 element in IE 8/9.
|
27
|
+
* Correct `block` display not defined for `details` or `summary` in IE 10/11
|
28
|
+
* and Firefox.
|
29
|
+
* Correct `block` display not defined for `main` in IE 11.
|
30
|
+
|
31
|
+
article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary
|
32
|
+
display: block
|
33
|
+
|
34
|
+
/**
|
35
|
+
* 1. Correct `inline-block` display not defined in IE 8/9.
|
36
|
+
* 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
|
37
|
+
|
38
|
+
audio, canvas, progress, video
|
39
|
+
display: inline-block
|
40
|
+
/* 1
|
41
|
+
vertical-align: baseline
|
42
|
+
/* 2
|
43
|
+
|
44
|
+
/**
|
45
|
+
* Prevent modern browsers from displaying `audio` without controls.
|
46
|
+
* Remove excess height in iOS 5 devices.
|
47
|
+
|
48
|
+
audio:not([controls])
|
49
|
+
display: none
|
50
|
+
height: 0
|
51
|
+
|
52
|
+
/**
|
53
|
+
* Address `[hidden]` styling not present in IE 8/9/10.
|
54
|
+
* Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
|
55
|
+
|
56
|
+
[hidden], template
|
57
|
+
display: none
|
58
|
+
|
59
|
+
/* Links
|
60
|
+
* ==========================================================================
|
61
|
+
|
62
|
+
/**
|
63
|
+
* Remove the gray background color from active links in IE 10.
|
64
|
+
|
65
|
+
a
|
66
|
+
background-color: transparent
|
67
|
+
&:active, &:hover
|
68
|
+
outline: 0
|
69
|
+
|
70
|
+
/**
|
71
|
+
* Improve readability when focused and also mouse hovered in all browsers.
|
72
|
+
|
73
|
+
/* Text-level semantics
|
74
|
+
* ==========================================================================
|
75
|
+
|
76
|
+
/**
|
77
|
+
* Address styling not present in IE 8/9/10/11, Safari, and Chrome.
|
78
|
+
|
79
|
+
abbr[title]
|
80
|
+
border-bottom: 1px dotted
|
81
|
+
|
82
|
+
/**
|
83
|
+
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
|
84
|
+
|
85
|
+
b, strong
|
86
|
+
font-weight: bold
|
87
|
+
|
88
|
+
/**
|
89
|
+
* Address styling not present in Safari and Chrome.
|
90
|
+
|
91
|
+
dfn
|
92
|
+
font-style: italic
|
93
|
+
|
94
|
+
/**
|
95
|
+
* Address variable `h1` font-size and margin within `section` and `article`
|
96
|
+
* contexts in Firefox 4+, Safari, and Chrome.
|
97
|
+
|
98
|
+
h1
|
99
|
+
font-size: 2em
|
100
|
+
margin: 0.67em 0
|
101
|
+
|
102
|
+
/**
|
103
|
+
* Address styling not present in IE 8/9.
|
104
|
+
|
105
|
+
mark
|
106
|
+
background: #ff0
|
107
|
+
color: #000
|
108
|
+
|
109
|
+
/**
|
110
|
+
* Address inconsistent and variable font size in all browsers.
|
111
|
+
|
112
|
+
small
|
113
|
+
font-size: 80%
|
114
|
+
|
115
|
+
/**
|
116
|
+
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
|
117
|
+
|
118
|
+
sub
|
119
|
+
font-size: 75%
|
120
|
+
line-height: 0
|
121
|
+
position: relative
|
122
|
+
vertical-align: baseline
|
123
|
+
|
124
|
+
sup
|
125
|
+
font-size: 75%
|
126
|
+
line-height: 0
|
127
|
+
position: relative
|
128
|
+
vertical-align: baseline
|
129
|
+
top: -0.5em
|
130
|
+
|
131
|
+
sub
|
132
|
+
bottom: -0.25em
|
133
|
+
|
134
|
+
/* Embedded content
|
135
|
+
* ==========================================================================
|
136
|
+
|
137
|
+
/**
|
138
|
+
* Remove border when inside `a` element in IE 8/9/10.
|
139
|
+
|
140
|
+
img
|
141
|
+
border: 0
|
142
|
+
|
143
|
+
/**
|
144
|
+
* Correct overflow not hidden in IE 9/10/11.
|
145
|
+
|
146
|
+
svg:not(:root)
|
147
|
+
overflow: hidden
|
148
|
+
|
149
|
+
/* Grouping content
|
150
|
+
* ==========================================================================
|
151
|
+
|
152
|
+
/**
|
153
|
+
* Address margin not present in IE 8/9 and Safari.
|
154
|
+
|
155
|
+
figure
|
156
|
+
margin: 1em 40px
|
157
|
+
|
158
|
+
/**
|
159
|
+
* Address differences between Firefox and other browsers.
|
160
|
+
|
161
|
+
hr
|
162
|
+
-moz-box-sizing: content-box
|
163
|
+
box-sizing: content-box
|
164
|
+
height: 0
|
165
|
+
|
166
|
+
/**
|
167
|
+
* Contain overflow in all browsers.
|
168
|
+
|
169
|
+
pre
|
170
|
+
overflow: auto
|
171
|
+
|
172
|
+
/**
|
173
|
+
* Address odd `em`-unit font size rendering in all browsers.
|
174
|
+
|
175
|
+
code, kbd, pre, samp
|
176
|
+
font-family: monospace, monospace
|
177
|
+
font-size: 1em
|
178
|
+
|
179
|
+
/* Forms
|
180
|
+
* ==========================================================================
|
181
|
+
|
182
|
+
/**
|
183
|
+
* Known limitation: by default, Chrome and Safari on OS X allow very limited
|
184
|
+
* styling of `select`, unless a `border` property is set.
|
185
|
+
|
186
|
+
/**
|
187
|
+
* 1. Correct color not being inherited.
|
188
|
+
* Known issue: affects color of disabled elements.
|
189
|
+
* 2. Correct font properties not being inherited.
|
190
|
+
* 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
|
191
|
+
|
192
|
+
button, input, optgroup, select, textarea
|
193
|
+
color: inherit
|
194
|
+
/* 1
|
195
|
+
font: inherit
|
196
|
+
/* 2
|
197
|
+
margin: 0
|
198
|
+
/* 3
|
199
|
+
|
200
|
+
/**
|
201
|
+
* Address `overflow` set to `hidden` in IE 8/9/10/11.
|
202
|
+
|
203
|
+
button
|
204
|
+
overflow: visible
|
205
|
+
text-transform: none
|
206
|
+
|
207
|
+
/**
|
208
|
+
* Address inconsistent `text-transform` inheritance for `button` and `select`.
|
209
|
+
* All other form control elements do not inherit `text-transform` values.
|
210
|
+
* Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
|
211
|
+
* Correct `select` style inheritance in Firefox.
|
212
|
+
|
213
|
+
select
|
214
|
+
text-transform: none
|
215
|
+
|
216
|
+
/**
|
217
|
+
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
|
218
|
+
* and `video` controls.
|
219
|
+
* 2. Correct inability to style clickable `input` types in iOS.
|
220
|
+
* 3. Improve usability and consistency of cursor style between image-type
|
221
|
+
* `input` and others.
|
222
|
+
|
223
|
+
button, html input[type="button"]
|
224
|
+
-webkit-appearance: button
|
225
|
+
/* 2
|
226
|
+
cursor: pointer
|
227
|
+
/* 3
|
228
|
+
|
229
|
+
input
|
230
|
+
&[type="reset"], &[type="submit"]
|
231
|
+
-webkit-appearance: button
|
232
|
+
/* 2
|
233
|
+
cursor: pointer
|
234
|
+
/* 3
|
235
|
+
|
236
|
+
/**
|
237
|
+
* Re-set default cursor for disabled elements.
|
238
|
+
|
239
|
+
button[disabled], html input[disabled]
|
240
|
+
cursor: default
|
241
|
+
|
242
|
+
/**
|
243
|
+
* Remove inner padding and border in Firefox 4+.
|
244
|
+
|
245
|
+
button::-moz-focus-inner
|
246
|
+
border: 0
|
247
|
+
padding: 0
|
248
|
+
|
249
|
+
input
|
250
|
+
&::-moz-focus-inner
|
251
|
+
border: 0
|
252
|
+
padding: 0
|
253
|
+
line-height: normal
|
254
|
+
&[type="checkbox"], &[type="radio"]
|
255
|
+
box-sizing: border-box
|
256
|
+
/* 1
|
257
|
+
padding: 0
|
258
|
+
/* 2
|
259
|
+
&[type="number"]
|
260
|
+
&::-webkit-inner-spin-button, &::-webkit-outer-spin-button
|
261
|
+
height: auto
|
262
|
+
&[type="search"]
|
263
|
+
-webkit-appearance: textfield
|
264
|
+
/* 1
|
265
|
+
-moz-box-sizing: content-box
|
266
|
+
-webkit-box-sizing: content-box
|
267
|
+
/* 2
|
268
|
+
box-sizing: content-box
|
269
|
+
&::-webkit-search-cancel-button, &::-webkit-search-decoration
|
270
|
+
-webkit-appearance: none
|
271
|
+
|
272
|
+
/**
|
273
|
+
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
|
274
|
+
* the UA stylesheet.
|
275
|
+
|
276
|
+
/**
|
277
|
+
* It's recommended that you don't attempt to style these elements.
|
278
|
+
* Firefox's implementation doesn't respect box-sizing, padding, or width.
|
279
|
+
*
|
280
|
+
* 1. Address box sizing set to `content-box` in IE 8/9/10.
|
281
|
+
* 2. Remove excess padding in IE 8/9/10.
|
282
|
+
|
283
|
+
/**
|
284
|
+
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
|
285
|
+
* `font-size` values of the `input`, it causes the cursor style of the
|
286
|
+
* decrement button to change from `default` to `text`.
|
287
|
+
|
288
|
+
/**
|
289
|
+
* 1. Address `appearance` set to `searchfield` in Safari and Chrome.
|
290
|
+
* 2. Address `box-sizing` set to `border-box` in Safari and Chrome
|
291
|
+
* (include `-moz` to future-proof).
|
292
|
+
|
293
|
+
/**
|
294
|
+
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
|
295
|
+
* Safari (but not Chrome) clips the cancel button when the search input has
|
296
|
+
* padding (and `textfield` appearance).
|
297
|
+
|
298
|
+
/**
|
299
|
+
* Define consistent border, margin, and padding.
|
300
|
+
|
301
|
+
fieldset
|
302
|
+
border: 1px solid #c0c0c0
|
303
|
+
margin: 0 2px
|
304
|
+
padding: 0.35em 0.625em 0.75em
|
305
|
+
|
306
|
+
/**
|
307
|
+
* 1. Correct `color` not being inherited in IE 8/9/10/11.
|
308
|
+
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
|
309
|
+
|
310
|
+
legend
|
311
|
+
border: 0
|
312
|
+
/* 1
|
313
|
+
padding: 0
|
314
|
+
/* 2
|
315
|
+
|
316
|
+
/**
|
317
|
+
* Remove default vertical scrollbar in IE 8/9/10/11.
|
318
|
+
|
319
|
+
textarea
|
320
|
+
overflow: auto
|
321
|
+
|
322
|
+
/**
|
323
|
+
* Don't inherit the `font-weight` (applied by a rule above).
|
324
|
+
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
|
325
|
+
|
326
|
+
optgroup
|
327
|
+
font-weight: bold
|
328
|
+
|
329
|
+
/* Tables
|
330
|
+
* ==========================================================================
|
331
|
+
|
332
|
+
/**
|
333
|
+
* Remove most spacing between table cells.
|
334
|
+
|
335
|
+
table
|
336
|
+
border-collapse: collapse
|
337
|
+
border-spacing: 0
|
338
|
+
|
339
|
+
td, th
|
340
|
+
padding: 0
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_dependency 'c/admin_controller'
|
3
|
+
|
4
|
+
module C
|
5
|
+
class Admin::BlogsController < AdminController
|
6
|
+
before_action :load_from_url, only: [:edit, :update, :destroy]
|
7
|
+
load_and_authorize_resource class: C::Blog
|
8
|
+
|
9
|
+
def index
|
10
|
+
@blogs = filter_and_paginate(@blogs, 'created_at desc')
|
11
|
+
end
|
12
|
+
|
13
|
+
def create
|
14
|
+
@blog = C::Blog.new(blog_params)
|
15
|
+
if @blog.save
|
16
|
+
redirect_to blogs_path
|
17
|
+
else
|
18
|
+
render :new
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def update
|
23
|
+
if params[:commit] == 'upload'
|
24
|
+
@blog.assign_attributes(new_image_params)
|
25
|
+
render :edit
|
26
|
+
elsif @blog.update(blog_params)
|
27
|
+
redirect_to blogs_path
|
28
|
+
else
|
29
|
+
render :edit
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def destroy
|
34
|
+
@blog.destroy
|
35
|
+
respond_to do |format|
|
36
|
+
format.js
|
37
|
+
format.html { redirect_to pages_path }
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def load_from_url
|
44
|
+
@blog = C::Blog.get_from_url(params[:id])
|
45
|
+
end
|
46
|
+
|
47
|
+
def new_image_params
|
48
|
+
params.require(:blog).permit(new_images: [], images_attributes: [:id, :_destroy, :alt, :caption])
|
49
|
+
end
|
50
|
+
|
51
|
+
def blog_params
|
52
|
+
params.require(:blog).permit(
|
53
|
+
:name, :body, :published, :url_alias, C::Blog::IMAGEABLE_ATTRIBUTES, C::Blog::PAGE_INFO_ATTRIBUTES, new_images: []
|
54
|
+
)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_dependency 'c/admin_controller'
|
3
|
+
|
4
|
+
module C
|
5
|
+
class Admin::DocumentsController < AdminController
|
6
|
+
load_and_authorize_resource class: C::Document
|
7
|
+
|
8
|
+
def index; end
|
9
|
+
|
10
|
+
def create
|
11
|
+
if @document.save
|
12
|
+
redirect_to documents_path, notice: 'Document created'
|
13
|
+
else
|
14
|
+
render :new
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def update
|
19
|
+
if @document.update(document_params)
|
20
|
+
redirect_to documents_path, notice: 'Document updated'
|
21
|
+
else
|
22
|
+
render :edit
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def destroy
|
27
|
+
@document.delete
|
28
|
+
redirect_to documents_path, notice: 'Document deleted'
|
29
|
+
end
|
30
|
+
|
31
|
+
def bulk_upload
|
32
|
+
count = 0
|
33
|
+
|
34
|
+
params[:documents][:attachments].each do |attachment|
|
35
|
+
document = C::Document.new(name: attachment[:attachment].original_filename, document: attachment[:attachment])
|
36
|
+
count += 1 if document.save
|
37
|
+
end
|
38
|
+
|
39
|
+
redirect_to documents_path, notice: "#{count} document(s) uploaded"
|
40
|
+
end
|
41
|
+
|
42
|
+
# TODO: Add a destroy action
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def document_params
|
47
|
+
params.require(:document).permit(:document, :name)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_dependency 'c/admin_controller'
|
3
|
+
|
4
|
+
module C
|
5
|
+
class Admin::EnquiriesController < AdminController
|
6
|
+
load_and_authorize_resource class: C::Enquiry
|
7
|
+
|
8
|
+
def index
|
9
|
+
@enquiries = filter_and_paginate(@enquiries, 'created_at desc')
|
10
|
+
end
|
11
|
+
|
12
|
+
def show; end
|
13
|
+
|
14
|
+
def destroy
|
15
|
+
@enquiry.destroy
|
16
|
+
respond_to do |format|
|
17
|
+
format.js
|
18
|
+
format.html { redirect_to enquiries_path }
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_dependency 'c/admin_controller'
|
3
|
+
|
4
|
+
module C
|
5
|
+
class Admin::ImagesController < AdminController
|
6
|
+
load_and_authorize_resource class: C::Image
|
7
|
+
|
8
|
+
def create
|
9
|
+
# Take upload from params[:file] and store it somehow...
|
10
|
+
# Optionally also accept params[:hint] and consume if needed
|
11
|
+
image = C::Image.create!(image: params[:file])
|
12
|
+
|
13
|
+
render json: {
|
14
|
+
image: {
|
15
|
+
url: image.image.url
|
16
|
+
}
|
17
|
+
}, content_type: 'text/html'
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_dependency 'c/admin_controller'
|
3
|
+
|
4
|
+
module C
|
5
|
+
class Admin::LocationsController < AdminController
|
6
|
+
before_action :load_from_url, only: [:edit, :update, :destroy]
|
7
|
+
load_and_authorize_resource class: C::Location
|
8
|
+
|
9
|
+
def index
|
10
|
+
@locations = filter_and_paginate(@locations, 'created_at desc')
|
11
|
+
end
|
12
|
+
|
13
|
+
def create
|
14
|
+
@location = C::Location.new(location_params)
|
15
|
+
if @location.save
|
16
|
+
redirect_to locations_path, notice: 'Location created'
|
17
|
+
else
|
18
|
+
render :new
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def update
|
23
|
+
if params[:commit] == 'upload'
|
24
|
+
@location.assign_attributes(new_image_params)
|
25
|
+
render :edit
|
26
|
+
elsif @location.update(location_params)
|
27
|
+
redirect_to locations_path, notice: 'Location updated'
|
28
|
+
else
|
29
|
+
render :edit
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def destroy
|
34
|
+
@location.destroy
|
35
|
+
respond_to do |format|
|
36
|
+
format.js
|
37
|
+
format.html { redirect_to locations_path }
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def sort
|
42
|
+
@locations = C::Location.all
|
43
|
+
@locations.update_order(params[:location])
|
44
|
+
respond_to do |format|
|
45
|
+
format.js { head :ok, content_type: 'text/html' }
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
private
|
50
|
+
|
51
|
+
def load_from_url
|
52
|
+
@location = C::Location.get_from_url(params[:id])
|
53
|
+
end
|
54
|
+
|
55
|
+
def new_image_params
|
56
|
+
params.require(:location).permit(new_images: [], images_attributes: [:id, :_destroy, :alt, :caption])
|
57
|
+
end
|
58
|
+
|
59
|
+
def location_params
|
60
|
+
params.require(:location).permit(:name, :body, :published, C::Page::IMAGEABLE_ATTRIBUTES, C::Page::PAGE_INFO_ATTRIBUTES, new_images: [])
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_dependency 'c/admin_controller'
|
3
|
+
|
4
|
+
module C
|
5
|
+
class Admin::MenuItemsController < AdminController
|
6
|
+
load_and_authorize_resource class: C::MenuItem
|
7
|
+
|
8
|
+
def index
|
9
|
+
@menu_items = @menu_items.hash_tree
|
10
|
+
end
|
11
|
+
|
12
|
+
def create
|
13
|
+
if @menu_item.save
|
14
|
+
redirect_to menu_items_path, notice: 'Item Created'
|
15
|
+
else
|
16
|
+
render :new
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def update
|
21
|
+
if @menu_item.update(menu_item_params)
|
22
|
+
redirect_to menu_items_path, notice: 'Item Updated'
|
23
|
+
else
|
24
|
+
render :edit
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def update_order
|
29
|
+
children = params.require(:order)
|
30
|
+
MenuItem.update(children.keys, children.values)
|
31
|
+
end
|
32
|
+
|
33
|
+
def destroy
|
34
|
+
@menu_item.destroy
|
35
|
+
respond_to do |format|
|
36
|
+
format.js
|
37
|
+
format.html { redirect_to [:menu_items] }
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def confirm_destroy; end
|
42
|
+
|
43
|
+
private
|
44
|
+
|
45
|
+
def menu_item_params
|
46
|
+
params.require(:menu_item).permit(:name, :link, :target, :page_id, :parent_id)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,94 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_dependency 'c/admin_controller'
|
3
|
+
|
4
|
+
module C
|
5
|
+
class Admin::PagesController < AdminController
|
6
|
+
before_action :load_from_url, only: [:destroy, :edit, :update]
|
7
|
+
load_and_authorize_resource class: C::Page
|
8
|
+
|
9
|
+
# required for dropzone to work
|
10
|
+
skip_before_action :verify_authenticity_token, only: :dropzone_image
|
11
|
+
|
12
|
+
def index
|
13
|
+
# @pages = filter_and_paginate(@pages, 'created_at desc')
|
14
|
+
@pages = C::Page.hash_tree
|
15
|
+
end
|
16
|
+
|
17
|
+
def new; end
|
18
|
+
|
19
|
+
def edit; end
|
20
|
+
|
21
|
+
def create
|
22
|
+
if @page.save
|
23
|
+
redirect_to pages_path, notice: 'Page created'
|
24
|
+
else
|
25
|
+
render :new
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def update
|
30
|
+
if @page.update(page_params)
|
31
|
+
redirect_to pages_path, notice: 'Page updated'
|
32
|
+
else
|
33
|
+
render :edit
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def dashboard; end
|
38
|
+
|
39
|
+
def destroy
|
40
|
+
@page.destroy unless @page.protected
|
41
|
+
respond_to do |format|
|
42
|
+
format.js
|
43
|
+
format.html { redirect_to pages_path }
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# methods for dropzone and js image cool stuff
|
48
|
+
def dropzone_image
|
49
|
+
@page.images.create(image: params[:file])
|
50
|
+
end
|
51
|
+
|
52
|
+
def destroy_image
|
53
|
+
@page.images.find_by(id: params[:image_id]).destroy
|
54
|
+
respond_to do |format|
|
55
|
+
format.js
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
def reload_images
|
60
|
+
@obj = @page
|
61
|
+
respond_to do |format|
|
62
|
+
format.js
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
def set_preview_image
|
67
|
+
@obj = @page
|
68
|
+
@obj.images.find_each { |image| image.update(preview_image: false) }
|
69
|
+
C::Image.find(params[:image_id]).update(preview_image: true)
|
70
|
+
respond_to do |format|
|
71
|
+
format.js
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def update_order
|
76
|
+
children = params.require(:order)
|
77
|
+
Page.update(children.keys, children.values)
|
78
|
+
end
|
79
|
+
|
80
|
+
private
|
81
|
+
|
82
|
+
def load_from_url
|
83
|
+
@page = C::Page.get_from_url(params[:id])
|
84
|
+
end
|
85
|
+
|
86
|
+
def new_image_params
|
87
|
+
params.require(:page).permit(new_images: [], images_attributes: [:id, :_destroy, :alt, :caption])
|
88
|
+
end
|
89
|
+
|
90
|
+
def page_params
|
91
|
+
params.require(:page).permit(:name, :body, :preview_body, :layout, :published, :url_alias, C::Page::IMAGEABLE_ATTRIBUTES, C::Page::PAGE_INFO_ATTRIBUTES, new_images: [], documents_attributes: [:id, :name, :document, :_destroy], new_documents: [])
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|