Commit 616fe8fed349d1c16dc1513941105f71dbc29677

Authored by Caio Almeida
Committed by Daniela Feitosa
1 parent 893aa26f

Last fixes for new profile wall

app/views/profile/_comment.rhtml
... ... @@ -25,6 +25,7 @@
25 25 <%= icon_button(:delete, _('Remove'), { :action => :remove_comment, :comment_id => comment.id }, :method => :get, :confirm => _('Are you sure you want to remove this comment and all its replies?')) %>
26 26 <% end %>
27 27 <% end %>
  28 + <br style="clear: both;" />
28 29  
29 30 <div class="comment_reply post_comment_box closed">
30 31 <% if @comment && @comment.errors.any? && @comment.reply_of_id.to_i == comment.id %>
... ...
app/views/profile/_create_article.rhtml
1 1 <div class='profile-activity-image'>
2 2 <%= link_to(profile_image(activity.user, :minor), activity.user.url) %>
3 3 </div>
4   -<div class='profile-activity-description'>
  4 +<div class='profile-activity-description profile-activity-article-<%= activity.target.class.icon_name %>'>
5 5 <p class='profile-activity-text'><%= link_to activity.user.name, activity.user.url %></p>
6 6 <div class='profile-activity-lead'>
7   - <b><%= activity.params['name'] %></b> <span title='<%= activity.target.class.short_description %>' class='profile-activity-icon icon-new icon-new<%= activity.target.class.icon_name %>'></span><br />
8   - <%= image_tag(activity.params['first_image']) unless activity.params['first_image'].blank? %><%= strip_tags(activity.params['lead']).gsub(/(\xA0|\xC2|\s)+/, ' ').gsub(/^\s+/, '') %> <small><%= link_to(_('See more +'), activity.params['url']) unless activity.get_lead.blank? %></small></div>
  7 + <b><%= activity.params['name'] %></b>
  8 + <span title='<%= activity.target.class.short_description %>' class='profile-activity-icon icon-new icon-new<%= activity.target.class.icon_name %>'></span><br />
  9 + <%= image_tag(activity.params['first_image']) unless activity.params['first_image'].blank? %><%= strip_tags(activity.params['lead']).gsub(/(\xA0|\xC2|\s)+/, ' ').gsub(/^\s+/, '') %> <small><%= link_to(_('See more'), activity.params['url']) unless activity.get_lead.blank? %></small></div>
  10 + <%= content_tag(:p, link_to(_('See complete forum'), activity.get_url), :class => 'see-forum') if activity.target.is_a?(Forum) %>
9 11 <p class='profile-activity-time'><%= time_ago_as_sentence(activity.created_at) + ' ' + _('ago') %></p>
10 12 <div class='profile-wall-actions'>
  13 + <%= link_to _('Comment'), "#reply_content_#{activity.id}" %>
11 14 <%= link_to_remote(content_tag(:span, _('Remove')), :url =>{:action => 'remove_activity', :activity_id => activity.id}, :update => "profile-activity-item-#{activity.id}") if logged_in? && current_person == @profile %>
12 15 </div>
13 16 </div>
... ...
app/views/profile/_default_activity.rhtml
... ... @@ -5,6 +5,7 @@
5 5 <p class='profile-activity-text'><%= link_to activity.user.name, activity.user.url %> <%= describe activity %></p>
6 6 <p class='profile-activity-time'><%= time_ago_as_sentence(activity.created_at) + ' ' + _('ago') %></p>
7 7 <div class='profile-wall-actions'>
  8 + <%= link_to _('Comment'), "#reply_content_#{activity.id}" %>
8 9 <%= link_to_remote(content_tag(:span, _('Remove')), :url =>{:action => 'remove_activity', :activity_id => activity.id}, :update => "profile-activity-item-#{activity.id}") if logged_in? && current_person == @profile %>
9 10 </div>
10 11 </div>
... ...
app/views/profile/_profile_comment_form.rhtml
... ... @@ -2,7 +2,7 @@
2 2 <div id='profile-wall-reply-form-<%= activity.id%>'>
3 3 <p class='profile-wall-reply'>
4 4 <% form_remote_tag :url => {:controller => 'profile', :action => 'leave_comment_on_activity'}, :update => 'profile_activities', :html => { :class => 'profile-wall-reply-form' } do %>
5   - <%= text_area :comment, :body, {:id => "reply_content_#{activity.id}", :cols => 50, :rows => 1, :class => 'submit-with-keypress', :title => _('Leave your comment'), :onfocus => 'if(this.value==this.title){this.value="";this.style.color="#000"}', :onblur => 'if(this.value==""){this.value=this.title;this.style.color="#ccc"}', :value => _('Leave your comment'), :style => 'color: #ccc' } %>
  5 + <%= text_area :comment, :body, {:id => "reply_content_#{activity.id}", :cols => 50, :rows => 1, :class => 'submit-with-keypress', :title => _('Leave your comment'), :onfocus => 'if(this.value==this.title){this.value="";this.style.color="#000"};this.style.backgroundImage="url(' + current_person.profile_custom_icon + ')"', :onblur => 'if(this.value==""){this.value=this.title;this.style.color="#ccc"};this.style.backgroundImage="none"', :value => _('Leave your comment'), :style => 'color: #ccc' } %>
6 6 <%= hidden_field_tag :source_id, activity.id, :id => "activity_id_#{activity.id}" %>
7 7 <% end %>
8 8 </p>
... ...
app/views/profile/_profile_scrap.rhtml
1   -<li class='profile-wall-item' id='profile-wall-item-<%= scrap.id %>'>
2   - <div class='profile-wall-image'>
  1 +<li class='profile-activity-item' id='profile-activity-item-<%= scrap.id %>'>
  2 + <div class='profile-activity-image'>
3 3 <%= link_to(profile_image(scrap.sender, :minor), scrap.sender.url) %>
4   - <% if logged_in? && current_person.follows?(scrap.sender) && current_person != scrap.sender %>
5   - <p class='profile-wall-send-message'><%= link_to_function _('Scrap'), "hide_and_show(['#profile-wall-message-response-#{scrap.id}'],['#profile-wall-message-#{scrap.id}', '#profile-wall-form-#{scrap.id}']);$('content_#{scrap.id}').value='';return false", :class => "profile-send-message", :title => _("Send a message to %s") % scrap.sender.name %></p>
6   - <% end %>
7 4 </div>
8   - <% comment_balloon :class => 'profile-wall-description' do %>
9   - <p class='profile-wall-sender'><%= link_to scrap.sender.name, scrap.sender.url %></p>
10   - <p class='profile-wall-text'><%= txt2html scrap.content %></p>
11   - <p class='profile-wall-time'><%= time_ago_as_sentence(scrap.created_at) + ' ' + _('ago') %></p>
  5 + <% comment_balloon :class => 'profile-activity-description' do %>
  6 + <p class='profile-activity-sender'><%= link_to scrap.sender.name, scrap.sender.url %></p>
  7 + <p class='profile-activity-text'><%= txt2html scrap.content %></p>
  8 + <p class='profile-activity-time'><%= time_ago_as_sentence(scrap.created_at) + ' ' + _('ago') %></p>
12 9 <div class='profile-wall-actions'>
13 10 <% if logged_in? && current_person.follows?(scrap.sender) %>
14   - <span class='profile-wall-send-reply'><%= link_to_function _('Comment'), "hide_and_show(['#profile-wall-reply-response-#{scrap.id}'],['#profile-wall-reply-#{scrap.id}', '#profile-wall-reply-form-#{scrap.id}']);$('reply_content_#{scrap.id}').value='';$('reply_content_#{scrap.id}').focus();$('scrap_id_#{scrap.id}').value='#{scrap.id}';return false", :class => "profile-send-reply" %></span>
  11 + <span class='profile-activity-send-reply'><%= link_to_function _('Comment'), "hide_and_show(['#profile-activity-reply-response-#{scrap.id}'],['#profile-activity-reply-#{scrap.id}', '#profile-activity-reply-form-#{scrap.id}']);$('reply_content_#{scrap.id}').value='';$('reply_content_#{scrap.id}').focus();$('scrap_id_#{scrap.id}').value='#{scrap.id}';return false", :class => "profile-send-reply" %></span>
15 12 <% end %>
16   - <%= link_to_remote(content_tag(:span, _('Remove')), :url =>{:action => 'remove_scrap', :scrap_id => scrap.id}, :update => "profile-wall-item-#{scrap.id}") if logged_in? && user.can_control_scrap?(scrap) %>
  13 + <%= link_to_remote(content_tag(:span, _('Remove')), :url =>{:action => 'remove_scrap', :scrap_id => scrap.id}, :update => "profile-activity-item-#{scrap.id}") if logged_in? && user.can_control_scrap?(scrap) %>
17 14 <% end %>
18 15 </div>
19   - <ul class="profile-wall-scrap-replies">
  16 + <ul class="profile-activity-scrap-replies">
20 17 <% scrap.replies.map do |reply| %>
21 18 <%= render :partial => 'profile_scrap', :locals => {:scrap => reply} %>
22 19 <% end %>
23 20 </ul>
24   - <div id='profile-wall-message-<%= scrap.id%>' style='display:none;'>
25   - <div id='profile-wall-form-<%= scrap.id%>' style='display:none;'>
26   - <p class='profile-wall-message'>
27   - <% form_remote_tag :url => {:controller => 'profile', :action => 'leave_scrap', :not_load_scraps => true}, :update => "profile-wall-message-response-#{scrap.id}", :success =>"hide_and_show(['#profile-wall-form-#{scrap.id}'],['#profile-wall-message-response-#{scrap.id}'])" do %>
  21 + <div id='profile-activity-message-<%= scrap.id%>' style='display:none;'>
  22 + <div id='profile-activity-form-<%= scrap.id%>' style='display:none;'>
  23 + <p class='profile-activity-message'>
  24 + <% form_remote_tag :url => {:controller => 'profile', :action => 'leave_scrap', :not_load_scraps => true}, :update => "profile-activity-message-response-#{scrap.id}", :success =>"hide_and_show(['#profile-activity-form-#{scrap.id}'],['#profile-activity-message-response-#{scrap.id}'])" do %>
28 25 <%= limited_text_area :scrap, :content, 420, "content_#{scrap.id}", :cols => 50, :rows => 2 %>
29 26 <%= hidden_field_tag 'receiver_id', scrap.sender.id %>
30 27 <%= submit_button :add, _('Leave a scrap') %>
31   - <%= button_to_function :cancel, _('Cancel'), "hide_and_show(['#profile-wall-message-#{scrap.id}'],[]);return false" %>
  28 + <%= button_to_function :cancel, _('Cancel'), "hide_and_show(['#profile-activity-message-#{scrap.id}'],[]);return false" %>
32 29 <% end %>
33 30 </p>
34 31 </div>
35   - <div id='profile-wall-message-response-<%=scrap.id%>' class='profile-wall-message-response'></div>
  32 + <div id='profile-activity-message-response-<%=scrap.id%>' class='profile-activity-message-response'></div>
36 33 </div>
37 34 <%= render :partial => 'profile_scrap_reply_form', :locals => { :scrap => scrap } %>
38 35 <hr />
... ...
app/views/profile/_upload_image.rhtml
1   -<%= render :partial => 'default_activity', :locals => {:activity => activity} %>
  1 +<div class="activity-gallery-images-count-<%= activity.get_view_url.size %>">
  2 + <%= render :partial => 'default_activity', :locals => {:activity => activity} %>
  3 +</div>
  4 +<div title='<%= activity.target.class.short_description %>' class='profile-activity-icon icon-new icon-newgallery'></div>
... ...
public/designs/icons/tango/style.css
... ... @@ -91,7 +91,7 @@
91 91 .icon-lock { background-image: url(Tango/16x16/actions/lock.png) }
92 92 .icon-chat { background-image: url(Tango/16x16/apps/internet-group-chat.png); background-repeat: no-repeat }
93 93 .icon-reply { background-image: url(Tango/16x16/actions/mail-reply-sender.png) }
94   -.icon-newforum { background-image: url(Tango/16x16/apps/system-users.png) }
  94 +.icon-newforum { background-image: url(Tango/16x16/apps/internet-group-chat.png) }
95 95 .icon-forum { background-image: url(Tango/16x16/apps/system-users.png) }
96 96 .icon-gallery { background-image: url(Tango/16x16/mimetypes/image-x-generic.png) }
97 97 .icon-newgallery { background-image: url(Tango/16x16/mimetypes/image-x-generic.png) }
... ...
public/designs/templates/leftbar/stylesheets/style.css
... ... @@ -23,3 +23,15 @@
23 23 #profile-wall ul {
24 24 width: 620px;
25 25 }
  26 +
  27 +.profile-activity-lead {
  28 + width: 534px;
  29 +}
  30 +
  31 +#profile-wall textarea {
  32 + width: 534px;
  33 +}
  34 +
  35 +#profile-wall #leave_scrap textarea {
  36 + width: 640px;
  37 +}
... ...
public/designs/templates/rightbar/stylesheets/style.css
... ... @@ -23,3 +23,15 @@
23 23 #profile-wall ul {
24 24 width: 620px;
25 25 }
  26 +
  27 +.profile-activity-lead {
  28 + width: 534px;
  29 +}
  30 +
  31 +#profile-wall textarea {
  32 + width: 534px;
  33 +}
  34 +
  35 +#profile-wall #leave_scrap textarea {
  36 + width: 640px;
  37 +}
... ...
public/images/forum-activity-bg.png 0 → 100644

1.72 KB

public/images/forum-activity-icon.png 0 → 100644

477 Bytes

public/images/gallery-image-activity-border-big.png 0 → 100644

1.32 KB

public/images/gallery-image-activity-border.png

732 Bytes | W: | H:

665 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin
public/stylesheets/application.css
... ... @@ -5884,8 +5884,9 @@ h1#agenda-title {
5884 5884 display: block;
5885 5885 padding: 10px;
5886 5886 margin-bottom: 10px;
5887   - background-color: #f0f0f1;
5888   - border-bottom: 0;
  5887 + background-color: #fff;
  5888 + border-bottom: 1px solid #e8e8e8;
  5889 + position: relative;
5889 5890 }
5890 5891  
5891 5892 .profile-activity-lead img {
... ... @@ -5901,6 +5902,32 @@ h1#agenda-title {
5901 5902 margin: 5px 0;
5902 5903 }
5903 5904  
  5905 +.profile-activity-article-forum .profile-activity-lead {
  5906 + height: 50px;
  5907 + width: 297px;
  5908 + padding-left: 60px;
  5909 + float: none;
  5910 + overflow: hidden;
  5911 + background: transparent url(/images/forum-activity-bg.png) left center no-repeat;
  5912 +}
  5913 +
  5914 +.profile-activity-article-forum .see-forum {
  5915 + text-align: right;
  5916 +}
  5917 +
  5918 +.profile-activity-article-forum .see-forum a {
  5919 + background: transparent url(/images/forum-activity-icon.png) left center no-repeat;
  5920 + padding-left: 30px;
  5921 + font-weight: bold;
  5922 + color: #dadada !important;
  5923 + text-decoration: none;
  5924 + font-size: 11px;
  5925 +}
  5926 +
  5927 +.profile-activity-article-forum .profile-activity-lead b {
  5928 + font-weight: normal;
  5929 +}
  5930 +
5904 5931 #profile-activity li a, #profile-network li a, #profile-wall li a,
5905 5932 #profile-wall .profile-wall-send-reply {
5906 5933 color: #333;
... ... @@ -5908,7 +5935,7 @@ h1#agenda-title {
5908 5935  
5909 5936 .profile-activity-text {
5910 5937 margin: 0;
5911   - color: #808080;
  5938 + color: #000;
5912 5939 }
5913 5940  
5914 5941 #profile-wall li.profile-activity-item.upload_image span,
... ... @@ -5924,6 +5951,16 @@ h1#agenda-title {
5924 5951 position: absolute;
5925 5952 }
5926 5953  
  5954 +#profile-wall li.profile-activity-item.upload_image .activity-gallery-images-count-1 span,
  5955 +#profile-wall li.profile-activity-item.upload_image .activity-gallery-images-count-1 span img,
  5956 +#profile-wall li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a,
  5957 +#profile-network li.profile-activity-item.upload_image .activity-gallery-images-count-1 span,
  5958 +#profile-network li.profile-activity-item.upload_image .activity-gallery-images-count-1 span img,
  5959 +#profile-network li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a {
  5960 + width: 383px;
  5961 + height: 177px;
  5962 +}
  5963 +
5927 5964 #profile-wall li.profile-activity-item.upload_image span,
5928 5965 #profile-network li.profile-activity-item.upload_image span {
5929 5966 position: relative;
... ... @@ -5937,6 +5974,11 @@ h1#agenda-title {
5937 5974 text-indent: -5000em;
5938 5975 }
5939 5976  
  5977 +#profile-wall li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a,
  5978 +#profile-network li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a {
  5979 + background-image: url(/images/gallery-image-activity-border-big.png);
  5980 +}
  5981 +
5940 5982 #profile-wall li.profile-activity-item.upload_image .article-comment span,
5941 5983 #profile-wall li.profile-activity-item.upload_image .profile-wall-actions span,
5942 5984 #profile-network li.profile-activity-item.upload_image .article-comment span,
... ... @@ -6058,9 +6100,8 @@ h1#agenda-title {
6058 6100 .profile-wall-actions a {
6059 6101 display: block;
6060 6102 float: right;
6061   - font-size: 11px;
6062   - margin: 0;
6063   - margin-left: 10px;
  6103 + font-size: 10px;
  6104 + margin: 2px 0 3px 10px;
6064 6105 color: #ccc;
6065 6106 padding: 0;
6066 6107 }
... ... @@ -6163,8 +6204,9 @@ h1#agenda-title {
6163 6204 }
6164 6205  
6165 6206 .profile-network-sender,
  6207 +.profile-activity-sender,
6166 6208 .profile-wall-sender {
6167   - margin: 2px 0;
  6209 + margin: 0;
6168 6210 }
6169 6211  
6170 6212 #profile-activity .profile-activity-time,
... ... @@ -6181,6 +6223,13 @@ h1#agenda-title {
6181 6223 overflow: hidden;
6182 6224 }
6183 6225  
  6226 +#profile-network li textarea:focus,
  6227 +#profile-wall li textarea:focus {
  6228 + background-position: left center;
  6229 + background-repeat: no-repeat;
  6230 + text-indent: 28px;
  6231 +}
  6232 +
6184 6233 .profile-network-message,
6185 6234 .profile-wall-message {
6186 6235 margin: 0;
... ... @@ -6258,7 +6307,7 @@ h1#agenda-title {
6258 6307  
6259 6308 #profile-wall .profile-wall-activities-comments li,
6260 6309 #profile-network .profile-wall-activities-comments li {
6261   - background: #e8e8e8;
  6310 + background: #f0f0f1;
6262 6311 border-bottom: 1px solid #d2d2d2 !important;
6263 6312 border-top: 1px solid #fff;
6264 6313 margin-bottom: 0;
... ... @@ -6300,10 +6349,17 @@ h1#agenda-title {
6300 6349  
6301 6350 #profile-wall .profile-wall-activities-comments .article-comment .button-bar,
6302 6351 #profile-network .profile-wall-activities-comments .article-comment .button-bar {
6303   - float: none !important;
  6352 + float: right;
6304 6353 padding: 0;
6305 6354 text-align: right;
6306 6355 position: static;
  6356 + clear: none;
  6357 + display: none;
  6358 +}
  6359 +
  6360 +#profile-wall .profile-wall-activities-comments .article-comment:hover .button-bar,
  6361 +#profile-network .profile-wall-activities-comments .article-comment:hover .button-bar {
  6362 + display: block;
6307 6363 }
6308 6364  
6309 6365 #profile-wall .profile-wall-activities-comments .article-comment .button-bar a.button,
... ... @@ -6314,7 +6370,7 @@ h1#agenda-title {
6314 6370 line-height: auto;
6315 6371 color: #333;
6316 6372 text-decoration: none;
6317   - font-size: 11px;
  6373 + font-size: 10px;
6318 6374 padding: 0;
6319 6375 margin: 0;
6320 6376 display: inline;
... ... @@ -6332,7 +6388,6 @@ h1#agenda-title {
6332 6388 display: inline;
6333 6389 position: static;
6334 6390 display: inline;
6335   - margin-right: -5px;
6336 6391 }
6337 6392  
6338 6393 /* friends online {{{ */
... ... @@ -6473,7 +6528,7 @@ h1#agenda-title {
6473 6528  
6474 6529 .profile-wall-reply-form {
6475 6530 display: block;
6476   - background: #e8e8e8;
  6531 + background: #f0f0f1;
6477 6532 border-bottom: 1px solid #d2d2d2;
6478 6533 border-top: 1px solid #fff;
6479 6534 margin-left: 50px;
... ... @@ -6518,6 +6573,10 @@ h1#agenda-title {
6518 6573 width: 375px;
6519 6574 }
6520 6575  
  6576 +#profile-wall #leave_scrap textarea {
  6577 + width: 442px;
  6578 +}
  6579 +
6521 6580 .profile-wall-scrap-replies {
6522 6581 width: 100%;
6523 6582 position: relative;
... ...