refinerycms-photo-gallery 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog.md +7 -1
- data/Gemfile +8 -3
- data/Gemfile.lock +244 -183
- data/README.md +12 -11
- data/app/assets/javascripts/refinery/photo_gallery/admin/photo_gallery.js.erb +1 -10
- data/app/controllers/refinery/photo_gallery/admin/photos_controller.rb +2 -2
- data/app/models/refinery/album_page.rb +1 -1
- data/app/models/refinery/photo_gallery/album.rb +6 -7
- data/app/views/refinery/admin/pages/tabs/_form.html.erb +1 -1
- data/app/views/refinery/admin/pages/tabs/_photo_gallery.html.erb +1 -1
- data/app/views/refinery/photo_gallery/admin/albums/_album.html.erb +1 -1
- data/config/locales/de.yml +109 -0
- data/config/locales/no.yml +109 -0
- data/config/locales/zh-CN.yml +109 -0
- data/db/migrate/20120804063842_create_albums.rb +3 -3
- data/db/migrate/20120805131321_create_collections.rb +1 -1
- data/db/migrate/20120805131547_create_collection_albums.rb +1 -1
- data/db/migrate/20120805165238_create_photos.rb +3 -3
- data/db/migrate/20120805222125_add_indexes.rb +1 -1
- data/db/migrate/20120805222126_create_album_pages.rb +1 -1
- data/db/migrate/20130127175559_add_url_to_photos.rb +1 -1
- data/db/migrate/20130128173800_add_css_styles_and_show_original_fields_to_photos.rb +1 -1
- data/lib/refinery/photo_gallery/extensions/pages_controller_extension.rb +1 -1
- data/lib/refinery/photo_gallery/extensions/pages_extension.rb +2 -2
- data/lib/refinery/photo_gallery/version.rb +1 -1
- data/refinerycms-photo-gallery.gemspec +5 -4
- data/spec/factories/album_photos.rb +2 -2
- data/spec/factories/albums.rb +3 -3
- data/spec/factories/collections.rb +3 -3
- data/spec/factories/photos.rb +2 -2
- data/spec/features/manage_albums_spec.rb +3 -3
- data/spec/features/manage_collections_spec.rb +3 -3
- data/spec/features/manage_photos_spec.rb +3 -3
- data/tasks/testing.rake +2 -1
- metadata +30 -15
- data/spec/factories/user.rb +0 -27
data/README.md
CHANGED
@@ -4,13 +4,15 @@ __Photo gallery engine for Refinery CMS.__
|
|
4
4
|
|
5
5
|
## Requirements
|
6
6
|
|
7
|
-
Currently unreleased version 0.
|
7
|
+
Currently unreleased version 0.3.x in master branch supports Rails 5.1.x and Refinery CMS ~> 4.0.3
|
8
8
|
|
9
|
-
Previous
|
9
|
+
Previous branches supports:
|
10
|
+
* 0-2-stable: Rails 4.2.x and Refinery CMS ~> 3.0.0
|
11
|
+
* 0-1-stable: Rails 3.2.x and Refinery CMS ~> 2.0.3
|
10
12
|
|
11
13
|
## Features
|
12
14
|
|
13
|
-
* Multiple photo uploading with [Plupload](http://www.plupload.com/) 1.
|
15
|
+
* Multiple photo uploading with [Plupload](http://www.plupload.com/) 2.1.9
|
14
16
|
* Only HTML5 runtime is supported
|
15
17
|
* Client side photo resizing to do faster uploading on slow connections
|
16
18
|
* Server side resizing with Carrierwave
|
@@ -47,7 +49,7 @@ All screenshots are in branch screenshots
|
|
47
49
|
|
48
50
|
## Language
|
49
51
|
|
50
|
-
Gem is fully translated to
|
52
|
+
Gem is fully translated to de, en, no, pl, sk, zh-CN languages. Plupload is translated to 24 languages. You can add your own to
|
51
53
|
photo_gallery/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n and enable it in config.plupload_locale
|
52
54
|
|
53
55
|
## Browser support
|
@@ -55,7 +57,7 @@ Client side image resizing with Plupload is possible on Firefox 3.5+ (with fixed
|
|
55
57
|
Safari doesn't support direct data access to the selected files. Opera 12.00 + supports drag&drop and also client side image resizing.
|
56
58
|
|
57
59
|
|
58
|
-
## Installation for ~> 0.
|
60
|
+
## Installation for ~> 0.3.0
|
59
61
|
|
60
62
|
Make sure, you [have installed ImageMagick](http://www.imagemagick.org/script/install-source.php#unix) and ImageMagick dev.
|
61
63
|
On Ubuntu 12.04 you can install dev suite with commands:
|
@@ -69,14 +71,14 @@ Instructions for installation you can find under [www.sno.phy.queensu.ca/~phil/e
|
|
69
71
|
|
70
72
|
|
71
73
|
Open up your ``Gemfile`` and add at the bottom this line:
|
72
|
-
|
74
|
+
* for edge version:
|
73
75
|
```ruby
|
74
|
-
gem 'refinerycms-photo-gallery', '~> 0.
|
76
|
+
gem 'refinerycms-photo-gallery', '~> 0.3.0', :github=>"Matho/refinerycms-photo-gallery", :branch=>"master"
|
75
77
|
```
|
76
78
|
|
77
|
-
|
79
|
+
* for latest stable version
|
78
80
|
```ruby
|
79
|
-
gem 'refinerycms-photo-gallery', '~> 0.
|
81
|
+
gem 'refinerycms-photo-gallery', '~> 0.2.0'
|
80
82
|
```
|
81
83
|
|
82
84
|
Now, run
|
@@ -257,9 +259,8 @@ Remove gem from Gemfile
|
|
257
259
|
* cd to this engine path
|
258
260
|
* bundle install
|
259
261
|
* rake refinery:testing:dummy_app
|
262
|
+
* Add at the end of file `Rails.application.config.assets.precompile += %w( refinery/photo_gallery/admin/jquery.chosen.min.js refinery/photo_gallery/admin/photo_gallery.js refinery/photo_gallery/admin/photo_gallery.css refinery/photo_gallery/admin/chosen.css refinery/photo_gallery/admin/icons/loading.gif refinery/wymeditor.js )` to `spec/dummy/config/initializers/assets.rb`
|
260
263
|
* rake spec
|
261
|
-
* Probably you will need to set some asset manifest to dummy's app manifest - see console output for errors
|
262
|
-
|
263
264
|
|
264
265
|
## Todo list
|
265
266
|
|
@@ -16,15 +16,6 @@ $(function() {
|
|
16
16
|
return false;
|
17
17
|
});
|
18
18
|
|
19
|
-
$('#more_photo_options_field #toggle_advanced_options').click(function(e){
|
20
|
-
e.preventDefault();
|
21
|
-
$('#more_options').animate({opacity: 'toggle', height: 'toggle'}, 250);
|
22
|
-
|
23
|
-
$('html,body').animate({
|
24
|
-
scrollTop: $('#toggle_advanced_options').parent().offset().top
|
25
|
-
}, 250);
|
26
|
-
});
|
27
|
-
|
28
19
|
$(".chzn-select").chosen(
|
29
20
|
{
|
30
21
|
no_results_text: "<%= I18n.t('chosen.no_results') %>"
|
@@ -50,4 +41,4 @@ $(function() {
|
|
50
41
|
return false;
|
51
42
|
});
|
52
43
|
|
53
|
-
});
|
44
|
+
});
|
@@ -34,7 +34,7 @@ module Refinery
|
|
34
34
|
|
35
35
|
|
36
36
|
def update_multiple
|
37
|
-
photo_ids = update_multiple_photo_params["photo"].
|
37
|
+
photo_ids = update_multiple_photo_params["photo"].keys
|
38
38
|
|
39
39
|
@photos = Photo.find(photo_ids)
|
40
40
|
@photos.each do |photo|
|
@@ -77,4 +77,4 @@ module Refinery
|
|
77
77
|
end
|
78
78
|
end
|
79
79
|
end
|
80
|
-
end
|
80
|
+
end
|
@@ -19,13 +19,12 @@ module Refinery
|
|
19
19
|
select("refinery_photo_gallery_albums.*, refinery_photo_gallery_collection_albums.collection_id ").joins(:collection_albums)
|
20
20
|
end
|
21
21
|
|
22
|
-
scope :find_by_collection_id,
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
}
|
22
|
+
# scope :find_by_collection_id, ->(collection_id) {
|
23
|
+
# select("refinery_photo_gallery_albums.*").
|
24
|
+
# joins(:collection_albums).
|
25
|
+
# where("refinery_photo_gallery_collection_albums.collection_id = ?", collection_id).
|
26
|
+
# order('created_at DESC, title ASC')
|
27
|
+
# }
|
29
28
|
|
30
29
|
def collection_ids
|
31
30
|
Refinery::PhotoGallery::CollectionAlbum.select('collection_id').where("album_id = ?", self.id ).map{|ca| ca.collection_id }
|
@@ -20,7 +20,7 @@
|
|
20
20
|
<%= link_to (image_tag 'refinery/photo_gallery/admin/icons/album_edit.png'),
|
21
21
|
refinery.edit_photo_gallery_admin_album_path(album),
|
22
22
|
:title => t('.edit') %>
|
23
|
-
<%= link_to
|
23
|
+
<%= link_to image_tag('refinery/icons/delete.png'), refinery.photo_gallery_admin_album_path(album),
|
24
24
|
:class => "cancel confirm-delete",
|
25
25
|
:title => t('.delete'),
|
26
26
|
:method => :delete,
|
@@ -0,0 +1,109 @@
|
|
1
|
+
de:
|
2
|
+
chosen:
|
3
|
+
no_results: Keine Ergebnisse
|
4
|
+
refinery:
|
5
|
+
admin:
|
6
|
+
pages:
|
7
|
+
tabs:
|
8
|
+
form:
|
9
|
+
join_page_with_album: "Seite mit Album verbinden:"
|
10
|
+
choose_album: "Fotoalbum wählen"
|
11
|
+
flash:
|
12
|
+
connection_destroyed: "Foto aus Album entfernt."
|
13
|
+
plugins:
|
14
|
+
refinerycms_photo_gallery:
|
15
|
+
title: Fotogalerie
|
16
|
+
description: Fotogalerie-Plugin mit Uploads, Tagging usw.
|
17
|
+
tab_name: Fotogalerie
|
18
|
+
photo_gallery:
|
19
|
+
admin:
|
20
|
+
submenu:
|
21
|
+
collections:
|
22
|
+
title: Sammlungen
|
23
|
+
manage: Sammlungen verwalten
|
24
|
+
new: Neue Sammlung anlegen
|
25
|
+
albums:
|
26
|
+
title: Alben
|
27
|
+
manage: Alben verwalten
|
28
|
+
new: Neues Album anlegen
|
29
|
+
collections:
|
30
|
+
collection:
|
31
|
+
view_live_html: Sammlung zeigen <br/><em>(in neuem Fenster)</em>
|
32
|
+
delete: Sammlung permanent löschen
|
33
|
+
edit: Sammlung bearbeiten
|
34
|
+
index:
|
35
|
+
no_items_yet: Es gibt noch keine Sammlungen. "%{create}" klicken, um eine anzulegen.
|
36
|
+
new:
|
37
|
+
title: Neue Sammlung erstellen
|
38
|
+
edit:
|
39
|
+
title: Sammlung verwalten
|
40
|
+
albums:
|
41
|
+
album:
|
42
|
+
view_live_html: Album anzeigen <br/><em>(in neuem Fenster)</em>
|
43
|
+
delete: Album permanent löschen
|
44
|
+
edit: Album verwalten
|
45
|
+
upload_photos: Neue Fotos für Album hochladen
|
46
|
+
edit_photos: Fotos im Album verwalten
|
47
|
+
index:
|
48
|
+
no_items_yet: Es gibt noch keine Alben. "%{create}" klicken, um eins anzulegen.
|
49
|
+
new:
|
50
|
+
title: Neues Album anlegen
|
51
|
+
edit:
|
52
|
+
title: Album verwalten
|
53
|
+
form:
|
54
|
+
album_belongs_to_collection: Album gehört Sammlung(en)
|
55
|
+
more_options: Weitere Eigenschaften
|
56
|
+
more_options_tooltip: "Weitere Eigenschaften: Anschrift, Notiz, Breiten- und Längengrad"
|
57
|
+
choose_collection: Sammlung auswählen
|
58
|
+
path_prefix: Verzeichnisname
|
59
|
+
number_of_photos: "%{number} Fotos"
|
60
|
+
photos:
|
61
|
+
updated: Fotos aktualisiert
|
62
|
+
title: Fotos
|
63
|
+
manage: Verwalten
|
64
|
+
new: Neue Fotos hochladen
|
65
|
+
edit_multiple:
|
66
|
+
no_photos_yet: Dieses Album enthält noch keine Fotos. "%{create}" klicken, um welche zuzufügen.
|
67
|
+
photo:
|
68
|
+
delete: Foto permanent löschen
|
69
|
+
deleted: Foto "%{title}" gelöscht
|
70
|
+
form_fields:
|
71
|
+
use_decimal_format: Dezimal verwenden
|
72
|
+
photo_pages:
|
73
|
+
show:
|
74
|
+
other: Andere Fotoseiten
|
75
|
+
albums:
|
76
|
+
show:
|
77
|
+
no_photos: Keine Fotos im Album
|
78
|
+
photos:
|
79
|
+
image: Foto
|
80
|
+
collections:
|
81
|
+
show:
|
82
|
+
no_albums: Diese Sammlung enthält noch keine Alben
|
83
|
+
index:
|
84
|
+
no_collections: Es gibt noch keine Sammlungen
|
85
|
+
activerecord:
|
86
|
+
attributes:
|
87
|
+
refinery/photo_gallery/photo_page:
|
88
|
+
page_id: Seite
|
89
|
+
refinery/photo_gallery/collection:
|
90
|
+
title: Titel
|
91
|
+
description: Beschreibung
|
92
|
+
refinery/photo_gallery/album:
|
93
|
+
title: Titel
|
94
|
+
description: Beschreibung
|
95
|
+
longitude: Längengrad
|
96
|
+
latitude: Breitengrad
|
97
|
+
path: Verzeichnis
|
98
|
+
address: Anschrift
|
99
|
+
note: Notiz
|
100
|
+
tags: Tags
|
101
|
+
refinery/photo_gallery/photo:
|
102
|
+
title: Titel
|
103
|
+
description: Beschreibung
|
104
|
+
longitude: Längengrad
|
105
|
+
latitude: Breitengrad
|
106
|
+
path: Verzeichnis
|
107
|
+
file: Datei
|
108
|
+
models:
|
109
|
+
refinery/photo_gallery/collection: Album
|
@@ -0,0 +1,109 @@
|
|
1
|
+
"no":
|
2
|
+
chosen:
|
3
|
+
no_results: Ingen treff
|
4
|
+
refinery:
|
5
|
+
admin:
|
6
|
+
pages:
|
7
|
+
tabs:
|
8
|
+
form:
|
9
|
+
join_page_with_album: "Koble side med album:"
|
10
|
+
choose_album: "Klikk for å velge album"
|
11
|
+
flash:
|
12
|
+
connection_destroyed: "Slettet kobling mellom album og side."
|
13
|
+
plugins:
|
14
|
+
refinerycms_photo_gallery:
|
15
|
+
title: Fotogalleri
|
16
|
+
description: Galleri med opplasting, tagging osv.
|
17
|
+
tab_name: Fotogalleri
|
18
|
+
photo_gallery:
|
19
|
+
admin:
|
20
|
+
submenu:
|
21
|
+
collections:
|
22
|
+
title: Samlinger
|
23
|
+
manage: Behandle samlingene
|
24
|
+
new: Lag en ny fotosamling
|
25
|
+
albums:
|
26
|
+
title: Album
|
27
|
+
manage: Behandle albumene
|
28
|
+
new: Lag et nytt album
|
29
|
+
collections:
|
30
|
+
collection:
|
31
|
+
view_live_html: Vis denne samlingen <br/><em>(i et nytt vindu)</em>
|
32
|
+
delete: Slett denne samlingen permanent
|
33
|
+
edit: Rediger denne samlingen
|
34
|
+
index:
|
35
|
+
no_items_yet: Det finnes ikke noen samlinger enda. Klikk "%{create}" for å lage en samling.
|
36
|
+
new:
|
37
|
+
title: Lag en ny samling
|
38
|
+
edit:
|
39
|
+
title: Behandle denne samlingen
|
40
|
+
albums:
|
41
|
+
album:
|
42
|
+
view_live_html: Vis dette albumet <br/><em>(i et nytt vindu)</em>
|
43
|
+
delete: Slett dette albumet permanent
|
44
|
+
edit: Rediger dette elbumet
|
45
|
+
upload_photos: Last opp et nytt foto til albumet
|
46
|
+
edit_photos: Rediger fotoene i albumet
|
47
|
+
index:
|
48
|
+
no_items_yet: Det finnes ingen album enda. Klikk "%{create}" for å lage et nytt album.
|
49
|
+
new:
|
50
|
+
title: Lag et nytt album.
|
51
|
+
edit:
|
52
|
+
title: Sett tittel
|
53
|
+
form:
|
54
|
+
album_belongs_to_collection: Albumet hører til samling/er
|
55
|
+
more_options: Muligheter
|
56
|
+
more_options_tooltip: Endre andre felt, f.eks. adresse, notat, bredde- og lengdegrad
|
57
|
+
choose_collection: Velg samlinger
|
58
|
+
path_prefix: Katalogprefiks
|
59
|
+
number_of_photos: "Inneholder %{number} foto(s)"
|
60
|
+
photos:
|
61
|
+
updated: Fotos oppdatert
|
62
|
+
title: Fotos
|
63
|
+
manage: Behandle
|
64
|
+
new: Last opp nye fotos
|
65
|
+
edit_multiple:
|
66
|
+
no_photos_yet: Det er ingen fotos i albumet enda. Klikk "%{create} for å legge til noen fotos.
|
67
|
+
photo:
|
68
|
+
delete: Slett dette bildet permanent.
|
69
|
+
deleted: Slettet "%{title}"
|
70
|
+
form_fields:
|
71
|
+
use_decimal_format: Bruk desimalformat
|
72
|
+
photo_pages:
|
73
|
+
show:
|
74
|
+
other: Andre fotosider
|
75
|
+
albums:
|
76
|
+
show:
|
77
|
+
no_photos: Det er ingen fotos i dette albumet enda
|
78
|
+
photos:
|
79
|
+
image: Foto
|
80
|
+
collections:
|
81
|
+
show:
|
82
|
+
no_albums: Det er ingen album i denne samlingen enda
|
83
|
+
index:
|
84
|
+
no_collections: Det er ingen samlinger her enda
|
85
|
+
activerecord:
|
86
|
+
attributes:
|
87
|
+
refinery/photo_gallery/photo_page:
|
88
|
+
page_id: Side
|
89
|
+
refinery/photo_gallery/collection:
|
90
|
+
title: Tittel
|
91
|
+
description: Beskrivelse
|
92
|
+
refinery/photo_gallery/album:
|
93
|
+
title: Tittel
|
94
|
+
description: Beskrivelse
|
95
|
+
longitude: Lengdegrad
|
96
|
+
latitude: Breddegrad
|
97
|
+
path: Katalog
|
98
|
+
address: Adresse
|
99
|
+
note: Notat
|
100
|
+
tags: Tagger
|
101
|
+
refinery/photo_gallery/photo:
|
102
|
+
title: Tittel
|
103
|
+
description: Beskrivelse
|
104
|
+
longitude: Lengdegrad
|
105
|
+
latitude: Breddegrad
|
106
|
+
path: Katalog
|
107
|
+
file: Fil
|
108
|
+
models:
|
109
|
+
refinery/photo_gallery/collection: Album
|
@@ -0,0 +1,109 @@
|
|
1
|
+
zh-CN:
|
2
|
+
chosen:
|
3
|
+
no_results: "没有匹配的结果"
|
4
|
+
refinery:
|
5
|
+
admin:
|
6
|
+
pages:
|
7
|
+
tabs:
|
8
|
+
form:
|
9
|
+
join_page_with_album: "添加相册到页面"
|
10
|
+
choose_album: "点击选择相册"
|
11
|
+
flash:
|
12
|
+
connection_destroyed: "相册与页面之间的关联已经成功删除。"
|
13
|
+
plugins:
|
14
|
+
refinerycms_photo_gallery:
|
15
|
+
title: 图片库
|
16
|
+
description: 提供高级的图片库
|
17
|
+
tab_name: 图片库
|
18
|
+
photo_gallery:
|
19
|
+
admin:
|
20
|
+
submenu:
|
21
|
+
collections:
|
22
|
+
title: 合辑
|
23
|
+
manage: 管理合辑
|
24
|
+
new: 新建合辑
|
25
|
+
albums:
|
26
|
+
title: 相册
|
27
|
+
manage: 管理相册
|
28
|
+
new: 新建相册
|
29
|
+
collections:
|
30
|
+
collection:
|
31
|
+
view_live_html: 查看合辑的最新内容.<br/><em>(新窗口中打开)</em>
|
32
|
+
delete: 永久删除合辑
|
33
|
+
edit: 编辑合辑
|
34
|
+
index:
|
35
|
+
no_items_yet: 目前没有合辑。点击"%{create}"创建你的第一个合辑。
|
36
|
+
new:
|
37
|
+
title: 新建合辑
|
38
|
+
edit:
|
39
|
+
title: 编辑合辑
|
40
|
+
albums:
|
41
|
+
album:
|
42
|
+
view_live_html: 查看相册的最新内容.<br/><em>(新窗口中打开)</em>
|
43
|
+
delete: 永久删除相册
|
44
|
+
edit: 编辑相册
|
45
|
+
upload_photos: 上传新图片到相册
|
46
|
+
edit_photos: 编辑当前相册的图片
|
47
|
+
index:
|
48
|
+
no_items_yet: 目前没有相册。点击"%{create}"创建你的第一个相册。
|
49
|
+
new:
|
50
|
+
title: 新建相册
|
51
|
+
edit:
|
52
|
+
title: 编辑相册
|
53
|
+
form:
|
54
|
+
album_belongs_to_collection: 相册从属于合辑
|
55
|
+
more_options: 更多选项
|
56
|
+
more_options_tooltip: 编辑更多字段,例如地址、纬度、经度和注释
|
57
|
+
choose_collection: 选择合辑
|
58
|
+
path_prefix: 路径前缀
|
59
|
+
number_of_photos: 包含 %{number} 张图片
|
60
|
+
photos:
|
61
|
+
updated: 图片已上传
|
62
|
+
title: 图片
|
63
|
+
manage: 管理
|
64
|
+
new: 上传新图片
|
65
|
+
edit_multiple:
|
66
|
+
no_items_yet: 目前相册里没有图片。点击"%{create}"添加你的第一张图片到相册。
|
67
|
+
photo:
|
68
|
+
delete: 永久删除图片
|
69
|
+
deleted: 图片已删除 "%{title}"
|
70
|
+
form_fields:
|
71
|
+
use_decimal_format: 使用十进制
|
72
|
+
photo_pages:
|
73
|
+
show:
|
74
|
+
other: 其他带相册的页面
|
75
|
+
albums:
|
76
|
+
show:
|
77
|
+
no_photos: 相册内目前没有图片
|
78
|
+
photos:
|
79
|
+
image: 图片
|
80
|
+
collections:
|
81
|
+
show:
|
82
|
+
no_albums: 合辑内目前没有相册
|
83
|
+
index:
|
84
|
+
no_collections: 目前没有合辑
|
85
|
+
activerecord:
|
86
|
+
attributes:
|
87
|
+
refinery/photo_gallery/photo_page:
|
88
|
+
page_id: 页面
|
89
|
+
refinery/photo_gallery/collection:
|
90
|
+
title: 标题
|
91
|
+
description: 描述
|
92
|
+
refinery/photo_gallery/album:
|
93
|
+
title: 标题
|
94
|
+
description: 描述
|
95
|
+
longitude: 经度
|
96
|
+
latitude: 纬度
|
97
|
+
path: 路径
|
98
|
+
address: 地址
|
99
|
+
note: 注释
|
100
|
+
tags: 标签
|
101
|
+
refinery/photo_gallery/photo:
|
102
|
+
title: 标题
|
103
|
+
description: 描述
|
104
|
+
longitude: 经度
|
105
|
+
latitude: 纬度
|
106
|
+
path: 路径
|
107
|
+
file: 文件
|
108
|
+
models:
|
109
|
+
refinery/photo_gallery/collection: 相册
|