더북(TheBook)

▼ app/views/Post/Show.html

{{set . “title” “Show Post”}}
{{template “header.html” .}}
 
<p>
    <b>Title: </b>
    {{ .post.Title}}
</p>
 
<p>
    <b>Body: </b>
    {{ .post.Body}}
</p>
 
<h4>Comments: </h4>
{{template “Comment/_comment.html” .}}
 
<h4>Add a comment:</h4>
{{template “Comment/_form.html” .}}
 
{{if isAdmin .currentUser }}
    <a href=”{{url “Post.Edit” .post.Id}}”>Edit</a>
    <a href=”{{url “Post.Destroy” .Id}}”>Destroy</a>
{{end}}
 
<a href=”{{url “Post.Index”}}”>Back</a>
 
{{template “footer.html” .}}

신간 소식 구독하기
뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.