social_stream-documents 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. data/.gitignore +3 -0
  2. data/README.rdoc +2 -2
  3. data/app/assets/images/btn/btn_audio.png +0 -0
  4. data/app/assets/images/btn/btn_documents.png +0 -0
  5. data/app/assets/images/btn/btn_excel.png +0 -0
  6. data/app/assets/images/btn/btn_pdf.png +0 -0
  7. data/app/assets/images/btn/btn_photo.png +0 -0
  8. data/app/assets/images/btn/btn_resource.png +0 -0
  9. data/app/assets/images/btn/btn_video.png +0 -0
  10. data/app/assets/images/btn/btn_word.png +0 -0
  11. data/app/assets/images/btn/document.png +0 -0
  12. data/app/assets/images/formats/btn_documents.png +0 -0
  13. data/app/assets/images/formats/default.png +0 -0
  14. data/app/assets/images/formats/mp3.png +0 -0
  15. data/app/assets/images/formats/msexcel.png +0 -0
  16. data/app/assets/images/formats/msword.png +0 -0
  17. data/app/assets/images/formats/pdf.png +0 -0
  18. data/app/assets/images/formats/plain.png +0 -0
  19. data/app/assets/stylesheets/documents.css +3 -2
  20. data/app/models/document.rb +2 -0
  21. data/app/views/audios/_new.html.erb +1 -0
  22. data/app/views/audios/index.html.erb +1 -1
  23. data/app/views/documents/_fields.html.erb +1 -0
  24. data/app/views/documents/_header.html.erb +1 -0
  25. data/app/views/documents/_new.html.erb +1 -5
  26. data/app/views/documents/index.html.erb +1 -1
  27. data/app/views/pictures/_new.html.erb +1 -0
  28. data/app/views/toolbar/_uploads_menu.html.erb +10 -10
  29. data/app/views/videos/_new.html.erb +1 -0
  30. data/config/locales/en.yml +17 -5
  31. data/lib/generators/social_stream/documents/install_generator.rb +1 -0
  32. data/social_stream-documents.gemspec +1 -1
  33. metadata +42 -24
  34. data/app/views/toolbar/_home_menu_options.html.erb +0 -33
data/.gitignore CHANGED
@@ -7,3 +7,6 @@ spec/dummy/tmp/
7
7
  *.DS_Store
8
8
  Gemfile.lock
9
9
  .project
10
+ .idea/*
11
+ .idea/social_stream-documents.iml
12
+
data/README.rdoc CHANGED
@@ -1,6 +1,6 @@
1
- = Social Stream Attachments
1
+ = Social Stream Documents
2
2
 
3
- Social Stream Attachments provides with files support to
3
+ Social Stream Documents provides with files support to
4
4
  {Social Stream}[http://social-stream.dit.upm.es/], the core for building social
5
5
  network websites. This gem allows actor to upload files as other activity type.
6
6
 
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -34,9 +34,10 @@
34
34
  .attachment_thumb
35
35
  {
36
36
  position: relative;
37
- width: 10%;
37
+ /*width: 10%;*/
38
38
  float: left;
39
- height: 50px;
39
+ /*height: 50px;*/
40
+ padding-right:5px;
40
41
  vertical-align: middle;
41
42
  }
42
43
 
@@ -1,4 +1,6 @@
1
1
  class Document < ActiveRecord::Base
2
+ include SocialStream::Models::Object
3
+
2
4
  has_attached_file :file,
3
5
  :url => '/:class/:id.:extension',
4
6
  :path => ':rails_root/documents/:class/:id_partition/:style.:extension'
@@ -0,0 +1 @@
1
+ <%= render :partial => 'objects/new', :locals => {:remote => false, :receiver => receiver, :object => Document.new()} %>
@@ -12,7 +12,7 @@
12
12
  <% end %>
13
13
 
14
14
  <%= location(
15
- link_to(image_tag("btn/btn_outline.png", :class => "menu_icon")+t('audio.title'), audios_path,:remote => true)
15
+ link_to(image_tag("btn/btn_audio.png", :class => "menu_icon")+t('audio.title'), audios_path,:remote => true)
16
16
  ) %>
17
17
 
18
18
  <% toolbar %>
@@ -0,0 +1 @@
1
+ <%= f.file_field :file %>
@@ -0,0 +1 @@
1
+ <%= image_tag("btn/document.png") %> <%=t('document.title')%>
@@ -1,5 +1 @@
1
- <%= form_for Document.new(:_activity_tie_id => a_tie_id),
2
- :html => { :multipart => true } do |form| %>
3
- <%= form.hidden_field :_activity_tie_id %>
4
- <%= form.file_field :file %>
5
- <% end %>
1
+ <%= render :partial => 'objects/new', :locals => {:remote => false, :receiver => receiver, :object => Document.new()} %>
@@ -12,7 +12,7 @@
12
12
  <% end %>
13
13
 
14
14
  <%= location(
15
- link_to(image_tag("btn/document.png", :class => "menu_icon")+t('document.title'), documents_path,:remote => true)
15
+ link_to(image_tag("btn/btn_resources.png", :class => "menu_icon")+t('resource.title'), documents_path,:remote => true)
16
16
  ) %>
17
17
 
18
18
  <% toolbar %>
@@ -0,0 +1 @@
1
+ <%= render :partial => 'objects/new', :locals => {:remote => false, :receiver => receiver, :object => Document.new()} %>
@@ -1,21 +1,21 @@
1
1
  <li>
2
- <%= link_to( image_tag("btn/document.png",:class =>"menu_icon")+t('document.title'),"#") %>
2
+ <%= link_to( image_tag("btn/btn_resource.png",:class =>"menu_icon")+t('resource.title'),"#") %>
3
3
  <ul>
4
- <li>
5
- <%= link_to( image_tag("btn/btn_gallery.png",
6
- :class => "menu_icon")+t('picture.title'), pictures_path) %>
7
- </li>
4
+ <li>
5
+ <%= link_to( image_tag("btn/btn_documents.png",
6
+ :class => "menu_icon")+t('document.title'), documents_path) %>
7
+ </li>
8
+ <li>
9
+ <%= link_to( image_tag("btn/btn_gallery.png",
10
+ :class => "menu_icon")+t('picture.title'), pictures_path) %>
11
+ </li>
8
12
  <li>
9
13
  <%= link_to( image_tag("btn/btn_video.png",
10
14
  :class => "menu_icon")+t('video.title'), videos_path) %>
11
15
  </li>
12
16
  <li>
13
- <%= link_to( image_tag("btn/btn_outline.png",
17
+ <%= link_to( image_tag("btn/btn_audio.png",
14
18
  :class => "menu_icon")+t('audio.title'), audios_path) %>
15
19
  </li>
16
- <li>
17
- <%= link_to( image_tag("btn/document.png",
18
- :class => "menu_icon")+t('document.all'), documents_path) %>
19
- </li>
20
20
  </ul>
21
21
  </li>
@@ -0,0 +1 @@
1
+ <%= render :partial => 'objects/new', :locals => {:remote => false, :receiver => receiver, :object => Document.new()} %>
@@ -1,4 +1,15 @@
1
1
  en:
2
+ audio:
3
+ confirm_delete: "Delete audio?"
4
+ title: "Audios"
5
+ mine: "My audios"
6
+ msg: "Just uploaded an audio:"
7
+ conference:
8
+ all: "All conferences"
9
+ confirm_delete: "Delete conference?"
10
+ title: "Conferences"
11
+ mine: "My conferences"
12
+ msg: "Just uploaded a conference:"
2
13
  document:
3
14
  all: "All documents"
4
15
  confirm_delete: "Delete document?"
@@ -10,13 +21,14 @@ en:
10
21
  title: "Pictures"
11
22
  mine: "My pictures"
12
23
  msg: "Just uploaded a picture:"
24
+ resource:
25
+ all: "All Resources"
26
+ confirm_delete: "Delete resource?"
27
+ title: "Resources"
28
+ mine: "My resources"
29
+ msg: "Just uploaded a resource:"
13
30
  video:
14
31
  confirm_delete: "Delete video?"
15
32
  title: "Videos"
16
33
  mine: "My videos"
17
34
  msg: "Just uploaded a video:"
18
- audio:
19
- confirm_delete: "Delete audio?"
20
- title: "Audios"
21
- mine: "My audios"
22
- msg: "Just uploaded an audio:"
@@ -6,6 +6,7 @@ class SocialStream::Documents::InstallGenerator < Rails::Generators::Base
6
6
  def create_migration_file
7
7
  require 'rake'
8
8
  Rails.application.load_tasks
9
+ Rake::Task['railties:install:migrations'].reenable
9
10
  Rake::Task['social_stream_documents_engine:install:migrations'].invoke
10
11
  end
11
12
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "social_stream-documents"
3
- s.version = "0.1.0"
3
+ s.version = "0.1.1"
4
4
  s.authors = ["Víctor Sánchez Belmar", "GING - DIT - UPM"]
5
5
  s.summary = "File capabilities for Social Stream, the core for building social network websites"
6
6
  s.description = "Social Stream is a Ruby on Rails engine providing your application with social networking features and activity streams.\n\nThis gem allow you upload almost any kind of file as new social stream activity."
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_stream-documents
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - "V\xC3\xADctor S\xC3\xA1nchez Belmar"
@@ -16,12 +16,12 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-06-30 00:00:00 +02:00
19
+ date: 2011-07-04 00:00:00 +02:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
- name: social_stream-base
24
23
  prerelease: false
24
+ type: :runtime
25
25
  requirement: &id001 !ruby/object:Gem::Requirement
26
26
  none: false
27
27
  requirements:
@@ -33,11 +33,11 @@ dependencies:
33
33
  - 6
34
34
  - 0
35
35
  version: 0.6.0
36
- type: :runtime
36
+ name: social_stream-base
37
37
  version_requirements: *id001
38
38
  - !ruby/object:Gem::Dependency
39
- name: paperclip-ffmpeg
40
39
  prerelease: false
40
+ type: :runtime
41
41
  requirement: &id002 !ruby/object:Gem::Requirement
42
42
  none: false
43
43
  requirements:
@@ -49,11 +49,11 @@ dependencies:
49
49
  - 6
50
50
  - 0
51
51
  version: 0.6.0
52
- type: :runtime
52
+ name: paperclip-ffmpeg
53
53
  version_requirements: *id002
54
54
  - !ruby/object:Gem::Dependency
55
- name: rails
56
55
  prerelease: false
56
+ type: :development
57
57
  requirement: &id003 !ruby/object:Gem::Requirement
58
58
  none: false
59
59
  requirements:
@@ -67,11 +67,11 @@ dependencies:
67
67
  - rc
68
68
  - 4
69
69
  version: 3.1.0.rc4
70
- type: :development
70
+ name: rails
71
71
  version_requirements: *id003
72
72
  - !ruby/object:Gem::Dependency
73
- name: sqlite3-ruby
74
73
  prerelease: false
74
+ type: :development
75
75
  requirement: &id004 !ruby/object:Gem::Requirement
76
76
  none: false
77
77
  requirements:
@@ -81,11 +81,11 @@ dependencies:
81
81
  segments:
82
82
  - 0
83
83
  version: "0"
84
- type: :development
84
+ name: sqlite3-ruby
85
85
  version_requirements: *id004
86
86
  - !ruby/object:Gem::Dependency
87
- name: ruby-debug
88
87
  prerelease: false
88
+ type: :development
89
89
  requirement: &id005 !ruby/object:Gem::Requirement
90
90
  none: false
91
91
  requirements:
@@ -97,11 +97,11 @@ dependencies:
97
97
  - 10
98
98
  - 3
99
99
  version: 0.10.3
100
- type: :development
100
+ name: ruby-debug
101
101
  version_requirements: *id005
102
102
  - !ruby/object:Gem::Dependency
103
- name: rspec-rails
104
103
  prerelease: false
104
+ type: :development
105
105
  requirement: &id006 !ruby/object:Gem::Requirement
106
106
  none: false
107
107
  requirements:
@@ -113,11 +113,11 @@ dependencies:
113
113
  - 5
114
114
  - 0
115
115
  version: 2.5.0
116
- type: :development
116
+ name: rspec-rails
117
117
  version_requirements: *id006
118
118
  - !ruby/object:Gem::Dependency
119
- name: factory_girl
120
119
  prerelease: false
120
+ type: :development
121
121
  requirement: &id007 !ruby/object:Gem::Requirement
122
122
  none: false
123
123
  requirements:
@@ -129,11 +129,11 @@ dependencies:
129
129
  - 3
130
130
  - 2
131
131
  version: 1.3.2
132
- type: :development
132
+ name: factory_girl
133
133
  version_requirements: *id007
134
134
  - !ruby/object:Gem::Dependency
135
- name: forgery
136
135
  prerelease: false
136
+ type: :development
137
137
  requirement: &id008 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
@@ -145,11 +145,11 @@ dependencies:
145
145
  - 3
146
146
  - 6
147
147
  version: 0.3.6
148
- type: :development
148
+ name: forgery
149
149
  version_requirements: *id008
150
150
  - !ruby/object:Gem::Dependency
151
- name: capybara
152
151
  prerelease: false
152
+ type: :development
153
153
  requirement: &id009 !ruby/object:Gem::Requirement
154
154
  none: false
155
155
  requirements:
@@ -161,7 +161,7 @@ dependencies:
161
161
  - 3
162
162
  - 9
163
163
  version: 0.3.9
164
- type: :development
164
+ name: capybara
165
165
  version_requirements: *id009
166
166
  description: |-
167
167
  Social Stream is a Ruby on Rails engine providing your application with social networking features and activity streams.
@@ -176,11 +176,25 @@ extra_rdoc_files: []
176
176
 
177
177
  files:
178
178
  - .gitignore
179
+ - .idea/encodings.xml
180
+ - .idea/misc.xml
181
+ - .idea/modules.xml
182
+ - .idea/social_stream-documents.iml
183
+ - .idea/vcs.xml
179
184
  - Gemfile
180
185
  - MIT-LICENSE
181
186
  - README.rdoc
182
187
  - Rakefile
188
+ - app/assets/images/btn/btn_audio.png
189
+ - app/assets/images/btn/btn_documents.png
190
+ - app/assets/images/btn/btn_excel.png
191
+ - app/assets/images/btn/btn_pdf.png
192
+ - app/assets/images/btn/btn_photo.png
193
+ - app/assets/images/btn/btn_resource.png
194
+ - app/assets/images/btn/btn_video.png
195
+ - app/assets/images/btn/btn_word.png
183
196
  - app/assets/images/btn/document.png
197
+ - app/assets/images/formats/btn_documents.png
184
198
  - app/assets/images/formats/default.png
185
199
  - app/assets/images/formats/mp3.png
186
200
  - app/assets/images/formats/msexcel.png
@@ -203,17 +217,21 @@ files:
203
217
  - app/models/video.rb
204
218
  - app/views/audios/_audio.html.erb
205
219
  - app/views/audios/_index.html.erb
220
+ - app/views/audios/_new.html.erb
206
221
  - app/views/audios/index.html.erb
207
222
  - app/views/documents/_document.html.erb
223
+ - app/views/documents/_fields.html.erb
224
+ - app/views/documents/_header.html.erb
208
225
  - app/views/documents/_index.html.erb
209
226
  - app/views/documents/_new.html.erb
210
227
  - app/views/documents/index.html.erb
211
228
  - app/views/pictures/_index.html.erb
229
+ - app/views/pictures/_new.html.erb
212
230
  - app/views/pictures/_picture.html.erb
213
231
  - app/views/pictures/index.html.erb
214
- - app/views/toolbar/_home_menu_options.html.erb
215
232
  - app/views/toolbar/_uploads_menu.html.erb
216
233
  - app/views/videos/_index.html.erb
234
+ - app/views/videos/_new.html.erb
217
235
  - app/views/videos/_video.html.erb
218
236
  - app/views/videos/index.html.erb
219
237
  - app/worker/videoencoder.rb
@@ -288,7 +306,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
288
306
  requirements: []
289
307
 
290
308
  rubyforge_project:
291
- rubygems_version: 1.5.2
309
+ rubygems_version: 1.6.2
292
310
  signing_key:
293
311
  specification_version: 3
294
312
  summary: File capabilities for Social Stream, the core for building social network websites
@@ -1,33 +0,0 @@
1
- <ul class="menu">
2
-
3
- <%= menu_options[:notifications] || capture do %>
4
- <%= render :partial =>'toolbar/notifications_menu'%>
5
- <% end %>
6
-
7
- <%= menu_options[:uploads] || capture do %>
8
- <%= render :partial =>'toolbar/uploads_menu'%>
9
- <% end %>
10
-
11
- <%= menu_options[:messages] || capture do %>
12
- <%= render :partial =>'toolbar/message_menu'%>
13
- <% end %>
14
-
15
- <%= menu_options[:contacts] || capture do %>
16
- <li>
17
- <%= link_to( image_tag("btn/btn_friend.png", :class => "menu_icon")+t('contact.other'), '#', :id => "contacts_menu") %>
18
- <ul>
19
- <% current_subject.relation_customs.sort.each do |r| %>
20
- <li>
21
- <%= link_to image_tag("btn/btn_friend.png", :class => "menu_icon") + r.name , contacts_path(:relation => r.id) %>
22
- </li>
23
- <% end %>
24
- </ul>
25
- </li>
26
- <% end %>
27
-
28
- <%= menu_options[:subjects] || capture do %>
29
- <%= render :partial => 'toolbar/home_menu_options_subjects' %>
30
- <% end %>
31
-
32
- </ul>
33
-