Sha256: 17eaec55235d6845bac29b0e2aa8992764b14b51603cad2f156740e50f4fb26b

Contents?: true

Size: 1.03 KB

Versions: 15

Compression:

Stored size: 1.03 KB

Contents

- posts = recent_posts(category: nil, limit: 5)

- if EffectivePosts.categories.present?
  - categories = EffectivePosts.categories
  %h4.dashboard-title Categories
  %ul.list-unstyled
    %li= link_to 'All Posts', effective_posts.posts_path

    - categories.sort.each do |category|
      %li= link_to category.to_s.titleize, effective_post_category_path(category)

- posts = recent_posts(category: nil, limit: 5)
%h4.dashboard-title Recent
%ul.list-unstyled
  - posts.each do |post|
    %li= link_to post, effective_post_path(post)

  - if posts.length == 0
    %li= link_to 'None', effective_posts.posts_path, class: 'disabled'

- if EffectivePosts.authorized?(self, :admin, :effective_posts)
  %h4.dashboard-title Admin
  %ul.list-unstyled
    %li= link_to 'All Posts', effective_posts.admin_posts_path

    - if @post.present?
      %li= link_to 'Edit Post Content', effective_regions.edit_path(effective_posts.post_path(@post, exit: effective_posts.post_path(@post)))
      %li= link_to 'Edit Post Settings', effective_posts.edit_admin_post_path(@post)

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
effective_posts-1.2.0 app/views/effective/posts/_sidebar.html.haml
effective_posts-1.1.11 app/views/effective/posts/_sidebar.html.haml
effective_posts-1.1.10 app/views/effective/posts/_sidebar.html.haml
effective_posts-1.1.9 app/views/effective/posts/_sidebar.html.haml
effective_posts-1.1.8 app/views/effective/posts/_sidebar.html.haml
effective_posts-1.1.7 app/views/effective/posts/_sidebar.html.haml
effective_posts-1.1.6 app/views/effective/posts/_sidebar.html.haml
effective_posts-1.1.5 app/views/effective/posts/_sidebar.html.haml
effective_posts-1.1.4 app/views/effective/posts/_sidebar.html.haml
effective_posts-1.1.3 app/views/effective/posts/_sidebar.html.haml
effective_posts-1.1.2 app/views/effective/posts/_sidebar.html.haml
effective_posts-1.1.1 app/views/effective/posts/_sidebar.html.haml
effective_posts-1.1.0 app/views/effective/posts/_sidebar.html.haml
effective_posts-1.0.6 app/views/effective/posts/_sidebar.html.haml
effective_posts-1.0.5 app/views/effective/posts/_sidebar.html.haml