Sha256: 95937068e56e94e26a087f815adf3c0af5ab0e7f2454d9d58829969282b80308

Contents?: true

Size: 887 Bytes

Versions: 7

Compression:

Stored size: 887 Bytes

Contents

<?r if !@posts.empty? ?>

<?r @posts.each do |post| ?>
<?r created_at = post.created_at.strftime('%Y-%m-%d') ?>

<article>
    <header>
        <h1>
            #{Posts.a(post.title, :view, post.id)}
        </h1>
        <p>
            Created at <time pubdate="pubdate"
            datetime="#{created_at}">#{created_at}</time> and written by
            #{post.user.username}
        </p>
    </header>

    #{RDiscount.new(post.body).to_html}

    <p>
        #{post.comments.length} comment(s)

        <?r if logged_in? ?>
        | #{Posts.a('Edit', :edit, post.id)}
        | #{Posts.a('Delete', :delete, post.id)}
        <?r end ?>
    </p>
</article>

<?r end ?>

#{if @posts.respond_to?(:navigation) and @posts.page_count > 1
  @posts.navigation
end}

<?r else ?>

<p>No posts were found.</p>

<?r end ?>

<?r if logged_in? ?>
<p>#{Posts.a('New Post', :new)}</p>
<?r end ?>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ramaze-2023.01.06 examples/app/blog/view/index.xhtml
ramaze-2012.12.08 examples/app/blog/view/index.xhtml
ramaze-2012.12.08b examples/app/blog/view/index.xhtml
ramaze-2012.04.14 examples/app/blog/view/index.xhtml
ramaze-2012.03.07 examples/app/blog/view/index.xhtml
ramaze-2011.12.28 examples/app/blog/view/index.xhtml
ramaze-2011.10.23 examples/app/blog/view/index.xhtml