spina 0.12.0 → 1.0.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 (210) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +65 -7
  3. data/app/assets/fonts/spina/ics_spina.eot +0 -0
  4. data/app/assets/fonts/spina/ics_spina.svg +65 -61
  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/fonts/spina/ics_spina.woff2 +0 -0
  8. data/app/assets/icons/spina/export.svg +10 -0
  9. data/app/assets/icons/spina/preview/ics_spina-preview.html +17 -1
  10. data/app/assets/images/spina/media_folder_placeholder.png +0 -0
  11. data/app/assets/images/spina/{admin/spina.png → spina-large.png} +0 -0
  12. data/app/assets/javascripts/spina/admin/application.js +50 -0
  13. data/app/assets/javascripts/spina/admin/controllers/infinite_scroll_controller.js +40 -0
  14. data/app/assets/javascripts/spina/admin/media_gallery.coffee +65 -0
  15. data/app/assets/javascripts/spina/admin/modal.coffee +0 -1
  16. data/app/assets/javascripts/spina/admin/pages.coffee.erb +2 -2
  17. data/app/assets/javascripts/spina/admin/{application.coffee.erb → scaffold.coffee} +20 -61
  18. data/app/assets/javascripts/spina/admin/trix.coffee.erb +5 -8
  19. data/app/assets/javascripts/spina/admin/uploads.coffee +2 -2
  20. data/app/assets/stylesheets/spina.sass +3 -3
  21. data/app/assets/stylesheets/spina/_buttons.sass +0 -1
  22. data/app/assets/stylesheets/spina/{_configuration.sass → _configuration.sass.erb} +5 -1
  23. data/app/assets/stylesheets/spina/_forms.sass +79 -20
  24. data/app/assets/stylesheets/spina/_gallery.sass +91 -3
  25. data/app/assets/stylesheets/spina/_ics_spina.scss +1 -0
  26. data/app/assets/stylesheets/spina/_tables.sass +4 -0
  27. data/app/assets/stylesheets/spina/_trix.sass +7 -4
  28. data/app/assets/stylesheets/spina_front_end.sass +19 -0
  29. data/app/controllers/concerns/spina/frontend.rb +29 -12
  30. data/app/controllers/spina/admin/admin_controller.rb +1 -1
  31. data/app/controllers/spina/admin/attachments_controller.rb +10 -5
  32. data/app/controllers/spina/admin/images_controller.rb +51 -0
  33. data/app/controllers/spina/admin/media_folders_controller.rb +37 -0
  34. data/app/controllers/spina/admin/media_picker_controller.rb +28 -0
  35. data/app/controllers/spina/admin/pages_controller.rb +16 -6
  36. data/app/controllers/spina/admin/resources_controller.rb +33 -0
  37. data/app/controllers/spina/admin/settings_controller.rb +56 -0
  38. data/app/controllers/spina/pages_controller.rb +0 -6
  39. data/app/helpers/spina/admin/pages_helper.rb +2 -2
  40. data/app/helpers/spina/admin_nav_helper.rb +7 -0
  41. data/app/helpers/spina/files_helper.rb +9 -0
  42. data/app/helpers/spina/images_helper.rb +17 -0
  43. data/app/helpers/spina/pages_helper.rb +17 -0
  44. data/app/models/concerns/spina/image_collectable.rb +23 -0
  45. data/app/models/concerns/spina/part.rb +7 -4
  46. data/app/models/spina/account.rb +10 -14
  47. data/app/models/spina/attachment.rb +8 -10
  48. data/app/models/spina/attachment_collection.rb +6 -1
  49. data/app/models/spina/current.rb +5 -0
  50. data/app/models/spina/image.rb +26 -0
  51. data/app/models/spina/{photo_collection.rb → image_collection.rb} +6 -6
  52. data/app/models/spina/image_collections_image.rb +6 -0
  53. data/app/models/spina/line.rb +1 -0
  54. data/app/models/spina/media_folder.rb +7 -0
  55. data/app/models/spina/navigation.rb +4 -0
  56. data/app/models/spina/navigation_item.rb +1 -1
  57. data/app/models/spina/page.rb +18 -13
  58. data/app/models/spina/page_part.rb +1 -0
  59. data/app/models/spina/resource.rb +16 -0
  60. data/app/models/spina/setting.rb +7 -0
  61. data/app/models/spina/structure.rb +2 -0
  62. data/app/models/spina/structure_item.rb +2 -0
  63. data/app/models/spina/structure_part.rb +2 -1
  64. data/app/models/spina/text.rb +1 -0
  65. data/app/views/dummy/show.html.haml +1 -0
  66. data/app/views/layouts/spina/admin/media_library.html.haml +6 -3
  67. data/app/views/layouts/spina/admin/pages.html.haml +4 -1
  68. data/app/views/layouts/spina/admin/resources.html.haml +10 -0
  69. data/app/views/spina/admin/accounts/style.html.haml +3 -2
  70. data/app/views/spina/admin/attachments/_attachment.html.haml +3 -3
  71. data/app/views/spina/admin/attachments/_select.html.haml +7 -15
  72. data/app/views/spina/admin/attachments/_select_collection.html.haml +7 -14
  73. data/app/views/spina/admin/attachments/create.js.erb +1 -3
  74. data/app/views/spina/admin/attachments/index.html.haml +4 -3
  75. data/app/views/spina/admin/attachments/insert.js.erb +5 -0
  76. data/app/views/spina/admin/image_collections/_image_collection.html.haml +5 -0
  77. data/app/views/spina/admin/images/_form.html.haml +5 -0
  78. data/app/views/spina/admin/images/_image.html.haml +10 -0
  79. data/app/views/spina/admin/images/create.js.erb +8 -0
  80. data/app/views/spina/admin/images/index.html.haml +22 -0
  81. data/app/views/spina/admin/images/index.js.erb +7 -0
  82. data/app/views/spina/admin/media_folders/_form.html.haml +14 -0
  83. data/app/views/spina/admin/media_folders/_media_folder.html.haml +8 -0
  84. data/app/views/spina/admin/media_folders/new.js.erb +1 -0
  85. data/app/views/spina/admin/media_folders/show.html.haml +17 -0
  86. data/app/views/spina/admin/media_picker/_modal.html.haml +26 -0
  87. data/app/views/spina/admin/media_picker/infinite_scroll.js.erb +5 -0
  88. data/app/views/spina/admin/media_picker/select.js.erb +28 -0
  89. data/app/views/spina/admin/media_picker/show.js.erb +1 -0
  90. data/app/views/spina/admin/navigations/_page.html.haml +2 -2
  91. data/app/views/spina/admin/navigations/edit.html.haml +1 -1
  92. data/app/views/spina/admin/pages/_form.html.haml +21 -15
  93. data/app/views/spina/admin/pages/_form_advanced.html.haml +53 -43
  94. data/app/views/spina/admin/pages/_form_page_content.html.haml +1 -1
  95. data/app/views/spina/admin/pages/_form_page_seo.html.haml +1 -1
  96. data/app/views/spina/admin/pages/_page_nested_list.html.haml +3 -3
  97. data/app/views/spina/admin/pages/index.html.haml +1 -1
  98. data/app/views/spina/admin/{page_partables → partables}/attachment_collections/_form.html.haml +1 -1
  99. data/app/views/spina/admin/{page_partables → partables}/attachments/_form.html.haml +4 -4
  100. data/app/views/spina/admin/partables/image_collections/_form.html.haml +16 -0
  101. data/app/views/spina/admin/partables/images/_form.html.haml +14 -0
  102. data/app/views/spina/admin/{page_partables → partables}/lines/_form.html.haml +1 -1
  103. data/app/views/spina/admin/{structure_partables → partables}/options/_form.html.haml +1 -1
  104. data/app/views/spina/admin/partables/photo_collections/_form.html.haml +4 -0
  105. data/app/views/spina/admin/partables/photos/_form.html.haml +4 -0
  106. data/app/views/spina/admin/{page_partables → partables}/structures/_form.html.haml +3 -3
  107. data/app/views/spina/admin/{page_partables → partables}/texts/_form.html.haml +1 -1
  108. data/app/views/spina/admin/password_resets/edit.html.haml +1 -1
  109. data/app/views/spina/admin/password_resets/new.html.haml +1 -1
  110. data/app/views/spina/admin/resources/edit.html.haml +49 -0
  111. data/app/views/spina/admin/resources/show.html.haml +14 -0
  112. data/app/views/spina/admin/sessions/new.html.haml +1 -1
  113. data/app/views/spina/admin/settings/_string_field.html.haml +4 -0
  114. data/app/views/spina/admin/settings/_wysiwyg_field.html.haml +4 -0
  115. data/app/views/spina/admin/settings/edit.html.haml +13 -0
  116. data/app/views/spina/admin/shared/_primary_navigation.html.haml +13 -5
  117. data/app/views/spina/admin/shared/_rich_text_field.html.haml +10 -10
  118. data/app/views/spina/admin/structure_items/_fields.html.haml +1 -1
  119. data/app/views/spina/admin/structure_partables/attachment_collections/_form.html.haml +14 -0
  120. data/app/views/spina/admin/structure_partables/attachments/_form.html.haml +13 -0
  121. data/app/views/spina/shared/_analytics.html.erb +8 -8
  122. data/app/views/spina/shared/_navigation.html.haml +3 -3
  123. data/app/views/spina/shared/_spina_link.html.haml +2 -0
  124. data/app/views/spina/sitemaps/show.xml.builder +2 -2
  125. data/config/initializers/assets.rb +6 -1
  126. data/config/locales/TH.yml +243 -0
  127. data/config/locales/bg.yml +250 -0
  128. data/config/locales/de.yml +67 -22
  129. data/config/locales/en.yml +29 -2
  130. data/config/locales/es.yml +58 -1
  131. data/config/locales/fr.yml +80 -32
  132. data/config/locales/id.yml +228 -0
  133. data/config/locales/nl.yml +32 -0
  134. data/config/locales/pl.yml +225 -0
  135. data/config/locales/pt-BR.yml +34 -3
  136. data/config/locales/ro.yml +225 -0
  137. data/config/locales/ru.yml +10 -0
  138. data/config/locales/sv.yml +223 -0
  139. data/config/routes.rb +13 -13
  140. data/db/migrate/10_create_spina_image_collections.rb +16 -0
  141. data/db/migrate/11_create_spina_resources.rb +15 -0
  142. data/db/migrate/1_create_spina_tables.rb +0 -19
  143. data/db/migrate/2_create_spina_translation_tables.rb +36 -6
  144. data/db/migrate/7_create_spina_settings.rb +11 -0
  145. data/db/migrate/8_create_spina_media_folders.rb +8 -0
  146. data/db/migrate/9_create_spina_images.rb +10 -0
  147. data/lib/generators/spina/install_generator.rb +2 -2
  148. data/lib/generators/spina/templates/app/views/default/pages/homepage.html.haml +3 -2
  149. data/lib/generators/spina/templates/app/views/default/pages/show.html.haml +2 -2
  150. data/lib/generators/spina/templates/app/views/default/shared/_navigation.html.haml +3 -5
  151. data/lib/generators/spina/templates/app/views/demo/pages/demo.html.haml +20 -23
  152. data/lib/generators/spina/templates/app/views/demo/pages/homepage.html.haml +2 -2
  153. data/lib/generators/spina/templates/app/views/demo/pages/show.html.haml +2 -2
  154. data/lib/generators/spina/templates/app/views/demo/shared/_navigation.html.haml +3 -5
  155. data/lib/generators/spina/templates/config/initializers/mobility.rb +6 -0
  156. data/lib/generators/spina/templates/config/initializers/spina.rb +3 -0
  157. data/lib/generators/spina/templates/config/initializers/themes/demo.rb +7 -7
  158. data/lib/spina.rb +0 -1
  159. data/lib/spina/engine.rb +6 -7
  160. data/lib/spina/plugin.rb +48 -3
  161. data/lib/spina/version.rb +1 -1
  162. data/vendor/assets/javascripts/spina/stimulus.umd.js +5 -0
  163. data/vendor/assets/javascripts/spina/trix.js +10 -9
  164. metadata +106 -103
  165. data/app/assets/images/spina/danger-zone-ribbon.png +0 -0
  166. data/app/assets/images/spina/spina_small.png +0 -0
  167. data/app/assets/javascripts/spina/admin/infinite_scroll.coffee +0 -25
  168. data/app/controllers/spina/admin/photos_controller.rb +0 -100
  169. data/app/models/concerns/spina/photo_collectable.rb +0 -24
  170. data/app/models/spina/photo.rb +0 -29
  171. data/app/models/spina/photo_collections_photo.rb +0 -6
  172. data/app/presenters/spina/pages/menu_presenter.rb +0 -63
  173. data/app/uploaders/spina/default_store_uploader.rb +0 -15
  174. data/app/uploaders/spina/file_uploader.rb +0 -6
  175. data/app/uploaders/spina/logo_uploader.rb +0 -13
  176. data/app/uploaders/spina/photo_uploader.rb +0 -23
  177. data/app/views/spina/admin/attachments/_fields.html.haml +0 -8
  178. data/app/views/spina/admin/attachments/insert.js.coffee +0 -5
  179. data/app/views/spina/admin/page_partables/options/_form.html.haml +0 -6
  180. data/app/views/spina/admin/page_partables/photo_collections/_form.html.haml +0 -17
  181. data/app/views/spina/admin/page_partables/photos/_form.html.haml +0 -14
  182. data/app/views/spina/admin/photos/_photo.html.haml +0 -8
  183. data/app/views/spina/admin/photos/_photo_collection.html.haml +0 -5
  184. data/app/views/spina/admin/photos/_photo_collection_select.html.haml +0 -23
  185. data/app/views/spina/admin/photos/_photo_link.html.haml +0 -11
  186. data/app/views/spina/admin/photos/_photo_multi_picker.html.haml +0 -3
  187. data/app/views/spina/admin/photos/_photo_select.html.haml +0 -16
  188. data/app/views/spina/admin/photos/_photo_single_picker.html.haml +0 -3
  189. data/app/views/spina/admin/photos/_photo_uploaded.html.haml +0 -4
  190. data/app/views/spina/admin/photos/_trix_select.html.haml +0 -11
  191. data/app/views/spina/admin/photos/create.js.erb +0 -4
  192. data/app/views/spina/admin/photos/index.html.haml +0 -13
  193. data/app/views/spina/admin/photos/index.js.erb +0 -5
  194. data/app/views/spina/admin/photos/insert_photo.js.erb +0 -10
  195. data/app/views/spina/admin/photos/insert_photo_collection.js.erb +0 -25
  196. data/app/views/spina/admin/photos/link.js.erb +0 -2
  197. data/app/views/spina/admin/photos/multi_picker_infinite_scroll.js.erb +0 -6
  198. data/app/views/spina/admin/photos/photo_collection_select.js.erb +0 -3
  199. data/app/views/spina/admin/photos/photo_select.js.erb +0 -3
  200. data/app/views/spina/admin/photos/single_picker_infinite_scroll.js.erb +0 -6
  201. data/app/views/spina/admin/photos/trix_infinite_scroll.js.erb +0 -4
  202. data/app/views/spina/admin/photos/trix_insert.js.erb +0 -2
  203. data/app/views/spina/admin/photos/trix_select.js.erb +0 -3
  204. data/app/views/spina/admin/structure_partables/lines/_form.html.haml +0 -5
  205. data/app/views/spina/admin/structure_partables/photo_collections/_form.html.haml +0 -17
  206. data/app/views/spina/admin/structure_partables/photos/_form.html.haml +0 -11
  207. data/app/views/spina/admin/structure_partables/texts/_form.html.haml +0 -5
  208. data/config/initializers/spina.rb +0 -0
  209. data/lib/generators/spina/templates/config/initializers/carrierwave.rb +0 -17
  210. data/lib/spina/railtie.rb +0 -9
@@ -13,6 +13,7 @@ ru:
13
13
  ago: назад
14
14
  edit_website: Редактировать сайт
15
15
  logout: Выход
16
+ main_menu: Главное меню
16
17
 
17
18
  modal:
18
19
  agree: "Да, я уверен"
@@ -51,6 +52,8 @@ ru:
51
52
  skip_to_first_child: Переход на страницу ребенка
52
53
  invisible_to_search_engines: Ваш сайт не виден для поисковых машин
53
54
  invisible_to_search_engines_description: "Перейти к вашим параметрам, чтобы активировать поисковые системы."
55
+ rebuild_materialized_path: Rebuild materialized path
56
+ materialize_path_confirmation: "Are you sure you want to rebuild the path for this page?"
54
57
 
55
58
  users:
56
59
  new: Новый пользователь
@@ -61,6 +64,7 @@ ru:
61
64
  photos:
62
65
  delete_confirmation: "Вы уверены, что хотите удалить <strong>image</strong>?"
63
66
  insert_photos: Вставить изображения
67
+ choose_images: Выбрать изображения
64
68
  insert_photo: Вставить изображение
65
69
  link: "URL изображения:"
66
70
  cannot_be_created: "Изображение не может быть обработано:"
@@ -169,6 +173,8 @@ ru:
169
173
  menu_title: Навигация
170
174
  menu_title_placeholder: "Оставьте пустым, чтобы использовать заголовок страницы"
171
175
  view_template: Шаблон страницы
176
+ ancestry: Parent page
177
+ no_parent: No parent
172
178
 
173
179
  spina/user:
174
180
  email: Почта
@@ -191,3 +197,7 @@ ru:
191
197
  zero: "0 новых сообщений"
192
198
  one: "1 новое сообщение"
193
199
  other: "%{count} новых сообщений"
200
+
201
+ languages:
202
+ en: Английский
203
+ nl: Голландский
@@ -0,0 +1,223 @@
1
+ sv:
2
+ spina:
3
+ cancel: Avbryt
4
+ close: Stäng
5
+ choose_from_library: Välj från bibliotek
6
+ edit: Ändra
7
+ save: Spara
8
+ delete: Radera
9
+ permanently_delete: Radera permanent
10
+ delete_confirmation: Är du säker på att du vill radera <strong>%{subject}</strong>?"
11
+ login: Logga in
12
+ preview_website: Förhandsvisa hemsida
13
+ search: Sök...
14
+ ago: sen
15
+ edit_website: Ändra din hemsida
16
+ logout: Logga ut
17
+ main_menu: Huvudmeny
18
+
19
+ settings:
20
+ title: Inställningar
21
+ save: Spara inställningar
22
+
23
+ forgot_password:
24
+ new: Glömt lösenord
25
+ request: Begär nytt lösenord
26
+ unknown_user: Denna användare finns inte
27
+ save: Spara nytt lösenord
28
+ success: Du kan använda ditt nya lösenord
29
+ mail_subject: Återställ ditt lösenord
30
+ expired: Din lösenordsomställning har gått ut
31
+
32
+ modal:
33
+ agree: "Ja, jag är säker"
34
+ cancel: "Nej, avbryt"
35
+
36
+ notifications:
37
+ information: Information
38
+ alert: Oops! Något gick fel
39
+ login: Du måste logga in först
40
+ wrong_username_or_password: Fel mail eller lösenord
41
+
42
+ website:
43
+ title: Din hemsida
44
+ pages: Sidor
45
+ all_pages: Alla sidor
46
+ pages_description: "Alla sidor på din hemsida"
47
+ media_library: Mediebibliotek
48
+ media_library_description: "Här finns alla dina bilder och dokument"
49
+ documents: Dokument
50
+ photos: Bilder
51
+
52
+ pages:
53
+ new: Ny sida
54
+ create_page: "ny %{template}"
55
+ change_order: Ändra ordning
56
+ done_changing_order: Klar med att ändra ordning
57
+ page_content: Innehåll
58
+ page_seo: Sökmotorer
59
+ advanced: Avancerat
60
+ page_part: Sidsektion
61
+ photos_picker: Välj bilder
62
+ photo_picker: Välj bild
63
+ delete_confirmation: "Är du säker på att du vill radera sidan <strong>%{subject}</strong>?"
64
+ save: Spara sida
65
+ concept: utkast
66
+ show_in_menu: osynlig
67
+ skip_to_first_child: gå till första undersida
68
+ invisible_to_search_engines: Din hemsida är osynlig för sökmotorer
69
+ invisible_to_search_engines_description: Gå till inställningar för att aktivera sökmotorer.
70
+ rebuild_materialized_path: Bygg om materialiserade sökvägar
71
+ materialize_path_confirmation: "Är du säker på att du vill bygga om sökvägen för denna sida?"
72
+ saving: Sparar...
73
+ saved: Sida sparad
74
+
75
+ users:
76
+ new: Ny användare
77
+ save: Spara användare
78
+ delete_confirmation: "Är du säker på att du vill ta bort användaren <strong>%{user}</strong>?"
79
+ cannot_be_created: Användaren kunde inte sparas
80
+
81
+ photos:
82
+ delete_confirmation: "Är du säker på att du vill ta bort bilden <strong>image</strong>?"
83
+ insert_photos: Välj bilder
84
+ choose_images: Välj bilder
85
+ insert_photo: Infoga bild
86
+ link: "URL till din bild:"
87
+ cannot_be_created: "Bilden kunde inte behandlas:"
88
+ upload_image: "Ladda up en bild"
89
+ organize: Organisera bilder
90
+ done_organizing: Klar med organisering
91
+ new_folder: Ny mapp
92
+ delete_folder: Radera mapp
93
+
94
+ wysiwyg:
95
+ paragraph: Paragraf
96
+ heading_1: Rubrik 1
97
+ heading_2: Rubrik 2
98
+ heading_3: Rubrik 3
99
+ quote: Citat
100
+ insert_link: Infoga länk
101
+
102
+ preferences:
103
+ title: Inställningar
104
+ account: Allmänt
105
+ account_description: Personliga inställningar
106
+ account_save: Spara inställningar
107
+ style: Stilning
108
+ style_description: Välj ett tema som passar ditt märke
109
+ style_save: Spara stilning
110
+ users: Användare
111
+ users_description: Hantera användare och administratörer
112
+ social_media: Social media
113
+ social_media_description: Facebook och Twitter-konton
114
+ social_media_save: Spara social media
115
+ analytics: Analys och sök
116
+ analytics_description: Länka ditt konto för realtidsanalys
117
+ analytics_save: Spara inställningar
118
+ domain_name_settings: Domäninställningar
119
+ domain_name_settings_description: Ställ in din egen domän
120
+
121
+ attachments:
122
+ insert: 'Infoga dokument'
123
+ insert_multiple: 'Infoga dokument'
124
+
125
+ media_library:
126
+ photos: Bilder
127
+ attachments: Dokument
128
+
129
+ activerecord:
130
+ models:
131
+ spina/page:
132
+ one: Sida
133
+ other: Sidor
134
+ spina/user:
135
+ one: Användare
136
+ other: Användare
137
+ spina/photo:
138
+ one: Bild
139
+ other: Bilder
140
+ spina/attachment:
141
+ one: Dokument
142
+ other: Dokument
143
+
144
+ attributes:
145
+ spina/account:
146
+ name: Hemsidenamn
147
+ address: Adress
148
+ postal_code: Postkod
149
+ city: Stad
150
+ phone: Telefon
151
+ email: Email
152
+ kvk_identifier: Handelskammare
153
+ kvk_identifier_description: Handelskammare
154
+ vat_identifier: moms
155
+ vat_identifier_description: moms
156
+ theme: Hemsidetema
157
+ logo: Logo
158
+ google_analytics: Google Analytics
159
+ google_site_verification: Google Site Verification
160
+ robots_allowed: Synlig i sökmotorer
161
+ facebook: Facebook
162
+ twitter: Twitter
163
+ google_plus: Google+
164
+
165
+ spina/attachment:
166
+ created_at: Skapad
167
+ name: Filnamn
168
+ size: Storlek
169
+
170
+ spina/page:
171
+ title: Titel
172
+ title_placeholder: Sidtitel
173
+ seo_title: SEO <title>
174
+ seo_title_placeholder: Denna titel används i <title>-taggen
175
+ description: Metabeskrivning
176
+ description_description: Denna beskrivning visas i dina sökresultat
177
+ description_placeholder: Kort beskrivning av din sida
178
+ draft: Utkast
179
+ draft_description: Bra för när din sida inte är klar
180
+ skip_to_first_child: Framåt
181
+ skip_to_first_child_description: gå till första undersida
182
+ link_url: Dirigera om sida
183
+ link_url_description: Dirigera om sida till URL
184
+ link_url_placeholder: t.ex. http://www.example.com/
185
+ show_in_menu: Visa i navigering
186
+ show_in_menu_description: "Denna sida visas inte i navigeringen om detta är avstängt"
187
+ menu_title: Navigeringstitel
188
+ menu_title_placeholder: Lämna tom för att använda sidotiteln
189
+ view_template: Sidmall
190
+ ancestry: Föräldersida
191
+ no_parent: Ingen förälder
192
+
193
+ spina/media_folder:
194
+ name: Namn
195
+
196
+ spina/navigation:
197
+ label: Etikett
198
+ auto_add_pages: Lägg automatiskt till sidor
199
+ auto_add_pages_description: Nya sidor läggs automatiskt till denna navigering
200
+ pages: Sidor
201
+ pages_description: Välj sidorna du vill använda i denna navigering
202
+
203
+ spina/user:
204
+ email: Email
205
+ password: Lösenord
206
+ name: Namn
207
+ name_placeholder: Namn
208
+ email: Email
209
+ email_description: Din email måste vara unik
210
+ password: Lösenord
211
+ password_description: Lämna tom för att behålla ditt lösenord
212
+ password_confirmation: Bekräfta lösenord
213
+ admin: Administratör
214
+ user: Användare
215
+ admin_description: Administratörer kan skapa användare
216
+ role: Roll
217
+ last_logged_in: Senast inloggad
218
+
219
+ misc:
220
+ messages:
221
+ zero: "0 nya meddelanden"
222
+ one: "1 nytt meddelande"
223
+ other: "%{count} nya meddelanden"
@@ -1,5 +1,4 @@
1
1
  Spina::Engine.routes.draw do
2
-
3
2
  # Backend
4
3
  namespace :admin, path: Spina.config.backend_path do
5
4
  root to: "pages#index"
@@ -12,6 +11,9 @@ Spina::Engine.routes.draw do
12
11
  end
13
12
  end
14
13
 
14
+ get "/settings/:plugin", to: "settings#edit", as: :edit_settings
15
+ patch "/settings/:plugin", to: "settings#update", as: :settings
16
+
15
17
  resources :users
16
18
 
17
19
  # Sessions
@@ -23,12 +25,14 @@ Spina::Engine.routes.draw do
23
25
  resources :password_resets
24
26
 
25
27
  # Media library
26
- get 'media_library' => 'photos#media_library', as: "media_library"
28
+ get 'media_library' => 'images#index', as: "media_library"
27
29
 
28
30
  resources :pages do
29
31
  post :sort, on: :collection
30
32
  end
31
33
 
34
+ resources :resources, only: [:show, :edit, :update]
35
+
32
36
  resources :navigations do
33
37
  post :sort, on: :member
34
38
  end
@@ -42,20 +46,16 @@ Spina::Engine.routes.draw do
42
46
  end
43
47
  end
44
48
 
45
- resources :photos do
49
+ resources :media_folders
50
+
51
+ resources :images do
46
52
  collection do
47
- get 'trix_select/:object_id' => 'photos#trix_select', as: :trix_select
48
- post 'trix_insert/:object_id' => 'photos#trix_insert', as: :trix_insert
49
- get 'photo_select/:page_part_id' => 'photos#photo_select', as: :photo_select
50
- get 'photo_collection_select/:page_part_id' => 'photos#photo_collection_select', as: :photo_collection_select
51
- post 'insert_photo/:page_part_id' => 'photos#insert_photo', as: :insert_photo
52
- post 'insert_photo_collection/:page_part_id' => 'photos#insert_photo_collection', as: :insert_photo_collection
53
- end
54
- member do
55
- post :enhance
56
- get :link
53
+ get 'folder/:id' => 'images#media_folder', as: :media_folder
54
+ put 'folder/:id' => 'images#add_to_media_folder', as: :add_to_media_folder
57
55
  end
58
56
  end
57
+ get :media_picker, to: 'media_picker#show'
58
+ post :media_picker, to: 'media_picker#select'
59
59
  end
60
60
 
61
61
  # Sitemap
@@ -0,0 +1,16 @@
1
+ class CreateSpinaImageCollections < ActiveRecord::Migration[5.2]
2
+ def change
3
+ create_table :spina_image_collections do |t|
4
+ t.timestamps
5
+ end
6
+
7
+ create_table "spina_image_collections_images", id: :serial, force: :cascade do |t|
8
+ t.integer "image_collection_id"
9
+ t.integer "image_id"
10
+ t.integer "position"
11
+ end
12
+
13
+ add_index :spina_image_collections_images, :image_collection_id
14
+ add_index :spina_image_collections_images, :image_id
15
+ end
16
+ end
@@ -0,0 +1,15 @@
1
+ class CreateSpinaResources < ActiveRecord::Migration[5.1]
2
+ def change
3
+ create_table :spina_resources do |t|
4
+ t.string :name, null: false, unique: true
5
+ t.string :label
6
+ t.string :view_template
7
+ t.integer :parent_page_id
8
+ t.string :order_by
9
+ t.timestamps
10
+ end
11
+ add_column :spina_pages, :resource_id, :integer, null: true
12
+ add_index :spina_pages, :resource_id
13
+ add_index :spina_resources, :parent_page_id
14
+ end
15
+ end
@@ -11,8 +11,6 @@ class CreateSpinaTables < ActiveRecord::Migration[4.2]
11
11
  t.string "logo"
12
12
  t.datetime "created_at", null: false
13
13
  t.datetime "updated_at", null: false
14
- t.string "kvk_identifier"
15
- t.string "vat_identifier"
16
14
  t.boolean "robots_allowed", default: false
17
15
  end
18
16
 
@@ -80,23 +78,6 @@ class CreateSpinaTables < ActiveRecord::Migration[4.2]
80
78
  t.boolean "active", default: true
81
79
  end
82
80
 
83
- create_table "spina_photo_collections", force: :cascade do |t|
84
- t.datetime "created_at", null: false
85
- t.datetime "updated_at", null: false
86
- end
87
-
88
- create_table "spina_photo_collections_photos", force: :cascade do |t|
89
- t.integer "photo_collection_id"
90
- t.integer "photo_id"
91
- t.integer "position"
92
- end
93
-
94
- create_table "spina_photos", force: :cascade do |t|
95
- t.string "file"
96
- t.datetime "created_at", null: false
97
- t.datetime "updated_at", null: false
98
- end
99
-
100
81
  create_table "spina_structure_items", force: :cascade do |t|
101
82
  t.integer "structure_id"
102
83
  t.integer "position"
@@ -1,13 +1,43 @@
1
1
  class CreateSpinaTranslationTables < ActiveRecord::Migration[4.2]
2
2
  def up
3
- Spina::Page.create_translation_table! title: :string, menu_title: :string, description: :string, seo_title: :string, materialized_path: :string
4
- Spina::Text.create_translation_table! content: :text
5
- Spina::Line.create_translation_table! content: :string
3
+ create_table "spina_page_translations", force: :cascade do |t|
4
+ t.integer "spina_page_id", null: false
5
+ t.string "locale", null: false
6
+ t.string "title"
7
+ t.string "menu_title"
8
+ t.string "description"
9
+ t.string "seo_title"
10
+ t.string "materialized_path"
11
+ t.datetime "created_at", null: false
12
+ t.datetime "updated_at", null: false
13
+ t.index ["locale"], name: "index_spina_page_translations_on_locale"
14
+ t.index ["spina_page_id"], name: "index_spina_page_translations_on_spina_page_id"
15
+ end
16
+
17
+ create_table "spina_line_translations", force: :cascade do |t|
18
+ t.integer "spina_line_id", null: false
19
+ t.string "locale", null: false
20
+ t.string "content"
21
+ t.datetime "created_at", null: false
22
+ t.datetime "updated_at", null: false
23
+ t.index ["locale"], name: "index_spina_line_translations_on_locale"
24
+ t.index ["spina_line_id"], name: "index_spina_line_translations_on_spina_line_id"
25
+ end
26
+
27
+ create_table "spina_text_translations", force: :cascade do |t|
28
+ t.integer "spina_text_id", null: false
29
+ t.string "locale", null: false
30
+ t.text "content"
31
+ t.datetime "created_at", null: false
32
+ t.datetime "updated_at", null: false
33
+ t.index ["locale"], name: "index_spina_text_translations_on_locale"
34
+ t.index ["spina_text_id"], name: "index_spina_text_translations_on_spina_text_id"
35
+ end
6
36
  end
7
37
 
8
38
  def down
9
- Spina::Page.drop_translation_table!
10
- Spina::Text.drop_translation_table!
11
- Spina::Line.drop_translation_table!
39
+ drop_table "spina_page_translations"
40
+ drop_table "spina_text_translations"
41
+ drop_table "spina_line_translations"
12
42
  end
13
43
  end
@@ -0,0 +1,11 @@
1
+ class CreateSpinaSettings < ActiveRecord::Migration[5.0]
2
+ def change
3
+ create_table :spina_settings do |t|
4
+ t.string :plugin
5
+ t.jsonb :preferences, default: {}
6
+ t.timestamps
7
+ end
8
+
9
+ add_index :spina_settings, :plugin
10
+ end
11
+ end