From 8660046b42d27e400e175d0f8d4306961db01528 Mon Sep 17 00:00:00 2001 From: DualFroz Date: Fri, 4 Sep 2026 18:31:38 +0200 Subject: [PATCH] feat(account): add comments and edit --- examples/blog/app/views/account/comments.erb | 25 +++++++++++++++++ examples/blog/app/views/account/edit.erb | 21 +++++++++++++++ .../blog/app/views/account/moderation.erb | 27 +++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 examples/blog/app/views/account/comments.erb create mode 100644 examples/blog/app/views/account/edit.erb create mode 100644 examples/blog/app/views/account/moderation.erb diff --git a/examples/blog/app/views/account/comments.erb b/examples/blog/app/views/account/comments.erb new file mode 100644 index 0000000..d6c54a3 --- /dev/null +++ b/examples/blog/app/views/account/comments.erb @@ -0,0 +1,25 @@ +

<%= t('account.comments_heading') %>

+ +<% if comments.none? %> +

<%= t('account.comments_empty') %>

+<% else %> + +<% end %> + +<%== paginate(comments, path: ->(page) { "#{url_for(:account_comments)}?page=#{page}" }) %> + +

<%== link_to(t('posts.back_to_list'), url_for(:posts)) %>

diff --git a/examples/blog/app/views/account/edit.erb b/examples/blog/app/views/account/edit.erb new file mode 100644 index 0000000..ee62a8a --- /dev/null +++ b/examples/blog/app/views/account/edit.erb @@ -0,0 +1,21 @@ +

<%= t('account.heading') %>

+ +<% unless errors.empty? %> +

<%= t('posts.errors_heading') %>

+ +<% end %> + +<% form_for(user, url: '/account', method: :patch) do |f| %> +

+ <%== f.label(:email, t('account.email_label')) %> + <%== f.email_field(:email) %> + <%== f.error_messages(:email) %> +

+ <%== f.submit(t('account.submit')) %> +<% end %> + +

<%== link_to(t('posts.back_to_list'), url_for(:root)) %>

diff --git a/examples/blog/app/views/account/moderation.erb b/examples/blog/app/views/account/moderation.erb new file mode 100644 index 0000000..63132d2 --- /dev/null +++ b/examples/blog/app/views/account/moderation.erb @@ -0,0 +1,27 @@ +

<%= t('account.moderation_heading') %>

+ +<% if comments.none? %> +

<%= t('account.moderation_empty') %>

+<% else %> + +<% end %> + +<%== paginate(comments, path: ->(page) { "#{url_for(:account_moderation)}?page=#{page}" }) %> + +

<%== link_to(t('posts.back_to_list'), url_for(:posts)) %>