<%= t('email.digest.message') %>

<% unless @inbox.empty? %>

<%= t('private_message.title', :count => @inbox.size) %>

<% @inbox.take(10).each do |inbox| %>

<%= t('email.digest.inbox', :sender_name => inbox.sender.name).html_safe %> <%= link_to sanitize(inbox.title), user_message_url(inbox.receiver, inbox) %> <%= t('updated_time_ago', :time => sanitize(time_ago_in_words(inbox.updated_at))) %>

<% end %> <% if @inbox.size > 10 %>

<%= t('private_message.more', :count => @inbox.size - 10) %>

<% end %> <% end %> <% unless @posts.empty? %>

<%= t('post.title', :count => @posts.size) %>

<% @posts.take(10).each do |post| %>

<%= t('email.digest.posted', :author_name => post.author.name, :space_name => post.space.name).html_safe %> <%=link_to post.title, space_post_url(post.space,post)%> <%= t('updated_time_ago', :time => time_ago_in_words(post.updated_at)) %>

<% end %> <% if @posts.size > 10 %>

<%= t('post.more', :count => @posts.size - 10) %>

<% end %> <% end %> <% unless @news.empty? %>

<%= t('news.title', :count => @news.size) %>

<% @news.take(10).each do |news| %>

<%= t('email.digest.news', :space_name => news.space.name).html_safe %> <%= link_to(sanitize(news.title), space_url(news.space)) %> <%= t('updated_time_ago', :time => time_ago_in_words(news.updated_at)) %>

<% end %> <% if @news.size > 10 %>

<%= t('new.more', :count => @news.size - 10) %>

<% end %> <% end %> <% unless @attachments.empty? %>

<%= t('attachment.title', :count => @attachments.size) %>

<% @attachments.take(10).each do |att| %>

<%= t('email.digest.attachment', :author_name => att.author.name, :space_name => att.space.name).html_safe %> <%= link_to(sanitize(att.filename), space_attachment_url(att.space, att, :format => att.format!)) %> <%= t('created_time_ago', :time => sanitize(time_ago_in_words(att.created_at))) %>

<% end %> <% if @attachments.size > 10 %>

<%= t('attachment.more', :count => @attachments.size - 10) %>

<% end %> <% end %> <% unless @events.empty? %>

<%= t('event.title', :count => @events.size) %>

<% @events.take(10).each do |event| %>

<%= t('email.digest.event', :author_name => event.author.name, :space_name => event.space.name).html_safe %> <%=link_to sanitize(event.title), space_event_url(event.space, event) %> <%= t('updated_time_ago', :time => sanitize(time_ago_in_words(event.updated_at))) %>

<% end %> <% if @events.size > 10 %>

<%= t('event.more', :count => @events.size - 10) %>

<% end %> <% end %> <%= @signature %>