Commit 185ab97249c37040144f2603a149c3b985572a86
1 parent
090bb72b
Exists in
master
and in
28 other branches
Wall almost ready
Missing feed notification and network
Showing
6 changed files
with
33 additions
and
24 deletions
Show diff stats
app/views/profile/_create_article.rhtml
... | ... | @@ -2,11 +2,15 @@ |
2 | 2 | <%= link_to(profile_image(activity.user, :minor), activity.user.url) %> |
3 | 3 | </div> |
4 | 4 | <div class='profile-activity-description profile-activity-article-<%= activity.target.class.icon_name %>'> |
5 | - <p class='profile-activity-text'><%= link_to activity.user.name, activity.user.url %></p> | |
5 | + <p class='profile-activity-text'> | |
6 | + <%= link_to activity.user.short_name(20), activity.user.url %> | |
7 | + <%= _("on community %s") % link_to(activity.target.profile.short_name(20), activity.target.profile.url) if activity.target.profile.is_a?(Community) %> | |
8 | + </p> | |
6 | 9 | <div class='profile-activity-lead'> |
7 | - <b><%= link_to(activity.params['name'], activity.params['url']) %></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 | + <b><%= link_to(activity.params['name'], activity.params['url']) %></b> | |
11 | + <span title='<%= activity.target.class.short_description %>' class='profile-activity-icon icon-new icon-new<%= activity.target.class.icon_name %>'></span><br /> | |
12 | + <%= 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> | |
13 | + </div> | |
10 | 14 | <%= content_tag(:p, link_to(_('See complete forum'), activity.get_url), :class => 'see-forum') if activity.target.is_a?(Forum) %> |
11 | 15 | <p class='profile-activity-time'><%= time_ago_as_sentence(activity.created_at) %></p> |
12 | 16 | <div class='profile-wall-actions'> |
... | ... | @@ -15,9 +19,4 @@ |
15 | 19 | </div> |
16 | 20 | </div> |
17 | 21 | |
18 | -<hr /> | |
19 | -<ul class="profile-wall-activities-comments comments-count-<%= activity.comments_count %>" > | |
20 | - <%= render :partial => 'comment', :collection => activity.comments %> | |
21 | -</ul> | |
22 | - | |
23 | -<%= render :partial => 'profile_comment_form', :locals => { :activity => activity } %> | |
22 | +<%= render :partial => 'profile_comments', :locals => { :activity => activity } %> | ... | ... |
app/views/profile/_default_activity.rhtml
... | ... | @@ -10,9 +10,4 @@ |
10 | 10 | </div> |
11 | 11 | </div> |
12 | 12 | |
13 | -<hr /> | |
14 | -<ul class="profile-wall-activities-comments comments-count-<%= activity.comments_count %>" > | |
15 | - <%= render :partial => 'comment', :collection => activity.comments %> | |
16 | -</ul> | |
17 | - | |
18 | -<%= render :partial => 'profile_comment_form', :locals => { :activity => activity } %> | |
13 | +<%= render :partial => 'profile_comments', :locals => { :activity => activity } %> | ... | ... |
app/views/profile/_profile_scrap.rhtml
... | ... | @@ -15,7 +15,14 @@ |
15 | 15 | <%= link_to_remote(content_tag(:span, _('Remove')), :confirm => _('Are you sure?'), :url =>{:action => 'remove_scrap', :scrap_id => scrap.id}, :update => "profile-activity-item-#{scrap.id}") if logged_in? && user.can_control_scrap?(scrap) %> |
16 | 16 | </div> |
17 | 17 | </div> |
18 | - <ul class="profile-wall-activities-comments scrap-replies" style='width: auto;'> | |
18 | + | |
19 | + <% if scrap.replies.count > 2 %> | |
20 | + <div class='view-all-comments icon-chat'> | |
21 | + <%= link_to(_("View all %s comments") % scrap.replies.count, '#') %> | |
22 | + </div> | |
23 | + <% end %> | |
24 | + | |
25 | + <ul class="profile-wall-activities-comments scrap-replies" style="width: auto;padding-left:0px; <%= 'display:none;' if (scrap.replies.count > 2) %>" > | |
19 | 26 | <% scrap.replies.map do |reply| %> |
20 | 27 | <%= render :partial => 'profile_scrap', :locals => {:scrap => reply} %> |
21 | 28 | <% end %> | ... | ... |
app/views/profile/_upload_image.rhtml
... | ... | @@ -14,12 +14,7 @@ |
14 | 14 | <div title='<%= activity.target.class.short_description %>' class='profile-activity-icon icon-new icon-newgallery'></div> |
15 | 15 | |
16 | 16 | <% if activity.get_view_url.size == 1 %> |
17 | - <hr /> | |
18 | - <ul class="profile-wall-activities-comments comments-count-<%= activity.comments_count %>" > | |
19 | - <%= render :partial => 'comment', :collection => activity.comments %> | |
20 | - </ul> | |
21 | - | |
22 | - <%= render :partial => 'profile_comment_form', :locals => { :activity => activity } %> | |
17 | + <%= render :partial => 'profile_comments', :locals => { :activity => activity } %> | |
23 | 18 | <% end %> |
24 | 19 | |
25 | 20 | <br/> | ... | ... |
public/javascripts/application.js
... | ... | @@ -731,4 +731,11 @@ jQuery(function($){ |
731 | 731 | return false; |
732 | 732 | } |
733 | 733 | }); |
734 | + | |
735 | + $('.view-all-comments').live('click', function(e) { | |
736 | + var link = this; | |
737 | + $(link).parent().find('.profile-wall-activities-comments').show(); | |
738 | + $(link).hide(); | |
739 | + return false; | |
740 | + }); | |
734 | 741 | }); | ... | ... |
public/stylesheets/application.css
... | ... | @@ -6577,7 +6577,7 @@ h1#agenda-title { |
6577 | 6577 | background: #f0f0f1; |
6578 | 6578 | border-bottom: 1px solid #d2d2d2; |
6579 | 6579 | border-top: 1px solid #fff; |
6580 | - margin-left: 50px; | |
6580 | + Xmargin-left: 50px; | |
6581 | 6581 | padding: 0 5px; |
6582 | 6582 | } |
6583 | 6583 | |
... | ... | @@ -6590,6 +6590,12 @@ h1#agenda-title { |
6590 | 6590 | margin-right: 2px; |
6591 | 6591 | } |
6592 | 6592 | |
6593 | +.view-all-comments { | |
6594 | + clear: both; | |
6595 | + margin-left: 50px; | |
6596 | + padding-left: 20px; | |
6597 | +} | |
6598 | + | |
6593 | 6599 | /* Profile activity relative dimensions */ |
6594 | 6600 | |
6595 | 6601 | #leave_scrap { | ... | ... |