refinerycms-photo-gallery 0.0.1.dev → 0.0.2.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/app/controllers/refinery/photo_gallery/albums_controller.rb +2 -1
- data/app/models/refinery/photo_gallery/album.rb +5 -2
- data/app/models/refinery/photo_gallery/photo.rb +15 -7
- data/app/views/refinery/photo_gallery/albums/show.html.erb +9 -1
- data/lib/refinery/photo_gallery/version.rb +2 -2
- metadata +2 -3
- data/app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/fa.js +0 -37
|
@@ -9,6 +9,7 @@ module Refinery
|
|
|
9
9
|
@collections = Collection.has_albums
|
|
10
10
|
|
|
11
11
|
@albums = Album.find_by_collection_id(params[:collection_id])
|
|
12
|
+
@album = Album.find(params[:id])
|
|
12
13
|
|
|
13
14
|
@photos = Photo.where("album_id = ? ", params[:id]).paginate(:page => params[:page])
|
|
14
15
|
|
|
@@ -18,4 +19,4 @@ module Refinery
|
|
|
18
19
|
end
|
|
19
20
|
end
|
|
20
21
|
end
|
|
21
|
-
end
|
|
22
|
+
end
|
|
@@ -49,12 +49,15 @@ module Refinery
|
|
|
49
49
|
def set_path
|
|
50
50
|
#Replaces special characters in tile
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
if self.path_prefix.blank? && self.path.blank?
|
|
53
53
|
self.path = self.title.parameterize
|
|
54
|
+
elsif self.path.present? && self.title.present?
|
|
55
|
+
# dont't update path, when album has photos and we change title
|
|
54
56
|
else
|
|
55
57
|
self.path = [self.path_prefix, self.title.parameterize].join('-')
|
|
56
58
|
end
|
|
59
|
+
|
|
57
60
|
end
|
|
58
61
|
end
|
|
59
62
|
end
|
|
60
|
-
end
|
|
63
|
+
end
|
|
@@ -27,12 +27,20 @@ module Refinery
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
def exif_read
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
begin
|
|
31
|
+
photo = MiniExiftool.new(self.file.file.file, {:numerical=> true})
|
|
32
|
+
|
|
33
|
+
self.longitude = photo.GPSLongitude if self.longitude.nil?
|
|
34
|
+
self.latitude = photo.GPSLatitude if self.latitude.nil?
|
|
35
|
+
self.title = photo.DocumentName if photo.DocumentName.present?
|
|
36
|
+
self.description = photo.ImageDescription if self.description.nil? && photo.ImageDescription != 'Exif_JPEG_PICTURE'
|
|
37
|
+
# TODO read keywords from exif
|
|
38
|
+
rescue
|
|
39
|
+
p "ERROR raised exception during MiniExiftool reading"
|
|
40
|
+
ensure
|
|
41
|
+
self.description = "" if self.description.nil? # Because description is concating in helpers, this can't be null
|
|
42
|
+
end
|
|
43
|
+
end
|
|
36
44
|
end
|
|
37
45
|
|
|
38
46
|
=begin
|
|
@@ -51,4 +59,4 @@ module Refinery
|
|
|
51
59
|
|
|
52
60
|
end
|
|
53
61
|
end
|
|
54
|
-
end
|
|
62
|
+
end
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
<% content_for :body_content_right do %>
|
|
2
2
|
<%= message_photos_length_is_zero %>
|
|
3
|
+
|
|
4
|
+
<h1 class="single-thumbnail-title post-title-color gdl-title">
|
|
5
|
+
<%= @album.title %>
|
|
6
|
+
</h1>
|
|
7
|
+
|
|
8
|
+
<div>
|
|
9
|
+
<%= raw @album.description %>
|
|
10
|
+
</div>
|
|
3
11
|
|
|
4
12
|
<% @photos.each_with_index do |photo, index| %>
|
|
5
13
|
<div class="column portfolio-item">
|
|
@@ -23,4 +31,4 @@
|
|
|
23
31
|
<%= render :partial=> "refinery/photo_gallery/shared/submenu" %>
|
|
24
32
|
<% end %>
|
|
25
33
|
|
|
26
|
-
<%= render :partial=> "refinery/photo_gallery/shared/layout" %>
|
|
34
|
+
<%= render :partial=> "refinery/photo_gallery/shared/layout" %>
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: refinerycms-photo-gallery
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2.dev
|
|
5
5
|
prerelease: 6
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2012-08-
|
|
13
|
+
date: 2012-08-11 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: refinerycms-core
|
|
@@ -173,7 +173,6 @@ files:
|
|
|
173
173
|
- app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/el.js
|
|
174
174
|
- app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/es.js
|
|
175
175
|
- app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/et.js
|
|
176
|
-
- app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/fa.js
|
|
177
176
|
- app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/fi.js
|
|
178
177
|
- app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/fr-ca.js
|
|
179
178
|
- app/assets/javascripts/refinery/photo_gallery/admin/plupload/i18n/fr.js
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// Persian
|
|
2
|
-
plupload.addI18n({
|
|
3
|
-
'Select files' : 'انتخاب فایل',
|
|
4
|
-
'Add files to the upload queue and click the start button.' : 'اضافه کنید فایل ها را به صف آپلود و دکمه شروع را کلیک کنید.',
|
|
5
|
-
'Filename' : 'نام فایل',
|
|
6
|
-
'Status' : 'وضعیت',
|
|
7
|
-
'Size' : 'سایز',
|
|
8
|
-
'Add Files' : 'افزودن فایل',
|
|
9
|
-
'Stop Upload' : 'توقف انتقال',
|
|
10
|
-
'Start Upload' : 'شروع انتقال',
|
|
11
|
-
'Add files' : 'افزودن فایل',
|
|
12
|
-
'Add files.' : 'افزودن فایل',
|
|
13
|
-
'Stop current upload' : 'توقف انتقال جاری',
|
|
14
|
-
'Start uploading queue' : 'شروع صف انتقال',
|
|
15
|
-
'Stop upload' : 'توقف انتقال',
|
|
16
|
-
'Start upload' : 'شروع انتقال',
|
|
17
|
-
'Uploaded %d/%d files': 'منتقل شد %d/%d از فایلها',
|
|
18
|
-
'N/A' : 'N/A',
|
|
19
|
-
'Drag files here.' : 'بکشید فایل ها رو به اینجا',
|
|
20
|
-
'File extension error.': 'خطا پیشوند فایل',
|
|
21
|
-
'File size error.': 'خطای سایز فایل',
|
|
22
|
-
'File count error.': 'خطای تعداد فایل',
|
|
23
|
-
'Init error.': 'خطا در استارت اسکریپت',
|
|
24
|
-
'HTTP Error.': 'HTTP خطای',
|
|
25
|
-
'Security error.': 'خطای امنیتی',
|
|
26
|
-
'Generic error.': 'خطای عمومی',
|
|
27
|
-
'IO error.': 'IO خطای',
|
|
28
|
-
'File: %s': ' فایل ها : %s',
|
|
29
|
-
'Close': 'بستن',
|
|
30
|
-
'%d files queued': '%d فایل در صف',
|
|
31
|
-
'Using runtime: ': 'استفاده میکنید از : ',
|
|
32
|
-
'File: %f, size: %s, max file size: %m': فایل: %f, سایز: %s, بزرگترین سایز فایل: %m',
|
|
33
|
-
'Upload element accepts only %d file(s) at a time. Extra files were stripped.': 'عنصر بارگذار فقط %d فایل رو در یک زمان می پذیرد. سایر فایل ها مجرد از این موضوع هستند.',
|
|
34
|
-
'Upload URL might be wrong or doesn\'t exist': 'آدرس آپلود اشتباه می باشد یا وجود ندارد',
|
|
35
|
-
'Error: File too large: ': 'خطا: فایل حجیم است :: ',
|
|
36
|
-
'Error: Invalid file extension: ': 'خطا پسوند فایل معتبر نمی باشد : '
|
|
37
|
-
});
|