activeadmin-selleo-cms 0.0.18 → 0.0.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. data/app/admin/active_admin/views_helper.rb +4 -0
  2. data/app/admin/activeadmin_selleo_cms/page.rb +42 -6
  3. data/app/assets/javascripts/activeadmin-selleo-cms/custom.js +35 -0
  4. data/app/assets/javascripts/activeadmin-selleo-cms/jquery-ui-timepicker-addon.js +1902 -0
  5. data/app/assets/javascripts/ckeditor/config.js +12 -1
  6. data/app/assets/stylesheets/activeadmin-selleo-cms/custom.css +5 -1
  7. data/app/assets/stylesheets/activeadmin-selleo-cms/jquery-ui-timepicker-addon.css +10 -0
  8. data/app/controllers/pages_controller.rb +9 -4
  9. data/app/controllers/searches_controller.rb +1 -1
  10. data/app/helpers/pages_helper.rb +9 -5
  11. data/app/models/activeadmin_selleo_cms/asset.rb +7 -1
  12. data/app/models/activeadmin_selleo_cms/attachment.rb +2 -0
  13. data/app/models/activeadmin_selleo_cms/image.rb +21 -0
  14. data/app/models/activeadmin_selleo_cms/layout.rb +27 -3
  15. data/app/models/activeadmin_selleo_cms/page.rb +33 -33
  16. data/app/models/activeadmin_selleo_cms/search.rb +1 -0
  17. data/app/models/activeadmin_selleo_cms/section.rb +33 -1
  18. data/app/views/admin/pages/_form.html.haml +2 -8
  19. data/app/views/admin/pages/_translated_fields.html.haml +52 -15
  20. data/app/views/admin/pages/reorder.html.haml +6 -0
  21. data/app/views/admin/pages/update_positions.js.erb +6 -0
  22. data/app/views/searches/show.html.haml +1 -1
  23. data/config/initializers/active_admin.rb +3 -0
  24. data/config/initializers/formtastic.rb +7 -0
  25. data/config/routes.rb +2 -7
  26. data/db/migrate/20130206173233_change_activeadmin_selleo_cms_searches.rb +29 -0
  27. data/db/migrate/20130207213528_change_activeadmin_selleo_cms_assets.rb +12 -0
  28. data/lib/activeadmin-selleo-cms/version.rb +1 -1
  29. data/lib/generators/activeadmin_selleo_cms/templates/cms.html.erb +7 -3
  30. data/spec/dummy/app/views/layouts/cms.html.erb +1 -1
  31. data/spec/dummy/db/snapshots/test_database.sql +1 -1
  32. data/spec/dummy/log/test.log +79024 -0
  33. data/spec/dummy/tmp/cache/assets/BEF/CA0/sprockets%2F3335c73d91157a627611592700a9654e +0 -0
  34. data/spec/dummy/tmp/cache/assets/C5A/610/sprockets%2Fbe898195780d802c102d152255d9e477 +0 -0
  35. data/spec/dummy/tmp/cache/assets/CB7/190/sprockets%2F136a9350fa75f3336af293952861ed6d +0 -0
  36. data/spec/dummy/tmp/cache/assets/CBA/D70/sprockets%2F8c5e2f7ea6f160a6792a442f01378479 +0 -0
  37. data/spec/dummy/tmp/cache/assets/CCF/2E0/sprockets%2Fde5b2bd811d24557c940a2239b7e3130 +0 -0
  38. data/spec/dummy/tmp/cache/assets/CD3/3E0/sprockets%2F373fa62090ab111ae606b963e1b8c793 +0 -0
  39. data/spec/dummy/tmp/cache/assets/CD6/930/sprockets%2Fb62a24129369fea572b674303a7fa12f +0 -0
  40. data/spec/dummy/tmp/cache/assets/CE2/D80/sprockets%2F28a4d5b1a75700c7579e3773f34ccd71 +0 -0
  41. data/spec/dummy/tmp/cache/assets/CE3/720/sprockets%2F8c9e2817b83ec580831f21b0c352c9c7 +0 -0
  42. data/spec/dummy/tmp/cache/assets/CED/FB0/sprockets%2Fa675d17ed83804639ec0264b624d98ed +0 -0
  43. data/spec/dummy/tmp/cache/assets/D2C/2E0/sprockets%2Fa031c32e27ced12f81d4326f8b52fb23 +0 -0
  44. data/spec/dummy/tmp/cache/assets/D5C/1D0/sprockets%2F0671a22da74f433700c99e13bfaaf0ce +0 -0
  45. data/spec/dummy/tmp/cache/assets/D63/6C0/sprockets%2F1ae1f1cf9d92d0e61b7006171a39fd4d +0 -0
  46. data/spec/dummy/tmp/cache/assets/D64/060/sprockets%2F3b86cba556132a40a7e49a7b4c7e17ad +0 -0
  47. data/spec/dummy/tmp/cache/assets/D92/B20/sprockets%2F871f050bda629a18e11ea8db7c1aca77 +0 -0
  48. data/spec/dummy/tmp/cache/assets/DB2/EA0/sprockets%2Ffead656b8b83fbae9f69435c33b4649d +0 -0
  49. data/spec/dummy/tmp/cache/assets/E37/3E0/sprockets%2F9e6d2d17ed6da64a2f1876d4cdfefcd1 +0 -0
  50. data/spec/dummy/tmp/capybara/capybara-201301312228138539754304.html +152 -0
  51. data/spec/dummy/tmp/capybara/capybara-201301312228185417992211.html +152 -0
  52. data/spec/dummy/tmp/capybara/capybara-201301312228232926906843.html +152 -0
  53. data/spec/dummy/tmp/capybara/capybara-201301312228302851745933.html +176 -0
  54. data/spec/dummy/tmp/capybara/capybara-20130131222835626927814.html +152 -0
  55. data/spec/dummy/tmp/capybara/capybara-201301312228403892930584.html +152 -0
  56. data/spec/dummy/tmp/capybara/capybara-201301312228491329185040.html +152 -0
  57. data/spec/dummy/tmp/capybara/capybara-201301312232412606495803.html +182 -0
  58. data/spec/dummy/tmp/capybara/capybara-201301312232508358940406.html +242 -0
  59. data/spec/dummy/tmp/capybara/capybara-201301312233036556441968.html +182 -0
  60. data/spec/dummy/tmp/capybara/capybara-201301312233093002404474.html +182 -0
  61. data/spec/models/activeadmin_selleo_cms/page_spec.rb +9 -0
  62. data/spec/support/pages_helper.rb +4 -4
  63. metadata +46 -5
  64. data/app/models/activeadmin_selleo_cms/header_image.rb +0 -12
  65. data/app/models/activeadmin_selleo_cms/icon.rb +0 -12
  66. data/app/modules/active_admin/views/index_as_list.rb +0 -28
@@ -1,12 +0,0 @@
1
- module ActiveadminSelleoCms
2
- class HeaderImage < ActiveadminSelleoCms::Asset
3
- has_attached_file :data,
4
- :url => "/system/cms/header_images/:id/:style_:basename.:extension",
5
- :path => ":rails_root/public/system/cms/header_images/:id/:style_:basename.:extension",
6
- :styles => { :normal => "770x385#" },
7
- :default_style => :normal
8
-
9
- validates_attachment_size :data, :less_than => 1.megabytes
10
- validates_attachment_presence :data
11
- end
12
- end
@@ -1,12 +0,0 @@
1
- module ActiveadminSelleoCms
2
- class Icon < ActiveadminSelleoCms::Asset
3
- has_attached_file :data,
4
- :url => "/system/cms/icons/:id/:style_:basename.:extension",
5
- :path => ":rails_root/public/system/cms/icons/:id/:style_:basename.:extension",
6
- :styles => { :normal => "120x90>" },
7
- :default_style => :normal
8
-
9
- validates_attachment_size :data, :less_than => 1.megabytes
10
- validates_attachment_presence :data
11
- end
12
- end
@@ -1,28 +0,0 @@
1
- module ActiveAdmin
2
- module Views
3
-
4
- class IndexAsList < ActiveAdmin::Component
5
-
6
- def build(page_presenter, collection)
7
- add_class "index"
8
- collection.each do |obj|
9
- instance_exec(obj, &page_presenter.block)
10
- end
11
- end
12
-
13
- def render_tree(obj)
14
- ol class: ('sortable' if obj.level == 0) do
15
- li do
16
- div do
17
- obj.to_s
18
- end
19
- obj.children.each{|c| render_tree(c)} if obj.children.any?
20
- end
21
- end
22
- render partial: 'js'
23
- end
24
-
25
- end
26
- end
27
- end
28
-