%dl{:class => (activity.item_type && activity.item_type.humanize.downcase) } %dt =time_ago_in_words_or_date(activity.created_at) %dd =link_to activity.user.login.capitalize, user_path(activity.user.login_slug) - if activity.item - case activity.item_type - when 'Post' =:wrote_a_post.l = link_to activity.item.title, user_post_path(activity.item.user, activity.item) - when 'Photo' =:uploaded_a_photo.l = link_to image_tag(activity.item.public_filename(:thumb), :width => '50px'), user_photo_path(activity.item.user, activity.item) - when 'Topic' =:started_a_topic.l -topic = activity.item = link_to truncate_words(topic.title), forum_topic_path(topic.forum, topic) - when 'SbPost' =:added_to_a_forum_topic.l - topic = activity.item.topic = link_to truncate_words(activity.item.body), forum_topic_path(topic.forum, topic) - when 'Comment' =:left_a_comment.l = link_to truncate_words(activity.item.comment), commentable_url(activity.item) - when 'Favorite' =:favorited.l = link_to " a #{activity.item.favoritable.class.to_s.humanize.downcase}", user_favorite_path(activity.item.user, activity.item) - when 'Clipping' =:added_a_clipping.l = link_to image_tag( activity.item.image_uri(:thumb), :width => '50px'), user_clipping_path(activity.item.user, activity.item) - else - case activity.action - when 'updated_profile' =:updated_their_profile.l - when 'logged_in' =:logged_into_the_site.l - else = " #{activity.action.sub("_", " ") }"