spina 0.9.0 → 0.10.0

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 (99) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -2
  3. data/app/assets/javascripts/spina/admin/account.js.coffee +1 -1
  4. data/app/assets/javascripts/spina/admin/pages.js.coffee.erb +1 -1
  5. data/app/assets/javascripts/spina/admin/spina.infinite_scroll.coffee +6 -2
  6. data/app/assets/javascripts/spina/admin/spina.scaffold.coffee +2 -2
  7. data/app/assets/javascripts/spina/admin/{spina.trix.js.coffee → spina.trix.js.coffee.erb} +1 -1
  8. data/app/assets/stylesheets/spina/admin/application.sass +3 -0
  9. data/app/controllers/spina/admin/accounts_controller.rb +0 -2
  10. data/app/controllers/spina/admin/admin_controller.rb +0 -2
  11. data/app/controllers/spina/admin/attachments_controller.rb +5 -3
  12. data/app/controllers/spina/admin/pages_controller.rb +1 -2
  13. data/app/controllers/spina/admin/photos_controller.rb +9 -6
  14. data/app/controllers/spina/admin/users_controller.rb +0 -2
  15. data/app/controllers/spina/pages_controller.rb +17 -6
  16. data/app/helpers/spina/admin/pages_helper.rb +15 -0
  17. data/app/models/spina/account.rb +8 -7
  18. data/app/models/spina/application_record.rb +5 -0
  19. data/app/models/spina/attachment.rb +6 -1
  20. data/app/models/spina/attachment_collection.rb +1 -1
  21. data/app/models/spina/color.rb +1 -1
  22. data/app/models/spina/layout_part.rb +1 -1
  23. data/app/models/spina/line.rb +1 -1
  24. data/app/models/spina/page.rb +10 -2
  25. data/app/models/spina/page_part.rb +1 -1
  26. data/app/models/spina/photo.rb +2 -2
  27. data/app/models/spina/photo_collection.rb +1 -1
  28. data/app/models/spina/photo_collections_photo.rb +1 -1
  29. data/app/models/spina/rewrite_rule.rb +1 -1
  30. data/app/models/spina/structure.rb +1 -1
  31. data/app/models/spina/structure_item.rb +9 -4
  32. data/app/models/spina/structure_part.rb +1 -1
  33. data/app/models/spina/text.rb +1 -1
  34. data/app/models/spina/user.rb +1 -1
  35. data/app/presenters/spina/pages/breadcrumb.rb +102 -0
  36. data/app/presenters/spina/pages/menu_presenter.rb +16 -5
  37. data/app/views/layouts/spina/admin/admin.html.haml +31 -0
  38. data/app/views/layouts/spina/admin/media_library.html.haml +11 -9
  39. data/app/views/spina/admin/accounts/_form.html.haml +29 -23
  40. data/app/views/spina/admin/accounts/analytics.html.haml +19 -15
  41. data/app/views/spina/admin/accounts/social.html.haml +19 -15
  42. data/app/views/spina/admin/accounts/style.html.haml +19 -15
  43. data/app/views/spina/admin/attachments/_select.html.haml +1 -1
  44. data/app/views/spina/admin/attachments/_select_collection.html.haml +1 -1
  45. data/app/views/spina/admin/attachments/insert.js.coffee +5 -0
  46. data/app/views/spina/admin/attachments/insert_collection.js.coffee +7 -0
  47. data/app/views/spina/admin/page_partables/attachment_collections/_form.html.haml +8 -9
  48. data/app/views/spina/admin/page_partables/attachments/_form.html.haml +7 -8
  49. data/app/views/spina/admin/page_partables/photo_collections/_form.html.haml +2 -2
  50. data/app/views/spina/admin/page_partables/photos/_form.html.haml +6 -10
  51. data/app/views/spina/admin/pages/_form.html.haml +25 -6
  52. data/app/views/spina/admin/pages/_form_advanced.html.haml +45 -45
  53. data/app/views/spina/admin/pages/_form_page_content.html.haml +1 -1
  54. data/app/views/spina/admin/pages/_form_page_seo.html.haml +1 -1
  55. data/app/views/spina/admin/pages/edit.html.haml +0 -19
  56. data/app/views/spina/admin/pages/index.html.haml +36 -29
  57. data/app/views/spina/admin/pages/new.html.haml +0 -10
  58. data/app/views/spina/admin/photos/_photo_collection_select.html.haml +4 -4
  59. data/app/views/spina/admin/photos/_photo_multi_picker.html.haml +2 -2
  60. data/app/views/spina/admin/photos/_photo_select.html.haml +4 -1
  61. data/app/views/spina/admin/photos/_photo_single_picker.html.haml +2 -2
  62. data/app/views/spina/admin/photos/index.html.haml +3 -2
  63. data/app/views/spina/admin/photos/insert_photo.js.erb +4 -4
  64. data/app/views/spina/admin/photos/insert_photo_collection.js.erb +6 -3
  65. data/app/views/spina/admin/photos/multi_picker_infinite_scroll.js.erb +1 -1
  66. data/app/views/spina/admin/photos/single_picker_infinite_scroll.js.erb +1 -1
  67. data/app/views/spina/admin/shared/_breadcrumbs.html.haml +1 -0
  68. data/app/views/spina/admin/shared/_notifications.html.haml +23 -12
  69. data/app/views/spina/admin/shared/_primary_navigation.html.haml +43 -3
  70. data/app/views/spina/admin/structure_partables/photos/_form.html.haml +3 -6
  71. data/app/views/spina/admin/users/_form.html.haml +37 -33
  72. data/app/views/spina/admin/users/index.html.haml +27 -23
  73. data/config/initializers/assets.rb +1 -1
  74. data/config/locales/de.yml +4 -0
  75. data/config/locales/en.yml +6 -1
  76. data/config/locales/es.yml +4 -0
  77. data/config/locales/fr.yml +4 -0
  78. data/config/locales/it.yml +4 -0
  79. data/config/locales/nl.yml +8 -0
  80. data/config/locales/pt-BR.yml +4 -0
  81. data/config/locales/ru.yml +16 -4
  82. data/config/locales/tr.yml +4 -0
  83. data/config/locales/zh-CN.yml +4 -0
  84. data/config/routes.rb +3 -3
  85. data/lib/generators/spina/install_generator.rb +31 -11
  86. data/lib/generators/spina/templates/app/views/default/pages/homepage.html.haml +1 -1
  87. data/lib/generators/spina/templates/app/views/default/pages/show.html.haml +1 -1
  88. data/lib/generators/spina/templates/app/views/demo/pages/homepage.html.haml +1 -1
  89. data/lib/generators/spina/templates/app/views/demo/pages/show.html.haml +1 -1
  90. data/lib/generators/spina/templates/config/initializers/spina.rb +1 -0
  91. data/lib/spina.rb +2 -1
  92. data/lib/spina/version.rb +1 -1
  93. data/lib/tasks/spina_tasks.rake +9 -1
  94. metadata +33 -18
  95. data/app/views/layouts/spina/admin/application.html.haml +0 -40
  96. data/app/views/layouts/spina/admin/settings.html.haml +0 -45
  97. data/app/views/layouts/spina/admin/website.html.haml +0 -26
  98. data/app/views/spina/admin/attachments/insert.js.erb +0 -5
  99. data/app/views/spina/admin/attachments/insert_collection.js.erb +0 -7
@@ -1,26 +0,0 @@
1
- - content_for :secondary_navigation do
2
- %nav#secondary
3
- %h1= t('spina.website.title')
4
- %ul
5
- %li{class: ('active' if current_admin_path.start_with?('/pages'))}
6
- = link_to spina.admin_pages_path do
7
- = icon('pages')
8
- = t('spina.website.pages')
9
- %small= t('spina.website.pages_description')
10
-
11
- %li{class: ('active' if current_admin_path.start_with?('/photos', '/attachments'))}
12
- = link_to spina.admin_photos_path do
13
- = icon('image')
14
- = t('spina.website.media_library')
15
- %small= t('spina.website.media_library_description')
16
-
17
- - Spina::Plugin.all.each do |plugin|
18
- - if current_theme.plugins.include? plugin.name
19
- - if lookup_context.exists? "spina/admin/hooks/#{ plugin.namespace }/_website_secondary_navigation"
20
- = render "spina/admin/hooks/#{ plugin.namespace }/website_secondary_navigation", plugin: plugin
21
-
22
- - content_for(:application) do
23
- = content_for?(:website) ? yield(:website) : yield
24
-
25
- = render template: 'layouts/spina/admin/application'
26
-
@@ -1,5 +0,0 @@
1
- var hidden_input = $("input[name='<%= j params[:page_part_id] %>[page_partable_id]']");
2
- hidden_input.parents('td').find('a .attachment, a .placeholder').remove();
3
- hidden_input.parents('td').find('a').prepend("<div class='attachment'><%= @attachment.name %></div>");
4
- hidden_input.val("<%= @attachment.id %>");
5
- $.hideModal();
@@ -1,7 +0,0 @@
1
- var hidden_input = $("input[name='<%= j params[:page_part_id] %>[attachment_tokens]']");
2
- var attachment_collection = $("<%= j render partial: 'attachment_collection', locals: {attachments: @attachments} %>");
3
-
4
- hidden_input.parents('td').find('.attachment, .placeholder').remove();
5
- hidden_input.parents('td a').append(attachment_collection);
6
- hidden_input.val("<%= @attachments.map(&:id).join(',') %>");
7
- $.hideModal();