Sha256: 282d6888ba2369bbf8f7b6a6052483dfa6fd6dbd204f407160b4d33b4d9f0334

Contents?: true

Size: 1.42 KB

Versions: 7

Compression:

Stored size: 1.42 KB

Contents

<article>
    <header>
        <h1>
            #{@post.title}
        </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}

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

<div id="comments">
    <h2>Comments</h2>

    <?r if !@post.comments.empty? ?>

    <?r @post.comments.each do |comment| ?>
    <article>
        <header>
            <h1>#{comment.username}</h1>

            <p class="meta">
                <time pubdate="pubdate"
                datetime="#{comment.created_at.strftime('%Y-%m-%d')}">
                    #{comment.created_at.strftime('%Y-%m-%d')}
                </time>
            </p>
        </header>

        <p>#{comment.comment}</p>
    </article>
    <?r end ?>

    <?r else ?>

    <p>No comments have been added yet.</p>

    <?r end ?>

    <h2>Add Comment</h2>

    #{form_for(
      @new_comment,
      :method => :post,
      :action => Posts.r(:add_comment)
    ) do |f|
      f.input_hidden(:post_id, @post.id)

      unless logged_in?
        f.input_text('Username', :username)
      end

      f.textarea('Comment', :comment, :rows => 7, :cols => 60)

      f.input_submit('Submit')
    end}
</div>

Version data entries

7 entries across 7 versions & 1 rubygems

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