social_stream-documents 1.1.4 → 2.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/icons/attach.png +0 -0
  3. data/app/assets/javascripts/{social_stream.audio.js.erb → social_stream/audio.js.erb} +7 -3
  4. data/app/assets/javascripts/social_stream/document.js +27 -0
  5. data/app/assets/javascripts/social_stream/documents.timeline.js +11 -0
  6. data/app/assets/javascripts/social_stream/documents.wall.js +48 -0
  7. data/app/assets/javascripts/{social_stream.video.js.erb → social_stream/video.js.erb} +11 -8
  8. data/app/assets/javascripts/social_stream-documents.js +1 -1
  9. data/{spec/dummy/config/navigation.rb → app/assets/stylesheets/social_stream/documents/_toolbar.css.sass} +0 -0
  10. data/app/assets/stylesheets/social_stream/documents/aside/_documents.css.sass +4 -0
  11. data/app/assets/stylesheets/social_stream/documents/aside/layout/_documents.css.sass +30 -0
  12. data/{spec/dummy/db/.gitkeep → app/assets/stylesheets/social_stream/documents/create/_new.css.sass} +0 -0
  13. data/app/assets/stylesheets/social_stream/documents/create/layout/_new.css.sass +32 -0
  14. data/app/assets/stylesheets/social_stream/documents/documents/_documents.css.sass +4 -0
  15. data/app/assets/stylesheets/social_stream/documents/documents/layout/_documents.css.sass +52 -0
  16. data/app/assets/stylesheets/social_stream/documents/explore/_explore-documents.css.sass +12 -0
  17. data/app/assets/stylesheets/social_stream/documents/explore/layout/_explore-documents.css.sass +20 -0
  18. data/app/assets/stylesheets/social_stream/documents/responsive/_responsive-1200px-min.css.sass +21 -0
  19. data/app/assets/stylesheets/social_stream/documents/responsive/_responsive-767px-max.css.sass +58 -0
  20. data/app/assets/stylesheets/social_stream/documents/responsive/_responsive-768px-979px.css.sass +54 -0
  21. data/app/assets/stylesheets/social_stream/documents/search/_header.css.sass +25 -0
  22. data/app/assets/stylesheets/social_stream/documents/search/layout/_header.css.sass +33 -0
  23. data/app/assets/stylesheets/social_stream/documents/show/_show.css.sass +72 -0
  24. data/app/assets/stylesheets/social_stream/documents/show/layout/_show.css.sass +112 -0
  25. data/app/assets/stylesheets/social_stream/documents/timeline/_audios.css.sass +21 -0
  26. data/app/assets/stylesheets/social_stream/documents/timeline/_wallinput.css.sass +10 -0
  27. data/app/assets/stylesheets/social_stream/documents/timeline/layout/_audios.css.sass +67 -0
  28. data/app/assets/stylesheets/social_stream/documents/timeline/layout/_wallinput.css.sass +10 -0
  29. data/app/assets/stylesheets/social_stream-documents.css.sass +49 -0
  30. data/app/controllers/documents_controller.rb +16 -5
  31. data/app/decorators/social_stream/base/activity_object_decorator.rb +1 -0
  32. data/app/helpers/documents_helper.rb +35 -18
  33. data/app/models/audio.rb +1 -6
  34. data/app/models/document.rb +23 -28
  35. data/app/models/picture.rb +0 -19
  36. data/app/models/video.rb +0 -5
  37. data/app/views/audios/_audio.html.erb +2 -11
  38. data/app/views/audios/_audio_processed.html.erb +28 -23
  39. data/app/views/audios/_audio_processing.html.erb +5 -5
  40. data/app/views/audios/_quick_search_result.html.erb +3 -0
  41. data/app/views/audios/_search_result.html.erb +1 -0
  42. data/app/views/audios/_timeline.html.erb +11 -0
  43. data/app/views/audios/index.html.erb +3 -1
  44. data/app/views/common_documents/_document.html.erb +18 -0
  45. data/app/views/common_documents/_filter.html.erb +1 -0
  46. data/app/views/common_documents/_form.html.erb +44 -0
  47. data/app/views/common_documents/_index.html.erb +27 -63
  48. data/app/views/common_documents/_info.html.erb +50 -0
  49. data/app/views/common_documents/_list.html.erb +2 -0
  50. data/app/views/common_documents/_new.modal.html.erb +13 -0
  51. data/app/views/common_documents/_new_button.html.erb +11 -0
  52. data/app/views/common_documents/_quick_search_result.html.erb +19 -0
  53. data/app/views/common_documents/_show.html.erb +76 -27
  54. data/app/views/documents/_document.html.erb +2 -26
  55. data/app/views/documents/_document_show.html.erb +2 -4
  56. data/app/views/documents/_new_activity.html.erb +3 -1
  57. data/app/views/documents/_quick_search_result.html.erb +3 -0
  58. data/app/views/documents/_search_result.html.erb +1 -0
  59. data/app/views/documents/_timeline.html.erb +15 -0
  60. data/app/views/documents/index.html.erb +7 -1
  61. data/app/views/documents/new.html.erb +9 -0
  62. data/app/views/documents/search.html.erb +1 -1
  63. data/app/views/pictures/_picture.html.erb +2 -41
  64. data/app/views/pictures/_picture_show.html.erb +1 -16
  65. data/app/views/pictures/_quick_search_result.html.erb +3 -0
  66. data/app/views/pictures/_search_result.html.erb +1 -0
  67. data/app/views/pictures/_timeline.html.erb +17 -0
  68. data/app/views/pictures/index.html.erb +3 -1
  69. data/app/views/videos/_quick_search_result.html.erb +3 -0
  70. data/app/views/videos/_search_result.html.erb +1 -0
  71. data/app/views/videos/_timeline.html.erb +9 -0
  72. data/app/views/videos/_video.html.erb +2 -11
  73. data/app/views/videos/_video_processed.html.erb +11 -15
  74. data/app/views/videos/_video_processing.html.erb +6 -5
  75. data/app/views/videos/_video_show.html.erb +1 -1
  76. data/app/views/videos/index.html.erb +3 -1
  77. data/config/locales/en.yml +25 -12
  78. data/config/locales/es.yml +23 -12
  79. data/lib/generators/social_stream/documents/install_generator.rb +2 -3
  80. data/lib/generators/social_stream/documents/templates/initializer.rb +37 -9
  81. data/lib/social_stream/documents/dependencies.rb +1 -0
  82. data/lib/social_stream/documents/engine.rb +5 -14
  83. data/lib/social_stream/documents/models/activity_object.rb +18 -0
  84. data/lib/social_stream/documents/version.rb +1 -1
  85. data/lib/social_stream-documents.rb +56 -13
  86. data/lib/tasks/db/populate.rake +21 -0
  87. data/social_stream-documents.gemspec +4 -1
  88. data/spec/controllers/documents_controller_spec.rb +15 -9
  89. data/spec/controllers/pictures_controller_spec.rb +8 -8
  90. data/spec/socialstream_documents_spec.rb +6 -0
  91. data/vendor/assets/stylesheets/jplayer.blue.monday.css +2 -1
  92. metadata +71 -74
  93. data/app/assets/javascripts/social_stream.repository.js.erb +0 -27
  94. data/app/assets/stylesheets/documents.css.scss +0 -302
  95. data/app/assets/stylesheets/show.css.scss +0 -111
  96. data/app/assets/stylesheets/social_stream-documents.css +0 -6
  97. data/app/views/audios/_audio_focus_search.html.erb +0 -3
  98. data/app/views/audios/_audio_global_search.html.erb +0 -3
  99. data/app/views/audios/_audio_with_details.html.erb +0 -3
  100. data/app/views/common_documents/_document_info.html.erb +0 -48
  101. data/app/views/common_documents/_edit_form.html.erb +0 -57
  102. data/app/views/common_documents/_headers.html.erb +0 -77
  103. data/app/views/documents/_document_focus_search.html.erb +0 -2
  104. data/app/views/documents/_document_global_search.html.erb +0 -2
  105. data/app/views/documents/_document_with_details.html.erb +0 -13
  106. data/app/views/documents/_new_activity_fields.html.erb +0 -15
  107. data/app/views/pictures/_picture_focus_search.html.erb +0 -2
  108. data/app/views/pictures/_picture_global_search.html.erb +0 -2
  109. data/app/views/pictures/_picture_with_details.html.erb +0 -2
  110. data/app/views/videos/_video_focus_search.html.erb +0 -2
  111. data/app/views/videos/_video_global_search.html.erb +0 -2
  112. data/app/views/videos/_video_with_details.html.erb +0 -2
  113. data/config/locales/de.yml +0 -78
  114. data/config/locales/fr.yml +0 -78
  115. data/config/locales/hu.yml +0 -77
  116. data/config/locales/nl.yml +0 -78
  117. data/lib/social_stream/views/toolbar/documents.rb +0 -28
  118. data/lib/tasks/db/populate_documents.rake +0 -19
  119. data/spec/dummy/.gitignore +0 -1
  120. data/spec/dummy/Rakefile +0 -7
  121. data/spec/dummy/app/assets/javascripts/application.js +0 -9
  122. data/spec/dummy/app/assets/stylesheets/application.css +0 -7
  123. data/spec/dummy/app/controllers/application_controller.rb +0 -3
  124. data/spec/dummy/app/helpers/application_helper.rb +0 -2
  125. data/spec/dummy/app/views/layouts/application.html.erb +0 -14
  126. data/spec/dummy/config/application.rb +0 -45
  127. data/spec/dummy/config/boot.rb +0 -10
  128. data/spec/dummy/config/database.yml +0 -25
  129. data/spec/dummy/config/environment.rb +0 -5
  130. data/spec/dummy/config/environments/development.rb +0 -30
  131. data/spec/dummy/config/environments/production.rb +0 -60
  132. data/spec/dummy/config/environments/test.rb +0 -39
  133. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  134. data/spec/dummy/config/initializers/devise.rb +0 -176
  135. data/spec/dummy/config/initializers/inflections.rb +0 -10
  136. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  137. data/spec/dummy/config/initializers/secret_token.rb +0 -7
  138. data/spec/dummy/config/initializers/session_store.rb +0 -8
  139. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  140. data/spec/dummy/config/locales/en.yml +0 -5
  141. data/spec/dummy/config/relations.yml +0 -39
  142. data/spec/dummy/config/routes.rb +0 -60
  143. data/spec/dummy/config.ru +0 -4
  144. data/spec/dummy/db/schema.rb +0 -6
  145. data/spec/dummy/public/404.html +0 -26
  146. data/spec/dummy/public/422.html +0 -26
  147. data/spec/dummy/public/500.html +0 -26
  148. data/spec/dummy/public/favicon.ico +0 -0
  149. data/spec/dummy/public/javascripts/application.js +0 -2
  150. data/spec/dummy/public/javascripts/controls.js +0 -965
  151. data/spec/dummy/public/javascripts/dragdrop.js +0 -974
  152. data/spec/dummy/public/javascripts/effects.js +0 -1123
  153. data/spec/dummy/public/javascripts/prototype.js +0 -6001
  154. data/spec/dummy/public/javascripts/rails.js +0 -191
  155. data/spec/dummy/public/stylesheets/.gitkeep +0 -0
  156. data/spec/dummy/script/rails +0 -6
@@ -0,0 +1,44 @@
1
+ <article id="new_file">
2
+ <%= form_for(document) do |f| %>
3
+ <%= f.hidden_field :owner_id %>
4
+
5
+ <div class="error">
6
+ <ul>
7
+ <h4>
8
+ <% document.errors.full_messages.each do |msg| %>
9
+ </h4>
10
+ <li>
11
+ <h5>
12
+ <%= msg %>
13
+ </h5>
14
+ </li>
15
+ <% end %>
16
+ </ul>
17
+ </div>
18
+
19
+ <section class="upload">
20
+ <%= f.label :file, t('document.info.file') %>
21
+ <%= f.file_field :file %>
22
+ </section>
23
+ <section class="title">
24
+ <%= f.label :title, t('document.info.title') %>
25
+ <%= f.text_field :title %>
26
+ </section>
27
+ <section class="description">
28
+ <%= f.label :description, t('document.info.description') %>
29
+ <%= f.text_area :description %>
30
+ </section>
31
+ <section class="tags">
32
+ <%= f.label :tag_list, t('document.info.tags') %>
33
+ <%= f.text_field :tag_list, 'data-path' => tags_path(format: 'json') %>
34
+ </section>
35
+
36
+ <%= f.submit :class => "btn" %>
37
+ <% end %>
38
+
39
+ <%= javascript_tag do %>
40
+ $(function() {
41
+ SocialStream.Document.edit();
42
+ });
43
+ <% end %>
44
+ </article>
@@ -1,70 +1,34 @@
1
- <% if params[:no_layout].blank? %>
2
- <%= render :partial => "common_documents/headers" %>
3
- <div id="documents_grid">
4
- <% end %>
1
+ <% content_for :title do %>
2
+ <%= "#{ profile_subject && profile_subject.name + ': ' }#{ t('repository.title') }" %>
3
+ <% end %>
5
4
 
6
- <% documents.each do |document| %>
7
- <div class="attachment_tile" id="<%= dom_id(document)%>">
8
- <div class="attachment_tile_thumb">
9
- <%= link_to thumb_for(document,48),
10
- document,
11
- :type => document.type,
12
- :title => document.file_file_name,
13
- :path => document_path(document) %>
14
- </div>
15
- <div class="attachment_tile_tipsy">
16
- <%= link_to image_tag("btn/btn_down.png"),
17
- "javascript:;" %>
18
- <div class="tipsy_content" style="display:none;">
19
- <div class="actions">
20
- <%= link_to content_tag(:div,image_tag("btn/download.png") + t('document.actions.download'), :class => :action), download_document_path(document) %>
21
- <% if can? :update, document %>
22
- <%= link_to content_tag(:div,image_tag("btn/edit.png") + t('document.actions.edit'), :class => :action, :id => :document_edit_action), document_path(document, :editing => true) %>
23
- <% end %>
24
- <% if can? :destroy, document %>
25
- <%= link_to content_tag(:div,image_tag("btn/error.png") + t('document.actions.delete'), :class => :action), document.post_activity.direct_object , :confirm => t('confirm_delete',
26
- :scope => document.post_activity.direct_object.class.to_s.underscore), :method => :delete %>
27
- <% end %>
28
- </div>
29
- </div>
30
- </div>
31
- <div class="attachment_tile_text">
32
- <%= link_to truncate_name(document.file_file_name,:length => 15),
33
- document_path(document),
34
- :alt => document.file_file_name,
35
- :type => document.type,
36
- :path => document_path(document) %>
37
- </div>
38
- </div>
39
- <%= javascript_tag do %>
40
- $(document).ready(function(){
5
+ <% if profile_or_current_subject %>
6
+ <%= render partial: 'toolbar/profile', locals: { :subject => profile_or_current_subject } %>
7
+ <% end %>
41
8
 
42
- SocialStream.Repository.init();
9
+ <%= render partial: 'common_documents/filter' %>
43
10
 
44
- $('#<%= dom_id(document)%> .attachment_tile_tipsy a').tipsy({
45
- delayIn: 0,
46
- delayOut: 1000,
47
- gravity: 'nw',
48
- className: 'attachment_tile_tipsy_menu',
49
- html: true,
50
- hoverable: true,
51
- title: function(){
52
- return $('#<%= dom_id(document)%> .attachment_tile_tipsy .tipsy_content').html();
53
- }
54
- });
55
- });
56
- <% end %>
57
- <% end %>
11
+ <%= render partial: 'common_documents/new_button',
12
+ locals: { owner: profile_subject } %>
58
13
 
59
- <% unless documents.last_page? %>
60
- <% next_url = url_for(:no_layout => true,
61
- :page => params[:page].present? ? params[:page].to_i + 1 : 2,
62
- :q => params[:q]) %>
63
- <%= content_tag(:span, "", :class => "screw screw-after", :rel => next_url)%>
64
- <% end %>
14
+ <section class="documents">
15
+ <%= render partial: 'common_documents/list',
16
+ locals: { documents: collection } %>
17
+ </section>
65
18
 
66
- <% unless params[:no_layout].present? %>
67
- </div>
68
- <% end %>
19
+
20
+ <nav class="documents">
21
+ <%= render partial: 'layouts/more',
22
+ locals: {
23
+ path: polymorphic_path([profile_subject, Document.new ]),
24
+ per_page: Document.default_per_page,
25
+ total: collection.total_count
26
+ } %>
27
+ </nav>
69
28
 
70
29
 
30
+ <%= javascript_tag do %>
31
+ $(function() {
32
+ SocialStream.Document.index();
33
+ });
34
+ <% end %>
@@ -0,0 +1,50 @@
1
+ <div class="info">
2
+ <%= render partial: 'objects/counters', locals: { object: document } %>
3
+
4
+ <div class="description <%= 'blank' if document.description.blank? %>">
5
+ <h4>
6
+ <%= t 'document.info.description' %>
7
+ </h4>
8
+
9
+ <%= document.description %>
10
+ </div>
11
+
12
+ <div class="tags">
13
+ <h4>
14
+ <%= t 'document.info.tags' %>
15
+ </h4>
16
+
17
+ <%= tag_list document %>
18
+ </div>
19
+
20
+ <div class="autor">
21
+ <h4>
22
+ <%= t 'document.info.author' %>
23
+ </h4>
24
+
25
+ <%= link_to document.author_subject.name, document.author_subject %>
26
+ </div>
27
+
28
+ <div class="dates">
29
+ <h4>
30
+ <%= t('document.info.date.created_at') %>
31
+ </h4>
32
+ <div class="date">
33
+ <%= I18n.localize document.created_at, :format => :long %>
34
+ </div>
35
+
36
+ <h4>
37
+ <%= t('document.info.date.updated_at') %>
38
+ </h4>
39
+ <div class="date">
40
+ <%= I18n.localize document.updated_at, :format => :long %>
41
+ </div>
42
+
43
+ <div class="file_size">
44
+ <h4>
45
+ <%= t('document.info.size') %>
46
+ </h4>
47
+ <%= number_to_human_size document.file_file_size %>
48
+ </div>
49
+ </div>
50
+ </div>
@@ -0,0 +1,2 @@
1
+ <%= render partial: 'common_documents/document',
2
+ collection: documents %>
@@ -0,0 +1,13 @@
1
+ <% document ||= Document.new %>
2
+
3
+ <div id="new_document-modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="new_document-modal-title" aria-hidden="true">
4
+ <div class="modal-header">
5
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
6
+ <h3 id="new_document-modal-title"><%= t 'document.new.title' %></h3>
7
+ </div>
8
+ <div class="modal-body">
9
+ <%= render partial: 'common_documents/form',
10
+ object: document,
11
+ as: :document %>
12
+ </div>
13
+ </div>
@@ -0,0 +1,11 @@
1
+ <% if can? :create, document = Document.new(author: current_actor, owner: Actor.normalize(owner)) %>
2
+ <%= link_to t('document.new.link'), new_document_path, class: "btn new_document-modal-link", 'data-toggle' => 'modal' %>
3
+
4
+ <%= render partial: 'common_documents/new.modal',
5
+ locals: { document: document } %>
6
+
7
+ <%= javascript_tag do %>
8
+ SocialStream.Document.new_();
9
+ <% end %>
10
+ <% end %>
11
+
@@ -0,0 +1,19 @@
1
+ <%= div_for document do %>
2
+ <div class="thumb">
3
+ <%= link_to icon(document, 40), document, :title => document.file_file_name %>
4
+ </div>
5
+ <div class="brifing">
6
+ <h5>
7
+ <%= link_to truncate(document.title, :length => 15), document %>
8
+ </h5>
9
+
10
+ <div class="author">
11
+ <%= raw t('document.by', author: link_to(document.author.name, document.author_subject)) %>
12
+ </div>
13
+
14
+ <%= render partial: 'objects/counters', locals: { object: document } %>
15
+
16
+ </div>
17
+ <% end %>
18
+
19
+
@@ -1,35 +1,84 @@
1
- <%= render :partial => 'objects/show',
2
- :locals => { :object => document } %>
1
+ <section id="<%= document.class.to_s.underscore %>">
2
+ <%= render :partial => 'objects/show',
3
+ :locals => { :object => document } %>
3
4
 
4
- <% profile_subject ||= document.owner_subject %>
5
+ <% profile_subject ||= document.owner_subject %>
5
6
 
6
- <% content_for :title do %>
7
- <%= profile_subject.name + ": " + t('repository.title') %>
8
- <% end %>
7
+ <% content_for :title do %>
8
+ <%= profile_subject.name + ": " + t('repository.title') %>
9
+ <% end %>
9
10
 
10
- <% sidebar %>
11
+ <%= div_for document do %>
12
+ <div class="central">
13
+ <div class="show">
11
14
 
12
- <%if profile_subject_is_current?%>
13
- <%= location(
14
- link_to(t('repository.title'), polymorphic_path(controller.controller_name),:remote => true)
15
- ) %>
16
- <%else%>
17
- <%= location(
18
- link_to(profile_subject.name, polymorphic_path(profile_subject),:remote => true),
19
- link_to(t('repository.title'), polymorphic_path([profile_subject, controller.controller_name]),:remote => true)
20
- ) %>
21
- <%end%>
15
+ <%= render partial: "#{ document.class.to_s.tableize }/#{ document.class.to_s.underscore }_show",
16
+ locals: { document.class.to_s.underscore.to_sym => document } %>
17
+ <h6>
18
+ <%= document.title %>
19
+ </h6>
20
+ <div class="actions">
21
+ <% if can? :destroy, document %>
22
+
23
+ <%= link_to raw("<i class='icon_tool16-save'></i> "), download_document_path(document), title: t('document.actions.download') %>
22
24
 
23
- <br class="clearfloat" />
24
- <div class="space_center"></div>
25
- <h2><%= document.title.nil? ? document.file_file_name : document.title %></h2>
26
- <div class="space_center"></div>
25
+ <% end %>
27
26
 
28
- <%= show_view_for document %>
27
+ <%= link_to raw("<i class='icon_tool16-trash'></i> "), document,
28
+ confirm: t('confirm_delete', scope: document.class.to_s.underscore),
29
+ title: t('document.actions.delete'),
30
+ method: :delete %>
31
+
32
+ </div>
33
+ </div>
29
34
 
30
- <%= render :partial => "common_documents/document_info", :locals => {:document => document} %>
35
+ <div class="tabbable">
36
+ <ul class="nav nav-tabs">
37
+ <li class="active">
38
+ <a href="#comments" data-toggle="tab">
39
+ <%= t 'comment.title.other' %>
40
+ </a>
41
+ </li>
42
+ </ul>
31
43
 
32
- <div id="document_comments">
33
- <%= render :partial => 'activities/comments', :locals => { :activity => document.post_activity } %>
34
- <%= render :partial => 'comments/new', :locals => { :activity => document.post_activity } %>
35
- </div>
44
+ <div class="tab-content">
45
+ <div id="comments" class="comments">
46
+ <%= render :partial => 'activities/comments', :locals => { :activity => document.post_activity } %>
47
+ <%= render :partial => 'comments/new', :locals => { :activity => document.post_activity } %>
48
+ </div>
49
+ </div>
50
+ </div>
51
+ </div>
52
+
53
+ <div class="details">
54
+ <div class="tabbable">
55
+ <ul class="nav nav-tabs">
56
+ <li class="<%= document_details_tab_class document, :info %>">
57
+ <%= link_to t('document.details.info'), '#document-info', 'data-toggle' => 'tab' %>
58
+ </li>
59
+
60
+ <% if can? :update, document %>
61
+ <li class="<%= document_details_tab_class document, :edit %>">
62
+
63
+ <%= link_to (raw("<i class='icon_tool16-edit'></i> ")), '#document-edit', 'data-toggle' => 'tab' %>
64
+ <!--alt: t('document.actions.edit'),-->
65
+
66
+ </li>
67
+ <% end %>
68
+ </ul>
69
+ </div>
70
+
71
+ <div class="tab-content">
72
+ <div class="tab-pane <%= document_details_tab_class document, :info %>" id="document-info">
73
+ <%= render partial: "common_documents/info", locals: { document: document } %>
74
+ </div>
75
+ <% if can? :update, document %>
76
+ <div class="tab-pane <%= document_details_tab_class document, :edit %>" id="document-edit">
77
+ <%= render partial: 'common_documents/form', locals: { document: document } %>
78
+ </div>
79
+ <% end %>
80
+ </div>
81
+ </div>
82
+ </div>
83
+ <% end %>
84
+ </section>
@@ -1,26 +1,2 @@
1
- <%= div_for document, :class => 'content_size' do %>
2
-
3
- <div class="attachment_thumb">
4
- <%= link_to thumb_for(document, 16),
5
- document,
6
- :class => "" %>
7
- </div>
8
-
9
- <div class="attachment_text">
10
- <div class="title">
11
- <%= document.title %>
12
- </div>
13
-
14
- <%= simple_format auto_link(document.description) %>
15
-
16
- <%= link_to t('details.msg'),
17
- document_path(document),
18
- :alt => t('details.msg'),
19
- :type => document.type,
20
- :path => document_path(document),
21
- :class => "attachment_text_link document_link" %>
22
- </div>
23
-
24
- <% end %>
25
-
26
- <div class="clearfloat"></div>
1
+ <%= render partial: 'common_documents/document',
2
+ object: document %>
@@ -1,7 +1,5 @@
1
- <%= div_for document, :class => 'content_size' do %>
1
+ <%= div_for document do %>
2
2
 
3
- <div class="document_show">
4
- <%= thumb_for(document, 48) %>
5
- </div>
3
+ <%= icon document, 70 %>
6
4
 
7
5
  <% end %>
@@ -1 +1,3 @@
1
- <%= render :partial => 'objects/new_activity', :locals => {:remote => false, :receiver => receiver, :object => Document.new()} %>
1
+ <button class="new_document btn" data-path="<%= documents_path %>">
2
+ <%= image_tag 'icons/attach.png', alt: t('document.new_activity.attach'), title: t('document.new_activity.attach') %>
3
+ </button>
@@ -0,0 +1,3 @@
1
+ <%= render partial: "common_documents/quick_search_result",
2
+ object: document,
3
+ as: :document %>
@@ -0,0 +1 @@
1
+ <%= render document %>
@@ -0,0 +1,15 @@
1
+ <%= div_for document do %>
2
+ <div class="thumb">
3
+ <%= link_to icon(document, 70), document %>
4
+ </div>
5
+
6
+ <div class="text">
7
+ <h6>
8
+ <%= document.title %>
9
+ </h6>
10
+
11
+ <%= render partial: 'objects/timeline_description',
12
+ object: document,
13
+ as: :obj %>
14
+ </div>
15
+ <% end %>
@@ -1 +1,7 @@
1
- <%= render :partial => 'common_documents/index', :locals => { :documents => collection } %>
1
+ <section id="documents">
2
+ <h1><%= t 'document.title.other' %></h1>
3
+
4
+ <% if profile_or_current_subject.present? %>
5
+ <%= render :partial => 'common_documents/index', :locals => { :documents => collection } %>
6
+ <% end %>
7
+ </section>
@@ -0,0 +1,9 @@
1
+ <% content_for :title do %>
2
+ <%= "#{ current_subject.name }: #{ t('document.new.title') }" %>
3
+ <% end %>
4
+
5
+ <%= render partial: 'toolbar/profile', locals: { subject: current_subject } %>
6
+
7
+ <h1><%= t 'document.new.title' %></h1>
8
+
9
+ <%= render partial: 'common_documents/form', locals: { document: @document } %>
@@ -1,3 +1,3 @@
1
- <% params[:no_layout] = true %>
1
+ <% params[:no_layout] = true %>
2
2
  <%= render :partial => 'common_documents/index',
3
3
  :locals => { :documents => @documents } %>
@@ -1,41 +1,2 @@
1
- <%= div_for picture, :class => 'content_size' do %>
2
-
3
- <div class="picture_link picture_thumbnail_show">
4
- <%= link_to thumb_for(picture, 130),
5
- download_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
-
16
- <%= simple_format auto_link(picture.description) %>
17
-
18
- <%= link_to t('details.msg'),
19
- picture_path(picture),
20
- :alt => t('details.msg'),
21
- :type => picture.type,
22
- :path => document_path(picture),
23
- :class => "attachment_text_link picture_link" %>
24
- </div>
25
- <% end %>
26
-
27
-
28
- <%= javascript_tag do %>
29
- $(document).ready(function() {
30
- $('.picture_thumbnail_show a').lightBox({
31
- maxHeight: 920,
32
- maxWidth: 920,
33
- imageLoading: 'assets/lightbox-ico-loading.gif',
34
- imageBtnClose: 'assets/lightbox-btn-close.gif',
35
- imageBtnPrev: 'assets/lightbox-btn-prev.gif',
36
- imageBtnNext: 'assets/lightbox-btn-next.gif',
37
- imageBlank: 'assets/lightbox-blank.gif'});
38
- })
39
- <% end %>
40
-
41
- <div class="clearfloat"></div>
1
+ <%= render partial: 'common_documents/document',
2
+ object: picture %>
@@ -1,4 +1,4 @@
1
- <%= div_for picture, :class => 'content_size' do %>
1
+ <%= div_for picture do %>
2
2
  <div class="picture_show">
3
3
  <%= link_to thumb_for(picture, 500),
4
4
  download_document_path(picture),
@@ -8,18 +8,3 @@
8
8
  :path => document_path(picture) %>
9
9
  </div>
10
10
  <% end %>
11
-
12
-
13
- <%= javascript_tag do %>
14
- $(document).ready(function() {
15
- $("#<%= dom_id picture %> #<%= dom_id picture %>_a").lightBox({
16
- maxHeight: 920,
17
- maxWidth: 920,
18
- imageLoading: '../assets/lightbox-ico-loading.gif',
19
- imageBtnClose: '../assets/lightbox-btn-close.gif',
20
- imageBtnPrev: '../assets/lightbox-btn-prev.gif',
21
- imageBtnNext: '../assets/lightbox-btn-next.gif',
22
- imageBlank: '../assets/lightbox-blank.gif'});
23
-
24
- })
25
- <% end %>
@@ -0,0 +1,3 @@
1
+ <%= render partial: "common_documents/quick_search_result",
2
+ object: picture,
3
+ as: :document %>
@@ -0,0 +1 @@
1
+ <%= render picture %>
@@ -0,0 +1,17 @@
1
+ <%= div_for picture do %>
2
+ <div class="thumb">
3
+ <%= image_tag thumb_file_for(picture, "170x127#"), "data-modal-carousel-id" => "false", "data-modal-carousel-content" => "#{ thumb_for(picture, 500) }" %>
4
+ </div>
5
+
6
+ <div class="text">
7
+ <h6>
8
+ <%= picture.title %>
9
+ </h6>
10
+
11
+ <%= render partial: 'objects/timeline_description',
12
+ object: picture,
13
+ as: :obj %>
14
+ </div>
15
+ <% end %>
16
+
17
+ <div class="clearfloat"></div>
@@ -1 +1,3 @@
1
- <%= render :partial => 'common_documents/index', :locals => { :documents => @pictures } %>
1
+ <section id="pictures">
2
+ <%= render :partial => 'common_documents/index', :locals => { :documents => @pictures } %>
3
+ </section>
@@ -0,0 +1,3 @@
1
+ <%= render partial: "common_documents/quick_search_result",
2
+ object: video,
3
+ as: :document %>
@@ -0,0 +1 @@
1
+ <%= render video %>
@@ -0,0 +1,9 @@
1
+ <%= div_for video do %>
2
+ <% if video.file_processing %>
3
+ <%= render :partial => 'videos/video_processing', :locals => {:video => video}%>
4
+ <% else %>
5
+ <%= render :partial => 'videos/video_processed', :locals => {:video => video}%>
6
+ <% end %>
7
+ <% end %>
8
+
9
+ <div class="clearfloat"></div>
@@ -1,11 +1,2 @@
1
- <%= div_for video, :class => 'content_size' do %>
2
-
3
- <% if video.file_processing %>
4
- <%= render :partial => 'videos/video_processing', :locals => {:video => video}%>
5
- <% else %>
6
- <%= render :partial => 'videos/video_processed', :locals => {:video => video}%>
7
- <% end %>
8
-
9
- <% end %>
10
-
11
- <div class="clearfloat"></div>
1
+ <%= render :partial => 'common_documents/document',
2
+ :locals => {:document => video} %>
@@ -1,23 +1,19 @@
1
- <div class="video-thumb video_thumbnail_show">
2
- <%= image_tag(video_path(video, :format => :png, :style => 'thumbwall'), :class => "video_thumbnail_image", :alt => "")%>
3
- <div class="video_thumbnail_play_over"></div>
1
+ <div class="thumb">
2
+ <%= image_tag(video_path(video, :format => :png, :style => '170x127#'))%>
3
+ <div class="play_over">
4
+ </div>
4
5
  </div>
5
6
 
6
- <div class="attachment_text video-details">
7
- <div class="title">
7
+ <div class="text">
8
+ <h6>
8
9
  <%= video.title %>
9
- </div>
10
-
11
- <%= simple_format auto_link(video.description) %>
10
+ </h6>
12
11
 
13
- <%= link_to t('details.msg'),
14
- video,
15
- :alt => t('details.msg'),
16
- :type => video.type,
17
- :path => document_path(video),
18
- :class => "attachment_text_link video_link" %>
12
+ <%= render partial: 'objects/timeline_description',
13
+ object: video,
14
+ as: :obj %>
19
15
 
20
- <div class="video-format-links">
16
+ <div class="format-links">
21
17
  <%= link_to "WebM", video_path(video, :format => :webm), :class => "video-webm" %>
22
18
  <%= link_to "FLV", video_path(video, :format => :flv), :class => "video-flv" %>
23
19
  <%= link_to "MP4", video_path(video, :format => :mp4), :class => "video-mp4" %>
@@ -1,9 +1,10 @@
1
- <div class="attachment_thumb">
2
- <%= thumb_for(video, 16) %>
1
+ <div class="thumb">
2
+ <%= icon video, 70 %>
3
3
  </div>
4
- <div class="attachment_text">
5
- <div class="title">
4
+ <div class="text">
5
+ <h6>
6
6
  <%= video.title %>
7
+ </h6>
8
+ <div class="processing_text"><%= t('video.processing')%>
7
9
  </div>
8
- <div class="processing_text"><%= t('video.processing')%></div>
9
10
  </div>