Commit ffee6f29b3b9dbf6e9bf00e7032967a8e42dfa20

Authored by Daniela Feitosa
1 parent 2841bca8

Network layout

app/views/profile/_profile_network_activities.rhtml
1   - <% network_activities.each do |activity| %>
2   - <li class='profile-network-item <%= activity.verb %>' id='profile-network-item-<%= activity.id %>'>
3   - <div class='profile-network-image'>
4   - <%= link_to(profile_image(activity.user, :minor), activity.user.url) %>
5   - <% if logged_in? && current_person.follows?(activity.user) && current_person != activity.user %>
6   - <p class='profile-network-send-message'><%= link_to_function _('Scrap'), "hide_and_show(['#profile-network-message-response-#{activity.id}'],['#profile-network-message-#{activity.id}', '#profile-network-form-#{activity.id}']);$('content_#{activity.id}').value='';return false", :class => "profile-send-message", :title => _("Send a message to %s") % activity.user.name %></p>
7   - <% end %>
8   - </div>
9   - <div class='profile-network-description'>
10   - <p class='profile-network-time'><%= time_ago_as_sentence(activity.created_at) + ' ' + _('ago') %></p>
11   - <p class='profile-network-text'><%= link_to activity.user.name, activity.user.url %> <%= describe activity %></p>
12   - <%= button_to_remote(:delete, content_tag(:span, _('Remove')), :url =>{:action => 'remove_notification', :activity_id => activity.id}, :update => "profile-network-item-#{activity.id}") if can_edit_profile %>
13   - <p class='profile-network-where'><%= _('In community %s') % link_to(activity.target.name, activity.target.url) if !profile.is_a?(Community) && activity.target.is_a?(Community) %></p>
14   - </div>
15   - <div id='profile-network-message-<%= activity.id%>' style='display:none;'>
16   - <div id='profile-network-form-<%= activity.id%>' style='display:none;'>
17   - <p class='profile-network-message'>
18   - <% form_remote_tag :url => {:controller => 'profile', :action => 'leave_scrap', :not_load_scraps => true}, :update => "profile-network-message-response-#{activity.id}", :success =>"hide_and_show(['#profile-network-form-#{activity.id}'],['#profile-network-message-response-#{activity.id}'])" do %>
19   - <%= limited_text_area :scrap, :content, 420, "content_#{activity.id}", :cols => 50, :rows => 2 %>
20   - <%= hidden_field_tag 'receiver_id', activity.user.id %>
21   - <%= submit_button :add, _('Leave a message') %>
22   - <%= button_to_function :cancel, _('Cancel'), "hide_and_show(['#profile-network-message-#{activity.id}'],[]);return false" %>
23   - <% end %>
24   - </p>
25   - </div>
26   - <div id='profile-network-message-response-<%=activity.id%>' class='profile-network-message-response'></div>
27   - </div>
28   - <hr />
29   - </li>
30   - <% end %>
  1 +<% network_activities.each do |activity| %>
  2 + <li class='profile-activity-item <%= activity.verb %>' id='profile-network-item-<%= activity.id %>'>
  3 + <%= render :partial => activity.verb, :locals => { :activity => activity }%>
  4 + <hr/>
  5 + <ul class="profile-wall-activities-comments" style='padding-left: 50px;width:auto'>
  6 + <%= render :partial => 'comment', :collection => activity.comments %>
  7 + </ul>
  8 +
  9 + <%#= render :partial => 'profile_comment_form', :locals => { :activity => activity } %>
  10 + <hr />
  11 + </li>
  12 +<% end %>
31 13 <% if network_activities.current_page < network_activities.total_pages %>
32 14 <div id='profile_network_activities_page_<%= network_activities.current_page %>'>
33 15 <%= button_to_remote :add, _('View more'), :url => {:action => 'view_more_network_activities', :page => (network_activities.current_page + 1)}, :update => "profile_network_activities_page_#{network_activities.current_page}" %>
... ...
public/stylesheets/application.css
... ... @@ -5913,7 +5913,10 @@ h1#agenda-title {
5913 5913  
5914 5914 #profile-wall li.profile-activity-item.upload_image span,
5915 5915 #profile-wall li.profile-activity-item.upload_image span img,
5916   -#profile-wall li.profile-activity-item.upload_image span a {
  5916 +#profile-wall li.profile-activity-item.upload_image span a,
  5917 +#profile-network li.profile-activity-item.upload_image span,
  5918 +#profile-network li.profile-activity-item.upload_image span img,
  5919 +#profile-network li.profile-activity-item.upload_image span a {
5917 5920 width: 98px;
5918 5921 height: 86px;
5919 5922 display: block;
... ... @@ -5921,19 +5924,23 @@ h1#agenda-title {
5921 5924 position: absolute;
5922 5925 }
5923 5926  
5924   -#profile-wall li.profile-activity-item.upload_image span {
  5927 +#profile-wall li.profile-activity-item.upload_image span,
  5928 +#profile-network li.profile-activity-item.upload_image span {
5925 5929 position: relative;
5926 5930 float: left;
5927 5931 margin: 5px 5px 5px 0;
5928 5932 }
5929 5933  
5930   -#profile-wall li.profile-activity-item.upload_image span a {
  5934 +#profile-wall li.profile-activity-item.upload_image span a,
  5935 +#profile-network li.profile-activity-item.upload_image span a {
5931 5936 background: transparent url(/images/gallery-image-activity-border.png) center center no-repeat;
5932 5937 text-indent: -5000em;
5933 5938 }
5934 5939  
5935 5940 #profile-wall li.profile-activity-item.upload_image .article-comment span,
5936   -#profile-wall li.profile-activity-item.upload_image .profile-wall-actions span {
  5941 +#profile-wall li.profile-activity-item.upload_image .profile-wall-actions span,
  5942 +#profile-network li.profile-activity-item.upload_image .article-comment span,
  5943 +#profile-network li.profile-activity-item.upload_image .profile-wall-actions span {
5937 5944 display: inline;
5938 5945 position: static;
5939 5946 margin: 0;
... ... @@ -5942,22 +5949,27 @@ h1#agenda-title {
5942 5949 height: auto;
5943 5950 }
5944 5951  
5945   -#profile-wall li.profile-activity-item ul.profile-wall-activities-comments {
  5952 +#profile-wall li.profile-activity-item ul.profile-wall-activities-comments,
  5953 +#profile-network li.profile-activity-item ul.profile-wall-activities-comments {
5946 5954 margin-top: 0;
5947 5955 }
5948 5956  
5949   -#profile-wall li.profile-activity-item.upload_image .profile-activity-text {
  5957 +#profile-wall li.profile-activity-item.upload_image .profile-activity-text,
  5958 +#profile-network li.profile-activity-item ul.profile-wall-activities-comments {
5950 5959 padding-left: 50px;
5951 5960 }
5952 5961  
5953 5962 #profile-wall li.profile-activity-item.join_community .profile-activity-text a img,
5954   -#profile-wall li.profile-activity-item.new_friendship .profile-activity-text a img {
  5963 +#profile-wall li.profile-activity-item.new_friendship .profile-activity-text a img,
  5964 +#profile-network li.profile-activity-item.join_community .profile-activity-text a img,
  5965 +#profile-network li.profile-activity-item.new_friendship .profile-activity-text a img {
5955 5966 margin: 5px 5px 0 0;
5956 5967 padding: 1px;
5957 5968 border: 1px solid #ccc;
5958 5969 }
5959 5970  
5960   -#profile-wall li.profile-activity-item.create_article {
  5971 +#profile-wall li.profile-activity-item.create_article,
  5972 +#profile-netowrk li.profile-activity-item.create_article {
5961 5973 position: relative;
5962 5974 }
5963 5975  
... ... @@ -6233,52 +6245,63 @@ h1#agenda-title {
6233 6245 background: transparent;
6234 6246 }
6235 6247  
6236   -#profile-wall ul.profile-wall-activities-comments {
  6248 +#profile-wall ul.profile-wall-activities-comments,
  6249 +#profile-network ul.profile-wall-activities-comments {
6237 6250 margin-top: 35px;
6238 6251 }
6239 6252  
6240   -#profile-wall .profile-wall-activities-comments li {
  6253 +#profile-wall .profile-wall-activities-comments li,
  6254 +#profile-network .profile-wall-activities-comments li {
6241 6255 background: #e8e8e8;
6242 6256 border-bottom: 1px solid #d2d2d2 !important;
6243 6257 border-top: 1px solid #fff;
6244 6258 margin-bottom: 0;
6245 6259 }
6246 6260  
6247   -#profile-wall .profile-wall-activities-comments img {
  6261 +#profile-wall .profile-wall-activities-comments img,
  6262 +#profile-network .profile-wall-activities-comments img {
6248 6263 width: 33px;
6249 6264 height: 33px;
6250 6265 }
6251 6266  
6252 6267 #profile-wall .profile-wall-activities-comments .comment_reply,
6253   -#profile-wall .profile-wall-activities-comments h4 {
  6268 +#profile-wall .profile-wall-activities-comments h4,
  6269 +#profile-network .profile-wall-activities-comments .comment_reply,
  6270 +#profile-network .profile-wall-activities-comments h4 {
6254 6271 display: none;
6255 6272 }
6256 6273  
6257   -#profile-wall .profile-wall-activities-comments .comment-picture {
  6274 +#profile-wall .profile-wall-activities-comments .comment-picture,
  6275 +#profile-network .profile-wall-activities-comments .comment-picture {
6258 6276 width: 33px;
6259 6277 margin-right: 10px;
6260 6278 }
6261 6279  
6262   -#profile-wall .profile-wall-activities-comments .comment-text p {
  6280 +#profile-wall .profile-wall-activities-comments .comment-text p,
  6281 +#profile-network .profile-wall-activities-comments .comment-text p {
6263 6282 margin: 0;
6264 6283 }
6265 6284  
6266   -#profile-wall .profile-wall-activities-comments .profile-activity-time {
  6285 +#profile-wall .profile-wall-activities-comments .profile-activity-time,
  6286 +#profile-network .profile-wall-activities-comments .profile-activity-time {
6267 6287 clear: both;
6268 6288 }
6269 6289  
6270   -#profile-wall .profile-wall-activities-comments .comment-details {
  6290 +#profile-wall .profile-wall-activities-comments .comment-details,
  6291 +#profile-network .profile-wall-activities-comments .comment-details {
6271 6292 padding: 0;
6272 6293 }
6273 6294  
6274   -#profile-wall .profile-wall-activities-comments .article-comment .button-bar {
  6295 +#profile-wall .profile-wall-activities-comments .article-comment .button-bar,
  6296 +#profile-network .profile-wall-activities-comments .article-comment .button-bar {
6275 6297 float: none !important;
6276 6298 padding: 0;
6277 6299 text-align: right;
6278 6300 position: static;
6279 6301 }
6280 6302  
6281   -#profile-wall .profile-wall-activities-comments .article-comment .button-bar a.button {
  6303 +#profile-wall .profile-wall-activities-comments .article-comment .button-bar a.button,
  6304 +#profile-network .profile-wall-activities-comments .article-comment .button-bar a.button {
6282 6305 background: transparent;
6283 6306 border: 0;
6284 6307 height: auto;
... ... @@ -6293,11 +6316,13 @@ h1#agenda-title {
6293 6316 float: none;
6294 6317 }
6295 6318  
6296   -#profile-wall .profile-wall-activities-comments .article-comment .button-bar a.button:hover {
  6319 +#profile-wall .profile-wall-activities-comments .article-comment .button-bar a.button:hover,
  6320 +#profile-network .profile-wall-activities-comments .article-comment .button-bar a.button:hover {
6297 6321 text-decoration: underline;
6298 6322 }
6299 6323  
6300   -#profile-wall .profile-wall-activities-comments .article-comment .button-bar .button span {
  6324 +#profile-wall .profile-wall-activities-comments .article-comment .button-bar .button span,
  6325 +#profile-network .profile-wall-activities-comments .article-comment .button-bar .button span {
6301 6326 display: inline;
6302 6327 position: static;
6303 6328 display: inline;
... ... @@ -6455,13 +6480,17 @@ h1#agenda-title {
6455 6480 width: 98%;
6456 6481 }
6457 6482  
6458   -#profile_activities .profile-activity-image, #profile-network .profile-network-image, #profile-wall .profile-wall-image {
  6483 +#profile_activities .profile-activity-image,
  6484 +#profile-network .profile-activity-image,
  6485 +#profile-wall .profile-wall-image {
6459 6486 width: 50px;
6460 6487 margin: 5px;
6461 6488 float: left;
6462 6489 }
6463 6490  
6464   -#profile-activity .profile-activity-description, #profile-network .profile-network-description, #profile-wall .profile-wall-description {
  6491 +#profile-activity .profile-activity-description,
  6492 +#profile-network .profile-activity-description,
  6493 +#profile-wall .profile-wall-description {
6465 6494 width: 80%;
6466 6495 word-wrap: break-word;
6467 6496 }
... ...