.post

  %h3.title
    = link_to post.title, post

  %p.meta
    %span.date
      #{post.created_at.day} de #{I18n.t('date.month_names')[post.created_at.month.to_i]} de #{post.created_at.year}
    %span.comments
      Comentarios:
      = link_to post.comments.visible_by(current_user).count, post_path(post, :anchor => "comments")
    - if can? :update, post
      %span.edit= link_to "Editar", edit_admin_post_path(post)
    %span.share
      %span.twitter-share= tweet_button_for post
      %span.facebook-share= fb_like_button_for post

  .audios
    = render post.audios
    = render post.media

  .content
    - if post.content?
      = markdown_format post.content, :filter_html => false

  - if can?(:update, Post) && post.pending?
    %p.meta
      = link_to "Aprobar contribución", approve_contribution_admin_post_path(post)
      (Enviado por #{link_to post.contributor.alias, post.contributor})

.post

  %h3.title
    = link_to post.title, post

  %p.meta
    %span.date
      #{post.created_at.day} de #{I18n.t('date.month_names')[post.created_at.month.to_i]} de #{post.created_at.year}
    %span.comments
      Comentarios:
      = link_to post.comments.visible_by(current_user).count, post_path(post, :anchor => "comments")
    - if can? :update, post
      %span.edit= link_to "Editar", edit_admin_post_path(post)
    %span.share
      %span.twitter-share= tweet_button_for post
      %span.facebook-share= fb_like_button_for post
    - if post.contributor
      %span.contribution
        %br/
        (contribución de #{link_to post.contributor.alias, user_url(post.contributor)})

  .audios
    = render post.audios
    = render post.media

  .content
    - if post.content?
      = markdown_format post.content, :filter_html => false

  - if can?(:update, Post) && post.pending?
    %p.meta
      = link_to "Aprobar contribución", approve_contribution_admin_post_path(post)
      (Enviado por #{link_to post.contributor.alias, post.contributor})

Add contributor to post view
Add contributor to post view
