alt layout for user profile

This commit is contained in:
albert
2013-02-22 15:16:54 -05:00
parent 5b0c192d18
commit ad28a2cced
5 changed files with 119 additions and 118 deletions

View File

@@ -37,6 +37,10 @@ class UserPresenter
Post.where("id in (?)", subscription.post_id_array.slice(0, 6).map(&:to_i)).order("id desc")
end
def tag_links_for_subscription(template, subscription)
subscription.tag_query_array.map {|x| template.link_to(x.tr("_", " "), template.posts_path(:tags => x))}.join(", ").html_safe
end
def upload_limit
deleted_count = Post.for_user(user.id).deleted.count
pending_count = Post.for_user(user.id).pending.count