spina 0.7.0 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of spina might be problematic. Click here for more details.

Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/spina/admin/application.js +3 -1
  3. data/app/assets/javascripts/spina/admin/spina.infinite_scroll.coffee +20 -0
  4. data/app/assets/javascripts/spina/admin/spina.scaffold.coffee +15 -0
  5. data/app/assets/javascripts/spina/admin/spina.trix.js.coffee +2 -0
  6. data/app/controllers/spina/admin/photos_controller.rb +26 -6
  7. data/app/controllers/spina/application_controller.rb +2 -4
  8. data/app/controllers/spina/inquiries_controller.rb +2 -2
  9. data/app/controllers/spina/pages_controller.rb +2 -2
  10. data/app/controllers/spina/sitemaps_controller.rb +1 -1
  11. data/app/models/spina/account.rb +4 -4
  12. data/app/models/spina/page.rb +0 -10
  13. data/app/models/spina/photo.rb +5 -0
  14. data/app/presenters/spina/pages/menu_presenter.rb +7 -6
  15. data/app/uploaders/spina/photo_uploader.rb +1 -1
  16. data/app/views/spina/admin/inquiries/inbox.html.haml +1 -1
  17. data/app/views/spina/admin/inquiries/show.html.haml +1 -1
  18. data/app/views/spina/admin/photos/_photo.html.haml +4 -6
  19. data/app/views/spina/admin/photos/_photo_collection_select.html.haml +16 -15
  20. data/app/views/spina/admin/photos/_photo_multi_picker.html.haml +3 -0
  21. data/app/views/spina/admin/photos/_photo_select.html.haml +5 -14
  22. data/app/views/spina/admin/photos/_photo_single_picker.html.haml +3 -0
  23. data/app/views/spina/admin/photos/_photo_uploaded.html.haml +4 -0
  24. data/app/views/spina/admin/photos/_wysihtml5_select.html.haml +5 -12
  25. data/app/views/spina/admin/photos/create.js.erb +3 -1
  26. data/app/views/spina/admin/photos/index.html.haml +10 -6
  27. data/app/views/spina/admin/photos/index.js.erb +5 -0
  28. data/app/views/spina/admin/photos/multi_picker_infinite_scroll.js.erb +6 -0
  29. data/app/views/spina/admin/photos/photo_collection_select.js.erb +1 -0
  30. data/app/views/spina/admin/photos/photo_select.js.erb +1 -0
  31. data/app/views/spina/admin/photos/single_picker_infinite_scroll.js.erb +6 -0
  32. data/app/views/spina/admin/photos/wysihtml5_infinite_scroll.js.erb +6 -0
  33. data/app/views/spina/admin/photos/wysihtml5_select.js.erb +1 -0
  34. data/app/views/spina/admin/shared/_rich_text_field.html.haml +24 -23
  35. data/config/locales/en.yml +2 -1
  36. data/db/seeds.rb +19 -9
  37. data/lib/generators/spina/install_generator.rb +14 -12
  38. data/lib/generators/spina/templates/app/assets/stylesheets/default/application.css.sass +66 -0
  39. data/lib/generators/spina/templates/app/views/default/pages/demo.html.haml +30 -0
  40. data/lib/generators/spina/templates/app/views/default/pages/homepage.html.haml +2 -0
  41. data/lib/generators/spina/templates/app/views/default/pages/show.html.haml +3 -0
  42. data/lib/generators/spina/templates/app/views/default/shared/_navigation.html.haml +5 -0
  43. data/lib/generators/spina/templates/app/views/layouts/default/application.html.haml +11 -0
  44. data/lib/generators/spina/templates/{spina.rb → config/initializers/spina.rb} +3 -2
  45. data/lib/generators/spina/templates/config/initializers/themes/default.rb +96 -0
  46. data/lib/spina/engine.rb +1 -0
  47. data/lib/spina/version.rb +1 -1
  48. data/test/dummy/app/assets/stylesheets/default/application.css.sass +66 -0
  49. data/test/dummy/app/views/default/pages/demo.html.haml +41 -0
  50. data/test/dummy/app/views/default/pages/homepage.html.haml +2 -0
  51. data/test/dummy/app/views/default/pages/show.html.haml +3 -0
  52. data/test/dummy/app/views/default/shared/_navigation.html.haml +5 -0
  53. data/test/dummy/app/views/layouts/default/application.html.haml +11 -0
  54. data/test/dummy/config/application.rb +1 -1
  55. data/test/dummy/config/initializers/spina.rb +26 -0
  56. data/test/dummy/config/initializers/themes/default.rb +65 -33
  57. data/test/dummy/db/migrate/20160114085213_create_spina_tables.spina.rb +167 -0
  58. metadata +40 -13
  59. data/app/views/spina/admin/photos/enhance.js +0 -0
  60. data/lib/generators/spina/templates/application.html.erb +0 -16
  61. data/lib/generators/spina/templates/homepage.html.erb +0 -3
  62. data/lib/generators/spina/templates/show.html.erb +0 -3
  63. data/lib/generators/spina/templates/theme.rb +0 -42
  64. data/test/dummy/app/assets/stylesheets/application.css +0 -13
  65. data/test/dummy/app/views/default/pages/homepage.html.erb +0 -3
  66. data/test/dummy/app/views/default/pages/show.html.erb +0 -3
  67. data/test/dummy/app/views/layouts/default/application.html.erb +0 -16
  68. data/test/dummy/tmp/restart.txt +0 -0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spina
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bram Jetten
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-01-08 00:00:00.000000000 Z
12
+ date: 2016-01-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -235,6 +235,20 @@ dependencies:
235
235
  - - ">="
236
236
  - !ruby/object:Gem::Version
237
237
  version: '0'
238
+ - !ruby/object:Gem::Dependency
239
+ name: kaminari
240
+ requirement: !ruby/object:Gem::Requirement
241
+ requirements:
242
+ - - ">="
243
+ - !ruby/object:Gem::Version
244
+ version: '0'
245
+ type: :runtime
246
+ prerelease: false
247
+ version_requirements: !ruby/object:Gem::Requirement
248
+ requirements:
249
+ - - ">="
250
+ - !ruby/object:Gem::Version
251
+ version: '0'
238
252
  description: CMS
239
253
  email:
240
254
  - bram@denkgroot.com
@@ -252,6 +266,8 @@ files:
252
266
  - app/assets/javascripts/spina/admin/aviary.js.coffee
253
267
  - app/assets/javascripts/spina/admin/confirm_delete.js.coffee.erb
254
268
  - app/assets/javascripts/spina/admin/pages.js.coffee
269
+ - app/assets/javascripts/spina/admin/spina.infinite_scroll.coffee
270
+ - app/assets/javascripts/spina/admin/spina.scaffold.coffee
255
271
  - app/assets/javascripts/spina/admin/spina.trix.js.coffee
256
272
  - app/assets/javascripts/spina/application.js
257
273
  - app/assets/stylesheets/spina/_mixins.scss
@@ -356,16 +372,22 @@ files:
356
372
  - app/views/spina/admin/photos/_photo_collection.html.haml
357
373
  - app/views/spina/admin/photos/_photo_collection_select.html.haml
358
374
  - app/views/spina/admin/photos/_photo_link.html.haml
375
+ - app/views/spina/admin/photos/_photo_multi_picker.html.haml
359
376
  - app/views/spina/admin/photos/_photo_select.html.haml
377
+ - app/views/spina/admin/photos/_photo_single_picker.html.haml
378
+ - app/views/spina/admin/photos/_photo_uploaded.html.haml
360
379
  - app/views/spina/admin/photos/_wysihtml5_select.html.haml
361
380
  - app/views/spina/admin/photos/create.js.erb
362
- - app/views/spina/admin/photos/enhance.js
363
381
  - app/views/spina/admin/photos/index.html.haml
382
+ - app/views/spina/admin/photos/index.js.erb
364
383
  - app/views/spina/admin/photos/insert_photo.js.erb
365
384
  - app/views/spina/admin/photos/insert_photo_collection.js.erb
366
385
  - app/views/spina/admin/photos/link.js.erb
386
+ - app/views/spina/admin/photos/multi_picker_infinite_scroll.js.erb
367
387
  - app/views/spina/admin/photos/photo_collection_select.js.erb
368
388
  - app/views/spina/admin/photos/photo_select.js.erb
389
+ - app/views/spina/admin/photos/single_picker_infinite_scroll.js.erb
390
+ - app/views/spina/admin/photos/wysihtml5_infinite_scroll.js.erb
369
391
  - app/views/spina/admin/photos/wysihtml5_insert.js.coffee
370
392
  - app/views/spina/admin/photos/wysihtml5_select.js.erb
371
393
  - app/views/spina/admin/sessions/new.html.haml
@@ -404,11 +426,14 @@ files:
404
426
  - db/migrate/20150507135428_create_spina_tables.rb
405
427
  - db/seeds.rb
406
428
  - lib/generators/spina/install_generator.rb
407
- - lib/generators/spina/templates/application.html.erb
408
- - lib/generators/spina/templates/homepage.html.erb
409
- - lib/generators/spina/templates/show.html.erb
410
- - lib/generators/spina/templates/spina.rb
411
- - lib/generators/spina/templates/theme.rb
429
+ - lib/generators/spina/templates/app/assets/stylesheets/default/application.css.sass
430
+ - lib/generators/spina/templates/app/views/default/pages/demo.html.haml
431
+ - lib/generators/spina/templates/app/views/default/pages/homepage.html.haml
432
+ - lib/generators/spina/templates/app/views/default/pages/show.html.haml
433
+ - lib/generators/spina/templates/app/views/default/shared/_navigation.html.haml
434
+ - lib/generators/spina/templates/app/views/layouts/default/application.html.haml
435
+ - lib/generators/spina/templates/config/initializers/spina.rb
436
+ - lib/generators/spina/templates/config/initializers/themes/default.rb
412
437
  - lib/spina.rb
413
438
  - lib/spina/carrierwave.rb
414
439
  - lib/spina/engine.rb
@@ -419,13 +444,15 @@ files:
419
444
  - test/dummy/README.rdoc
420
445
  - test/dummy/Rakefile
421
446
  - test/dummy/app/assets/javascripts/application.js
422
- - test/dummy/app/assets/stylesheets/application.css
447
+ - test/dummy/app/assets/stylesheets/default/application.css.sass
423
448
  - test/dummy/app/assets/stylesheets/fonts.css.sass
424
449
  - test/dummy/app/controllers/application_controller.rb
425
450
  - test/dummy/app/helpers/application_helper.rb
426
- - test/dummy/app/views/default/pages/homepage.html.erb
427
- - test/dummy/app/views/default/pages/show.html.erb
428
- - test/dummy/app/views/layouts/default/application.html.erb
451
+ - test/dummy/app/views/default/pages/demo.html.haml
452
+ - test/dummy/app/views/default/pages/homepage.html.haml
453
+ - test/dummy/app/views/default/pages/show.html.haml
454
+ - test/dummy/app/views/default/shared/_navigation.html.haml
455
+ - test/dummy/app/views/layouts/default/application.html.haml
429
456
  - test/dummy/config.ru
430
457
  - test/dummy/config/application.rb
431
458
  - test/dummy/config/application.yml
@@ -446,6 +473,7 @@ files:
446
473
  - test/dummy/config/locales/nl.yml
447
474
  - test/dummy/config/routes.rb
448
475
  - test/dummy/config/secrets.yml
476
+ - test/dummy/db/migrate/20160114085213_create_spina_tables.spina.rb
449
477
  - test/dummy/db/schema.rb
450
478
  - test/dummy/db/seeds.rb
451
479
  - test/dummy/public/404.html
@@ -453,7 +481,6 @@ files:
453
481
  - test/dummy/public/500.html
454
482
  - test/dummy/public/favicon.ico
455
483
  - test/dummy/script/rails
456
- - test/dummy/tmp/restart.txt
457
484
  - test/fixtures/spina/accounts.yml
458
485
  - test/fixtures/spina/pages.yml
459
486
  - test/fixtures/spina/users.yml
File without changes
@@ -1,16 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title><%%= current_account.name %></title>
5
- <%%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6
- <%%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
7
- <%%= csrf_meta_tags %>
8
- </head>
9
- <body>
10
-
11
- <%%= render 'spina/shared/navigation' %>
12
-
13
- <%%= yield %>
14
-
15
- </body>
16
- </html>
@@ -1,3 +0,0 @@
1
- <h1><%%= @page.title %></h1>
2
-
3
- <%%= @page.content(:content).try(:html_safe) %>
@@ -1,3 +0,0 @@
1
- <h1><%%= @page.title %></h1>
2
-
3
- <%%= @page.content(:content).try(:html_safe) %>
@@ -1,42 +0,0 @@
1
- module Spina
2
- module DefaultTheme
3
- include ::ActiveSupport::Configurable
4
-
5
- config_accessor :title, :page_parts, :view_templates, :layout_parts, :custom_pages, :plugins, :structures
6
-
7
- self.title = "Default theme"
8
-
9
- self.page_parts = [{
10
- name: 'content',
11
- title: 'Content',
12
- page_partable_type: "Spina::Text"
13
- }]
14
-
15
- self.structures = []
16
- self.layout_parts = []
17
- self.custom_pages = []
18
- self.plugins = []
19
-
20
- self.view_templates = {
21
- 'homepage' => {
22
- title: 'Homepage',
23
- page_parts: ['content']
24
- },
25
- 'show' => {
26
- title: 'Default',
27
- description: 'A simple page',
28
- usage: 'Use for your content',
29
- page_parts: ['content']
30
- }
31
- }
32
-
33
- self.custom_pages = [
34
- { name: 'homepage', title: 'Homepage', deletable: false, view_template: 'homepage' }
35
- ]
36
- end
37
- end
38
-
39
- theme = Spina::Theme.new
40
- theme.name = "default"
41
- theme.config = Spina::DefaultTheme.config
42
- Spina.register_theme(theme)
@@ -1,13 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the top of the
9
- * compiled file, but it's generally better to create a new file per style scope.
10
- *
11
- *= require_self
12
- *= require_tree .
13
- */
@@ -1,3 +0,0 @@
1
- <h1><%= @page.title %></h1>
2
-
3
- <%= @page.content(:content).try(:html_safe) %>
@@ -1,3 +0,0 @@
1
- <h1><%= @page.title %></h1>
2
-
3
- <%= @page.content(:content).try(:html_safe) %>
@@ -1,16 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title><%= current_account.name %></title>
5
- <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6
- <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
7
- <%= csrf_meta_tags %>
8
- </head>
9
- <body>
10
-
11
- <%= render 'spina/shared/navigation' %>
12
-
13
- <%= yield %>
14
-
15
- </body>
16
- </html>
File without changes