Sha256: 585f048881f541fa56e1ccd2576692ef1c02a5a974dc6e30fe99093564a0440a

Contents?: true

Size: 1.78 KB

Versions: 3

Compression:

Stored size: 1.78 KB

Contents

- cuser = current_user

.panel.panel-primary
  .panel-heading= t "the_comments.nav.header"
  .panel-body
    %p= link_to raw(t('the_comments.back_to_root')), '/'
    %hr

    %h5= t 'the_comments.incoming'
    %ul
      %li= link_to t("the_comments.draft_comments",     num: cuser.draft_comcoms_count),     [comments, :draft,     :comments]
      %li= link_to t("the_comments.published_comments", num: cuser.published_comcoms_count), [comments, :published, :comments]
      %li= link_to t("the_comments.deleted_comments",   num: cuser.deleted_comcoms_count),   [comments, :deleted,   :comments]
      %li= link_to t("the_comments.spam_comments",      num: cuser.spam_comcoms_count),      [comments, :spam,      :comments]

    %h5= t 'the_comments.written_by_me'
    %ul
      %li= link_to t("the_comments.draft_comments",     num: cuser.my_draft_comments.count),     [comments, :my_draft,     :comments]
      %li= link_to t("the_comments.published_comments", num: cuser.my_published_comments.count), [comments, :my_published, :comments]
      %li= link_to t("the_comments.my_comments",        num: cuser.my_comments_count),           [comments, :my_comments,  :comments]

    - if cuser.comments_admin?
      %h5= t 'the_comments.in_system'
      %ul
        %li= link_to t("the_comments.draft_comments",     num: Comment.with_state(:draft).count),     [comments, :total_draft,     :comments]
        %li= link_to t("the_comments.published_comments", num: Comment.with_state(:published).count), [comments, :total_published, :comments]
        %li= link_to t("the_comments.deleted_comments",   num: Comment.with_state(:deleted).count),   [comments, :total_deleted,   :comments]
        %li= link_to t("the_comments.spam_comments",      num: Comment.where(spam: true).count),      [comments, :total_spam,      :comments]

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
the_comments-2.1.0 app/views/the_comments/haml/_sidebar.html.haml
the_comments-2.0.1 app/views/the_comments/haml/_sidebar.html.haml
the_comments-2.0.0 app/views/the_comments/haml/_sidebar.html.haml