refinerycms-photo-gallery 0.0.1.dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +26 -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/fa.js +37 -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 +21 -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 +58 -0
- data/app/middleware/refinery/photo_gallery/admin/flash_session_cookie_middleware.rb +27 -0
- data/app/models/refinery/photo_gallery/album.rb +60 -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 +54 -0
- data/app/uploaders/refinery/photo_gallery/admin/file_uploader.rb +121 -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 +26 -0
- data/app/views/refinery/photo_gallery/collections/index.html.erb +9 -0
- data/app/views/refinery/photo_gallery/collections/show.html.erb +19 -0
- data/app/views/refinery/photo_gallery/shared/_layout.html.erb +22 -0
- data/app/views/refinery/photo_gallery/shared/_submenu.html.erb +4 -0
- data/config/initializers/carrierwave.rb +7 -0
- data/config/initializers/form_builder.rb +26 -0
- data/config/initializers/refinery/core.rb +10 -0
- data/config/initializers/s3.rb +13 -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.rb +30 -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/refinerycms-photo-gallery.rb +1 -0
- data/refinerycms-balder-photo-gallery.gemspec +30 -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 +323 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
|
|
2
|
+
CarrierWave.configure do |config|
|
|
3
|
+
config.root = Rails.root.to_s + Refinery::PhotoGallery.photo_gallery_dir_relative_to_root
|
|
4
|
+
#Prefix in Uploader#url See https://github.com/jnicklas/carrierwave/pull/445
|
|
5
|
+
config.base_path = Refinery::PhotoGallery.photo_gallery_dir
|
|
6
|
+
end
|
|
7
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Self-marking required fields http://davidsulc.com/blog/2011/05/01/self-marking-required-fields-in-rails-3/
|
|
2
|
+
# It works, but I'm leaving it commented. It affects all forms in refinery app, not only in this gem
|
|
3
|
+
=begin
|
|
4
|
+
|
|
5
|
+
class ActionView::Helpers::FormBuilder
|
|
6
|
+
alias :orig_label :label
|
|
7
|
+
|
|
8
|
+
# add a '*' after the field label if the field is required
|
|
9
|
+
def label(method, content_or_options = nil, options = nil, &block)
|
|
10
|
+
if content_or_options && content_or_options.class == Hash
|
|
11
|
+
options = content_or_options
|
|
12
|
+
else
|
|
13
|
+
content = content_or_options
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
required_mark = ''
|
|
17
|
+
required_mark = ' *'.html_safe if object.class.validators_on(method).map(&:class).include? ActiveModel::Validations::PresenceValidator
|
|
18
|
+
|
|
19
|
+
content ||= I18n.t("activerecord.attributes.#{object.class.name.underscore}.#{method}", :default=>method.to_s.humanize)
|
|
20
|
+
content = content + required_mark
|
|
21
|
+
|
|
22
|
+
self.orig_label(method, content, options || {}, &block)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
=end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Refinery::Core.configure do |config|
|
|
2
|
+
# Register extra javascript for backend
|
|
3
|
+
config.register_javascript "refinery/photo_gallery/admin/photo_gallery.js"
|
|
4
|
+
config.register_javascript "refinery/photo_gallery/admin/jquery.chosen.min.js"
|
|
5
|
+
|
|
6
|
+
#Register extra stylesheet for backend (optional options)
|
|
7
|
+
config.register_stylesheet "refinery/photo_gallery/admin/photo_gallery.css"
|
|
8
|
+
config.register_stylesheet "refinery/photo_gallery/admin/chosen.css"
|
|
9
|
+
|
|
10
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#TODO not tested
|
|
3
|
+
Refinery::PhotoGallery::CarrierWave.configure do |config|
|
|
4
|
+
config.fog_credentials = {
|
|
5
|
+
:provider => 'AWS',
|
|
6
|
+
:aws_access_key_id => ENV['S3_KEY'],
|
|
7
|
+
:aws_secret_access_key => ENV['S3_SECRET']
|
|
8
|
+
# :region => ENV['S3_REGION'] # Change this for different AWS region. Default is 'us-east-1'
|
|
9
|
+
}
|
|
10
|
+
config.fog_directory = ENV['S3_BUCKET']
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
=end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#Rails.application.config.session_store :cookie_store, :key => '_balder_session'
|
|
2
|
+
|
|
3
|
+
=begin
|
|
4
|
+
#TODO fix flash runtime
|
|
5
|
+
Rails.application.config.middleware.insert_before(
|
|
6
|
+
Rails.application.config.session_store,
|
|
7
|
+
Refinery::PhotoGallery::Admin::FlashSessionCookieMiddleware,
|
|
8
|
+
Rails.application.config.session_options[:key]
|
|
9
|
+
)
|
|
10
|
+
=end
|
|
@@ -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: There are no collections yet
|
|
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
|