.yui-b.sidebar -box do %h3=:links.l %ul.checks %li=link_to :view_my_blog.l, user_posts_path(current_user) %li=link_to :new_post.l, new_user_post_path(current_user) -box do %h3=:search.l = form_for @search, :url => manage_user_posts_path(current_user), :html => {:class => "MainForm"} do |f| %label= :title.l = f.text_field :title_like %p %label= :category.l = f.select :category_id_equals, Category.all.collect{|c| [c.name, c.id]}, :include_blank => true %p %label= :status.l = f.select :published_as_equals, [['Published','live'], ['Draft','draft']], :include_blank => true %p %label= :show.l = select_tag :size, options_for_select([['10',10], ['20',20], ['100',100]], params[:size].to_i ) %p= f.submit :search.l #yui-main .yui-b -box do %h3 =:manage_posts.l %p=:posts_saved_with_draft_status_wont_appear_in_your_blog_until_you_publish_them.l -if @posts.total_count > 1 = paginate @posts %table{:border => 0, :width => '100%'} %thead %tr %th =sort_link @search, :created_at, :date_created.l %th =sort_link @search, :published_at, :date_published.l %th=:title.l %th=:category.l %th=:tags.l %th=:comments.l %th=:status.l %tbody - @posts.each do |post| %tr %td %abbr{:title=>"#{post.created_at}"}= I18n.l(post.created_at, :format => :published_date) %td %abbr{:title=>"#{post.published_at}"}= post.published_at_display %td = link_to post.title, edit_user_post_path(post.user, post) = link_to("(#{:preview.l})", user_post_path(post.user, post), :target => '_blank') unless post.is_live? %td= post.category ? post.category.name : :uncategorized.l %td= post.tags.any? ? post.tag_list : :no_tags.l %td= post.comments.count %td= post.is_live? ? link_to(:published.l, user_post_path(post.user, post)) : :draft.l