Sha256: 818c9092eb657cee16d3b2256396729f5f8add4aababeb2b6279caaba45c3ce3

Contents?: true

Size: 1.04 KB

Versions: 16

Compression:

Stored size: 1.04 KB

Contents

- if @blog.nil?
  .well
    -if !current_user.nil?
      Create your first blog
    - else
      %em current_user
      is not defined. You have to be logged in with Devise in order to configure your first blog.
- else
  - if @posts.empty? and @drafts.empty?
    .well
      = link_to "Create Your First Post", new_post_path, :class => "btn"
  - else
    - unless @drafts.empty?
      %h3.head Your #{pluralize(@drafts.count, "draft")}:
      - @drafts.each do |draft|
        - @post = draft
        - unless @post.nil?
          = render "post"
      - unless @posts.empty?
        %hr.gradient-white
    - old_date = DateTime.now + 1.day
    - @posts.each do |post|
      - @post = post
      - unless @post.nil?
        - unless old_date.day == @post.written_at.day and old_date.month == @post.written_at.month and old_date.year == @post.written_at.year
          %h3.head
            = @post.written_at.strftime("%B %d, %Y")
        = render "post"
        - old_date = @post.written_at
    = will_paginate(@posts, :renderer => BootstrapPagination::Rails)

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
almanac-0.9.2 app/views/almanac/posts/index.html.haml
almanac-0.9.1 app/views/almanac/posts/index.html.haml
almanac-0.9.0 app/views/almanac/posts/index.html.haml
almanac-0.8.0 app/views/almanac/posts/index.html.haml
almanac-0.7.4 app/views/almanac/posts/index.html.haml
almanac-0.7.3 app/views/almanac/posts/index.html.haml
almanac-0.7.2 app/views/almanac/posts/index.html.haml
almanac-0.7.1 app/views/almanac/posts/index.html.haml
almanac-0.6.1 app/views/almanac/posts/index.html.haml
almanac-0.6.0 app/views/almanac/posts/index.html.haml
almanac-0.5.3 app/views/almanac/posts/index.html.haml
almanac-0.5.2 app/views/almanac/posts/index.html.haml
almanac-0.5.1 app/views/almanac/posts/index.html.haml
almanac-0.5.0 app/views/almanac/posts/index.html.haml
almanac-0.4.5 app/views/almanac/posts/index.html.haml
almanac-0.4.4 app/views/almanac/posts/index.html.haml