refinerycms-photo-gallery 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (226) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +3 -0
  3. data/Changelog.md +11 -0
  4. data/Gemfile +35 -17
  5. data/Gemfile.lock +301 -0
  6. data/LICENSE.md +0 -0
  7. data/README.md +63 -13
  8. data/Rakefile +3 -2
  9. data/app/assets/images/refinery/photo_gallery/admin/chosen-sprite.png +0 -0
  10. data/app/assets/images/refinery/photo_gallery/admin/icons/album.png +0 -0
  11. data/app/assets/images/refinery/photo_gallery/admin/icons/album_add.png +0 -0
  12. data/app/assets/images/refinery/photo_gallery/admin/icons/album_edit.png +0 -0
  13. data/app/assets/images/refinery/photo_gallery/admin/icons/cog.png +0 -0
  14. data/app/assets/images/refinery/photo_gallery/admin/icons/down.gif +0 -0
  15. data/app/assets/images/refinery/photo_gallery/admin/icons/folder.png +0 -0
  16. data/app/assets/images/refinery/photo_gallery/admin/icons/folder_add.png +0 -0
  17. data/app/assets/images/refinery/photo_gallery/admin/icons/folder_edit.png +0 -0
  18. data/app/assets/images/refinery/photo_gallery/admin/icons/loading.gif +0 -0
  19. data/app/assets/images/refinery/photo_gallery/admin/icons/page_copy.png +0 -0
  20. data/app/assets/images/refinery/photo_gallery/admin/icons/photo.png +0 -0
  21. data/app/assets/images/refinery/photo_gallery/admin/icons/photo_add.png +0 -0
  22. data/app/assets/images/refinery/photo_gallery/admin/icons/photo_edit.png +0 -0
  23. data/app/assets/images/refinery/photo_gallery/admin/icons/up.gif +0 -0
  24. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/backgrounds.gif +0 -0
  25. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/buttons-disabled.png +0 -0
  26. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/buttons.png +0 -0
  27. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/delete.gif +0 -0
  28. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/done.gif +0 -0
  29. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/error.gif +0 -0
  30. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/throbber.gif +0 -0
  31. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/transp50.png +0 -0
  32. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.ui.plupload/plupload-bw.png +0 -0
  33. data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.ui.plupload/plupload.png +0 -0
  34. data/app/assets/images/refinery/photo_gallery/fancybox/blank.gif +0 -0
  35. data/app/assets/images/refinery/photo_gallery/fancybox/fancybox_loading.gif +0 -0
  36. data/app/assets/images/refinery/photo_gallery/fancybox/fancybox_sprite.png +0 -0
  37. data/app/assets/images/refinery/photo_gallery/fancybox/helpers/fancybox_buttons.png +0 -0
  38. data/app/assets/javascripts/refinery/photo_gallery/admin/jquery.chosen.min.js +0 -0
  39. data/app/assets/javascripts/refinery/photo_gallery/admin/photo_gallery.js.erb +46 -46
  40. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/Moxie.swf +0 -0
  41. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/Moxie.xap +0 -0
  42. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/changelog.txt +0 -0
  43. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ar.js +2 -0
  44. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/az.js +2 -0
  45. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/bg.js +2 -0
  46. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/bs.js +2 -0
  47. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ca.js +2 -0
  48. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/cs.js +2 -14
  49. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/cy.js +2 -0
  50. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/da.js +2 -12
  51. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/de.js +2 -24
  52. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/el.js +2 -14
  53. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/en.js +2 -0
  54. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/es.js +2 -25
  55. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/et.js +2 -33
  56. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/fa.js +2 -0
  57. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/fi.js +2 -33
  58. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/fr-ca.js +0 -0
  59. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/fr.js +2 -25
  60. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/he.js +2 -0
  61. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/hr.js +2 -25
  62. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/hu.js +2 -33
  63. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/hy.js +2 -0
  64. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/id.js +2 -0
  65. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/it.js +2 -24
  66. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ja.js +2 -37
  67. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ka.js +2 -0
  68. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/kk.js +2 -0
  69. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/km.js +2 -0
  70. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ko.js +2 -36
  71. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ku_IQ.js +2 -0
  72. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/lt.js +2 -0
  73. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/lv.js +2 -33
  74. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ms.js +2 -0
  75. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/nl.js +2 -21
  76. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/pl.js +2 -24
  77. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/pt-br.js +0 -0
  78. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/pt.js +2 -0
  79. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/pt_BR.js +2 -0
  80. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ro.js +2 -24
  81. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ru.js +2 -21
  82. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/sk.js +2 -37
  83. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/sl.js +2 -0
  84. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/sq.js +2 -0
  85. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/sr.js +2 -14
  86. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/sv.js +2 -12
  87. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/th_TH.js +2 -0
  88. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/tr.js +2 -0
  89. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/uk_UA.js +2 -0
  90. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/vi.js +2 -0
  91. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/zh_CN.js +2 -0
  92. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/zh_TW.js +2 -0
  93. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.plupload.queue.js +0 -0
  94. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/css/jquery.plupload.queue.css +185 -0
  95. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/img/backgrounds.gif +0 -0
  96. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/img/buttons-disabled.png +0 -0
  97. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/img/buttons.png +0 -0
  98. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/img/delete.gif +0 -0
  99. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/img/done.gif +0 -0
  100. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/img/error.gif +0 -0
  101. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/img/throbber.gif +0 -0
  102. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/img/transp50.png +0 -0
  103. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/jquery.plupload.queue.js +428 -0
  104. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/jquery.plupload.queue.min.js +1 -0
  105. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.ui.plupload.js +0 -0
  106. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.ui.plupload/css/jquery.ui.plupload.css +375 -0
  107. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.ui.plupload/img/loading.gif +0 -0
  108. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.ui.plupload/img/plupload.png +0 -0
  109. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.ui.plupload/jquery.ui.plupload.js +1343 -0
  110. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.ui.plupload/jquery.ui.plupload.min.js +1 -0
  111. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/license.txt +0 -0
  112. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/moxie.js +11158 -0
  113. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/moxie.min.js +16 -0
  114. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.browserplus.js +0 -0
  115. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.dev.js +2381 -0
  116. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.flash.js +0 -0
  117. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.flash.swf +0 -0
  118. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.full.js +0 -0
  119. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.full.js.default +0 -0
  120. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.full.min.js +29 -0
  121. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.gears.js +0 -0
  122. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.html4.js +0 -0
  123. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.html5.js +0 -0
  124. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.html5.js.default +0 -0
  125. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.js +0 -0
  126. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.min.js +13 -0
  127. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.silverlight.js +0 -0
  128. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.silverlight.xap +0 -0
  129. data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/readme.md +0 -0
  130. data/app/assets/javascripts/refinery/photo_gallery/fancybox/CHANGELOG.md +0 -0
  131. data/app/assets/javascripts/refinery/photo_gallery/fancybox/README.md +0 -0
  132. data/app/assets/javascripts/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-buttons.js +0 -0
  133. data/app/assets/javascripts/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-media.js +0 -0
  134. data/app/assets/javascripts/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-thumbs.js +0 -0
  135. data/app/assets/javascripts/refinery/photo_gallery/fancybox/jquery.fancybox.js +0 -0
  136. data/app/assets/javascripts/refinery/photo_gallery/fancybox/jquery.fancybox.pack.js +0 -0
  137. data/app/assets/javascripts/refinery/photo_gallery/fancybox/lib/jquery.mousewheel-3.0.6.pack.js +0 -0
  138. data/app/assets/javascripts/refinery/photo_gallery/photo_gallery.js +0 -0
  139. data/app/assets/stylesheets/refinery/photo_gallery/admin/chosen.css.scss +262 -262
  140. data/app/assets/stylesheets/refinery/photo_gallery/admin/photo_gallery.css.scss +1 -13
  141. data/app/assets/stylesheets/refinery/photo_gallery/admin/plupload/jquery.plupload.queue.css.scss +0 -0
  142. data/app/assets/stylesheets/refinery/photo_gallery/admin/plupload/jquery.ui.plupload.css.scss +0 -0
  143. data/app/assets/stylesheets/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-buttons.css.scss +0 -0
  144. data/app/assets/stylesheets/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-thumbs.css +0 -0
  145. data/app/assets/stylesheets/refinery/photo_gallery/fancybox/jquery.fancybox.css.scss +0 -0
  146. data/app/controllers/refinery/photo_gallery/admin/albums_controller.rb +10 -3
  147. data/app/controllers/refinery/photo_gallery/admin/collections_controller.rb +8 -0
  148. data/app/controllers/refinery/photo_gallery/admin/photos_controller.rb +19 -8
  149. data/app/helpers/refinery/photo_gallery/admin/photos_helper.rb +5 -1
  150. data/app/helpers/refinery/photo_gallery/albums_helper.rb +0 -0
  151. data/app/helpers/refinery/photo_gallery/photo_gallery_helper.rb +0 -0
  152. data/app/models/refinery/album_page.rb +0 -1
  153. data/app/models/refinery/photo_gallery/album.rb +0 -2
  154. data/app/models/refinery/photo_gallery/collection.rb +0 -2
  155. data/app/models/refinery/photo_gallery/collection_album.rb +0 -0
  156. data/app/models/refinery/photo_gallery/photo.rb +14 -16
  157. data/app/sweepers/refinery/admin/album_page_sweeper.rb +0 -0
  158. data/app/sweepers/refinery/photo_gallery/admin/album_sweeper.rb +0 -0
  159. data/app/sweepers/refinery/photo_gallery/admin/photo_sweeper.rb +0 -0
  160. data/app/uploaders/refinery/photo_gallery/admin/file_uploader.rb +7 -1
  161. data/app/views/refinery/admin/pages/tabs/_form.html.erb +0 -0
  162. data/app/views/refinery/admin/pages/tabs/_photo_gallery.html.erb +0 -0
  163. data/app/views/refinery/admin/pages/tabs/_photo_pages_bar.html.erb +0 -0
  164. data/app/views/refinery/photo_gallery/admin/_submenu.html.erb +4 -30
  165. data/app/views/refinery/photo_gallery/admin/albums/_album.html.erb +0 -0
  166. data/app/views/refinery/photo_gallery/admin/albums/_albums.html.erb +0 -0
  167. data/app/views/refinery/photo_gallery/admin/albums/_form.html.erb +1 -2
  168. data/app/views/refinery/photo_gallery/admin/albums/edit.html.erb +0 -0
  169. data/app/views/refinery/photo_gallery/admin/albums/index.html.erb +0 -0
  170. data/app/views/refinery/photo_gallery/admin/albums/new.html.erb +0 -0
  171. data/app/views/refinery/photo_gallery/admin/collections/_collection.html.erb +0 -0
  172. data/app/views/refinery/photo_gallery/admin/collections/_collections.html.erb +0 -0
  173. data/app/views/refinery/photo_gallery/admin/collections/_form.html.erb +0 -0
  174. data/app/views/refinery/photo_gallery/admin/collections/edit.html.erb +0 -0
  175. data/app/views/refinery/photo_gallery/admin/collections/index.html.erb +1 -0
  176. data/app/views/refinery/photo_gallery/admin/collections/new.html.erb +0 -0
  177. data/app/views/refinery/photo_gallery/admin/photos/_destroy.js.erb +0 -0
  178. data/app/views/refinery/photo_gallery/admin/photos/_form.html.erb +0 -0
  179. data/app/views/refinery/photo_gallery/admin/photos/_form_actions.html.erb +0 -0
  180. data/app/views/refinery/photo_gallery/admin/photos/_form_fields.html.erb +1 -0
  181. data/app/views/refinery/photo_gallery/admin/photos/_form_fields_actions.html.erb +0 -0
  182. data/app/views/refinery/photo_gallery/admin/photos/edit_multiple.html.erb +0 -0
  183. data/app/views/refinery/photo_gallery/admin/photos/upload.html.erb +4 -3
  184. data/app/views/refinery/photo_gallery/albums/_photos.html.erb +6 -2
  185. data/app/views/refinery/photo_gallery/albums/_photos.js.erb +0 -0
  186. data/app/views/refinery/photo_gallery/albums/_show.html.erb +0 -0
  187. data/config/initializers/carrierwave.rb +0 -0
  188. data/config/initializers/form_builder.rb +0 -0
  189. data/config/initializers/refinery/core.rb +0 -0
  190. data/config/initializers/s3.rb +0 -0
  191. data/config/locales/en.yml +2 -2
  192. data/config/locales/pl.yml +110 -0
  193. data/config/locales/sk.yml +2 -2
  194. data/config/routes.rb +0 -0
  195. data/db/migrate/20120804063842_create_albums.rb +0 -0
  196. data/db/migrate/20120805131321_create_collections.rb +0 -0
  197. data/db/migrate/20120805131547_create_collection_albums.rb +0 -0
  198. data/db/migrate/20120805165238_create_photos.rb +0 -0
  199. data/db/migrate/20120805222125_add_indexes.rb +2 -2
  200. data/db/migrate/20120805222126_create_album_pages.rb +0 -0
  201. data/db/migrate/20130127175559_add_url_to_photos.rb +5 -0
  202. data/db/migrate/20130128173800_add_css_styles_and_show_original_fields_to_photos.rb +6 -0
  203. data/db/seeds.rb +0 -0
  204. data/lib/generators/refinery/photo_gallery_generator.rb +5 -2
  205. data/lib/generators/refinery/templates/config/initializers/refinery/photo_gallery.rb.erb +3 -2
  206. data/lib/refinery/photo_gallery.rb +0 -1
  207. data/lib/refinery/photo_gallery/configuration.rb +7 -1
  208. data/lib/refinery/photo_gallery/engine.rb +0 -1
  209. data/lib/refinery/photo_gallery/extensions/pages_controller_extension.rb +0 -0
  210. data/lib/refinery/photo_gallery/extensions/pages_extension.rb +4 -12
  211. data/lib/refinery/photo_gallery/version.rb +2 -2
  212. data/lib/refinerycms-photo-gallery.rb +0 -0
  213. data/refinerycms-photo-gallery.gemspec +2 -3
  214. data/spec/factories/album_photos.rb +5 -0
  215. data/spec/factories/albums.rb +23 -0
  216. data/spec/factories/collections.rb +6 -0
  217. data/spec/factories/photos.rb +12 -0
  218. data/spec/factories/user.rb +27 -0
  219. data/spec/features/manage_albums_spec.rb +93 -0
  220. data/spec/features/manage_collections_spec.rb +62 -0
  221. data/spec/features/manage_photos_spec.rb +47 -0
  222. data/spec/spec_helper.rb +32 -0
  223. data/spec/support/images/refinery-logo-trans.png +0 -0
  224. data/tasks/rspec.rake +6 -0
  225. data/tasks/testing.rake +8 -0
  226. metadata +110 -63
File without changes
File without changes
File without changes
File without changes
@@ -20,11 +20,11 @@ en:
20
20
  submenu:
21
21
  collections:
22
22
  title: Collections
23
- manage: Manage
23
+ manage: Manage Collections
24
24
  new: Create new collection
25
25
  albums:
26
26
  title: Albums
27
- manage: Manage
27
+ manage: Manage Albums
28
28
  new: Create new album
29
29
  collections:
30
30
  collection:
@@ -0,0 +1,110 @@
1
+ pl:
2
+ chosen:
3
+ no_results: "Brak wyników"
4
+ refinery:
5
+ admin:
6
+ pages:
7
+ tabs:
8
+ form:
9
+ join_page_with_album: "Połącz stronę z albumem:"
10
+ choose_album: "Kliknij, aby dodać album"
11
+ flash:
12
+ connection_destroyed: "Połączenie pomiędzy stroną i albumem zostało usunięte"
13
+ plugins:
14
+ refinerycms_photo_gallery:
15
+ title: Galeria zdjęć
16
+ description: Zaawansowana galeria zdjęć
17
+ tab_name: Galeria zdjęć
18
+ photo_gallery:
19
+ admin:
20
+ submenu:
21
+ collections:
22
+ title: Kolekcje
23
+ manage: Przeglądaj
24
+ new: Dodaj nową kolekcję
25
+ albums:
26
+ title: Albumy
27
+ manage: Przeglądaj
28
+ new: Dodaj nowy album
29
+ collections:
30
+ collection:
31
+ view_live_html: Podgląd kolekcji <br/><em>(w nowym oknie)</em>
32
+ delete: Usuń tę kolekcję na zawsze
33
+ edit: Edytuj tę kolekcję
34
+ index:
35
+ no_items_yet: Nie ma jeszcze żadnych kolekcji. Kliknij "%{create}" aby dodać pierwszą kolekcję.
36
+ new:
37
+ title: Dodaj nową kolekcję
38
+ edit:
39
+ title: Edytuj kolekcję
40
+ albums:
41
+ album:
42
+ view_live_html: Podgląd albumu <br/><em>(w nowym oknie)</em>
43
+ delete: Usuń ten album na zawsze
44
+ edit: Edytuj ten album
45
+ upload_photos: Załaduj nowe zdjęcia do albumu
46
+ edit_photos: Edytuj zdjęcia w albumie
47
+ index:
48
+ no_items_yet: Nie ma jeszcze żadnych albumów. Kliknij "%{create}" aby dodać pierwszy album.
49
+ new:
50
+ title: Dodaj nowy album
51
+ edit:
52
+ title: Edytuj album
53
+ form:
54
+ album_belongs_to_collection: Album należy do kolekcji
55
+ more_options: Więcej opcji
56
+ more_options_tooltip: Włącz edycję dodakowych pól, takich jak adres, długość i szerokość geograficzna
57
+ choose_collection: Wybierz kolekcję/e
58
+ path_prefix: Prefix
59
+ number_of_photos: Zawiera %{number} zdjęć
60
+ photos:
61
+ updated: Zaktualizowane zdjęcia
62
+ title: Zdjęcia
63
+ manage: Przeglądaj
64
+ new: Załaduj nowe zdjęcia
65
+ edit_multiple:
66
+ no_photos_yet: Nie ma jeszcze zdjęć w tym albumie. Kliknij "%{create} aby dodać pierwsze zdjęcia.
67
+ photo:
68
+ delete: Usuń to zdjęcie na zawsze
69
+ deleted: Usunięto zdjęcie "%{title}"
70
+ form_fields:
71
+ use_decimal_format: Użyj formatu dziesiętnego
72
+ photo_pages:
73
+ show:
74
+ other: Inne strony
75
+ albums:
76
+ show:
77
+ no_photos: Nie ma jeszcze zdjęć w tym albumie
78
+ photos:
79
+ image: Obrazek
80
+ collections:
81
+ show:
82
+ no_albums: Nie ma jeszcze albumów w tej kolekcji
83
+ index:
84
+ no_collections: Nie ma jeszcze żadnej kolekcji
85
+ activerecord:
86
+ attributes:
87
+ refinery/photo_gallery/photo_page:
88
+ page_id: Strona
89
+ refinery/photo_gallery/collection:
90
+ title: Tytuł
91
+ description: Opis
92
+ refinery/photo_gallery/album:
93
+ title: Tytuł
94
+ description: Opis
95
+ longitude: Długość geograficzna
96
+ latitude: Szerokość geograficzna
97
+ path: Ścieżka
98
+ address: Adres
99
+ note: Notatka
100
+ tags: Tagi
101
+ refinery/photo_gallery/photo:
102
+ title: Tytuł
103
+ description: Opis
104
+ longitude: Długość geograficzna
105
+ latitude: Szerokość geograficzna
106
+ path: Ścieżka
107
+ file: Plik
108
+ models:
109
+ refinery/photo_gallery/collection: Album
110
+
@@ -20,11 +20,11 @@ sk:
20
20
  submenu:
21
21
  collections:
22
22
  title: Skupiny albumov
23
- manage: Spravovať
23
+ manage: Spravovať skupinu
24
24
  new: Vytvoriť novú skupinu albumov
25
25
  albums:
26
26
  title: Abumy
27
- manage: Spravovať
27
+ manage: Spravovať albumy
28
28
  new: Vytvoriť nový albun
29
29
  collections:
30
30
  collection:
File without changes
@@ -5,8 +5,8 @@ class AddIndexes < ActiveRecord::Migration
5
5
  add_index Refinery::PhotoGallery::Photo.table_name, :id, :unique => true
6
6
 
7
7
 
8
- add_index Refinery::PhotoGallery::CollectionAlbum.table_name, :collection_id
9
- add_index Refinery::PhotoGallery::CollectionAlbum.table_name, :album_id
8
+ add_index Refinery::PhotoGallery::CollectionAlbum.table_name, :collection_id, :name=>"index_rpg_collection_albums_on_collection_id"
9
+ add_index Refinery::PhotoGallery::CollectionAlbum.table_name, :album_id, :name=>"index_rpg_collection_albums_on_album_id"
10
10
  add_index Refinery::PhotoGallery::Photo.table_name, :album_id
11
11
  end
12
12
 
@@ -0,0 +1,5 @@
1
+ class AddUrlToPhotos < ActiveRecord::Migration
2
+ def change
3
+ add_column :refinery_photo_gallery_photos, :url, :string
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ class AddCssStylesAndShowOriginalFieldsToPhotos < ActiveRecord::Migration
2
+ def change
3
+ add_column :refinery_photo_gallery_photos, :css_class, :string
4
+ add_column :refinery_photo_gallery_photos, :preview_type, :string
5
+ end
6
+ end
File without changes
@@ -1,11 +1,14 @@
1
1
  module Refinery
2
2
  class PhotoGalleryGenerator < Rails::Generators::Base
3
+
3
4
  source_root File.expand_path('../templates', __FILE__)
4
5
 
5
- def generate_inquiries_initializer
6
+
7
+ def generate_photo_gallery_initializer
6
8
  template 'config/initializers/refinery/photo_gallery.rb.erb', File.join(destination_root, 'config', 'initializers', 'refinery', 'photo_gallery.rb')
7
9
  end
8
10
 
11
+
9
12
  def rake_db
10
13
  rake("refinery_photo_gallery:install:migrations")
11
14
  end
@@ -22,4 +25,4 @@ Refinery::PhotoGallery::Engine.load_seed
22
25
  end
23
26
 
24
27
  end
25
- end
28
+ end
@@ -31,6 +31,7 @@ Refinery::PhotoGallery.configure do |config|
31
31
  # config.albums_per_page = <%= Refinery::PhotoGallery.albums_per_page.inspect %>
32
32
  # config.photos_per_page = <%= Refinery::PhotoGallery.photos_per_page.inspect %>
33
33
 
34
-
35
-
34
+ # config.admin_photo_options_show_url = <%= Refinery::PhotoGallery.admin_photo_options_show_url.inspect %>
35
+ # config.admin_photo_options_show_css_class = <%= Refinery::PhotoGallery.admin_photo_options_show_css_class.inspect %>
36
+ # config.admin_photo_options_show_preview_type = <%= Refinery::PhotoGallery.admin_photo_options_show_preview_type.inspect %>
36
37
  end
@@ -1,5 +1,4 @@
1
1
  require 'refinerycms-core'
2
- require 'refinerycms-settings'
3
2
 
4
3
 
5
4
  module Refinery
@@ -4,7 +4,9 @@ module Refinery
4
4
 
5
5
  config_accessor :runtimes, :max_file_size,:client_side_resize, :client_side_resize_params, :plupload_locale, :extension_white_list,:photo_gallery_dir,
6
6
  :delete_uploaded_file,:collection_dimensions, :album_dimensions, :preview_dimensions, :single_dimensions, :photo_gallery_dir_relative_to_root,
7
- :photos_per_page, :albums_per_page, :collections_per_page
7
+ :photos_per_page, :albums_per_page, :collections_per_page,
8
+ :admin_photo_options_show_url, :admin_photo_options_show_css_class,
9
+ :admin_photo_options_show_preview_type
8
10
 
9
11
 
10
12
 
@@ -27,5 +29,9 @@ module Refinery
27
29
  self.albums_per_page = 10
28
30
  self.collections_per_page = 10
29
31
  self.photos_per_page = 10
32
+
33
+ self.admin_photo_options_show_url = true
34
+ self.admin_photo_options_show_css_class = true
35
+ self.admin_photo_options_show_preview_type = true
30
36
  end
31
37
  end
@@ -17,7 +17,6 @@ module Refinery
17
17
  plugin.name = "refinerycms_photo_gallery"
18
18
  plugin.url = proc { Refinery::Core::Engine.routes.url_helpers.photo_gallery_admin_albums_path }
19
19
  plugin.menu_match = %r{refinery/photo_gallery(/.+?)?$}
20
- plugin.activity = { :class_name => 'Refinery::PhotoGallery::Album' }
21
20
  end
22
21
  end
23
22
 
@@ -5,7 +5,7 @@ module Refinery
5
5
  def has_one_page_album
6
6
  has_one :album_page, :as => :page, :dependent=> :destroy
7
7
  has_one :album, :through => :album_page
8
- has_many :photos, :class_name => Refinery::PhotoGallery::Photo, :through => :album , :order=> "created_at ASC"
8
+ has_many :photos, -> {order "created_at ASC"}, class_name: Refinery::PhotoGallery::Photo, through: :album
9
9
 
10
10
 
11
11
  accepts_nested_attributes_for :album_page
@@ -13,9 +13,9 @@ module Refinery
13
13
  module_eval do
14
14
  def photos_for_page(params_page)
15
15
  Refinery::PhotoGallery::Photo.where("album_id = ?", self.album.id ).
16
- includes(:album).
17
- paginate(:page => params_page).
18
- order("created_at ASC")
16
+ includes(:album).
17
+ paginate(:page => params_page).
18
+ order("created_at ASC")
19
19
  end
20
20
 
21
21
 
@@ -29,22 +29,14 @@ module Refinery
29
29
  if album_page_params[:album_id].blank?
30
30
  self.album_page.destroy
31
31
 
32
- Refinery::Admin::AlbumPageSweeper.sweep
33
-
34
32
  # create or update if changed
35
33
  elsif self.album_page.album_id.to_s != album_page_params[:album_id]
36
34
  self.album_page.update_attributes( album_page_params)
37
35
  self.album_page.save
38
-
39
- Refinery::Admin::AlbumPageSweeper.sweep
40
36
  end
41
-
42
-
43
37
  end
44
38
  end
45
39
 
46
- attr_accessible :album_page
47
-
48
40
  end
49
41
  end
50
42
  end
@@ -2,8 +2,8 @@ module Refinery
2
2
  module PhotoGallery
3
3
  class Version
4
4
  @major = 0
5
- @minor = 1
6
- @tiny = '2'
5
+ @minor = 2
6
+ @tiny = '0'
7
7
 
8
8
  class << self
9
9
  attr_reader :major, :minor, :tiny
File without changes
@@ -18,13 +18,12 @@ Gem::Specification.new do |s|
18
18
  s.test_files = `git ls-files -- spec/*`.split("\n")
19
19
 
20
20
  # Runtime dependencies
21
- s.add_dependency 'refinerycms-core', '~> 2.0.3'
22
- s.add_dependency 'refinerycms-settings', '~> 2.0.1'
21
+ s.add_dependency 'refinerycms-core', '~> 3.0.5'
23
22
  s.add_dependency 'mime-types'
24
23
  s.add_dependency 'carrierwave', '0.6.2'
25
24
  s.add_dependency 'mini_magick'
26
25
  s.add_dependency 'mini_exiftool'
27
26
 
28
27
  # Development dependencies
29
- s.add_development_dependency 'refinerycms-testing', '~> 2.0.0'
28
+ s.add_development_dependency 'refinerycms-testing', '~> 3.0.5'
30
29
  end
@@ -0,0 +1,5 @@
1
+ FactoryGirl.define do
2
+ factory :album_photo, parent: :photo do
3
+ album
4
+ end
5
+ end
@@ -0,0 +1,23 @@
1
+ FactoryGirl.define do
2
+ factory :album, class: Refinery::PhotoGallery::Album do
3
+ title { Faker::Lorem::word }
4
+ path "15_04"
5
+ description "describtion about album"
6
+ address "slovakia"
7
+
8
+ factory :album_with_photos do
9
+ transient do
10
+ photos_count 5
11
+ end
12
+
13
+ # the after(:create) yields two values; the user instance itself and the
14
+ # evaluator, which stores all values from the factory, including transient
15
+ # attributes; `create_list`'s second argument is the number of records
16
+ # to create and we make sure the user is associated properly to the post
17
+ after(:create) do |album, evaluator|
18
+ create_list(:photo, evaluator.photos_count, album: album)
19
+ end
20
+
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,6 @@
1
+ FactoryGirl.define do
2
+ factory :collection, class: Refinery::PhotoGallery::Collection do
3
+ title { Faker::Lorem::word }
4
+ description "collection description"
5
+ end
6
+ end
@@ -0,0 +1,12 @@
1
+ FactoryGirl.define do
2
+ factory :photo, class: Refinery::PhotoGallery::Photo do
3
+ title "Photo"
4
+ description "description"
5
+ path "16_04"
6
+
7
+ #sequence(:title){|n| "Photo-#{n}" }
8
+ file { Rack::Test::UploadedFile.new( File.open(File.join(File.join(Refinery.roots(:'refinery/photo_gallery'), 'spec', 'support', 'images', 'refinery-logo-trans.png'))), "image/png" ) }
9
+ end
10
+ end
11
+
12
+
@@ -0,0 +1,27 @@
1
+ FactoryGirl.define do
2
+ factory :authentication_devise_user, :class => Refinery::Authentication::Devise::User do
3
+ sequence(:username) { |n| "refinery#{n}" }
4
+ sequence(:email) { |n| "refinery#{n}@example.com" }
5
+ password "refinerycms"
6
+ password_confirmation "refinerycms"
7
+ end
8
+
9
+ factory :authentication_devise_refinery_user, :parent => :authentication_devise_user do
10
+ roles { [ ::Refinery::Authentication::Devise::Role[:refinery] ] }
11
+
12
+ after(:create) do |user|
13
+ ::Refinery::Plugins.registered.each_with_index do |plugin, index|
14
+ user.plugins.create(:name => plugin.name, :position => index)
15
+ end
16
+ end
17
+ end
18
+
19
+ factory :authentication_devise_refinery_superuser, :parent => :authentication_devise_refinery_user do
20
+ roles {
21
+ [
22
+ ::Refinery::Authentication::Devise::Role[:refinery],
23
+ ::Refinery::Authentication::Devise::Role[:superuser]
24
+ ]
25
+ }
26
+ end
27
+ end
@@ -0,0 +1,93 @@
1
+ require "spec_helper"
2
+
3
+ describe "manage album items", :type => :feature do
4
+ refinery_login_with_devise :authentication_devise_refinery_superuser
5
+
6
+ context "when no album items" do
7
+ it "invites to create one" do
8
+ #save_and_open_page
9
+
10
+ visit refinery.photo_gallery_admin_albums_path
11
+ expect(page).to have_content("There are no albums yet. Click \"Create new album\" to add your first album.")
12
+ end
13
+ end
14
+
15
+ describe "submenu links" do
16
+ it "should have submenu links" do
17
+ visit refinery.photo_gallery_admin_albums_path
18
+
19
+ within "#actions" do
20
+ expect(page).to have_content("Collections")
21
+ expect(page).to have_content("Manage")
22
+ end
23
+ end
24
+ end
25
+
26
+ describe "action links" do
27
+ it "shows create new album" do
28
+ visit refinery.photo_gallery_admin_albums_path
29
+
30
+ within "#actions" do
31
+ expect(page).to have_content("Create new album")
32
+ expect(page).to have_selector("a[href='/#{Refinery::Core.backend_route}/photo-gallery/albums/new']")
33
+ end
34
+ end
35
+
36
+ it "shows create new collection" do
37
+ visit refinery.photo_gallery_admin_albums_path
38
+
39
+ within "#actions" do
40
+ expect(page).to have_content("Create new collection")
41
+ expect(page).to have_selector("a[href='/#{Refinery::Core.backend_route}/photo-gallery/collections/new']")
42
+ end
43
+ end
44
+ end
45
+
46
+ describe "new/create" do
47
+ it "allows to create albums" do
48
+ visit refinery.photo_gallery_admin_albums_path
49
+
50
+ click_link "Create new album"
51
+
52
+ fill_in "Title", :with => "My first album"
53
+ fill_in "Path prefix", :with => "16_04"
54
+ fill_in "Description", :with => "This is long story description ... "
55
+ click_button "Save"
56
+
57
+ expect(page).to have_content("'My first album' was successfully added.")
58
+
59
+ expect(Refinery::PhotoGallery::Album.count).to eq(1)
60
+ end
61
+ end
62
+
63
+ describe "edit/update" do
64
+ before { FactoryGirl.create(:album, :title => "Update me") }
65
+
66
+ it "updates album" do
67
+ visit refinery.photo_gallery_admin_albums_path
68
+
69
+ expect(page).to have_content("Update me")
70
+
71
+ click_link "Edit this album"
72
+
73
+ fill_in "Title", :with => "Updated"
74
+ click_button "Save"
75
+
76
+ expect(page).to have_content("'Updated' was successfully updated.")
77
+ end
78
+ end
79
+
80
+ describe "destroy" do
81
+ before { FactoryGirl.create(:album, :title => "Delete me") }
82
+
83
+ it "removes album" do
84
+ visit refinery.photo_gallery_admin_albums_path
85
+
86
+ click_link "Remove this album forever"
87
+
88
+ expect(page).to have_content("'Delete me' was successfully removed.")
89
+
90
+ expect(Refinery::PhotoGallery::Album.count).to eq(0)
91
+ end
92
+ end
93
+ end