refinerycms-6hoursdaily-photo-gallery 0.0.4.dev
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +27 -0
- data/LICENSE.md +8 -0
- data/README.md +224 -0
- data/app/assets/images/refinery/photo_gallery/admin/chosen-sprite.png +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/icons/album.png +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/icons/album_add.png +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/icons/album_edit.png +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/icons/cog.png +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/icons/down.gif +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/icons/folder.png +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/icons/folder_add.png +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/icons/folder_edit.png +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/icons/loading.gif +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/icons/page_copy.png +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/icons/photo.png +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/icons/photo_add.png +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/icons/photo_edit.png +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/icons/up.gif +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/backgrounds.gif +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/buttons-disabled.png +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/buttons.png +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/delete.gif +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/done.gif +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/error.gif +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/throbber.gif +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.plupload.queue/transp50.png +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.ui.plupload/plupload-bw.png +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/plupload/jquery.ui.plupload/plupload.png +0 -0
- data/app/assets/images/refinery/photo_gallery/admin/rss-feed.png +0 -0
- data/app/assets/images/refinery/photo_gallery/fancybox/blank.gif +0 -0
- data/app/assets/images/refinery/photo_gallery/fancybox/fancybox_loading.gif +0 -0
- data/app/assets/images/refinery/photo_gallery/fancybox/fancybox_sprite.png +0 -0
- data/app/assets/images/refinery/photo_gallery/fancybox/helpers/fancybox_buttons.png +0 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/jquery.chosen.min.js +10 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/photo_gallery.js +28 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/changelog.txt +218 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/cs.js +14 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/da.js +12 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/de.js +24 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/el.js +14 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/es.js +25 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/et.js +33 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/fi.js +33 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/fr-ca.js +35 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/fr.js +25 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/hr.js +25 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/hu.js +33 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/it.js +24 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ja.js +37 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ko.js +36 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/lv.js +33 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/nl.js +21 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/pl.js +24 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/pt-br.js +35 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ro.js +24 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ru.js +21 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/sk.js +37 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/sr.js +14 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/sv.js +12 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.plupload.queue.js +195 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/jquery.ui.plupload.js +383 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/license.txt +339 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.browserplus.js +1 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.flash.js +226 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.flash.swf +0 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.full.js +2525 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.full.js.default +2525 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.gears.js +1 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.html4.js +1 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.html5.js +765 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.html5.js.default +765 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.js +618 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.silverlight.js +1 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/plupload.silverlight.xap +0 -0
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/readme.md +46 -0
- data/app/assets/javascripts/refinery/photo_gallery/fancybox/CHANGELOG.md +68 -0
- data/app/assets/javascripts/refinery/photo_gallery/fancybox/README.md +212 -0
- data/app/assets/javascripts/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-buttons.js +115 -0
- data/app/assets/javascripts/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-media.js +85 -0
- data/app/assets/javascripts/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-thumbs.js +157 -0
- data/app/assets/javascripts/refinery/photo_gallery/fancybox/jquery.fancybox.js +1463 -0
- data/app/assets/javascripts/refinery/photo_gallery/fancybox/jquery.fancybox.pack.js +35 -0
- data/app/assets/javascripts/refinery/photo_gallery/fancybox/lib/jquery.mousewheel-3.0.6.pack.js +13 -0
- data/app/assets/stylesheets/refinery/photo_gallery/admin/chosen.css.scss +396 -0
- data/app/assets/stylesheets/refinery/photo_gallery/admin/photo_gallery.css.scss +109 -0
- data/app/assets/stylesheets/refinery/photo_gallery/admin/plupload/jquery.plupload.queue.css.scss +177 -0
- data/app/assets/stylesheets/refinery/photo_gallery/admin/plupload/jquery.ui.plupload.css.scss +147 -0
- data/app/assets/stylesheets/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-buttons.css.scss +85 -0
- data/app/assets/stylesheets/refinery/photo_gallery/fancybox/helpers/jquery.fancybox-thumbs.css +54 -0
- data/app/assets/stylesheets/refinery/photo_gallery/fancybox/jquery.fancybox.css.scss +234 -0
- data/app/controllers/refinery/photo_gallery/admin/albums_controller.rb +23 -0
- data/app/controllers/refinery/photo_gallery/admin/collections_controller.rb +10 -0
- data/app/controllers/refinery/photo_gallery/admin/photos_controller.rb +67 -0
- data/app/controllers/refinery/photo_gallery/albums_controller.rb +23 -0
- data/app/controllers/refinery/photo_gallery/collections_controller.rb +28 -0
- data/app/helpers/refinery/photo_gallery/admin/photos_helper.rb +10 -0
- data/app/helpers/refinery/photo_gallery/albums_helper.rb +11 -0
- data/app/helpers/refinery/photo_gallery/photo_gallery_helper.rb +113 -0
- data/app/middleware/refinery/photo_gallery/admin/flash_session_cookie_middleware.rb +27 -0
- data/app/models/refinery/photo_gallery/album.rb +63 -0
- data/app/models/refinery/photo_gallery/collection.rb +29 -0
- data/app/models/refinery/photo_gallery/collection_album.rb +8 -0
- data/app/models/refinery/photo_gallery/photo.rb +63 -0
- data/app/uploaders/refinery/photo_gallery/admin/file_uploader.rb +122 -0
- data/app/views/refinery/photo_gallery/admin/_submenu.html.erb +44 -0
- data/app/views/refinery/photo_gallery/admin/albums/_album.html.erb +31 -0
- data/app/views/refinery/photo_gallery/admin/albums/_form.html.erb +78 -0
- data/app/views/refinery/photo_gallery/admin/albums/_sortable_list.html.erb +7 -0
- data/app/views/refinery/photo_gallery/admin/albums/edit.html.erb +2 -0
- data/app/views/refinery/photo_gallery/admin/albums/index.html.erb +28 -0
- data/app/views/refinery/photo_gallery/admin/albums/new.html.erb +2 -0
- data/app/views/refinery/photo_gallery/admin/collections/_collection.html.erb +23 -0
- data/app/views/refinery/photo_gallery/admin/collections/_form.html.erb +32 -0
- data/app/views/refinery/photo_gallery/admin/collections/_sortable_list.html.erb +7 -0
- data/app/views/refinery/photo_gallery/admin/collections/edit.html.erb +2 -0
- data/app/views/refinery/photo_gallery/admin/collections/index.html.erb +28 -0
- data/app/views/refinery/photo_gallery/admin/collections/new.html.erb +2 -0
- data/app/views/refinery/photo_gallery/admin/collections/test.html.erb +39 -0
- data/app/views/refinery/photo_gallery/admin/photos/_destroy.js.erb +15 -0
- data/app/views/refinery/photo_gallery/admin/photos/_form.html.erb +7 -0
- data/app/views/refinery/photo_gallery/admin/photos/_form_actions.html.erb +6 -0
- data/app/views/refinery/photo_gallery/admin/photos/_form_fields.html.erb +31 -0
- data/app/views/refinery/photo_gallery/admin/photos/_form_fields_actions.html.erb +15 -0
- data/app/views/refinery/photo_gallery/admin/photos/edit_multiple.html.erb +9 -0
- data/app/views/refinery/photo_gallery/admin/photos/upload.html.erb +87 -0
- data/app/views/refinery/photo_gallery/albums/show.html.erb +49 -0
- data/app/views/refinery/photo_gallery/collections/index.html.erb +13 -0
- data/app/views/refinery/photo_gallery/collections/show.html.erb +33 -0
- data/app/views/refinery/photo_gallery/shared/_layout.html.erb +22 -0
- data/app/views/refinery/photo_gallery/shared/_submenu.html.erb +5 -0
- data/config/initializers/carrierwave.rb +5 -0
- data/config/initializers/form_builder.rb +26 -0
- data/config/initializers/refinery/core.rb +10 -0
- data/config/initializers/s3.rb +11 -0
- data/config/initializers/session_store.rb +10 -0
- data/config/locales/en.yml +95 -0
- data/config/locales/sk.yml +94 -0
- data/config/routes.rb +37 -0
- data/db/migrate/20120804063842_create_albums.rb +18 -0
- data/db/migrate/20120805131321_create_collections.rb +14 -0
- data/db/migrate/20120805131547_create_collection_albums.rb +12 -0
- data/db/migrate/20120805165238_create_photos.rb +19 -0
- data/db/migrate/20120805222125_add_indexes.rb +24 -0
- data/db/seeds.rb +21 -0
- data/lib/generators/refinery/photo_gallery_generator.rb +25 -0
- data/lib/generators/refinery/templates/config/initializers/refinery/photo_gallery.rb.erb +40 -0
- data/lib/refinery/photo_gallery/configuration.rb +33 -0
- data/lib/refinery/photo_gallery/engine.rb +33 -0
- data/lib/refinery/photo_gallery/version.rb +17 -0
- data/lib/refinery/photo_gallery.rb +30 -0
- data/lib/refinerycms-photo-gallery.rb +1 -0
- data/refinerycms-6hoursdaily-photo-gallery.gemspec +38 -0
- data/screenshots/01_collections#index.png +0 -0
- data/screenshots/02_albums#create.png +0 -0
- data/screenshots/03_photos#upload.png +0 -0
- data/screenshots/04_photos#upload- chooser.png +0 -0
- data/screenshots/05_photo#upoad-queue.png +0 -0
- data/screenshots/06_photos#upload-uploading.png +0 -0
- data/screenshots/07_photos#upload-uploading_2.png +0 -0
- data/screenshots/08_photos#edit_multiple.png +0 -0
- data/screenshots/09_albums#index.png +0 -0
- data/screenshots/10_albums_EXIF_reading.png +0 -0
- data/screenshots/11_frontend_show.png +0 -0
- data/screenshots/12_show_photo_using_fancybox.png +0 -0
- metadata +353 -0
@@ -0,0 +1,95 @@
|
|
1
|
+
en:
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
refinerycms_photo_gallery:
|
5
|
+
title: Photo Gallery
|
6
|
+
description: Provides advanced photo gallery
|
7
|
+
photo_gallery:
|
8
|
+
albums:
|
9
|
+
show:
|
10
|
+
image: Image
|
11
|
+
no_photos: There are no photos in this album yet
|
12
|
+
collections:
|
13
|
+
show:
|
14
|
+
no_albums: There are no albums in this collection yet
|
15
|
+
index:
|
16
|
+
no_collections: We're as excited as you are, come back soon!
|
17
|
+
admin:
|
18
|
+
submenu:
|
19
|
+
collections:
|
20
|
+
title: Collections
|
21
|
+
manage: Manage
|
22
|
+
new: Create new collection
|
23
|
+
albums:
|
24
|
+
title: Albums
|
25
|
+
manage: Manage
|
26
|
+
new: Create new album
|
27
|
+
collections:
|
28
|
+
collection:
|
29
|
+
view_live_html: 'View this collection live <br/><em>(opens in a new window)</em>'
|
30
|
+
delete: Remove this collection forever
|
31
|
+
edit: Edit this collection
|
32
|
+
index:
|
33
|
+
no_items_yet: 'There are no collections yet. Click "%{create}" to add your first collection.'
|
34
|
+
new:
|
35
|
+
title: Create new collection
|
36
|
+
edit:
|
37
|
+
title: Edit collection
|
38
|
+
albums:
|
39
|
+
album:
|
40
|
+
view_live_html: 'View this album live <br/><em>(opens in a new window)</em>'
|
41
|
+
delete: Remove this album forever
|
42
|
+
edit: Edit this album
|
43
|
+
upload_photos: Upload new photos to album
|
44
|
+
edit_photos: Edit photos in album
|
45
|
+
index:
|
46
|
+
no_items_yet: 'There are no albums yet. Click "%{create}" to add your first album.'
|
47
|
+
new:
|
48
|
+
title: Create new album
|
49
|
+
edit:
|
50
|
+
title: Edit album
|
51
|
+
form:
|
52
|
+
album_belongs_to_collection: Album belongs to collection(s)
|
53
|
+
more_options: More options
|
54
|
+
more_options_tooltip: Enable edit more fields like adress, latitude, longitude, note
|
55
|
+
choose_collection: Choose collection(s)
|
56
|
+
path_prefix: Path prefix
|
57
|
+
number_of_photos: Contains %{number} photos
|
58
|
+
photos:
|
59
|
+
updated: Updated photos
|
60
|
+
title: Photos
|
61
|
+
manage: Manage
|
62
|
+
new: Upload new photos
|
63
|
+
edit_multiple:
|
64
|
+
no_photos_yet: There are no photos in album yet. Click "%{create} to add your first photos to album.'
|
65
|
+
photo:
|
66
|
+
delete: Remove this photo forever
|
67
|
+
deleted: Deleted photo "%{title}"
|
68
|
+
form_fields:
|
69
|
+
use_decimal_format: Use decimal format
|
70
|
+
|
71
|
+
|
72
|
+
activerecord:
|
73
|
+
models:
|
74
|
+
refinery/photo_gallery/collection: Collection
|
75
|
+
refinery/photo_gallery/collection: Album
|
76
|
+
attributes:
|
77
|
+
refinery/photo_gallery/collection:
|
78
|
+
title: Title
|
79
|
+
description: Description
|
80
|
+
refinery/photo_gallery/album:
|
81
|
+
title: Title
|
82
|
+
description: Description
|
83
|
+
longitude: Longitude
|
84
|
+
latitude: Latitude
|
85
|
+
path: Path
|
86
|
+
adress: Adress
|
87
|
+
note: Note
|
88
|
+
tags: Tags
|
89
|
+
refinery/photo_gallery/photo:
|
90
|
+
title: Title
|
91
|
+
description: Description
|
92
|
+
longitude: Longitude
|
93
|
+
latitude: Latitude
|
94
|
+
path: Path
|
95
|
+
file: File
|
@@ -0,0 +1,94 @@
|
|
1
|
+
sk:
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
refinerycms_photo_gallery:
|
5
|
+
title: Fotogaléria
|
6
|
+
description: Poskytuje fotogalériu
|
7
|
+
photo_gallery:
|
8
|
+
albums:
|
9
|
+
show:
|
10
|
+
image: Obrázok
|
11
|
+
no_photos: V albume sa zatiaľ nenachádzajú žiadne fotografie
|
12
|
+
collections:
|
13
|
+
show:
|
14
|
+
no_albums: V tejto skupine albumov sa zatiať nenachádza žiadny album
|
15
|
+
index:
|
16
|
+
no_collections: Zatiaľ neboli vytvorené žiadne skupiny albumov
|
17
|
+
admin:
|
18
|
+
submenu:
|
19
|
+
collections:
|
20
|
+
title: Skupiny albumov
|
21
|
+
manage: Spravovať
|
22
|
+
new: Vytvoriť novú skupinu albumov
|
23
|
+
albums:
|
24
|
+
title: Abumy
|
25
|
+
manage: Spravovať
|
26
|
+
new: Vytvoriť nový albun
|
27
|
+
collections:
|
28
|
+
collection:
|
29
|
+
view_live_html: 'Pozrieť náhľad skupiny albumov<br/><em>(otvorí sa v novom okne)</em>'
|
30
|
+
delete: Zmazať skupinu albumov
|
31
|
+
edit: Upraviť skupinu albumov
|
32
|
+
index:
|
33
|
+
no_items_yet: 'Zatiaľ neboli vytvorené žiadne skupiny albumov. Klikni "%{create}" pre vytvorenie prvej.'
|
34
|
+
new:
|
35
|
+
title: Vytvoriť novú skupinu albumov
|
36
|
+
edit:
|
37
|
+
title: Upraviť skupinu albumov
|
38
|
+
albums:
|
39
|
+
album:
|
40
|
+
view_live_html: 'Zobraziť náhľad albumu <br/><em>(otvorí sa v novom okne)</em>'
|
41
|
+
delete: Zmazať album
|
42
|
+
edit: Upraviť album
|
43
|
+
upload_photos: Nahrať fotografie do albumu
|
44
|
+
edit_photos: Upraviť fotografie v albume
|
45
|
+
index:
|
46
|
+
no_items_yet: 'Zatiaľ neboli vytvorené žiadne albumy. Klikni "%{create}" pre vytvorenie prvého.'
|
47
|
+
new:
|
48
|
+
title: Vytvoriť nový album
|
49
|
+
edit:
|
50
|
+
title: Upraviť album
|
51
|
+
form:
|
52
|
+
album_belongs_to_collection: Album patrí do skupiny albumov
|
53
|
+
more_options: Rozšírené nastavenia
|
54
|
+
more_options_tooltip: Umožní upraviť ďalšie polia ako adresa, zemepisná dĺžka/šírka, poznámka
|
55
|
+
choose_collection: Vyber skupiny albumov
|
56
|
+
path_prefix: Prefix priečinka
|
57
|
+
number_of_photos: 'Obsahuje fotografií: %{number}'
|
58
|
+
photos:
|
59
|
+
updated: Fotografie upravené
|
60
|
+
title: Fotografie
|
61
|
+
manage: Spravovať
|
62
|
+
new: Nahrať nové fotografie
|
63
|
+
edit_multiple:
|
64
|
+
no_photos_yet: Zatiaľ neboli nahrané žiadne fotografie. Klikni "%{create}" pre pridanie prvých.
|
65
|
+
photo:
|
66
|
+
delete: Zmazať fotografiu
|
67
|
+
deleted: Fotografia "%{title}" zmazaná
|
68
|
+
form_fields:
|
69
|
+
use_decimal_format: Použi decimálny zápis
|
70
|
+
|
71
|
+
activerecord:
|
72
|
+
models:
|
73
|
+
refinery/photo_gallery/collection: Skupina albumov
|
74
|
+
refinery/photo_gallery/collection: Album
|
75
|
+
attributes:
|
76
|
+
refinery/photo_gallery/collection:
|
77
|
+
title: Názov
|
78
|
+
description: Popis
|
79
|
+
refinery/photo_gallery/album:
|
80
|
+
title: Názov
|
81
|
+
description: Popis
|
82
|
+
longitude: Zemepisná dĺžka
|
83
|
+
latitude: Zemepisná šírka
|
84
|
+
path: Názov priečinku
|
85
|
+
adress: Adresa
|
86
|
+
note: Poznámka
|
87
|
+
tags: Tagy
|
88
|
+
refinery/photo_gallery/photo:
|
89
|
+
title: Názov
|
90
|
+
description: Popis
|
91
|
+
longitude: Zemepisná dĺžka
|
92
|
+
latitude: Zemepisná šírka
|
93
|
+
path: Názov priečinku
|
94
|
+
file: Súbor
|
data/config/routes.rb
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
Refinery::Core::Engine.routes.draw do
|
2
|
+
namespace "photo_gallery", :path => 'photo-gallery' do
|
3
|
+
root :to => "collections#index"
|
4
|
+
|
5
|
+
resources :collections, :only => [:index,:show] do
|
6
|
+
resources :albums, :only => [:show] do
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
namespace "photo_gallery", :path => '' do
|
13
|
+
namespace :admin, :path => 'refinery' do
|
14
|
+
scope :path => 'photo-gallery' do
|
15
|
+
root :to => "albums#index"
|
16
|
+
|
17
|
+
resources :photos do
|
18
|
+
collection do
|
19
|
+
put :update_multiple
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
resources :albums do
|
24
|
+
resources :photos do
|
25
|
+
collection do
|
26
|
+
get :upload
|
27
|
+
get :edit_multiple
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
resources :collections
|
33
|
+
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class CreateAlbums < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table "refinery_photo_gallery_albums" do |t|
|
4
|
+
t.string :title, :length => 250, :null => false
|
5
|
+
t.text :description
|
6
|
+
t.string :path, :length => 100, :null=> true
|
7
|
+
t.string :address, :length => 200, :null=> true
|
8
|
+
t.decimal :longitude, :precision => 15, :scale => 10
|
9
|
+
t.decimal :latitude, :precision => 15, :scale => 10
|
10
|
+
t.text :note
|
11
|
+
t.timestamps
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.down
|
16
|
+
drop_table "refinery_photo_gallery_albums"
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateCollections < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table Refinery::PhotoGallery::Collection.table_name do |t|
|
4
|
+
t.string :title, :null => false
|
5
|
+
t.text :description
|
6
|
+
|
7
|
+
t.timestamps
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.down
|
12
|
+
drop_table Refinery::PhotoGallery::Collection.table_name
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class CreateCollectionAlbums < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table Refinery::PhotoGallery::CollectionAlbum.table_name do |t| #TODO primary id to false
|
4
|
+
t.references :collection
|
5
|
+
t.references :album
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.down
|
10
|
+
drop_table Refinery::PhotoGallery::CollectionAlbum.table_name
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class CreatePhotos < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table "refinery_photo_gallery_photos" do |t|
|
4
|
+
t.string :title, :length => 250, :null => false
|
5
|
+
t.text :description
|
6
|
+
t.string :path, :length => 100, :null=> true
|
7
|
+
t.decimal :longitude, :precision => 15, :scale => 10
|
8
|
+
t.decimal :latitude, :precision => 15, :scale => 10
|
9
|
+
t.string :file
|
10
|
+
|
11
|
+
t.references :album
|
12
|
+
t.timestamps
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.down
|
17
|
+
drop_table "refinery_photo_gallery_photos"
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
class AddIndexes < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_index Refinery::PhotoGallery::Album.table_name, :id, :unique => true
|
4
|
+
add_index Refinery::PhotoGallery::Collection.table_name, :id, :unique => true
|
5
|
+
add_index Refinery::PhotoGallery::Photo.table_name, :id, :unique => true
|
6
|
+
|
7
|
+
|
8
|
+
add_index Refinery::PhotoGallery::CollectionAlbum.table_name, :collection_id
|
9
|
+
add_index Refinery::PhotoGallery::CollectionAlbum.table_name, :album_id
|
10
|
+
add_index Refinery::PhotoGallery::Photo.table_name, :album_id
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.down
|
14
|
+
remove_index Refinery::PhotoGallery::Album.table_name, :id
|
15
|
+
remove_index Refinery::PhotoGallery::Collection.table_name, :id
|
16
|
+
remove_index Refinery::PhotoGallery::Photo.table_name, :id
|
17
|
+
|
18
|
+
|
19
|
+
remove_index Refinery::PhotoGallery::CollectionAlbum.table_name, :collection_id
|
20
|
+
remove_index Refinery::PhotoGallery::CollectionAlbum.table_name, :album_id
|
21
|
+
remove_index Refinery::PhotoGallery::Photo.table_name, :album_id
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
data/db/seeds.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
if defined?(::Refinery::User)
|
2
|
+
::Refinery::User.all.each do |user|
|
3
|
+
if user.plugins.where(:name => 'refinerycms_photo_gallery').blank?
|
4
|
+
user.plugins.create(:name => 'refinerycms_photo_gallery',
|
5
|
+
:position => (user.plugins.maximum(:position) || -1) +1)
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
if defined?(Refinery::Page) and !Refinery::Page.exists?(:link_url => '/photo-gallery')
|
11
|
+
page = Refinery::Page.create(
|
12
|
+
:title => "Photo galleries",
|
13
|
+
:link_url => "/photo-gallery",
|
14
|
+
:deletable => false,
|
15
|
+
:menu_match => "^/photo-gallery?(\/|\/.+?|)$"
|
16
|
+
)
|
17
|
+
|
18
|
+
Refinery::Pages.default_parts.each do |default_page_part|
|
19
|
+
page.parts.create(:title => default_page_part, :body => nil)
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Refinery
|
2
|
+
class PhotoGalleryGenerator < Rails::Generators::Base
|
3
|
+
source_root File.expand_path('../templates', __FILE__)
|
4
|
+
|
5
|
+
def generate_inquiries_initializer
|
6
|
+
template 'config/initializers/refinery/photo_gallery.rb.erb', File.join(destination_root, 'config', 'initializers', 'refinery', 'photo_gallery.rb')
|
7
|
+
end
|
8
|
+
|
9
|
+
def rake_db
|
10
|
+
rake("refinery_photo_gallery:install:migrations")
|
11
|
+
end
|
12
|
+
|
13
|
+
def append_load_seed_data
|
14
|
+
create_file 'db/seeds.rb' unless File.exists?(File.join(destination_root, 'db', 'seeds.rb'))
|
15
|
+
append_file 'db/seeds.rb', :verbose => true do
|
16
|
+
<<-EOH
|
17
|
+
|
18
|
+
# Added by Refinery CMS PhotoGallery engine
|
19
|
+
Refinery::PhotoGallery::Engine.load_seed
|
20
|
+
EOH
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
Refinery::PhotoGallery.configure do |config|
|
2
|
+
# At least one or more comma-separated values from list: html5,flash,browserplus,silverlight,gears
|
3
|
+
# config.runtimes = <%= Refinery::PhotoGallery.runtimes.inspect %>
|
4
|
+
|
5
|
+
# Max file size of uploaded image
|
6
|
+
# config.max_file_size = <%= Refinery::PhotoGallery.max_file_size.inspect %>
|
7
|
+
|
8
|
+
# Turn on/off client side resizing. If true, photo will be resized 2 times - on client side to accelerate transmision time, and also on server side to generate thumbs.
|
9
|
+
# If you want to achieve better quality, choose false.
|
10
|
+
# config.client_side_resize = <%= Refinery::PhotoGallery.client_side_resize.inspect %>
|
11
|
+
|
12
|
+
# Params for client side resizing. E.g: {:width => 800, :height=> 600, :quality=> 100}
|
13
|
+
# config.client_side_resize_params = <%= Refinery::PhotoGallery.client_side_resize_params.inspect %>
|
14
|
+
|
15
|
+
# Locale name for Plupload. Put your locale file in /app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/ and write here filename WITHOUT file extension. E.g: cs
|
16
|
+
# To leave english, put ''
|
17
|
+
# config.locale = <%= Refinery::PhotoGallery.plupload_locale.inspect %>
|
18
|
+
|
19
|
+
# Case insensitive extension white list for carrierwave
|
20
|
+
# config.extension_white_list = <%= Refinery::PhotoGallery.extension_white_list.inspect %>
|
21
|
+
|
22
|
+
# Directory where uploaded photos will be stored. Absolute adress to Rails root
|
23
|
+
# config.photo_gallery_dir = <%= Refinery::PhotoGallery.photo_gallery_dir.inspect %>
|
24
|
+
|
25
|
+
# After file uploading, there are created 4 versions of this image. If you are not going to recreate this thumbs, delete original uploaded file to save space on disk.
|
26
|
+
# config.delete_uploaded_file = <%= Refinery::PhotoGallery.delete_uploaded_file.inspect %>
|
27
|
+
|
28
|
+
# Thumbs dimensions in pixels. E.g: [950,950] for width:950, height: 950
|
29
|
+
# config.collection_dimensions = <%= Refinery::PhotoGallery.collection_dimensions.inspect %>
|
30
|
+
# config.album_dimensions = <%= Refinery::PhotoGallery.album_dimensions.inspect %>
|
31
|
+
# config.preview_dimensions = <%= Refinery::PhotoGallery.preview_dimensions.inspect %>
|
32
|
+
# config.single_dimensions = <%= Refinery::PhotoGallery.single_dimensions.inspect %>
|
33
|
+
|
34
|
+
# config.collections_per_page = <%= Refinery::PhotoGallery.collections_per_page.inspect %>
|
35
|
+
# config.albums_per_page = <%= Refinery::PhotoGallery.albums_per_page.inspect %>
|
36
|
+
# config.photos_per_page = <%= Refinery::PhotoGallery.photos_per_page.inspect %>
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Refinery
|
2
|
+
module PhotoGallery
|
3
|
+
include ActiveSupport::Configurable
|
4
|
+
|
5
|
+
config_accessor :runtimes, :max_file_size,:client_side_resize, :client_side_resize_params, :plupload_locale, :extension_white_list,:photo_gallery_dir,
|
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
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
self.runtimes = 'html5,flash,browserplus,silverlight,gears'
|
12
|
+
self.max_file_size = '10mb'
|
13
|
+
#TODO or per album?
|
14
|
+
#TODO by default false!
|
15
|
+
self.client_side_resize = true
|
16
|
+
self.client_side_resize_params = {:width => 800, :height=> 600, :quality=> 100}
|
17
|
+
#TODO leave blank before publishing this gem!
|
18
|
+
self.plupload_locale = ''
|
19
|
+
self.extension_white_list = %w(jpg jpeg gif png bmp tiff)
|
20
|
+
self.photo_gallery_dir = "/system/refinery/photo_gallery"
|
21
|
+
self.photo_gallery_dir_relative_to_root = '/public' + self.photo_gallery_dir
|
22
|
+
#TODO or per album?
|
23
|
+
self.delete_uploaded_file = true
|
24
|
+
self.collection_dimensions = [200, 200]
|
25
|
+
self.album_dimensions = [150, 150]
|
26
|
+
self.preview_dimensions = [210, 210]
|
27
|
+
self.single_dimensions = [950, 950]
|
28
|
+
|
29
|
+
self.albums_per_page = 10
|
30
|
+
self.collections_per_page = 10
|
31
|
+
self.photos_per_page = 10
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Refinery
|
2
|
+
module PhotoGallery
|
3
|
+
class Engine < Rails::Engine
|
4
|
+
include Refinery::Engine
|
5
|
+
|
6
|
+
isolate_namespace Refinery::PhotoGallery
|
7
|
+
|
8
|
+
initializer "init plugin" do
|
9
|
+
Refinery::Plugin.register do |plugin|
|
10
|
+
plugin.pathname = root
|
11
|
+
plugin.name = "refinerycms_photo_gallery"
|
12
|
+
plugin.url = proc { Refinery::Core::Engine.routes.url_helpers.photo_gallery_admin_albums_path }
|
13
|
+
plugin.menu_match = %r{refinery/photo_gallery(/.+?)?$}
|
14
|
+
plugin.activity = { :class_name => 'Refinery::PhotoGallery::Album' }
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
config.before_initialize do
|
19
|
+
require 'carrierwave'
|
20
|
+
require 'carrierwave/orm/activerecord'
|
21
|
+
#require 'carrierwave/processing/mini_magick'
|
22
|
+
#require 'mime/types'
|
23
|
+
require 'mini_exiftool'
|
24
|
+
end
|
25
|
+
|
26
|
+
config.after_initialize do
|
27
|
+
Refinery.register_engine(Refinery::PhotoGallery)
|
28
|
+
end
|
29
|
+
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'refinerycms-core'
|
2
|
+
require 'refinerycms-settings'
|
3
|
+
|
4
|
+
|
5
|
+
module Refinery
|
6
|
+
autoload :PhotoGalleryGenerator, 'generators/refinery/photo_gallery_generator'
|
7
|
+
|
8
|
+
module PhotoGallery
|
9
|
+
require 'refinery/photo_gallery/engine'
|
10
|
+
require 'refinery/photo_gallery/configuration'
|
11
|
+
|
12
|
+
autoload :Version, 'refinery/photo_gallery/version'
|
13
|
+
|
14
|
+
class << self
|
15
|
+
attr_writer :root
|
16
|
+
|
17
|
+
def root
|
18
|
+
@root ||= Pathname.new(File.expand_path('../../../', __FILE__))
|
19
|
+
end
|
20
|
+
|
21
|
+
def version
|
22
|
+
::Refinery::PhotoGallery::Version.to_s
|
23
|
+
end
|
24
|
+
|
25
|
+
def factory_paths
|
26
|
+
@factory_paths ||= [ root.join("spec/factories").to_s ]
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'refinery/photo_gallery'
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# Encoding: UTF-8
|
2
|
+
$:.push File.expand_path('../lib', __FILE__)
|
3
|
+
require 'refinery/photo_gallery/version'
|
4
|
+
|
5
|
+
# version = Refinery::PhotoGallery::Version.to_s
|
6
|
+
# version = '0.1'
|
7
|
+
|
8
|
+
Gem::Specification.new do |s|
|
9
|
+
s.name = %q{refinerycms-6hoursdaily-photo-gallery}
|
10
|
+
s.version = Refinery::PhotoGallery::Version.to_s
|
11
|
+
s.platform = Gem::Platform::RUBY
|
12
|
+
# s.version = version
|
13
|
+
s.description = %q{Forked and modified photo gallery engine from Martin Markech designed for integration with Refinery CMS.}
|
14
|
+
s.summary = %q{Ruby on Rails photo gallery engine for Refinery CMS.}
|
15
|
+
s.email = %q{jerrypascua@gmail.com}
|
16
|
+
s.homepage = %q{http://github.com/6hoursdaily/refinerycms-photo-gallery}
|
17
|
+
s.authors = ['6hoursdaily']
|
18
|
+
s.require_paths = %w(lib)
|
19
|
+
|
20
|
+
s.rubyforge_project = "refinerycms-6hoursdaily-photo-gallery"
|
21
|
+
|
22
|
+
s.files = `git ls-files`.split("\n")
|
23
|
+
s.test_files = `git ls-files -- spec/*`.split("\n")
|
24
|
+
s.require_paths = ["lib"]
|
25
|
+
|
26
|
+
# Runtime dependencies
|
27
|
+
s.add_dependency 'refinerycms-core', '~> 2.0.3'
|
28
|
+
s.add_dependency 'refinerycms-settings', '~> 2.0.1'
|
29
|
+
s.add_dependency 'refinerycms', '~> 2.0.3'
|
30
|
+
s.add_dependency 'mime-types'
|
31
|
+
s.add_dependency 'carrierwave', '0.6.2'
|
32
|
+
s.add_dependency 'mini_magick'
|
33
|
+
s.add_dependency 'mini_exiftool'
|
34
|
+
s.add_dependency 'fog', '1.3.1'
|
35
|
+
|
36
|
+
# Development dependencies
|
37
|
+
s.add_development_dependency 'refinerycms-testing', '~> 2.0.0'
|
38
|
+
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|