diff --git a/examples/blog/app/views/comments/edit.erb b/examples/blog/app/views/comments/edit.erb new file mode 100644 index 0000000..519b843 --- /dev/null +++ b/examples/blog/app/views/comments/edit.erb @@ -0,0 +1,22 @@ +
+ <%== f.label(:body, t('comments.body_label')) %> + <%== f.text_area(:body) %> + <%== f.error_messages(:body) %> +
+ <%== f.submit(t('comments.update_submit')) %> +<% end %> + +<%== link_to(t('posts.back_to_list'), url_for(:post, slug: post.to_param)) %>
diff --git a/examples/blog/app/views/comments/index.erb b/examples/blog/app/views/comments/index.erb new file mode 100644 index 0000000..d125c72 --- /dev/null +++ b/examples/blog/app/views/comments/index.erb @@ -0,0 +1,16 @@ +<%== link_to(post.title, url_for(:post, slug: post.to_param)) %>
+ +<% if comments.none? %> +<%= t('comments.empty') %>
+<% else %> +<%== link_to(t('posts.back_to_list'), url_for(:posts)) %>
diff --git a/examples/blog/app/views/comments/trash.erb b/examples/blog/app/views/comments/trash.erb new file mode 100644 index 0000000..4d8cf0a --- /dev/null +++ b/examples/blog/app/views/comments/trash.erb @@ -0,0 +1,27 @@ +<% if notice %> +<%= notice %>
+<% end %> + +<%= t('comments.trash_empty') %>
+<% else %> ++ <% if comment_post_linkable?(comment) %> + <%== link_to(comment_post_label(comment), url_for(:post, slug: comment_post_slug(comment))) %> + <% else %> + <%= comment_post_label(comment) %> + <% end %> +
+<%= comment.body %>
+ <%== button_to(t('comments.restore'), url_for(:restore_comment, id: comment.id), method: :patch) %> +<%== link_to(t('posts.back_to_list'), url_for(:posts)) %>