social_stream-documents 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,15 +18,23 @@
18
18
 
19
19
  .attachment_text
20
20
  {
21
- line-height: 20px;
22
- height: auto;
23
- font-size:13px;
21
+ float: left;
22
+ font-size:11px;
23
+ margin-bottom: 3px;
24
+ text-align: left;
25
+ width: 310px;
26
+ }
27
+
28
+ .attachment_text .title
29
+ {
30
+ font-weight: bold;
31
+ margin: 10px 0 3px 0;
24
32
  }
25
33
 
26
34
  .attachment_text_link
27
35
  {
28
36
  color: #2A3890;
29
- padding-left: 10px;
37
+ text-decoration: underline;
30
38
  }
31
39
 
32
40
  .attachment_text audio
@@ -46,7 +54,7 @@
46
54
  /*width: 10%;*/
47
55
  float: left;
48
56
  /*height: 50px;*/
49
- padding-right:5px;
57
+ padding-right:5px;
50
58
  vertical-align: middle;
51
59
  }
52
60
 
@@ -278,3 +286,20 @@
278
286
  width: 100%;
279
287
  text-align: center;
280
288
  }
289
+
290
+ /* Uploaded images, audio and vids */
291
+ .picture_thumbnail_show {
292
+ padding: 10px;
293
+ }
294
+
295
+ .picture_thumbnail_show, .picture_thumbnail_show img {
296
+ position: relative;
297
+ float: left;
298
+ max-height: 100px;
299
+ width: 130px;
300
+ }
301
+
302
+ .attachment_thumb {
303
+ position: relative;
304
+ float: left;
305
+ }
@@ -20,7 +20,7 @@ module DocumentsHelper
20
20
  def link_for_wall(document)
21
21
  format = Mime::Type.lookup(document.file_content_type)
22
22
 
23
- polymorphic_path(document, :format => format, :style => 'thumb0')
23
+ polymorphic_path(document, :format => format, :style => 'thumbwall')
24
24
  end
25
25
 
26
26
  def show_view_for(document)
@@ -2,8 +2,9 @@ class Picture < Document
2
2
  has_attached_file :file,
3
3
  :url => '/:class/:id.:extension',
4
4
  :path => ':rails_root/documents/:class/:id_partition/:style',
5
- :styles => {:thumb => ["48x48#"],
6
- :thumb0 => ["130x80#"]
5
+ :styles => {:thumb48sq => ["48x48"],
6
+ :thumbwall => ["130x97#"],
7
+ :preview => ["500>"]
7
8
  }
8
9
 
9
10
  define_index do
@@ -14,17 +15,19 @@ class Picture < Document
14
15
 
15
16
  has created_at
16
17
  end
18
+
17
19
  # Thumbnail file
18
20
  def thumb(size, helper)
19
21
  case size
20
22
  when 16
21
23
  "#{ size.to_s }/photo.png"
22
24
  when 48
23
- helper.picture_path self, :format => format, :style => 'thumb'
25
+ helper.picture_path self, :format => format, :style => 'thumb48sq'
24
26
  when 130
25
- helper.picture_path self, :format => format, :style => 'thumb0'
27
+ helper.picture_path self, :format => format, :style => 'thumbwall'
28
+ when 500
29
+ helper.picture_path self, :format => format, :style => 'preview'
26
30
  end
27
31
  end
28
-
29
-
32
+
30
33
  end
data/app/models/video.rb CHANGED
@@ -5,8 +5,8 @@ class Video < Document
5
5
  :styles => {
6
6
  :webm => {:format => 'webm'},
7
7
  :flv => { :format => 'flv' },
8
- :thumb => {:geometry => "48x48" , :format => 'png', :time => 5},
9
- :thumb0 => {:geometry => "130x80", :format => 'png', :time => 5}
8
+ :thumb48sq => {:geometry => "48x48" , :format => 'png', :time => 5},
9
+ :thumbwall => {:geometry => "130x97#", :format => 'png', :time => 5}
10
10
  },
11
11
  :processors => [:ffmpeg]
12
12
 
@@ -1,29 +1,24 @@
1
1
  <%= div_for picture, :class => 'content_size' do %>
2
2
 
3
- <div class="attachment_thumb picture_link">
4
- <%= link_to thumb_for(picture, 16),
5
- picture_path(picture),
6
- :type => picture.type,
7
- :title => picture.title,
8
- :path => document_path(picture) %>
9
- </div>
10
-
11
- <div class="attachment_text picture_summary_class picture_link">
12
- <%= t('picture.msg') %>
13
- <%= link_to "\""+picture.title+"\"",
14
- picture_path(picture),
15
- :alt => picture.title,
16
- :type => picture.type,
17
- :path => document_path(picture),
18
- :class => "attachment_text_link" %>
19
- </div>
20
-
21
3
  <div class="picture_link picture_thumbnail_show">
22
4
  <%= link_to thumb_for(picture, 130),
23
5
  download_document_path(picture),
24
- :type => picture.type,
25
- :title => picture.title,
26
- :path => document_path(picture) %>
6
+ :type => picture.type,
7
+ :title => picture.title,
8
+ :path => document_path(picture) %>
9
+ </div>
10
+
11
+ <div class="attachment_text picture_summary_class">
12
+ <div class="title">
13
+ <%= picture.title %>
14
+ </div>
15
+ <%= picture.description %>
16
+ <%= link_to t('picture.msg'),
17
+ picture_path(picture),
18
+ :alt => t('picture.msg'),
19
+ :type => picture.type,
20
+ :path => document_path(picture),
21
+ :class => "attachment_text_link picture_link" %>
27
22
  </div>
28
23
  <% end %>
29
24
 
@@ -1,6 +1,6 @@
1
1
  <%= div_for picture, :class => 'content_size' do %>
2
2
  <div class="picture_show">
3
- <%= link_to image_tag_for(picture),
3
+ <%= link_to thumb_for(picture, 500),
4
4
  download_document_path(picture),
5
5
  :id => dom_id(picture) + "_a",
6
6
  :type => picture.type,
@@ -12,7 +12,6 @@
12
12
 
13
13
  <%= javascript_tag do %>
14
14
  $(document).ready(function() {
15
- $("#<%= dom_id picture %> #<%= dom_id picture %>_img").aeImageResize({ height: 500, width: 500 });
16
15
  $("#<%= dom_id picture %> #<%= dom_id picture %>_a").lightBox({
17
16
  maxHeight: 920,
18
17
  maxWidth: 920,
@@ -23,4 +22,4 @@
23
22
  imageBlank: '../assets/lightbox-blank.gif'});
24
23
 
25
24
  })
26
- <% end %>
25
+ <% end %>
@@ -9,7 +9,7 @@
9
9
  video,
10
10
  :class => "attachment_text_link" %>
11
11
  <div id="video_thumbnail_<%= video.id%>" class="video_thumbnail_class">
12
- <%= image_tag(video_path(video, :format => :png, :style => 'thumb0'), :class => "video_thumbnail_image", :alt => "")%> <div id="<%= video.id%>" class="video_thumbnail_play_over"></div>
12
+ <%= image_tag(video_path(video, :format => :png, :style => 'thumbwall'), :class => "video_thumbnail_image", :alt => "")%> <div id="<%= video.id%>" class="video_thumbnail_play_over"></div>
13
13
  </div>
14
14
  <div id="full_video_<%= video.id%>" class="jp-video jp-video-270p">
15
15
  <div class="jp-type-single">
@@ -47,4 +47,4 @@
47
47
  <div id="jp_playlist_<%= video.id%>" class="jp-playlist"></div>
48
48
  </div>
49
49
  </div>
50
- </div>
50
+ </div>
@@ -43,7 +43,7 @@ en:
43
43
  confirm_delete: "Delete picture?"
44
44
  title: "Pictures"
45
45
  mine: "My pictures"
46
- msg: "Uploaded a picture:"
46
+ msg: "See details..."
47
47
  name: "picture"
48
48
  not_mine: "Pictures"
49
49
  one: "a picture"
@@ -43,7 +43,7 @@ es:
43
43
  confirm_delete: "¿Borrar imagen?"
44
44
  title: "Imágenes"
45
45
  mine: "Mis imágenes"
46
- msg: "Subió una imagen:"
46
+ msg: "Ver detalles..."
47
47
  name: "imagen"
48
48
  not_mine: "Imágenes"
49
49
  one: "una imagen"
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Documents
3
- VERSION = "0.7.0".freeze
3
+ VERSION = "0.8.0".freeze
4
4
  end
5
5
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.files = `git ls-files`.split("\n")
13
13
 
14
14
  # Gem dependencies
15
- s.add_runtime_dependency('social_stream-base', '~> 0.12.0')
15
+ s.add_runtime_dependency('social_stream-base', '~> 0.13.0')
16
16
  s.add_runtime_dependency('paperclip-ffmpeg', '~> 0.7.0')
17
17
  # Waiting for version > 2.4.5, which fixes:
18
18
  # https://github.com/thoughtbot/paperclip/issues/293
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_stream-documents
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,22 +10,22 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-01-11 00:00:00.000000000Z
13
+ date: 2012-01-23 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: social_stream-base
17
- requirement: &70784500 !ruby/object:Gem::Requirement
17
+ requirement: &81110600 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
21
21
  - !ruby/object:Gem::Version
22
- version: 0.12.0
22
+ version: 0.13.0
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70784500
25
+ version_requirements: *81110600
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: paperclip-ffmpeg
28
- requirement: &70783900 !ruby/object:Gem::Requirement
28
+ requirement: &81110050 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 0.7.0
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *70783900
36
+ version_requirements: *81110050
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: paperclip
39
- requirement: &70783600 !ruby/object:Gem::Requirement
39
+ requirement: &81109530 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - =
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: 2.3.11
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *70783600
47
+ version_requirements: *81109530
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: delayed_paperclip
50
- requirement: &70783320 !ruby/object:Gem::Requirement
50
+ requirement: &81108650 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - =
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: 0.7.2
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *70783320
58
+ version_requirements: *81108650
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: sqlite3-ruby
61
- requirement: &70783090 !ruby/object:Gem::Requirement
61
+ requirement: &81107460 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: '0'
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *70783090
69
+ version_requirements: *81107460
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rspec-rails
72
- requirement: &70782730 !ruby/object:Gem::Requirement
72
+ requirement: &81106510 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ~>
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: 2.6.0
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *70782730
80
+ version_requirements: *81106510
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: factory_girl
83
- requirement: &70782400 !ruby/object:Gem::Requirement
83
+ requirement: &81105640 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ~>
@@ -88,10 +88,10 @@ dependencies:
88
88
  version: 1.3.2
89
89
  type: :development
90
90
  prerelease: false
91
- version_requirements: *70782400
91
+ version_requirements: *81105640
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: forgery
94
- requirement: &70782100 !ruby/object:Gem::Requirement
94
+ requirement: &81104640 !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
97
97
  - - ~>
@@ -99,10 +99,10 @@ dependencies:
99
99
  version: 0.4.2
100
100
  type: :development
101
101
  prerelease: false
102
- version_requirements: *70782100
102
+ version_requirements: *81104640
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: capybara
105
- requirement: &70781840 !ruby/object:Gem::Requirement
105
+ requirement: &81104060 !ruby/object:Gem::Requirement
106
106
  none: false
107
107
  requirements:
108
108
  - - ~>
@@ -110,7 +110,7 @@ dependencies:
110
110
  version: 0.3.9
111
111
  type: :development
112
112
  prerelease: false
113
- version_requirements: *70781840
113
+ version_requirements: *81104060
114
114
  description: ! 'Social Stream is a Ruby on Rails engine providing your application
115
115
  with social networking features and activity streams.
116
116