cd2_catton_cms 1.1.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (306) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +37 -0
  3. data/app/assets/config/c_manifest.js +2 -0
  4. data/app/assets/images/c/drag_handle.gif +0 -0
  5. data/app/assets/images/c/login_background.jpg +0 -0
  6. data/app/assets/images/c/main_application/hero.jpg +0 -0
  7. data/app/assets/images/c/main_application/search.png +0 -0
  8. data/app/assets/images/c/placeholder_product_image.png +0 -0
  9. data/app/assets/images/c/select_arrow_down_blk.png +0 -0
  10. data/app/assets/images/c/small_icon.png +0 -0
  11. data/app/assets/images/c/vendor/chosen-sprite.png +0 -0
  12. data/app/assets/javascripts/c/application.js +59 -0
  13. data/app/assets/javascripts/c/change_tag.js +49 -0
  14. data/app/assets/javascripts/c/chosen.js +2 -0
  15. data/app/assets/javascripts/c/confirm_delete.js +55 -0
  16. data/app/assets/javascripts/c/draggable_tree.js +223 -0
  17. data/app/assets/javascripts/c/dropzone_init.js +98 -0
  18. data/app/assets/javascripts/c/fake_table.js +87 -0
  19. data/app/assets/javascripts/c/master_form2/collection.js +180 -0
  20. data/app/assets/javascripts/c/master_form2/eu_cookie.js +1 -0
  21. data/app/assets/javascripts/c/master_form2/jrecord.js +116 -0
  22. data/app/assets/javascripts/c/master_form2/master_form.coffee +4 -0
  23. data/app/assets/javascripts/c/split_buttons.js.erb +15 -0
  24. data/app/assets/javascripts/c/things_to_be_done.js +138 -0
  25. data/app/assets/javascripts/c/unloadevent.js +35 -0
  26. data/app/assets/stylesheets/c/_core.sass +237 -0
  27. data/app/assets/stylesheets/c/_engine.sass +4 -0
  28. data/app/assets/stylesheets/c/_variables.sass +32 -0
  29. data/app/assets/stylesheets/c/_vendor.sass +6 -0
  30. data/app/assets/stylesheets/c/application/checkout/_cart.sass +85 -0
  31. data/app/assets/stylesheets/c/application/checkout/_checkout.sass +87 -0
  32. data/app/assets/stylesheets/c/application/elements/buttons.sass +34 -0
  33. data/app/assets/stylesheets/c/application/elements/forms.sass +135 -0
  34. data/app/assets/stylesheets/c/application/elements/shadows.sass +23 -0
  35. data/app/assets/stylesheets/c/application/partials/_breadcrumbs.sass +10 -0
  36. data/app/assets/stylesheets/c/application/partials/_categories_sidebars/_1.sass +53 -0
  37. data/app/assets/stylesheets/c/application/partials/_categories_sidebars/_2.sass +77 -0
  38. data/app/assets/stylesheets/c/application/partials/_footer.sass +43 -0
  39. data/app/assets/stylesheets/c/application/partials/_header.sass +317 -0
  40. data/app/assets/stylesheets/c/engine/_draggable_trees.sass +68 -0
  41. data/app/assets/stylesheets/c/engine/_form_pages.sass +153 -0
  42. data/app/assets/stylesheets/c/engine/_header_bar.sass +29 -0
  43. data/app/assets/stylesheets/c/engine/_index_header.sass +17 -0
  44. data/app/assets/stylesheets/c/engine/_layout.sass +15 -0
  45. data/app/assets/stylesheets/c/engine/_login.sass +38 -0
  46. data/app/assets/stylesheets/c/engine/_navbar.sass +19 -0
  47. data/app/assets/stylesheets/c/engine/_pagination.sass +16 -0
  48. data/app/assets/stylesheets/c/engine/_settings.sass +5 -0
  49. data/app/assets/stylesheets/c/engine/_sidebar.sass +20 -0
  50. data/app/assets/stylesheets/c/engine/_tables.sass +76 -0
  51. data/app/assets/stylesheets/c/engine/flash_messages.sass +2 -0
  52. data/app/assets/stylesheets/c/print_application.sass +167 -0
  53. data/app/assets/stylesheets/c/vendor/_flex_mixins.scss +394 -0
  54. data/app/assets/stylesheets/c/vendor/_normalize.sass +340 -0
  55. data/app/controllers/c/admin/blogs_controller.rb +57 -0
  56. data/app/controllers/c/admin/devise/passwords_controller.rb +5 -0
  57. data/app/controllers/c/admin/devise/sessions_controller.rb +5 -0
  58. data/app/controllers/c/admin/documents_controller.rb +50 -0
  59. data/app/controllers/c/admin/enquiries_controller.rb +22 -0
  60. data/app/controllers/c/admin/images_controller.rb +21 -0
  61. data/app/controllers/c/admin/locations_controller.rb +63 -0
  62. data/app/controllers/c/admin/menu_items_controller.rb +49 -0
  63. data/app/controllers/c/admin/pages_controller.rb +94 -0
  64. data/app/controllers/c/admin/projects_controller.rb +55 -0
  65. data/app/controllers/c/admin/redirects_controller.rb +55 -0
  66. data/app/controllers/c/admin/roles_controller.rb +49 -0
  67. data/app/controllers/c/admin/slides_controller.rb +50 -0
  68. data/app/controllers/c/admin/slideshows_controller.rb +34 -0
  69. data/app/controllers/c/admin/team_members_controller.rb +61 -0
  70. data/app/controllers/c/admin/testimonials_controller.rb +43 -0
  71. data/app/controllers/c/admin/users_controller.rb +51 -0
  72. data/app/controllers/c/admin_controller.rb +43 -0
  73. data/app/controllers/c/application_controller.rb +15 -0
  74. data/app/controllers/c/errors_controller.rb +12 -0
  75. data/app/controllers/c/front/devise/passwords_controller.rb +6 -0
  76. data/app/controllers/c/front/devise/registrations_controller.rb +32 -0
  77. data/app/controllers/c/front/devise/sessions_controller.rb +27 -0
  78. data/app/controllers/c/front/mailchimp_controller.rb +32 -0
  79. data/app/controllers/c/front_controller.rb +7 -0
  80. data/app/controllers/c/front_end/blogs_controller.rb +21 -0
  81. data/app/controllers/c/front_end/enquiries_controller.rb +32 -0
  82. data/app/controllers/c/front_end/pages_controller.rb +19 -0
  83. data/app/controllers/c/main_application_controller.rb +22 -0
  84. data/app/helpers/c/application_helper.rb +51 -0
  85. data/app/helpers/c/blogs_helper.rb +113 -0
  86. data/app/helpers/c/c_form_builder.rb +43 -0
  87. data/app/helpers/c/link_to_helper.rb +25 -0
  88. data/app/helpers/c/navigation_helper.rb +28 -0
  89. data/app/helpers/c/pages_helper.rb +27 -0
  90. data/app/helpers/c/storefront_helper.rb +63 -0
  91. data/app/mailers/c/application_mailer.rb +7 -0
  92. data/app/mailers/c/enquiries_mailer.rb +10 -0
  93. data/app/models/c/ability.rb +21 -0
  94. data/app/models/c/application_record.rb +6 -0
  95. data/app/models/c/author_record.rb +13 -0
  96. data/app/models/c/blog.rb +43 -0
  97. data/app/models/c/document.rb +17 -0
  98. data/app/models/c/enquiry.rb +95 -0
  99. data/app/models/c/image.rb +11 -0
  100. data/app/models/c/location.rb +18 -0
  101. data/app/models/c/menu_item.rb +35 -0
  102. data/app/models/c/non_delete.rb +10 -0
  103. data/app/models/c/page.rb +48 -0
  104. data/app/models/c/page_info.rb +16 -0
  105. data/app/models/c/permission.rb +9 -0
  106. data/app/models/c/permission_subject.rb +12 -0
  107. data/app/models/c/project.rb +20 -0
  108. data/app/models/c/redirect.rb +33 -0
  109. data/app/models/c/role.rb +18 -0
  110. data/app/models/c/slide.rb +16 -0
  111. data/app/models/c/slideshow.rb +23 -0
  112. data/app/models/c/team_member.rb +33 -0
  113. data/app/models/c/testimonial.rb +42 -0
  114. data/app/models/c/user.rb +42 -0
  115. data/app/models/c/user_role.rb +7 -0
  116. data/app/models/c/weight.rb +10 -0
  117. data/app/models/concerns/c/authorable.rb +18 -0
  118. data/app/models/concerns/c/documentable.rb +18 -0
  119. data/app/models/concerns/c/imageable.rb +49 -0
  120. data/app/models/concerns/c/non_deletable.rb +30 -0
  121. data/app/models/concerns/c/orderable.rb +30 -0
  122. data/app/models/concerns/c/previewable.rb +20 -0
  123. data/app/models/concerns/c/site_page.rb +89 -0
  124. data/app/uploaders/c/file_uploader.rb +9 -0
  125. data/app/uploaders/c/image_uploader.rb +39 -0
  126. data/app/views/c/admin/_background_jobs_dropdown.html.haml +18 -0
  127. data/app/views/c/admin/_bread_crumbs.html.haml +7 -0
  128. data/app/views/c/admin/_ebay_categories.html.haml +20 -0
  129. data/app/views/c/admin/_flash_messages.html.haml +5 -0
  130. data/app/views/c/admin/_header_bar.html.haml +18 -0
  131. data/app/views/c/admin/_index_table.html.haml +113 -0
  132. data/app/views/c/admin/_index_table_data.html.haml +17 -0
  133. data/app/views/c/admin/_navigation_bar.html.haml +1 -0
  134. data/app/views/c/admin/_preview_image.html.haml +2 -0
  135. data/app/views/c/admin/_preview_upload.html.haml +18 -0
  136. data/app/views/c/admin/_seo.html.haml +11 -0
  137. data/app/views/c/admin/_side_menu.html.haml +26 -0
  138. data/app/views/c/admin/_uploaded_images_new.html.haml +13 -0
  139. data/app/views/c/admin/blogs/_form.html.haml +58 -0
  140. data/app/views/c/admin/blogs/index.html.haml +9 -0
  141. data/app/views/c/admin/confirm_destroy.html.haml +6 -0
  142. data/app/views/c/admin/confirm_mass_destroy.html.haml +10 -0
  143. data/app/views/c/admin/documents/_form.html.haml +8 -0
  144. data/app/views/c/admin/documents/index.html.haml +9 -0
  145. data/app/views/c/admin/edit.html.haml +15 -0
  146. data/app/views/c/admin/enquiries/index.html.haml +14 -0
  147. data/app/views/c/admin/locations/_form.html.haml +58 -0
  148. data/app/views/c/admin/locations/index.html.haml +9 -0
  149. data/app/views/c/admin/menu_items/_form.html.haml +44 -0
  150. data/app/views/c/admin/menu_items/_menu_item_list_item.html.haml +10 -0
  151. data/app/views/c/admin/menu_items/index.html.haml +10 -0
  152. data/app/views/c/admin/new.html.haml +8 -0
  153. data/app/views/c/admin/pages/_form.html.haml +93 -0
  154. data/app/views/c/admin/pages/_page_list_item.html.haml +10 -0
  155. data/app/views/c/admin/pages/dashboard.html.erb +0 -0
  156. data/app/views/c/admin/pages/index.html.haml +11 -0
  157. data/app/views/c/admin/projects/_form.html.haml +46 -0
  158. data/app/views/c/admin/projects/index.html.haml +9 -0
  159. data/app/views/c/admin/quick_edit.js.erb +6 -0
  160. data/app/views/c/admin/redirects/_form.html.haml +14 -0
  161. data/app/views/c/admin/redirects/index.html.haml +9 -0
  162. data/app/views/c/admin/reload_images.js.erb +2 -0
  163. data/app/views/c/admin/roles/_form.html.haml +42 -0
  164. data/app/views/c/admin/roles/index.html.haml +17 -0
  165. data/app/views/c/admin/set_preview_image.js.erb +1 -0
  166. data/app/views/c/admin/show.html.haml +1 -0
  167. data/app/views/c/admin/slides/_form.html.haml +19 -0
  168. data/app/views/c/admin/slideshows/_form.html.haml +25 -0
  169. data/app/views/c/admin/slideshows/index.html.haml +8 -0
  170. data/app/views/c/admin/team_members/_form.html.haml +20 -0
  171. data/app/views/c/admin/team_members/index.html.haml +10 -0
  172. data/app/views/c/admin/testimonials/_form.html.haml +13 -0
  173. data/app/views/c/admin/testimonials/index.html.haml +8 -0
  174. data/app/views/c/admin/users/_form.html.haml +17 -0
  175. data/app/views/c/admin/users/index.html.haml +12 -0
  176. data/app/views/c/enquiries_mailer/new_enquiry.html.haml +14 -0
  177. data/app/views/c/enquiries_mailer/new_enquiry.text.haml +9 -0
  178. data/app/views/c/errors/404.html.haml +5 -0
  179. data/app/views/c/errors/500.html.haml +5 -0
  180. data/app/views/c/front/application/_category_item.html.haml +2 -0
  181. data/app/views/c/front/application/_menu_item.html.haml +4 -0
  182. data/app/views/c/front/application/_sales_highlight.html.haml +1 -0
  183. data/app/views/c/front/application/_slide.html.haml +6 -0
  184. data/app/views/c/front/blogs/_archive_filter_month.html.haml +2 -0
  185. data/app/views/c/front/blogs/_archive_filter_year.html.haml +1 -0
  186. data/app/views/c/front/blogs/_menu_item.html.haml +2 -0
  187. data/app/views/c/front_end/enquiries/new.html.haml +23 -0
  188. data/app/views/c/front_end/enquiries/thanks.html.haml +5 -0
  189. data/app/views/c/front_end/pages/_sales_highlight.html.haml +7 -0
  190. data/app/views/c/front_end/pages/about.html.haml +8 -0
  191. data/app/views/c/front_end/pages/home.html.haml +19 -0
  192. data/app/views/c/front_end/pages/search.html.haml +16 -0
  193. data/app/views/c/front_end/pages/show.html.haml +7 -0
  194. data/app/views/c/front_end/pages/sitemap.xml.builder +25 -0
  195. data/app/views/c/mailchimp/_signup_newsletter.html.haml +4 -0
  196. data/app/views/c/main_application/_application_bar.html.haml +22 -0
  197. data/app/views/c/main_application/_breadcrumbs.html.haml +7 -0
  198. data/app/views/c/main_application/_contact_info.html.haml +5 -0
  199. data/app/views/c/main_application/_footer.html.haml +49 -0
  200. data/app/views/c/main_application/_front_head_tags.html.haml +3 -0
  201. data/app/views/c/main_application/_header.html.haml +55 -0
  202. data/app/views/c/main_application/_site_search.html.haml +3 -0
  203. data/app/views/c/main_application/_yield.html.haml +5 -0
  204. data/app/views/devise/confirmations/new.html.erb +16 -0
  205. data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  206. data/app/views/devise/mailer/password_change.html.erb +3 -0
  207. data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  208. data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  209. data/app/views/devise/passwords/edit.html.haml +26 -0
  210. data/app/views/devise/passwords/new.html.haml +14 -0
  211. data/app/views/devise/registrations/edit.html.haml +40 -0
  212. data/app/views/devise/registrations/new.html.haml +24 -0
  213. data/app/views/devise/sessions/new.html.haml +20 -0
  214. data/app/views/devise/shared/_links.html.erb +25 -0
  215. data/app/views/devise/unlocks/new.html.erb +16 -0
  216. data/app/views/layouts/c/application.html.haml +18 -0
  217. data/app/views/layouts/c/cms_login_layout.html.haml +18 -0
  218. data/app/views/layouts/c/mailer.html.erb +245 -0
  219. data/app/views/layouts/c/mailer.text.erb +3 -0
  220. data/app/views/layouts/c/main_application.html.haml +13 -0
  221. data/config/environment.rb +0 -0
  222. data/config/initializers/carrierwave.rb +18 -0
  223. data/config/initializers/devise.rb +283 -0
  224. data/config/initializers/rack_profiler.rb +8 -0
  225. data/config/locales/devise.en.yml +62 -0
  226. data/config/locales/en.yml +17 -0
  227. data/config/routes.rb +150 -0
  228. data/db/migrate/20160819000000_migrate_schema.rb +273 -0
  229. data/db/seed_data/countries.txt +227 -0
  230. data/lib/c/engine.rb +38 -0
  231. data/lib/c/version.rb +4 -0
  232. data/lib/cd2_catton_cms.rb +51 -0
  233. data/lib/tasks/c_tasks.rake +28 -0
  234. data/spec/dummy/Gemfile +4 -0
  235. data/spec/dummy/Gemfile.lock +20 -0
  236. data/spec/dummy/Rakefile +6 -0
  237. data/spec/dummy/app/assets/config/manifest.js +5 -0
  238. data/spec/dummy/app/assets/images/placeholder.png +0 -0
  239. data/spec/dummy/app/assets/javascripts/application.js +26 -0
  240. data/spec/dummy/app/assets/javascripts/cable.js +13 -0
  241. data/spec/dummy/app/assets/javascripts/pages.coffee +3 -0
  242. data/spec/dummy/app/assets/stylesheets/application.sass +13 -0
  243. data/spec/dummy/app/assets/stylesheets/c/application.sass +2 -0
  244. data/spec/dummy/app/controllers/application_controller.rb +10 -0
  245. data/spec/dummy/app/controllers/blogs_controller.rb +11 -0
  246. data/spec/dummy/app/controllers/pages_controller.rb +13 -0
  247. data/spec/dummy/app/models/application_record.rb +4 -0
  248. data/spec/dummy/app/models/page.rb +3 -0
  249. data/spec/dummy/bin/bundle +4 -0
  250. data/spec/dummy/bin/rails +5 -0
  251. data/spec/dummy/bin/rake +5 -0
  252. data/spec/dummy/bin/setup +35 -0
  253. data/spec/dummy/bin/update +30 -0
  254. data/spec/dummy/config/application.rb +17 -0
  255. data/spec/dummy/config/boot.rb +6 -0
  256. data/spec/dummy/config/cable.yml +9 -0
  257. data/spec/dummy/config/database.travis.yml +3 -0
  258. data/spec/dummy/config/database.yml +85 -0
  259. data/spec/dummy/config/environment.rb +6 -0
  260. data/spec/dummy/config/environments/development.rb +61 -0
  261. data/spec/dummy/config/environments/production.rb +87 -0
  262. data/spec/dummy/config/environments/test.rb +43 -0
  263. data/spec/dummy/config/initializers/application_controller_renderer.rb +7 -0
  264. data/spec/dummy/config/initializers/assets.rb +21 -0
  265. data/spec/dummy/config/initializers/backtrace_silencers.rb +8 -0
  266. data/spec/dummy/config/initializers/carrierwave.rb +15 -0
  267. data/spec/dummy/config/initializers/commercity.rb +4 -0
  268. data/spec/dummy/config/initializers/cookies_serializer.rb +6 -0
  269. data/spec/dummy/config/initializers/filter_parameter_logging.rb +5 -0
  270. data/spec/dummy/config/initializers/inflections.rb +17 -0
  271. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  272. data/spec/dummy/config/initializers/new_framework_defaults.rb +25 -0
  273. data/spec/dummy/config/initializers/session_store.rb +4 -0
  274. data/spec/dummy/config/initializers/wrap_parameters.rb +15 -0
  275. data/spec/dummy/config/locales/en.yml +23 -0
  276. data/spec/dummy/config/puma.rb +48 -0
  277. data/spec/dummy/config/routes.rb +4 -0
  278. data/spec/dummy/config/secrets.yml +22 -0
  279. data/spec/dummy/config/sidekiq.yml +6 -0
  280. data/spec/dummy/config/spring.rb +7 -0
  281. data/spec/dummy/config.ru +5 -0
  282. data/spec/dummy/db/schema.rb +1110 -0
  283. data/spec/dummy/lib/tasks/reprocess_images.rake +12 -0
  284. data/spec/dummy/lib/tasks/reset_all.rake +44 -0
  285. data/spec/dummy/lib/tasks/seeds/seed_blogs.rake +8 -0
  286. data/spec/dummy/lib/tasks/seeds/seed_pages.rake +24 -0
  287. data/spec/dummy/public/404.html +67 -0
  288. data/spec/dummy/public/422.html +67 -0
  289. data/spec/dummy/public/500.html +66 -0
  290. data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
  291. data/spec/dummy/public/apple-touch-icon.png +0 -0
  292. data/spec/dummy/public/favicon.ico +0 -0
  293. data/spec/dummy/seed/highlight1.png +0 -0
  294. data/spec/dummy/seed/highlight2.png +0 -0
  295. data/spec/dummy/seed/images/1/main.jpg +0 -0
  296. data/spec/dummy/seed/images/1/thumb.JPG +0 -0
  297. data/spec/dummy/seed/images/1/thumb2.jpg +0 -0
  298. data/spec/dummy/seed/images/2/main.jpeg +0 -0
  299. data/spec/dummy/seed/images/2/thumb.JPG +0 -0
  300. data/spec/dummy/seed/images/2/thumb2.JPG +0 -0
  301. data/spec/dummy/spec/models/redirect_spec.rb +57 -0
  302. data/spec/dummy/spec/support/factory_girl.rb +8 -0
  303. data/spec/dummy/spec/support/seed/images/product_image.png +0 -0
  304. data/spec/rails_helper.rb +49 -0
  305. data/spec/spec_helper.rb +52 -0
  306. metadata +734 -0
@@ -0,0 +1,11 @@
1
+ - provide :title, 'Pages'
2
+
3
+ .index-header
4
+ %h1= pluralize(@pages.count, 'Page')
5
+ = link_to '+ Create Page', new_page_path, class: 'btn btn--small'
6
+ %p
7
+ This is the list of the regular pages on your site. These can be sorted into hierachies by dragging and dropping them. Note the navigation structure is controller separately.
8
+
9
+
10
+ .draggable_tree_list_container.draggable_tree_children{data: {reorder_url: update_order_pages_path}}
11
+ = render 'page_list_item', pages: @pages
@@ -0,0 +1,46 @@
1
+
2
+ = form_for @project do |f|
3
+ = f.error_messages
4
+ = tabs do
5
+ = tab :content do
6
+ .field
7
+ = f.label :name
8
+ = f.text_field :name
9
+ .field
10
+ = f.label :body
11
+ = f.text_area :body, class: 'ckeditor'
12
+ = tab :seo, 'SEO' do
13
+ = render 'c/admin/seo', f: f
14
+
15
+ = tab :media do
16
+ .reorderable
17
+ = f.fields_for :images, f.object.images.sort_by(&:weight) do |f|
18
+ .fields_for.columns{class: ('not_persisted' if f.object.image_cache.present?)}
19
+ = f.hidden_field :image_cache
20
+ = f.hidden_field :weight, class: 'order_field'
21
+ .column
22
+ .sort_handle= fa_icon('ellipsis-v')
23
+ .column
24
+ .image_preview
25
+ = image_tag f.object.image.preview
26
+ .column
27
+ .field
28
+ = f.label :alt
29
+ = f.text_field :alt
30
+ .column
31
+ .field
32
+ = f.label :_destroy, 'Delete Image?'
33
+ = f.check_box :_destroy, class: '_destroy'
34
+
35
+ = f.label :new_images
36
+ = f.file_field :new_images, multiple: true, data: {auto_submit: :upload}
37
+ -# = button_tag 'Upload', name: :commit, value: :upload
38
+
39
+ = tab :publish do
40
+ .field
41
+ = f.label :published do
42
+ = f.check_box :published
43
+ %span Published
44
+ .actions.form-page__actions
45
+ = f.submit class: 'btn'
46
+ = link_to_delete 'Delete', @project, redirection: projects_path, class: 'btn btn--secondary' unless @project.new_record?
@@ -0,0 +1,9 @@
1
+ - provide :title, 'Projects'
2
+
3
+ .index-header
4
+ %h1= pluralize(@projects.count, 'Project')
5
+ = link_to '+ Create Project', new_project_path, class: 'btn btn--small'
6
+ %p
7
+ Case studies, works and projects
8
+
9
+ = index_table @projects, C::Project::INDEX_TABLE
@@ -0,0 +1,6 @@
1
+ console.log($("tr.object_<%=params[:id]%>"))
2
+ console.log("asdasda")
3
+ $("tr.object_<%=params[:id]%>").html("<div class='quick_edit_inner'><%= escape_javascript(render 'form') %></div>");
4
+
5
+
6
+ readyFunctions()
@@ -0,0 +1,14 @@
1
+ .form-page--narrow
2
+ = form_for @redirect do |f|
3
+ = f.error_messages
4
+ .field
5
+ = f.label :old_url
6
+ = f.text_field :old_url
7
+
8
+ .field
9
+ = f.label :new_url
10
+ = f.text_field :new_url
11
+
12
+ .actions
13
+ = f.submit class: 'btn'
14
+ = link_to_delete 'Delete', @redirect, redirection: redirects_path, class: 'btn btn--secondary' unless @redirect.new_record?
@@ -0,0 +1,9 @@
1
+ - provide :title, "Redirects"
2
+
3
+ .index-header
4
+ %h1= pluralize(@redirects.count, 'Redirect')
5
+ = link_to '+ Create Redirect', new_redirect_path, class: 'btn btn--small'
6
+ %p
7
+ Create 301s to redirect users from an old or missing page to the correct location
8
+
9
+ = index_table @redirects, C::Redirect::INDEX_TABLE ,bulk_actions: [['Delete', :delete]]
@@ -0,0 +1,2 @@
1
+ $("#images_container").html("<%= escape_javascript(render 'c/admin/uploaded_images_new', obj: @obj) %>")
2
+ $(".dz-complete").remove()
@@ -0,0 +1,42 @@
1
+ #form_page
2
+ = form_for @role do |f|
3
+ = f.error_messages
4
+ #upper_form
5
+ .title_field.sync_field
6
+ = f.text_field :name, placeholder: 'Name'
7
+ .right_form_buttons.full_form
8
+ = f.submit class: 'btn'
9
+ = link_to 'Delete', @object, method: :delete, data: { confirm: 'Are you sure? This cannot be undone' }, class: 'btn btn--secondary'
10
+ #main_form.two_panel_form
11
+ #summary_form_panel
12
+ .summary_title
13
+ %h3 Role Details
14
+ .field.sync_field
15
+ = f.label :name
16
+ = f.text_area :name
17
+ .field
18
+ = f.label :body
19
+ = f.text_area :body
20
+ #tabs_form_panel
21
+ .tabs_container
22
+ = tabs do
23
+ = tab :role do
24
+ %table
25
+ %tr
26
+ %td
27
+ %td Read
28
+ %td Create
29
+ %td Update
30
+ %td Delete
31
+ = f.fields_for :permissions, @role.build_or_find_permissions do |ff|
32
+ %tr
33
+ = ff.hidden_field :permission_subject_id
34
+ %td= ff.object.name
35
+ %td= ff.check_box :read
36
+ %td= ff.check_box :new
37
+ %td= ff.check_box :edit
38
+ %td= ff.check_box :remove
39
+
40
+ .actions.form-page__actions
41
+ = f.submit class: 'btn'
42
+ = link_to 'Delete', @object, method: :delete, data: { confirm: 'Are you sure? This cannot be undone' }, class: 'btn btn--secondary'
@@ -0,0 +1,17 @@
1
+ - provide :title, 'Roles'
2
+
3
+ .index-header
4
+ %h1= pluralize(@roles.count, 'Role')
5
+ = link_to 'New Role', new_role_path, class: 'btn btn--small'
6
+ %p
7
+ Manage the different roles and permissions in your store.
8
+
9
+ %table
10
+ %thead
11
+ %th Name
12
+ %th Edit
13
+ %tbody
14
+ - @roles.each do |role|
15
+ %tr
16
+ %td= role.name
17
+ %td= link_to 'Edit', edit_role_path(role), class: 'table_icon'
@@ -0,0 +1 @@
1
+ $("#preview_drag__target").html("<%= escape_javascript(render 'c/admin/preview_image', obj: @obj) %>")
@@ -0,0 +1 @@
1
+ = render 'form'
@@ -0,0 +1,19 @@
1
+ .form-page--narrow
2
+
3
+ = form_for [@slideshow, @slide] do |f|
4
+ = f.error_messages
5
+
6
+ .field
7
+ = f.label :name, placeholder: 'Slide name'
8
+ = f.text_field :name
9
+
10
+ .field
11
+ = f.label :url, placeholder: 'Link for slideshow'
12
+ = f.text_field :url
13
+
14
+ .field
15
+ = f.image_field :image
16
+
17
+ .actions
18
+ = f.submit class: 'btn'
19
+ = link_to_delete 'Delete', @slide, nested: @slideshow, redirection: edit_slideshow_path(@slideshow), class: 'btn btn--secondary' unless @slide.new_record?
@@ -0,0 +1,25 @@
1
+ = form_for @slideshow do |f|
2
+ = f.error_messages
3
+ .gs
4
+ .fixed-form-panel
5
+ .field
6
+ = f.label :name, placeholder: 'Slideshow name'
7
+ = f.text_field :name, disabled: !@slideshow.new_record?
8
+ .field
9
+ = f.label :body
10
+ = f.text_area :body
11
+
12
+
13
+ .g-1
14
+
15
+ = tabs do
16
+ = tab :slides, class: 'table_tab' do
17
+ - if @slideshow.new_record?
18
+ .padded
19
+ Your slides will appear here
20
+ - else
21
+ = index_table @slideshow.slides.ordered, C::Slide::INDEX_TABLE, sortable: sort_slideshow_slides_path(@slideshow)
22
+ .padded
23
+ = link_to 'Add Slide', [:new, @slideshow, :slide], class: 'button' unless @slideshow.new_record?
24
+ .actions.form-page__actions
25
+ = f.submit class: 'btn'
@@ -0,0 +1,8 @@
1
+ - provide :title, 'Slideshows'
2
+ .index-header
3
+ %h1= pluralize(@slideshows.count, 'Slideshow')
4
+ %p
5
+ Control the slideshows that appear on the site. You can have unlimited
6
+ slideshows, however new ones will have to be configured into your site by
7
+ CD2.
8
+ = index_table @slideshows, C::Slideshow::INDEX_TABLE
@@ -0,0 +1,20 @@
1
+ = form_for @team_member do |f|
2
+ = f.error_messages
3
+ = tabs do
4
+ = tab :content do
5
+ .field
6
+ = f.label :name
7
+ = f.text_field :name
8
+
9
+ .field
10
+ = f.label :role
11
+ = f.text_field :role
12
+
13
+ .field
14
+ = f.label :body
15
+ = f.text_area :body, class: 'ckeditor'
16
+ .field
17
+ = f.image_field :image
18
+ .actions.form-page__actions
19
+ = f.submit class: 'btn'
20
+ = link_to_delete 'Delete', @team_member, redirection: team_members_path, class: 'btn btn--secondary' unless @team_member.new_record?
@@ -0,0 +1,10 @@
1
+ - provide :title, 'Meet The Team'
2
+
3
+ -# TODO: Lets rethink this whole resource - really should be more integrated with the users section - seems a little lost
4
+ .index-header
5
+ %h1= pluralize(@team_members.count, 'Team Member')
6
+ = link_to '+ Create Team Member', new_team_member_path, class: 'btn btn--small'
7
+ %p
8
+ List of team members for your workplace to be displayed on the site
9
+
10
+ = index_table @team_members.ordered, C::TeamMember::INDEX_TABLE, sortable: sort_team_members_path
@@ -0,0 +1,13 @@
1
+ = form_for @testimonial do |f|
2
+ = f.error_messages
3
+ = tabs do
4
+ = tab :content do
5
+ .field
6
+ = f.label :author
7
+ = f.text_field :author
8
+ .field
9
+ = f.label :quote
10
+ = f.text_area :quote
11
+ .actions.form-page__actions
12
+ = f.submit class: 'btn'
13
+ = link_to_delete 'Delete', @testimonial, redirection: testimonials_path, class: 'btn btn--secondary' unless @testimonial.new_record?
@@ -0,0 +1,8 @@
1
+ - provide :title, 'Testimonials'
2
+
3
+ .index-header
4
+ %h1= pluralize(@testimonials.count, 'Testimonial')
5
+ = link_to '+ Create Testimonial', new_testimonial_path, class: 'btn btn--small'
6
+ %p Record and display your latest testimonials and reviews
7
+
8
+ = index_table @testimonials, C::Testimonial::INDEX_TABLE
@@ -0,0 +1,17 @@
1
+ .form-page--narrow
2
+ = form_for @user do |f|
3
+ = f.error_messages
4
+ .field
5
+ = f.label :name
6
+ = f.text_field :name
7
+ .field
8
+ = f.label :email
9
+ = f.text_field :email
10
+ .field
11
+ = f.label :password
12
+ = f.password_field :password
13
+
14
+ .actions
15
+ = f.submit class: 'btn'
16
+ = link_to_delete 'Delete', @user, redirection: users_path, class: 'btn btn--secondary' unless @user.new_record?
17
+
@@ -0,0 +1,12 @@
1
+ - provide :title, 'Users'
2
+
3
+ .index-header
4
+ %h1= pluralize(@users.count, 'User')
5
+ = link_to '+ Create User', new_user_path, class: 'btn btn--small'
6
+ %p
7
+ This is the list of users who can administer your store. You can create unlimited additional users by clicking the
8
+ create user button. You can also manage the permissions and roles of different users in you store through the manage
9
+ roles and permissions links.
10
+
11
+ = index_table @users, C::User::INDEX_TABLE
12
+
@@ -0,0 +1,14 @@
1
+
2
+ %b Name:
3
+ %br
4
+ = @enquiry.name
5
+ %br
6
+ %br
7
+ %b Email:
8
+ %br
9
+ = @enquiry.email
10
+ %br
11
+ %br
12
+ %b Message:
13
+ %br
14
+ = simple_format @enquiry.body
@@ -0,0 +1,9 @@
1
+
2
+ Name:
3
+ = @enquiry.name
4
+
5
+ Email:
6
+ = @enquiry.email
7
+
8
+ Message:
9
+ = simple_format @enquiry.body
@@ -0,0 +1,5 @@
1
+ #error_page
2
+ %h1 Page not found
3
+ %p
4
+ Sorry, this page seems to have moved.
5
+ = link_to 'Back to home', front_end_root_path
@@ -0,0 +1,5 @@
1
+ #error_page
2
+ %h1 500: Error
3
+ %p
4
+ Sorry, something appears to have gone wrong.
5
+ = link_to 'Back to home', front_end_root_path
@@ -0,0 +1,2 @@
1
+ %li
2
+ = link_to category_item.name, front_end_category_path(category_item)
@@ -0,0 +1,4 @@
1
+ %li{class: (:active if request.path == url_for(menu_item) || menu_item.children.map{|m| url_for(m)}.include?(request.path))}
2
+ = link_to(menu_item.name, (menu_item.page ? front_end_page_path(menu_item.page) : menu_item.link), target: menu_item.target)
3
+ - if depth > 1
4
+ = menu menu_item.machine_name, (depth - 1)
@@ -0,0 +1 @@
1
+ = link_to image_tag("#{sales_highlight.image.url}"), "#{(sales_highlight.url.blank? ? 'javascript:void(0)' : sales_highlight.url)}", {class: ('nolink' if sales_highlight.url.blank?), style: "background-color:#{sales_highlight.color}", :target => '_blank'}
@@ -0,0 +1,6 @@
1
+ %li
2
+ - if slide.url.blank?
3
+ = image_tag(slide.image)
4
+ - else
5
+ = link_to slide.url do
6
+ = image_tag(slide.image)
@@ -0,0 +1,2 @@
1
+ %li
2
+ = link_to Date::MONTHNAMES[archive_filter_month], safe_params({month: archive_filter_month}, {permitted: permitted})
@@ -0,0 +1 @@
1
+ = link_to archive_filter_year.to_s, safe_params({year: archive_filter_year, month: nil}, {permitted: permitted})
@@ -0,0 +1,2 @@
1
+ %li
2
+ = link_to(menu_item.name, menu_item)
@@ -0,0 +1,23 @@
1
+ .wrap.row.page.gs--m
2
+
3
+ .g-full.g-3--m
4
+ %h1 Get in touch
5
+ = form_for @enquiry, url: front_end_enquiries_path do |f|
6
+ - if @enquiry.errors.any?
7
+ %ul.errors
8
+ - @enquiry.errors.full_messages.each do |error|
9
+ %li= error
10
+ .field
11
+ = f.label :name
12
+ = f.text_field :name
13
+ .field
14
+ = f.label :email
15
+ = f.email_field :email
16
+ .field
17
+ = f.label :body, 'Message'
18
+ = f.text_area :body
19
+ .field
20
+ = f.submit 'Send', class: :btn
21
+
22
+ .g-gutter--m.g-1
23
+ = render 'contact_info'
@@ -0,0 +1,5 @@
1
+ .wrap.row.page
2
+ %h1 Thanks for getting in touch
3
+ %p
4
+ Someone from our team will take a look and get back to you shortly.
5
+ = link_to 'Back to home', '/'
@@ -0,0 +1,7 @@
1
+ .sidebar__block
2
+ .sales__point
3
+ - if highlight.url
4
+ = link_to highlight.url do
5
+ = image_tag(highlight.image.square)
6
+ - else
7
+ = image_tag(highlight.image.square)
@@ -0,0 +1,8 @@
1
+ .wrap.row.page.gs--m
2
+
3
+ .g-full.g-3--m
4
+
5
+ = simple_format(@page.body)
6
+
7
+ .g-gutter.g-1
8
+ = render 'contact_info'
@@ -0,0 +1,19 @@
1
+ #hero__wrapper
2
+ = image_tag ('home_banner.jpg')
3
+ = image_tag ('home_banner_short.jpg'), class: "mobile-only"
4
+
5
+ = raw @page.body
6
+
7
+ .intro__row
8
+ = image_tag 'sp_1.jpg'
9
+ = image_tag 'sp_2.jpg'
10
+ = image_tag 'sp_3.jpg'
11
+ = image_tag 'sp_4.jpg'
12
+
13
+ .row.wrap.page.gs--l
14
+
15
+ .g-1.g-2--l
16
+ = render 'c/front_end/categories_index_sidebar'
17
+
18
+ .g-gutter--l.g-3.g-6--l
19
+ = render 'c/front_end/products/_grids/standard', products: @products
@@ -0,0 +1,16 @@
1
+ = render_navigation 'breadcrumbs'
2
+
3
+ .wrap.row.page
4
+ - if @products.any?
5
+ = render 'c/front_end/products/_results_bars/2'
6
+
7
+ .gs--l
8
+
9
+ .g-1
10
+ = render 'c/front_end/categories_index_sidebar'
11
+ .g-gutter--l.g-3
12
+ = render 'c/front_end/products/_grids/standard', products: @products
13
+
14
+ - else
15
+ .no_results
16
+ %h3 The search returned no results
@@ -0,0 +1,7 @@
1
+ .wrap.row.page.gs--m
2
+
3
+ .g-full.g-3--m
4
+
5
+ = simple_format(@page.body)
6
+
7
+ .g-1
@@ -0,0 +1,25 @@
1
+ xml.instruct!
2
+ xml.urlset(
3
+ 'xmlns'.to_sym => "http://www.sitemaps.org/schemas/sitemap/0.9",
4
+ 'xmlns:image'.to_sym => "http://www.google.com/schemas/sitemap-image/1.1"
5
+ ) do
6
+ xml.url do
7
+ xml.loc "#{root_url}"
8
+ xml.changefreq("weekly")
9
+ end
10
+ @pages.each do |page|
11
+ xml.url do
12
+ xml.loc front_end_page_url(page)
13
+ xml.changefreq("weekly")
14
+ end
15
+ end
16
+ if @products.any?
17
+ @products.each do |product|
18
+ xml.url do
19
+ xml.loc front_end_product_variant_url(product)
20
+ xml.changefreq("weekly")
21
+ end
22
+ end
23
+ end
24
+
25
+ end
@@ -0,0 +1,4 @@
1
+ %p Sign up for news and updates
2
+ = form_tag c.mailchimp_subscribe_path do
3
+ = text_field_tag :email, nil, placeholder: 'email@email.com'
4
+ = submit_tag :subscribe
@@ -0,0 +1,22 @@
1
+ - if user_signed_in?
2
+ .app-bar
3
+ = link_to raw("Homepage #{fa_icon('home')}"), front_end_root_path
4
+ = link_to raw("Dashboard #{fa_icon('pie-chart')}"), c.root_path
5
+
6
+ - if C.commerce
7
+ = link_to 'Products', c.product_masters_path(q: {main_variant_status_eq: 'active'})
8
+ = link_to 'Brands', c.brands_path
9
+ = link_to 'Categories', c.categories_path
10
+
11
+ = link_to 'Orders', c.order_sales_path
12
+ = link_to 'Customers', c.customers_path
13
+ = link_to 'Enquiries', c.enquiries_path
14
+
15
+ = link_to 'Pages', c.pages_path if C.content_sections.include?(:pages)
16
+ = link_to 'Projects', c.projects_path if C.content_sections.include?(:projects)
17
+ = link_to 'Locations', c.locations_path if C.content_sections.include?(:locations)
18
+ = link_to 'Blogs', c.blogs_path if C.content_sections.include?(:blogs)
19
+ = link_to 'Navigation', c.menu_items_path
20
+
21
+
22
+
@@ -0,0 +1,7 @@
1
+ #breadcrumbs_container
2
+ #breadcrumbs_inner
3
+ %span You are here:
4
+ - nav.each_with_index do |crumb, i|
5
+ = link_to crumb[:title], crumb[:url]
6
+ %span= fa_icon 'angle-right'
7
+ = link_to yield(:title), request.path, class: 'no_link'
@@ -0,0 +1,5 @@
1
+ %h3 Contact us
2
+ %p Phone: 0000 00000
3
+ %p Mobile: 00000000000
4
+ %p Email: example@example.com
5
+ %p Address:
@@ -0,0 +1,49 @@
1
+ %footer#footer
2
+ .footer__inner
3
+ .footer__links
4
+ %h4 links
5
+ %ul
6
+ %li
7
+ = link_to 'link to somewhere', '#'
8
+ %li
9
+ = link_to 'link to somewhere', '#'
10
+ %li
11
+ = link_to 'link to somewhere', '#'
12
+ %li
13
+ = link_to 'link to somewhere', '#'
14
+ %li
15
+ = link_to 'link to somewhere', '#'
16
+ %li
17
+ = link_to 'link to somewhere', '#'
18
+ .footer__links
19
+ %h4 links
20
+ %ul
21
+ %li
22
+ = link_to 'link to somewhere', '#'
23
+ %li
24
+ = link_to 'link to somewhere', '#'
25
+ %li
26
+ = link_to 'link to somewhere', '#'
27
+ %li
28
+ = link_to 'link to somewhere', '#'
29
+ .footer__links
30
+ %h4 links
31
+ %ul
32
+ %li
33
+ = link_to 'link to somewhere', '#'
34
+ %li
35
+ = link_to 'link to somewhere', '#'
36
+ %li
37
+ = link_to 'link to somewhere', '#'
38
+ %li
39
+ = link_to 'link to somewhere', '#'
40
+ %li
41
+ = link_to 'link to somewhere', '#'
42
+ .footer__links
43
+ %h4 Social media
44
+ %ul
45
+ %li= link_to fa_icon('facebook-square')
46
+ %li= link_to fa_icon('twitter-square')
47
+ %li= link_to fa_icon('linkedin-square')
48
+ .footer__copyright_bar
49
+ %span © Copyright 2017 Comapny Ltd. Company Reg. 000 000 00
@@ -0,0 +1,3 @@
1
+ -# This is a husk file
2
+ Add Tags to the head of the main application
3
+ by overwriting this file in the child app