Noosfero/noosfero

View on GitHub
app/views/profile/_profile_activities_list.html.erb

Summary

Maintainability
Test Coverage
<% unless activities.nil? %>
  <% activities.each do |profile_activity| %>
    <% activity = profile_activity.activity %>
    <% if activity.kind_of?(ActionTracker::Record) %>
      <%= render :partial => 'profile_activity', :locals => { :activity => activity, :tab_action => 'wall' } if activity.visible? %>
    <% else %>
      <%= render :partial => 'profile_scraps', :locals => { :activity => activity, :scrap => activity } %>
    <% end %>
  <% end %>
<% end %>

<% if activities.current_page < activities.total_pages %>
  <div id='profile_activities_page_<%= activities.current_page %>' class="profile-activities-more-pages">
    <%= link_to_remote font_awesome(:down_arrow, _('View more')), url: { action: 'view_more_activities', page: (activities.current_page + 1), offsets: @offsets, kind: 'wall'}, update: "profile_activities_page_#{activities.current_page}", html: { class: "view-more-activities" } %>
  </div>
<% end %>