spina 0.10.0 → 0.11.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 (183) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +16 -4
  3. data/app/assets/fonts/spina/ics_spina.eot +0 -0
  4. data/app/assets/fonts/spina/ics_spina.svg +356 -0
  5. data/app/assets/fonts/spina/ics_spina.ttf +0 -0
  6. data/app/assets/fonts/spina/ics_spina.woff +0 -0
  7. data/app/assets/icons/spina/barchart.svg +10 -0
  8. data/app/assets/icons/spina/bars.svg +1 -0
  9. data/app/assets/icons/spina/bold.svg +1 -0
  10. data/app/assets/icons/spina/brush.svg +10 -0
  11. data/app/assets/icons/spina/camera.svg +10 -0
  12. data/app/assets/icons/spina/caret-down.svg +1 -0
  13. data/app/assets/icons/spina/caret-left.svg +1 -0
  14. data/app/assets/icons/spina/caret-right.svg +1 -0
  15. data/app/assets/icons/spina/caret-up.svg +1 -0
  16. data/app/assets/icons/spina/cart.svg +10 -0
  17. data/app/assets/icons/spina/chart-outline.svg +10 -0
  18. data/app/assets/icons/spina/check.svg +10 -0
  19. data/app/assets/icons/spina/chevron-down.svg +1 -0
  20. data/app/assets/icons/spina/chevron-left.svg +1 -0
  21. data/app/assets/icons/spina/chevron-right.svg +1 -0
  22. data/app/assets/icons/spina/chevron-up.svg +1 -0
  23. data/app/assets/icons/spina/code.svg +1 -0
  24. data/app/assets/icons/spina/cog-outline.svg +10 -0
  25. data/app/assets/icons/spina/cog.svg +10 -0
  26. data/app/assets/icons/spina/comment.svg +1 -0
  27. data/app/assets/icons/spina/cross.svg +10 -0
  28. data/app/assets/icons/spina/customer-outline.svg +10 -0
  29. data/app/assets/icons/spina/document.svg +10 -0
  30. data/app/assets/icons/spina/dots.svg +10 -0
  31. data/app/assets/icons/spina/exclamation.svg +13 -0
  32. data/app/assets/icons/spina/eye.svg +1 -0
  33. data/app/assets/icons/spina/filter.svg +10 -0
  34. data/app/assets/icons/spina/home.svg +1 -0
  35. data/app/assets/icons/spina/image.svg +10 -0
  36. data/app/assets/icons/spina/inbox-outline.svg +10 -0
  37. data/app/assets/icons/spina/info.svg +13 -0
  38. data/app/assets/icons/spina/italic.svg +1 -0
  39. data/app/assets/icons/spina/large-check.svg +10 -0
  40. data/app/assets/icons/spina/link.svg +1 -0
  41. data/app/assets/icons/spina/list-ul.svg +1 -0
  42. data/app/assets/icons/spina/mail-outline.svg +10 -0
  43. data/app/assets/icons/spina/mail.svg +10 -0
  44. data/app/assets/icons/spina/media-library.svg +10 -0
  45. data/app/assets/icons/spina/megaphone.svg +10 -0
  46. data/app/assets/icons/spina/min.svg +14 -0
  47. data/app/assets/icons/spina/pages.svg +10 -0
  48. data/app/assets/icons/spina/pencil-outline.svg +10 -0
  49. data/app/assets/icons/spina/pencil.svg +16 -0
  50. data/app/assets/icons/spina/picture-o.svg +1 -0
  51. data/app/assets/icons/spina/plus.svg +10 -0
  52. data/app/assets/icons/spina/power-off.svg +10 -0
  53. data/app/assets/icons/spina/preview/icons_spina-preview.html +1043 -0
  54. data/app/assets/icons/spina/preview/ics_spina-preview.html +1043 -0
  55. data/app/assets/icons/spina/preview.svg +10 -0
  56. data/app/assets/icons/spina/product-outline.svg +10 -0
  57. data/app/assets/icons/spina/random.svg +10 -0
  58. data/app/assets/icons/spina/refresh.svg +13 -0
  59. data/app/assets/icons/spina/search.svg +10 -0
  60. data/app/assets/icons/spina/shop.svg +12 -0
  61. data/app/assets/icons/spina/social-outline.svg +10 -0
  62. data/app/assets/icons/spina/trash.svg +10 -0
  63. data/app/assets/icons/spina/upload-outline.svg +14 -0
  64. data/app/assets/icons/spina/users-outline.svg +10 -0
  65. data/app/assets/images/spina/arrow-left.png +0 -0
  66. data/app/assets/images/spina/arrow-right.png +0 -0
  67. data/app/assets/images/spina/danger-zone-ribbon.png +0 -0
  68. data/app/assets/images/spina/datepicker.png +0 -0
  69. data/app/assets/images/spina/divider.png +0 -0
  70. data/app/assets/images/spina/marker.png +0 -0
  71. data/app/assets/images/spina/mask.png +0 -0
  72. data/app/assets/images/spina/spina.png +0 -0
  73. data/app/assets/images/spina/spina_small.png +0 -0
  74. data/app/assets/images/spina/wheel.png +0 -0
  75. data/app/assets/javascripts/spina/admin/{account.js.coffee → account.coffee} +0 -0
  76. data/app/assets/javascripts/spina/admin/application.coffee.erb +152 -0
  77. data/app/assets/javascripts/spina/admin/{confirm_delete.js.coffee.erb → confirm_delete.coffee.erb} +0 -0
  78. data/app/assets/javascripts/spina/admin/dropdown.coffee +75 -0
  79. data/app/assets/javascripts/spina/admin/forms.coffee +7 -0
  80. data/app/assets/javascripts/spina/admin/galleryselect.coffee +20 -0
  81. data/app/assets/javascripts/spina/admin/{spina.infinite_scroll.coffee → infinite_scroll.coffee} +1 -0
  82. data/app/assets/javascripts/spina/admin/modal.coffee +54 -0
  83. data/app/assets/javascripts/spina/admin/navigation.coffee +38 -0
  84. data/app/assets/javascripts/spina/admin/notifications.coffee +7 -0
  85. data/app/assets/javascripts/spina/admin/{pages.js.coffee.erb → pages.coffee.erb} +11 -2
  86. data/app/assets/javascripts/spina/admin/switch.coffee +43 -0
  87. data/app/assets/javascripts/spina/admin/tabs.coffee +13 -0
  88. data/app/assets/javascripts/spina/admin/{spina.trix.js.coffee.erb → trix.coffee.erb} +26 -25
  89. data/app/assets/javascripts/spina/admin/uploads.coffee +35 -0
  90. data/app/assets/stylesheets/spina/_admin_editing.sass +25 -0
  91. data/app/assets/stylesheets/spina/_buttons.sass +367 -0
  92. data/app/assets/stylesheets/spina/_cards.sass +54 -0
  93. data/app/assets/stylesheets/spina/_configuration.sass +15 -0
  94. data/app/assets/stylesheets/spina/_custom_animations.sass +61 -0
  95. data/app/assets/stylesheets/spina/_farbtastic.sass +37 -0
  96. data/app/assets/stylesheets/spina/_fonts.sass +18 -0
  97. data/app/assets/stylesheets/spina/_forms.sass +806 -0
  98. data/app/assets/stylesheets/spina/_gallery.sass +249 -0
  99. data/app/assets/stylesheets/spina/_ics_spina.scss +60 -0
  100. data/app/assets/stylesheets/spina/_labels.sass +30 -0
  101. data/app/assets/stylesheets/spina/_login.sass +46 -0
  102. data/app/assets/stylesheets/spina/_modal.sass +162 -0
  103. data/app/assets/stylesheets/spina/_notifications.sass +62 -0
  104. data/app/assets/stylesheets/spina/_sortable_lists.sass +177 -0
  105. data/app/assets/stylesheets/spina/_tables.sass +301 -0
  106. data/app/assets/stylesheets/spina/_trix.sass +99 -0
  107. data/app/assets/stylesheets/spina/_wizard.sass +122 -0
  108. data/app/assets/stylesheets/spina/_wysihtml5.sass +79 -0
  109. data/app/assets/stylesheets/spina/application.sass +0 -1
  110. data/app/assets/stylesheets/spina/wysihtml5_textarea.sass +14 -0
  111. data/app/assets/stylesheets/spina.sass +564 -0
  112. data/app/controllers/concerns/spina/frontend.rb +59 -0
  113. data/app/controllers/spina/admin/navigations_controller.rb +60 -0
  114. data/app/controllers/spina/admin/pages_controller.rb +7 -6
  115. data/app/controllers/spina/admin/photos_controller.rb +18 -7
  116. data/app/controllers/spina/application_controller.rb +2 -2
  117. data/app/controllers/spina/pages_controller.rb +4 -49
  118. data/app/helpers/spina/admin/pages_helper.rb +12 -7
  119. data/app/helpers/spina/application_helper.rb +0 -29
  120. data/app/models/concerns/spina/part.rb +1 -1
  121. data/app/models/spina/navigation.rb +11 -0
  122. data/app/models/spina/navigation_item.rb +17 -0
  123. data/app/models/spina/page.rb +11 -0
  124. data/app/models/spina/page_part.rb +1 -1
  125. data/app/models/spina/photo_collection.rb +6 -1
  126. data/app/models/spina/structure.rb +4 -0
  127. data/app/models/spina/structure_item.rb +5 -1
  128. data/app/models/spina/structure_part.rb +16 -3
  129. data/app/views/layouts/spina/admin/admin.html.haml +8 -1
  130. data/app/views/layouts/spina/admin/pages.html.haml +30 -0
  131. data/app/views/spina/admin/accounts/_form.html.haml +1 -1
  132. data/app/views/spina/admin/accounts/analytics.html.haml +1 -1
  133. data/app/views/spina/admin/accounts/social.html.haml +1 -1
  134. data/app/views/spina/admin/accounts/style.html.haml +1 -1
  135. data/app/views/spina/admin/navigations/_navigation_item_nested_list.html.haml +7 -0
  136. data/app/views/spina/admin/navigations/_page.html.haml +8 -0
  137. data/app/views/spina/admin/navigations/edit.html.haml +22 -0
  138. data/app/views/spina/admin/navigations/show.html.haml +7 -0
  139. data/app/views/spina/admin/page_partables/attachment_collections/_form.html.haml +1 -1
  140. data/app/views/spina/admin/page_partables/attachments/_form.html.haml +1 -1
  141. data/app/views/spina/admin/page_partables/photo_collections/_form.html.haml +1 -1
  142. data/app/views/spina/admin/page_partables/photos/_form.html.haml +1 -1
  143. data/app/views/spina/admin/page_partables/structures/_form.html.haml +1 -1
  144. data/app/views/spina/admin/pages/_form.html.haml +12 -5
  145. data/app/views/spina/admin/pages/_page.html.haml +12 -18
  146. data/app/views/spina/admin/pages/_page_nested_list.html.haml +7 -0
  147. data/app/views/spina/admin/pages/create.js.coffee +0 -0
  148. data/app/views/spina/admin/pages/index.html.haml +24 -42
  149. data/app/views/spina/admin/pages/update.js.coffee +1 -3
  150. data/app/views/spina/admin/photos/_photo.html.haml +2 -0
  151. data/app/views/spina/admin/photos/_photo_collection_select.html.haml +1 -1
  152. data/app/views/spina/admin/photos/_photo_select.html.haml +2 -2
  153. data/app/views/spina/admin/photos/_wysihtml5_select.html.haml +1 -1
  154. data/app/views/spina/admin/photos/create_multiple.js.erb +4 -0
  155. data/app/views/spina/admin/photos/index.html.haml +1 -1
  156. data/app/views/spina/admin/photos/single_picker_infinite_scroll.js.erb +1 -1
  157. data/app/views/spina/admin/sessions/new.html.haml +8 -5
  158. data/app/views/spina/admin/shared/_notifications.html.haml +3 -1
  159. data/app/views/spina/admin/shared/_primary_navigation.html.haml +4 -3
  160. data/app/views/spina/admin/shared/_rich_text_field.html.haml +16 -16
  161. data/app/views/spina/admin/structure_items/_fields.html.haml +7 -8
  162. data/app/views/spina/admin/structure_partables/photo_collections/_form.html.haml +14 -0
  163. data/app/views/spina/admin/structure_partables/photos/_form.html.haml +1 -1
  164. data/app/views/spina/shared/_google_site_verification.html.haml +1 -0
  165. data/config/fontcustom.yml +95 -0
  166. data/config/locales/en.yml +11 -0
  167. data/config/locales/nl.yml +13 -3
  168. data/config/locales/pt-BR.yml +11 -1
  169. data/config/routes.rb +14 -8
  170. data/db/migrate/1_create_spina_tables.rb +0 -7
  171. data/db/migrate/2_create_spina_translation_tables.rb +26 -7
  172. data/db/migrate/3_create_spina_navigations.rb +21 -0
  173. data/lib/generators/spina/templates/config/initializers/carrierwave.rb +1 -1
  174. data/lib/spina/engine.rb +1 -2
  175. data/lib/spina/fontcustom/_ics_spina.scss +5 -0
  176. data/lib/spina/version.rb +1 -1
  177. data/lib/spina.rb +3 -1
  178. metadata +146 -45
  179. data/app/assets/images/spina/admin/logo@2x.png +0 -0
  180. data/app/assets/javascripts/spina/admin/application.js +0 -10
  181. data/app/assets/javascripts/spina/admin/spina.scaffold.coffee +0 -15
  182. data/app/assets/javascripts/spina/application.js +0 -15
  183. data/app/assets/stylesheets/spina/_mixins.scss +0 -34
@@ -2,7 +2,7 @@
2
2
  = f.object.title
3
3
  .horizontal-form-content
4
4
  = link_to spina.photo_select_admin_photos_path(f.object_name, selected_photo_id: f.object.page_partable.try(:id)), remote: true, class: 'media_picker clearfix' do
5
- .placeholder.pull-right
5
+ .placeholder
6
6
  %span.button.button-small.button-round
7
7
  %i.icon.icon-dots
8
8
  =t 'spina.pages.photo_picker'
@@ -13,7 +13,7 @@
13
13
 
14
14
  = f.fields_for :page_partable do |ff|
15
15
  - ff.object.page_part = f.object
16
- = link_to_add_fields ff, :structure_items do
16
+ = link_to_add_structure_item_fields ff, :structure_items do
17
17
  = icon('plus')
18
18
 
19
19
  .structure-form-content
@@ -1,4 +1,14 @@
1
- = form_for [spina, :admin, @page], multipart: true, html: {autocomplete: "off"} do |f|
1
+ - if @page.errors.any?
2
+ - content_for :notifications do
3
+ .notification.notification-danger.animated.fadeInRight
4
+ = icon('exclamation')
5
+ .notification-message
6
+ =t 'spina.notifications.alert'
7
+ %small= @page.errors.full_messages.join('<br />').html_safe
8
+ = link_to '#', data: {close_notification: true} do
9
+ = icon('cross')
10
+
11
+ = form_for [spina, :admin, @page], html: {id: 'page_form', autocomplete: "off", data: {remote: @page.persisted?}} do |f|
2
12
  %header#header
3
13
  .breadcrumbs= render_breadcrumbs separator: '<div class="divider"></div>'
4
14
  - unless @page.new_record?
@@ -14,7 +24,7 @@
14
24
  = link_to t("languages.#{locale}"), "?locale=#{locale}", style: ('font-weight: 600' if @locale.to_s == locale.to_s)
15
25
 
16
26
  #header_actions
17
- %button.button.button-primary{type: 'submit', style: 'margin-right: 0'}
27
+ %button.button.button-primary{type: 'submit', style: 'margin-right: 0', data: {disable_with: t('spina.pages.saving')}}
18
28
  = icon('check')
19
29
  =t 'spina.pages.save'
20
30
 
@@ -26,9 +36,6 @@
26
36
 
27
37
  = hidden_field_tag :locale, @locale
28
38
 
29
- - content_for :notification_alert do
30
- = error_explanation!(@page)
31
-
32
39
  - Globalize.with_locale(@locale) do
33
40
  - @tabs.each do |tab|
34
41
  = render "spina/admin/pages/form_#{tab}", f: f
@@ -1,20 +1,14 @@
1
- %li.dd-item{data: {id: page.id}}
2
- %div.dd-item-inner
3
- = link_to spina.edit_admin_page_path(page), class: 'button button-link button-small sortable-link' do
4
- = page.menu_title
5
- - if page.draft?
6
- %small (#{t('spina.pages.concept')})
7
- - elsif !page.show_in_menu?
8
- %small (#{t('spina.pages.show_in_menu')})
1
+ = link_to spina.edit_admin_page_path(page), class: 'button button-link button-small sortable-link' do
2
+ = page.menu_title
3
+ - if page.draft?
4
+ %small (#{t('spina.pages.concept')})
5
+ - elsif !page.show_in_menu?
6
+ %small (#{t('spina.pages.show_in_menu')})
9
7
 
10
- - if page.skip_to_first_child
11
- %small (#{raw t('spina.pages.skip_to_first_child')})
8
+ - if page.skip_to_first_child
9
+ %small (#{raw t('spina.pages.skip_to_first_child')})
12
10
 
13
- %span.pull-right
14
- = link_to spina.edit_admin_page_path(page), class: 'button button-small button-link dd-nodrag' do
15
- = icon('pencil-outline')
16
- = t('spina.edit')
17
-
18
- - if page.children.active.present?
19
- %ol.dd-list
20
- = render partial: 'page', collection: page.children.active.sorted
11
+ %span.pull-right
12
+ = link_to spina.edit_admin_page_path(page), class: 'button button-small button-link dd-nodrag' do
13
+ = icon('pencil-outline')
14
+ = t('spina.edit')
@@ -0,0 +1,7 @@
1
+ %li.dd-item{data: {id: page_nested_list.id}}
2
+ %div.dd-item-inner
3
+ = render partial: 'page', object: page_nested_list
4
+
5
+ - if page_nested_list.children.active.present?
6
+ %ol.dd-list
7
+ = render partial: 'page_nested_list', collection: page_nested_list.children.active.sorted
File without changes
@@ -1,53 +1,35 @@
1
- - content_for(:permanent_notice) do
2
- - unless current_account.robots_allowed?
3
- .permanent-notice.permanent-notice-info
4
- = icon('search')
5
- %p
6
- =t 'spina.pages.invisible_to_search_engines'
7
- %small=t 'spina.pages.invisible_to_search_engines_description'
8
-
9
- %header#header
10
- #header_actions
11
- = link_to '#pages_list', class: 'button sort-switch', data: {change_order: t('spina.pages.change_order'), done_changing_order: t('spina.pages.done_changing_order')} do
12
- = icon('random')
13
- = t('spina.pages.change_order')
14
-
15
- %span{data: {dropdown: true}}
16
- = link_to spina.new_admin_page_path(params: {view_template: 'show'}), class: 'button button-primary', style: 'margin-right: 0', data: {trigger: ('dropdown' if current_theme.new_page_templates.size > 1), target: '#create_page_dropdown'} do
17
- = icon('plus')
18
- = t('spina.pages.new')
19
-
20
- .sliding-dropdown#create_page_dropdown.align-right
21
- .slide-controls
22
- %a.previous.muted.icon-only{href: '#'}
23
- = icon('chevron-left')
24
-
25
- - current_theme.new_page_templates.each_with_index do |template, index|
26
- .slide-title{class: ('active' if index == 0), data: {target: "#slide-#{template[1].parameterize}"}}= template[1]
27
-
28
- %a.next.icon-only{href: '#'}
29
- = icon('chevron-right')
1
+ - content_for(:header_actions) do
2
+ %span{data: {dropdown: true}}
3
+ = link_to spina.new_admin_page_path(params: {view_template: 'show'}), class: 'button button-primary', style: 'margin-right: 0', data: {trigger: ('dropdown' if current_theme.new_page_templates.size > 1), target: '#create_page_dropdown'} do
4
+ = icon('plus')
5
+ = t('spina.pages.new')
6
+
7
+ .sliding-dropdown#create_page_dropdown.align-right
8
+ .slide-controls
9
+ %a.previous.muted.icon-only{href: '#'}
10
+ = icon('chevron-left')
30
11
 
31
12
  - current_theme.new_page_templates.each_with_index do |template, index|
32
- .slide{class: ('active' if index == 0), id: "slide-#{template[1].parameterize}"}
33
- %p= template[2]
13
+ .slide-title{class: ('active' if index == 0), data: {target: "#slide-#{template[0].parameterize}"}}= template[1]
34
14
 
35
- %p.muted= template[3]
15
+ %a.next.icon-only{href: '#'}
16
+ = icon('chevron-right')
36
17
 
37
- .slide-dots
38
- - current_theme.new_page_templates.each_with_index do |template2, index2|
39
- .slide-dot{class: ('active' if index2 == index)}
18
+ - current_theme.new_page_templates.each_with_index do |template, index|
19
+ .slide{class: ('active' if index == 0), id: "slide-#{template[0].parameterize}"}
20
+ %p= template[2]
40
21
 
41
- = link_to spina.new_admin_page_path(params: {view_template: template[0]}), class: 'button button-primary' do
42
- = icon('pencil-outline')
43
- = t('spina.pages.create_page', template: template[1])
22
+ %p.muted= template[3]
44
23
 
45
- .breadcrumbs= render_breadcrumbs seperator: '<div class="divider"></div>'
24
+ .slide-dots
25
+ - current_theme.new_page_templates.each_with_index do |template2, index2|
26
+ .slide-dot{class: ('active' if index2 == index)}
46
27
 
47
- .filters
48
-
28
+ = link_to spina.new_admin_page_path(params: {view_template: template[0]}), class: 'button button-primary' do
29
+ = icon('pencil-outline')
30
+ = t('spina.pages.create_page', template: template[1])
49
31
 
50
32
  .well
51
33
  .dd#pages_list{data: {:"sort-url" => spina.sort_admin_pages_url }}
52
34
  %ol.dd-list
53
- = render partial: 'page', collection: @pages.roots
35
+ = render partial: 'page_nested_list', collection: @pages.roots
@@ -1,3 +1 @@
1
- button = $('form button[type=submit].button-saving')
2
- button.removeClass('button-saving')
3
- button.attr("data-icon", "o")
1
+ $('#header .breadcrumbs').html("<%=j render_breadcrumbs separator: '<div class="divider"></div>' %>")
@@ -2,4 +2,6 @@
2
2
  .overlay
3
3
  = link_to spina.admin_photo_path(photo), method: :delete, class: 'icon-only delete-photo-link', data: {confirm: t('spina.photos.delete_confirmation')} do
4
4
  =t('spina.photos.delete')
5
+ = radio_button_tag :photo_id, photo.id
6
+ = check_box_tag 'photo_ids[]', photo.id
5
7
  = image_tag photo.file.thumb.url, id: "photo_#{photo.id}"
@@ -4,7 +4,7 @@
4
4
  .item.item-small.item-uploader
5
5
  = form_for [spina, :admin, @photo], html: {multipart: true} do |f|
6
6
  = f.label :file, t('spina.photos.upload_image')
7
- = f.file_field :file, data: {customfileinput: true}
7
+ = f.file_field :files, multiple: true, data: {customfileinput: true}
8
8
 
9
9
  = form_tag spina.insert_photo_collection_admin_photos_path(params[:page_part_id]), remote: true, class: 'gallery-prepend-image' do
10
10
  .infinite-scroll
@@ -4,7 +4,7 @@
4
4
  .item.item-small.item-uploader
5
5
  = form_for [spina, :admin, @photo], html: {multipart: true} do |f|
6
6
  = f.label :file, t('spina.photos.upload_image')
7
- = f.file_field :file, data: {customfileinput: true}
7
+ = f.file_field :files, multiple: true, data: {customfileinput: true}
8
8
 
9
9
  = form_tag spina.insert_photo_admin_photos_path(params[:page_part_id]), remote: true, class: 'gallery-prepend-image' do
10
10
  = hidden_field_tag :hidden_field_id, @hidden_field_id
@@ -12,5 +12,5 @@
12
12
  .infinite-scroll
13
13
  = render partial: 'spina/admin/photos/photo_single_picker', collection: @photos
14
14
 
15
- .infinite-pagination= link_to_next_page @photos, 'Next', params: params.slice(:selected_photo_id), remote: true
15
+ .infinite-pagination= link_to_next_page @photos, 'Next', params: params.slice(:selected_photo_id).permit(:selected_photo_id), remote: true
16
16
 
@@ -4,7 +4,7 @@
4
4
  .item.item-uploader
5
5
  = form_for [spina, :admin, @photo], html: {multipart: true} do |f|
6
6
  = f.label :file, t('spina.photos.upload_image')
7
- = f.file_field :file, data: {customfileinput: true}
7
+ = f.file_field :files, multiple: true, data: {customfileinput: true}
8
8
 
9
9
  = form_tag spina.wysihtml5_insert_admin_photos_path(params[:object_id]), remote: true, class: 'gallery-prepend-image' do
10
10
  .infinite-scroll
@@ -0,0 +1,4 @@
1
+ <% @photos.each do |photo| %>
2
+ $item = $("<%=j render partial: 'spina/admin/photos/photo', object: photo %>");
3
+ $(".gallery-prepend-image .infinite-scroll").prepend($item);
4
+ <% end %>
@@ -4,7 +4,7 @@
4
4
  = form_for [spina, :admin, @photo], html: {multipart: true} do |f|
5
5
  = hidden_field_tag :media_library, value: true
6
6
  = f.label :file, t('spina.photos.upload_image')
7
- = f.file_field :file, data: {customfileinput: true}
7
+ = f.file_field :files, multiple: true, data: {customfileinput: true}
8
8
 
9
9
  .gallery-prepend-image
10
10
  .infinite-scroll
@@ -2,5 +2,5 @@
2
2
  $("<%=j render partial: 'spina/admin/photos/photo_single_picker', collection: @photos %>").appendTo($(".infinite-scroll"));
3
3
 
4
4
  // Update pagination link
5
- $('.infinite-pagination').html("<%= j link_to_next_page @photos, 'Next', params: params.slice(:selected_photo_id), remote: true %>").infiniteScroll()
5
+ $('.infinite-pagination').html("<%= j link_to_next_page @photos, 'Next', params: params.slice(:selected_photo_id).permit(:selected_photo_id), remote: true %>").infiniteScroll()
6
6
 
@@ -1,9 +1,12 @@
1
1
  = form_tag spina.admin_sessions_path, id: "login_wrapper" do
2
- = image_tag 'spina/admin/spina.png'
2
+ = image_tag 'spina/admin/spina.png', class: 'animated fadeInDown'
3
3
  - if flash[:alert].present?
4
- .notification.notification-danger
4
+ .failed-to-login.animated.fadeInDown
5
5
  .icon.icon-cross
6
6
  = flash[:alert]
7
- = text_field_tag :email, params[:email], placeholder: Spina::User.human_attribute_name(:email), autofocus: true
8
- = password_field_tag :password, nil, placeholder: Spina::User.human_attribute_name(:password)
9
- = button_tag t('spina.login'), class: 'button button-primary', data: {icon: '3'}
7
+
8
+ .login-fields
9
+ = text_field_tag :email, params[:email], placeholder: Spina::User.human_attribute_name(:email), autofocus: true, class: "animated fadeInDown"
10
+ = password_field_tag :password, nil, placeholder: Spina::User.human_attribute_name(:password), class: "animated fadeInDown"
11
+
12
+ = button_tag t('spina.login'), class: 'button button-primary animated fadeInDown', data: {icon: '3'}
@@ -24,4 +24,6 @@
24
24
  = flash[:success].html_safe
25
25
  %small= flash[:success_small].try(:html_safe)
26
26
  = link_to '#', data: {close_notification: true} do
27
- = icon('cross')
27
+ = icon('cross')
28
+
29
+ = yield(:notifications) if content_for?(:notifications)
@@ -1,13 +1,13 @@
1
- %nav#primary.transformed
1
+ %nav#primary.transformed{data: {turbolinks_permanent: true}}
2
2
  %ul
3
- %li{class: ('active' if (%w[pages photos attachments] + Spina::Plugin.all.map { |plugin| plugin.namespace if current_theme.plugins.include?(plugin.name) }).include? controller_name)}
3
+ %li{class: ('active' if (%w[pages photos attachments navigations] + Spina::Plugin.all.map { |plugin| plugin.namespace if current_theme.plugins.include?(plugin.name) }).include? controller_name)}
4
4
  = link_to spina.admin_pages_path do
5
5
  = icon('home')
6
6
  = t('spina.website.title')
7
7
  = icon('caret-right')
8
8
 
9
9
  %ul
10
- %li{class: ('active' if current_admin_path.start_with?('/pages'))}
10
+ %li{class: ('active' if current_admin_path.start_with?('/pages') || current_admin_path.start_with?('/navigations'))}
11
11
  = link_to t('spina.website.pages'), spina.admin_pages_path
12
12
  %li{class: ('active' if current_admin_path.start_with?('/photos', '/attachments'))}
13
13
  = link_to t('spina.website.media_library'), spina.admin_photos_path
@@ -57,3 +57,4 @@
57
57
  %li.bottom
58
58
  = link_to spina.admin_logout_path, data: {turbolinks: false} do
59
59
  = icon('power-off')
60
+ =t 'spina.logout'
@@ -1,34 +1,34 @@
1
1
  - object_id = f.object.persisted? ? f.object.object_id : "new_association_#{f.object.object_id}"
2
2
  = f.hidden_field field, id: "#{object_id}_input"
3
- %trix-toolbar.clearfix{ id: "#{object_id}_toolbar", data: { editor_id: "#{object_id}_editor" }}
3
+
4
+ %trix-toolbar.clearfix{ id: "#{object_id}_toolbar", data: { trix_editor_id: "#{object_id}_editor" }}
4
5
  .button-groups
5
6
  .button-group.pull-left
6
- %button.button.button-small{ type: 'button', tabindex: -1, title: 'Bold', data: { attribute: 'bold', key: 'b' }}
7
+ %button.button.button-small{ type: 'button', tabindex: -1, title: 'Bold', data: { trix_attribute: 'bold', trix_key: 'b' }}
7
8
  .icon.icon-bold
8
- %button.button.button-small{ type: 'button', tabindex: -1, title: 'Italic', data: { attribute: 'italic', key: 'i' }}
9
+ %button.button.button-small{ type: 'button', tabindex: -1, title: 'Italic', data: { trix_attribute: 'italic', trix_key: 'i' }}
9
10
  .icon.icon-italic
10
- %button.button.button-small{ type: 'button', tabindex: -1, title: 'Bullets', data: { attribute: 'bullet' }}
11
+ %button.button.button-small{ type: 'button', tabindex: -1, title: 'Bullets', data: { trix_attribute: 'bullet' }}
11
12
  .icon.icon-list-ul
12
- %button.button.button-small{ type: 'button', tabindex: -1, title: 'Link', data: { action: 'link', attribute: 'href', key: 'k' }}
13
+ %button.button.button-small{ type: 'button', tabindex: -1, title: 'Link', data: { trix_action: 'link', trix_attribute: 'href', trix_key: 'k' }}
13
14
  .icon.icon-link
14
- %button.button.button-small.js-trix-photo{ type: 'button', tabindex: -1, title: 'Photo', data: { action: 'photo', attribute: 'photo' }}
15
+ %button.button.button-small.js-trix-photo{ type: 'button', tabindex: -1, title: 'Photo', data: { trix_action: 'photo', trix_attribute: 'photo' }}
15
16
  .icon.icon-picture-o
16
17
 
17
18
  .button-group.pull-left
18
- %button.button.button-small{ type: 'button', tabindex: -1, title: 'h1', data: { attribute: 'h1' }} H1
19
- %button.button.button-small{ type: 'button', tabindex: -1, title: 'h2', data: { attribute: 'h2' }} H2
20
- %button.button.button-small{ type: 'button', tabindex: -1, title: 'h3', data: { attribute: 'h3' }} H3
21
- %button.button.button-small{ type: 'button', tabindex: -1, title: 'h4', data: { attribute: 'h4' }} H4
22
-
23
- -# %button.button.button-small{ type: 'button', tabindex: -1, title: 'Numbers', data: { attribute: 'number' }}
24
- -# .icon.icon-list-ul
19
+ %button.button.button-small{ type: 'button', tabindex: -1, title: 'h1', data: { trix_attribute: 'heading1' }} H1
20
+ %button.button.button-small{ type: 'button', tabindex: -1, title: 'h1', data: { trix_attribute: 'heading2' }} H2
21
+ %button.button.button-small{ type: 'button', tabindex: -1, title: 'h2', data: { trix_attribute: 'heading3' }} H3
22
+ %button.button.button-small{ type: 'button', tabindex: -1, title: 'h3', data: { trix_attribute: 'heading4' }} H4
23
+ %button.button.button-small{ type: 'button', tabindex: -1, title: 'h4', data: { trix_attribute: 'heading5' }} H5
24
+ %button.button.button-small{ type: 'button', tabindex: -1, title: 'h5', data: { trix_attribute: 'heading6' }} H6
25
25
 
26
26
  .dialogs
27
- .dialog.link_dialog{ data: { attribute: 'href', dialog: 'href'}}
27
+ .dialog.link_dialog{ data: { trix_attribute: 'href', trix_dialog: 'href'}}
28
28
  .link_url_fields
29
29
  %input{type: 'text', name: 'href', placeholder: 'Enter a URL…', required: true}
30
30
  .button-group
31
- %input.button{type: 'button', tabindex: -1, value: 'Link', data: { method: 'setAttribute'}}
32
- %input.button{type: 'button', tabindex: -1, value: 'Unlink', data: { method: 'removeAttribute'}}
31
+ %input.button{type: 'button', tabindex: -1, value: 'Link', data: { trix_method: 'setAttribute'}}
32
+ %input.button{type: 'button', tabindex: -1, value: 'Unlink', data: { trix_method: 'removeAttribute'}}
33
33
 
34
34
  %trix-editor.text-input{input: "#{object_id}_input", toolbar: "#{object_id}_toolbar", id: "#{object_id}_editor"}
@@ -1,16 +1,15 @@
1
1
  .structure-form-pane{class: ('active' if f.options[:child_index] == 0), id: "structure_form_pane_#{f.object.id}"}
2
- / Hidden field
3
- = f.hidden_field :position, placeholder: "Position", class: "structure_form_pane_#{f.object.id}_position"
2
+ / Structure parts
3
+ = f.fields_for :structure_parts, build_structure_parts(f.object.structure.try(:page_part).try(:name), f.object) do |ff|
4
+ .structure-form-part
5
+ = render "spina/admin/structure_partables/#{ partable_type_partial_namespace(ff.object.structure_partable_type) }/form", f: ff
4
6
 
5
- / Strucure parts
6
- = f.fields_for :structure_parts do |ff|
7
7
  = ff.hidden_field :id
8
8
  = ff.hidden_field :title
9
9
  = ff.hidden_field :structure_partable_type
10
10
  = ff.hidden_field :name
11
- .structure-form-part
12
- = render "spina/admin/structure_partables/#{ partable_type_partial_namespace(ff.object.structure_partable_type) }/form", f: ff
13
11
 
12
+ / Hidden field
13
+ = f.hidden_field :position, placeholder: "Position", class: "structure_form_pane_#{f.object.id}_position"
14
14
  = f.hidden_field :_destroy
15
- = link_to t('spina.delete'), '#', class: 'remove-structure-item-fields button button-mini button-link pull-right'
16
-
15
+ = link_to t('spina.delete'), '#', class: 'remove_structure_item_fields button button-mini button-link pull-right'
@@ -0,0 +1,14 @@
1
+ .horizontal-form-label
2
+ = f.object.title
3
+ .horizontal-form-content
4
+ = f.fields_for :structure_partable, f.object.structure_partable do |ff|
5
+ = link_to spina.photo_collection_select_admin_photos_path(ff.object_name, selected_photo_ids: ff.object.photo_ids), remote: true, class: 'media_picker clearfix' do
6
+ .placeholder.pull-right
7
+ %span.button.button-small.button-round{data: {icon: 'U'}}=t 'spina.pages.photos_picker'
8
+ .photo-collection
9
+ - if ff.object.photos.sorted_by_photo_collection.any?
10
+ = render 'spina/admin/photos/photo_collection', photos: ff.object.photos.sorted_by_photo_collection
11
+ - elsif ff.object.photos.any?
12
+ = render 'spina/admin/photos/photo_collection', photos: ff.object.photos
13
+ = ff.hidden_field :photo_tokens, value: ff.object.photo_ids.join(",")
14
+ = ff.hidden_field :photo_positions, value: ff.object.photos.sorted_by_photo_collection.pluck(:photo_id).join(","), class: 'photo-positions'
@@ -1,5 +1,5 @@
1
1
  = link_to spina.photo_select_admin_photos_path(f.object_name, selected_photo_id: f.object.structure_partable.try(:id)), remote: true, class: "media_picker" do
2
- .placeholder.pull-right
2
+ .placeholder
3
3
  %span.button.button-small.button-round{data: {icon: 'U'}}=t 'spina.pages.photo_picker'
4
4
  - if f.object.structure_partable && f.object.structure_partable.file.present?
5
5
  .image
@@ -0,0 +1 @@
1
+ %meta{ name: 'google-site-verification' , content: current_account.google_site_verification }
@@ -0,0 +1,95 @@
1
+ # =============================================================================
2
+ # Font Custom Configuration
3
+ # This file should live in the directory where you run `fontcustom compile`.
4
+ # For more info, visit <https://github.com/FontCustom/fontcustom>.
5
+ # =============================================================================
6
+
7
+
8
+ # -----------------------------------------------------------------------------
9
+ # Project Info
10
+ # -----------------------------------------------------------------------------
11
+
12
+ # The font's name. Also determines the file names of generated templates.
13
+ font_name: ics_spina
14
+
15
+ # Format of CSS selectors. {{glyph}} is substituted for the glyph name.
16
+ css_selector: .icon-{{glyph}}
17
+
18
+ # Generate fonts without asset-busting hashes.
19
+ no_hash: true
20
+
21
+ # Encode WOFF fonts into the generated CSS.
22
+ #base64: true
23
+
24
+ # Forces compilation, even if inputs have not changed
25
+ #force: true
26
+
27
+ # Display (possibly useful) debugging messages.
28
+ #debug: true
29
+
30
+ # Hide status messages.
31
+ #quiet: true
32
+
33
+
34
+ # -----------------------------------------------------------------------------
35
+ # Input / Output Locations
36
+ # You can save generated fonts, CSS, and other files to different locations
37
+ # here. Font Custom can also read input vectors and templates from different
38
+ # places.
39
+ #
40
+ # NOTE:
41
+ # - Be sure to preserve the whitespace in these YAML hashes.
42
+ # - INPUT[:vectors] and OUTPUT[:fonts] are required. Everything else is
43
+ # optional.
44
+ # - Specify output locations for custom templates by including their file
45
+ # names as the key.
46
+ # -----------------------------------------------------------------------------
47
+
48
+ input:
49
+ vectors: app/assets/icons/spina
50
+ templates: lib/spina/fontcustom
51
+
52
+ output:
53
+ fonts: app/assets/fonts/spina
54
+ css: app/assets/stylesheets/spina
55
+ preview: app/assets/icons/spina/preview
56
+
57
+
58
+ # -----------------------------------------------------------------------------
59
+ # Templates
60
+ # A YAML array of templates and files to generate alongside fonts. Custom
61
+ # templates should be saved in the INPUT[:templates] directory and referenced
62
+ # by their base file name.
63
+ #
64
+ # For Rails and Compass templates, set `preprocessor_path` as the relative
65
+ # path from OUTPUT[:css] to OUTPUT[:fonts]. By default, these are the same
66
+ # directory.
67
+ #
68
+ # Included in Font Custom: preview, css, scss, scss-rails
69
+ # Default: css, preview
70
+ # -----------------------------------------------------------------------------
71
+
72
+ templates:
73
+ - _ics_spina.scss
74
+ - preview
75
+ #- my-custom-template.yml
76
+
77
+ #preprocessor_path: ../fonts/
78
+
79
+
80
+ # -----------------------------------------------------------------------------
81
+ # Font Settings (defaults shown)
82
+ # -----------------------------------------------------------------------------
83
+
84
+ # Size (in pica points) for which your font is designed.
85
+ font_design_size: 32
86
+
87
+ # The em size. Setting this will scale the entire font to the given size.
88
+ #font_em: 512
89
+
90
+ # The font's ascent and descent. Used to calculate the baseline.
91
+ #font_ascent: 448
92
+ #font_descent: 64
93
+
94
+ # Horizontally fit glyphs to their individual vector widths.
95
+ #autowidth: false
@@ -4,6 +4,7 @@ en:
4
4
  close: Close
5
5
  choose_from_library: Choose from library
6
6
  edit: Edit
7
+ save: Save
7
8
  delete: Delete
8
9
  permanently_delete: Permanently delete
9
10
  delete_confirmation: "Are you sure you want to delete <strong>%{subject}</strong>?"
@@ -28,6 +29,7 @@ en:
28
29
  website:
29
30
  title: Your website
30
31
  pages: Pages
32
+ all_pages: All pages
31
33
  pages_description: "All pages on your website"
32
34
  media_library: Media library
33
35
  media_library_description: "Here's where you'll find all of your images and documents"
@@ -54,6 +56,7 @@ en:
54
56
  invisible_to_search_engines_description: Go to your preferences to activate search engines.
55
57
  rebuild_materialized_path: Rebuild materialized path
56
58
  materialize_path_confirmation: "Are you sure you want to rebuild the path for this page?"
59
+ saving: Saving...
57
60
 
58
61
  users:
59
62
  new: New user
@@ -68,6 +71,7 @@ en:
68
71
  insert_photo: Insert image
69
72
  link: "URL of your image:"
70
73
  cannot_be_created: "Image could not be processed:"
74
+ upload_image: "Upload an image"
71
75
 
72
76
  wysiwyg:
73
77
  paragraph: Paragraph
@@ -168,6 +172,13 @@ en:
168
172
  ancestry: Parent page
169
173
  no_parent: No parent
170
174
 
175
+ spina/navigation:
176
+ label: Label
177
+ auto_add_pages: Automatically add pages
178
+ auto_add_pages_description: New pages are added automatically to this navigation
179
+ pages: Pages
180
+ pages_description: Select the pages you want to use in this navigation
181
+
171
182
  spina/user:
172
183
  email: Email
173
184
  password: Password
@@ -7,6 +7,7 @@ nl:
7
7
  close: Sluiten
8
8
  choose_from_library: Kies uit bibliotheek
9
9
  edit: Bewerken
10
+ save: Opslaan
10
11
  delete: Verwijderen
11
12
  permanently_delete: Definitief verwijderen
12
13
  delete_confirmation: "Weet je zeker dat je <strong>%{subject}</strong> wilt verwijderen?"
@@ -30,6 +31,7 @@ nl:
30
31
 
31
32
  website:
32
33
  title: Je website
34
+ all_pages: Alle pagina's
33
35
  pages: Pagina's
34
36
  pages_description: "Alle pagina's op je website"
35
37
  media_library: Mediabibliotheek
@@ -55,6 +57,7 @@ nl:
55
57
  skip_to_first_child: doorsturen naar 1<sup>e</sup> subpagina
56
58
  invisible_to_search_engines: Je website is niet zichtbaar voor zoekmachines
57
59
  invisible_to_search_engines_description: Bij voorkeuren voor Statistieken en zoekmachines kun je dit activeren.
60
+ saving: <i></i> Opslaan...
58
61
 
59
62
  users:
60
63
  new: Nieuwe gebruiker
@@ -90,7 +93,7 @@ nl:
90
93
  social_media: Social media
91
94
  social_media_description: Facebook en Twitter accounts
92
95
  social_media_save: Social media opslaan
93
- analytics: Statistieken en zoekmachines
96
+ analytics: Google Analytics
94
97
  analytics_description: Koppel je account voor real-time statistieken
95
98
  analytics_save: Voorkeuren opslaan
96
99
  domain_name_settings: Eigen domein instellen
@@ -133,9 +136,9 @@ nl:
133
136
  vat_identifier_description: Het is verplicht je BTW-nummer te vermelden op je website
134
137
  theme: Layout website
135
138
  logo: Logo
136
- google_analytics: Google Analytics
139
+ google_analytics: Universal Analytics Code
137
140
  google_site_verification: Google Site Verification
138
- robots_allowed: Zichtbaar in zoekmachines
141
+ robots_allowed: Zichtbaar in Google
139
142
  facebook: Facebook
140
143
  twitter: Twitter
141
144
  google_plus: Google+
@@ -163,6 +166,13 @@ nl:
163
166
  menu_title_placeholder: Leeglaten om de titel van de pagina over te nemen
164
167
  view_template: Pagina template
165
168
 
169
+ spina/navigation:
170
+ label: Label
171
+ auto_add_pages: Automatisch aanvullen
172
+ auto_add_pages_description: Nieuwe pagina's worden automatisch toegevoegd aan deze navigatie
173
+ pages: Pagina's
174
+ pages_description: Selecteer de pagina's die in deze navigatie getoond worden
175
+
166
176
  spina/user:
167
177
  email: Emailadres
168
178
  password: Wachtwoord