From 05d57bf9306ceae67e55fe57bb453be03b2dc40a Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Sun, 13 Sep 2026 15:22:13 +0200 Subject: [PATCH 01/26] Add breadcrumbs for users#index page --- app/views/users/index.html.erb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index e0566527d..db249d801 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -1,3 +1,14 @@ +
+
+ +
+
+ <% content_for :title, t(".title") %> <% content_for :action_bar do %> From 51c787785904909de0a3c1f9cfefd7b6b1c3dede Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Sun, 13 Sep 2026 15:26:19 +0200 Subject: [PATCH 02/26] Enable stylesheet_link_tag integrity --- app/views/layouts/application.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 5467463f7..f32048848 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -13,7 +13,7 @@ <%= favicon_link_tag %> <%= csrf_meta_tag %> <%= csp_meta_tag %> - <%= stylesheet_link_tag :application %> + <%= stylesheet_link_tag :application, integrity: true %> <%= javascript_include_tag :app %> <%= javascript_importmap_tags %> From f6b19cb720a57bfa9a486a5e19f05d1680721bdd Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Sun, 13 Sep 2026 15:32:14 +0200 Subject: [PATCH 03/26] Cleanup --- app/views/shared/_link_github_account.html.erb | 1 + app/views/shared/_link_google_account.html.erb | 1 + app/views/shared/_notice_fingerprinter.html.erb | 1 + 3 files changed, 3 insertions(+) diff --git a/app/views/shared/_link_github_account.html.erb b/app/views/shared/_link_github_account.html.erb index cd987656d..ba509d061 100644 --- a/app/views/shared/_link_github_account.html.erb +++ b/app/views/shared/_link_github_account.html.erb @@ -1,4 +1,5 @@ <%# locals: (user:) %> + <% if Errbit::Config.github_authentication && user == current_user %> <% if user.github_account? %> diff --git a/app/views/shared/_link_google_account.html.erb b/app/views/shared/_link_google_account.html.erb index af1bfabb7..c0072fe1d 100644 --- a/app/views/shared/_link_google_account.html.erb +++ b/app/views/shared/_link_google_account.html.erb @@ -1,4 +1,5 @@ <%# locals: (user:) %> + <% if Errbit::Config.google_authentication && user == current_user %> <% if user.google_account? %> diff --git a/app/views/shared/_notice_fingerprinter.html.erb b/app/views/shared/_notice_fingerprinter.html.erb index bcea93579..f5625744d 100644 --- a/app/views/shared/_notice_fingerprinter.html.erb +++ b/app/views/shared/_notice_fingerprinter.html.erb @@ -1,4 +1,5 @@ <%# locals: (f:) %> + <%= f.fields_for :notice_fingerprinter do |g| %>
<%= g.check_box :error_class %> From 60f87334b34c6f8fcd5e6019dc088ee19fe2dfcf Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Sun, 13 Sep 2026 15:37:33 +0200 Subject: [PATCH 04/26] Update --- app/views/users/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index db249d801..d06216839 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -3,7 +3,7 @@
From f7f6bc953d8f2445ee2b43830f196904602d14bc Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Sun, 13 Sep 2026 15:40:33 +0200 Subject: [PATCH 05/26] Fix test --- app/views/users/index.html.erb | 2 +- spec/views/users/index.html.erb_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index d06216839..6e9dbcf6e 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -23,7 +23,7 @@
- +
<% if Errbit::Config.use_gravatar %> diff --git a/spec/views/users/index.html.erb_spec.rb b/spec/views/users/index.html.erb_spec.rb index 523d47f7d..bd1e33e18 100644 --- a/spec/views/users/index.html.erb_spec.rb +++ b/spec/views/users/index.html.erb_spec.rb @@ -10,6 +10,6 @@ it "should see users option" do render - expect(rendered).to match(/class="user_list"/) + expect(rendered).to match(/id="users"/) end end From cc7c9e24ab373600f4e70d4dfc2195fdad0848d3 Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Sun, 13 Sep 2026 18:27:29 +0200 Subject: [PATCH 06/26] Style users#new --- app/controllers/users_controller.rb | 2 +- app/views/users/new.html.erb | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index e2c0af073..6e79a8149 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class UsersController < ApplicationController - layout "errbit", except: :index + layout "errbit", except: [:index, :new] def index @users = policy_scope(User) diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index 90c033c70..27c7ec590 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -1,3 +1,15 @@ +
+
+ +
+
+ <% content_for :title, t(".title") %> <% content_for :action_bar, link_to(t(".cancel"), users_path, class: "button") %> From 0d6aed26e9bd393deb4294535d42ff4366bc45f4 Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Sun, 13 Sep 2026 18:30:19 +0200 Subject: [PATCH 07/26] Usability: all time zones --- app/views/users/_fields.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/_fields.html.erb b/app/views/users/_fields.html.erb index b72d125a1..2a206f077 100644 --- a/app/views/users/_fields.html.erb +++ b/app/views/users/_fields.html.erb @@ -33,7 +33,7 @@
<%= f.label :time_zone, t(".time_zone") %> - <%= f.time_zone_select :time_zone, ActiveSupport::TimeZone.us_zones %> + <%= f.time_zone_select :time_zone, ActiveSupport::TimeZone.all %>
From f5b42abeabd7ef0713e9902c3b21253b0c142e2d Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Sun, 13 Sep 2026 18:32:35 +0200 Subject: [PATCH 08/26] Style users#new --- app/views/users/new.html.erb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index 27c7ec590..61a3c5730 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -17,7 +17,11 @@ <%= form_for @user do |f| %> <%= render "fields", f: f, user: @user %> -
- <%= f.submit t(".add_user") %> +
+
+ <%= button_tag type: :submit, class: "btn btn-primary" do %> + <%= inline_svg_tag "icons/floppy.svg" %> <%= t(".add_user") %> + <% end %> +
<% end %> From 2aa7c64453aa16365ff9f8ab5e9d50413e77b2df Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Sun, 13 Sep 2026 18:38:08 +0200 Subject: [PATCH 09/26] Configure kaminari --- config/initializers/kaminari.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 config/initializers/kaminari.rb diff --git a/config/initializers/kaminari.rb b/config/initializers/kaminari.rb new file mode 100644 index 000000000..9bd4c7aa9 --- /dev/null +++ b/config/initializers/kaminari.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +Kaminari.configure do |config| + # config.default_per_page = 25 + # config.max_per_page = nil + config.window = 1 + # config.outer_window = 0 + # config.left = 0 + # config.right = 0 + # config.page_method_name = :page + # config.param_name = :page + # config.max_pages = nil + # config.params_on_first_page = false +end From 8fe99751a02d156e7bc6a1ee961092bbbf99c970 Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Sun, 13 Sep 2026 18:39:35 +0200 Subject: [PATCH 10/26] Configure kaminari --- config/locales/kaminari.en.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 config/locales/kaminari.en.yml diff --git a/config/locales/kaminari.en.yml b/config/locales/kaminari.en.yml new file mode 100644 index 000000000..8c01f9b57 --- /dev/null +++ b/config/locales/kaminari.en.yml @@ -0,0 +1,8 @@ +en: + views: + pagination: + first: "«" + last: "»" + previous: "‹" + next: "›" + truncate: "…" From e9be52910e9a22d300a9b48d458620c883567b23 Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Sun, 13 Sep 2026 18:45:37 +0200 Subject: [PATCH 11/26] Update --- app/views/layouts/application.html.erb | 6 ++++++ app/views/users/index.html.erb | 25 +++++++++++++------------ app/views/users/new.html.erb | 26 ++++++++++++++------------ 3 files changed, 33 insertions(+), 24 deletions(-) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index f32048848..420fe2fca 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -29,6 +29,12 @@
+ <% if (breadcrumb = yield(:breadcrumb)).present? %> +
+ <%= breadcrumb %> +
+ <% end %> +
<%= yield :title_avatar %> diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 6e9dbcf6e..62e0e48a5 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -1,16 +1,18 @@ -
-
- -
-
- <% content_for :title, t(".title") %> +<% content_for :breadcrumb do %> +
+
+ +
+
+<% end %> + <% content_for :action_bar do %> <%= link_to new_user_path do %> @@ -58,7 +60,6 @@
-
<%= paginate @users %> diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index 61a3c5730..afe3cac8b 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -1,17 +1,19 @@ -
-
- -
-
- <% content_for :title, t(".title") %> +<% content_for :breadcrumb do %> +
+
+ +
+
+<% end %> + <% content_for :action_bar, link_to(t(".cancel"), users_path, class: "button") %> <%= form_for @user do |f| %> From 156546745f5f80f887f49735b780965ec77e5a6f Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Mon, 14 Sep 2026 00:31:32 +0200 Subject: [PATCH 12/26] Fix GitHub job names --- .github/workflows/brakeman.yml | 2 +- .github/workflows/herb.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/brakeman.yml b/.github/workflows/brakeman.yml index 0ae890cca..bda70d0d3 100644 --- a/.github/workflows/brakeman.yml +++ b/.github/workflows/brakeman.yml @@ -19,7 +19,7 @@ permissions: contents: read jobs: - run: + brakeman: runs-on: ubuntu-24.04 timeout-minutes: 10 diff --git a/.github/workflows/herb.yml b/.github/workflows/herb.yml index 54ead1e72..f693c4987 100644 --- a/.github/workflows/herb.yml +++ b/.github/workflows/herb.yml @@ -17,7 +17,7 @@ permissions: contents: read jobs: - run: + herb: runs-on: ubuntu-24.04 timeout-minutes: 10 From a89de4f7e390d073fd71e41b627b8087de39612d Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Mon, 14 Sep 2026 00:33:48 +0200 Subject: [PATCH 13/26] Un-style app/views/users/_fields.html.erb --- app/views/users/_fields.html.erb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/views/users/_fields.html.erb b/app/views/users/_fields.html.erb index 2a206f077..309c941dc 100644 --- a/app/views/users/_fields.html.erb +++ b/app/views/users/_fields.html.erb @@ -2,19 +2,19 @@ <%= errors_for user %> -
+
<%= f.label :name, t(".name") %> <%= f.text_field :name %>
<% if Errbit::Config.user_has_username %> -
+
<%= f.label :username, t(".username") %> <%= f.text_field :username, autocomplete: "username" %>
<% end %> -
+
<%= f.label :email, t(".email") %> <%= f.text_field :email, autocomplete: "email" %>
@@ -26,28 +26,28 @@
<% end %> -
+
<%= f.label :per_page, t(".entries") %> <%= f.select :per_page, [10, 20, 30, 50, 75, 100] %>
-
+
<%= f.label :time_zone, t(".time_zone") %> <%= f.time_zone_select :time_zone, ActiveSupport::TimeZone.all %>
-
+
<%= f.label :password, t(".password") %> <%= f.password_field :password, autocomplete: "new-password" %>
-
+
<%= f.label :password_confirmation, t(".password_confirmation") %> <%= f.password_field :password_confirmation, autocomplete: "new-password" %>
<% if current_user.admin? %> -
+
<%= f.check_box :admin %> <%= f.label :admin, t(".admin") %>
From 20a5d31e75f06be47be981709e9b54d826ca6d6c Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Mon, 14 Sep 2026 00:37:44 +0200 Subject: [PATCH 14/26] Configure kaminari --- config/locales/kaminari.pt-BR.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 config/locales/kaminari.pt-BR.yml diff --git a/config/locales/kaminari.pt-BR.yml b/config/locales/kaminari.pt-BR.yml new file mode 100644 index 000000000..f0801936e --- /dev/null +++ b/config/locales/kaminari.pt-BR.yml @@ -0,0 +1,8 @@ +pt-BR: + views: + pagination: + first: "«" + last: "»" + previous: "‹" + next: "›" + truncate: "…" From 20159335ec7b0cd2958fea77bc214ce4c9c6e53c Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Mon, 14 Sep 2026 00:44:49 +0200 Subject: [PATCH 15/26] Update en locale --- config/locales/en.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index fe4e18c56..ac807dea3 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -206,9 +206,11 @@ en: success: "That's sad. %{name} is no longer part of your team." error: "You can't delete yourself" fields: - name: Name + name: "Name" + name_placeholder: "Jon Snow" username: Username email: Email + email_placeholder: "jon.snow@example.com" entries: Entries per page time_zone: Time Zone password: Password From 23eb51ce33748c639de3739c4132660f87ccb5be Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Mon, 14 Sep 2026 00:45:14 +0200 Subject: [PATCH 16/26] Style users/_fields --- app/views/users/_fields.html.erb | 74 ++++++++++++++++++++------------ 1 file changed, 47 insertions(+), 27 deletions(-) diff --git a/app/views/users/_fields.html.erb b/app/views/users/_fields.html.erb index 309c941dc..cfd7703c9 100644 --- a/app/views/users/_fields.html.erb +++ b/app/views/users/_fields.html.erb @@ -2,53 +2,73 @@ <%= errors_for user %> -
- <%= f.label :name, t(".name") %> - <%= f.text_field :name %> +
+
+ <%= f.label :name, t(".name"), class: "form-label" %> + <%= f.text_field :name, placeholder: t(".name_placeholder"), class: "form-control", required: true %> +
<% if Errbit::Config.user_has_username %> -
- <%= f.label :username, t(".username") %> - <%= f.text_field :username, autocomplete: "username" %> +
+
+ <%= f.label :username, t(".username") %> + <%= f.text_field :username, autocomplete: "username" %> +
<% end %> -
- <%= f.label :email, t(".email") %> - <%= f.text_field :email, autocomplete: "email" %> +
+
+ <%= f.label :email, t(".email") %> + <%= f.text_field :email, autocomplete: "email" %> +
<% if Errbit::Config.github_authentication %> -
- <%= f.label :github_login, "#{Errbit::Config.github_site_title} login" %> - <%= f.text_field :github_login %> +
+
+ <%= f.label :github_login, "#{Errbit::Config.github_site_title} login" %> + <%= f.text_field :github_login %> +
<% end %> -
- <%= f.label :per_page, t(".entries") %> - <%= f.select :per_page, [10, 20, 30, 50, 75, 100] %> +
+
+ <%= f.label :per_page, t(".entries") %> + <%= f.select :per_page, [10, 20, 30, 50, 75, 100] %> +
-
- <%= f.label :time_zone, t(".time_zone") %> - <%= f.time_zone_select :time_zone, ActiveSupport::TimeZone.all %> +
+
+ <%= f.label :time_zone, t(".time_zone") %> + <%= f.time_zone_select :time_zone, ActiveSupport::TimeZone.all %> +
-
- <%= f.label :password, t(".password") %> - <%= f.password_field :password, autocomplete: "new-password" %> +
+
+ <%= f.label :password, t(".password") %> + <%= f.password_field :password, autocomplete: "new-password" %> +
-
- <%= f.label :password_confirmation, t(".password_confirmation") %> - <%= f.password_field :password_confirmation, autocomplete: "new-password" %> +
+
+ <%= f.label :password_confirmation, t(".password_confirmation") %> + <%= f.password_field :password_confirmation, autocomplete: "new-password" %> +
<% if current_user.admin? %> -
- <%= f.check_box :admin %> - <%= f.label :admin, t(".admin") %> +
+
+
+ <%= f.check_box :admin %> + <%= f.label :admin, t(".admin") %> +
+
<% end %> From b196f0a228fdbe2c0ec668c168deccc1811dbb5b Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Mon, 14 Sep 2026 00:52:51 +0200 Subject: [PATCH 17/26] Style users/_fields --- app/views/users/_fields.html.erb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/views/users/_fields.html.erb b/app/views/users/_fields.html.erb index cfd7703c9..fc16fba76 100644 --- a/app/views/users/_fields.html.erb +++ b/app/views/users/_fields.html.erb @@ -12,7 +12,7 @@ <% if Errbit::Config.user_has_username %>
- <%= f.label :username, t(".username") %> + <%= f.label :username, t(".username"), class: "form-label" %> <%= f.text_field :username, autocomplete: "username" %>
@@ -20,7 +20,7 @@
- <%= f.label :email, t(".email") %> + <%= f.label :email, t(".email"), class: "form-label" %> <%= f.text_field :email, autocomplete: "email" %>
@@ -28,7 +28,7 @@ <% if Errbit::Config.github_authentication %>
- <%= f.label :github_login, "#{Errbit::Config.github_site_title} login" %> + <%= f.label :github_login, "#{Errbit::Config.github_site_title} login", class: "form-label" %> <%= f.text_field :github_login %>
@@ -36,28 +36,28 @@
- <%= f.label :per_page, t(".entries") %> + <%= f.label :per_page, t(".entries"), class: "form-label" %> <%= f.select :per_page, [10, 20, 30, 50, 75, 100] %>
- <%= f.label :time_zone, t(".time_zone") %> + <%= f.label :time_zone, t(".time_zone"), class: "form-label" %> <%= f.time_zone_select :time_zone, ActiveSupport::TimeZone.all %>
- <%= f.label :password, t(".password") %> + <%= f.label :password, t(".password"), class: "form-label" %> <%= f.password_field :password, autocomplete: "new-password" %>
- <%= f.label :password_confirmation, t(".password_confirmation") %> + <%= f.label :password_confirmation, t(".password_confirmation"), class: "form-label" %> <%= f.password_field :password_confirmation, autocomplete: "new-password" %>
@@ -66,7 +66,7 @@
- <%= f.check_box :admin %> + <%= f.check_box :admin, class: "form-check-input" %> <%= f.label :admin, t(".admin") %>
From da1fd382280cbeca6b53e189efca46b399d950ba Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Mon, 14 Sep 2026 01:24:44 +0200 Subject: [PATCH 18/26] Style users/_fields --- app/views/users/_fields.html.erb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/views/users/_fields.html.erb b/app/views/users/_fields.html.erb index fc16fba76..79965d552 100644 --- a/app/views/users/_fields.html.erb +++ b/app/views/users/_fields.html.erb @@ -13,7 +13,7 @@
<%= f.label :username, t(".username"), class: "form-label" %> - <%= f.text_field :username, autocomplete: "username" %> + <%= f.text_field :username, autocomplete: "username", class: "form-control", required: true %>
<% end %> @@ -21,7 +21,7 @@
<%= f.label :email, t(".email"), class: "form-label" %> - <%= f.text_field :email, autocomplete: "email" %> + <%= f.text_field :email, autocomplete: "email", placeholder: t(".email_placeholder"), class: "form-control", required: true %>
@@ -29,7 +29,7 @@
<%= f.label :github_login, "#{Errbit::Config.github_site_title} login", class: "form-label" %> - <%= f.text_field :github_login %> + <%= f.text_field :github_login, class: "form-control" %>
<% end %> @@ -37,28 +37,28 @@
<%= f.label :per_page, t(".entries"), class: "form-label" %> - <%= f.select :per_page, [10, 20, 30, 50, 75, 100] %> + <%= f.select :per_page, [10, 20, 30, 50, 75, 100], {}, {class: "form-select"} %>
<%= f.label :time_zone, t(".time_zone"), class: "form-label" %> - <%= f.time_zone_select :time_zone, ActiveSupport::TimeZone.all %> + <%= f.time_zone_select :time_zone, ActiveSupport::TimeZone.all, {}, class: "form-select" %>
<%= f.label :password, t(".password"), class: "form-label" %> - <%= f.password_field :password, autocomplete: "new-password" %> + <%= f.password_field :password, autocomplete: "new-password", class: "form-control" %>
<%= f.label :password_confirmation, t(".password_confirmation"), class: "form-label" %> - <%= f.password_field :password_confirmation, autocomplete: "new-password" %> + <%= f.password_field :password_confirmation, autocomplete: "new-password", class: "form-control" %>
@@ -67,7 +67,7 @@
<%= f.check_box :admin, class: "form-check-input" %> - <%= f.label :admin, t(".admin") %> + <%= f.label :admin, t(".admin"), class: "form-check-label" %>
From 72471292d405a0957db3aa40c2ce34abb9a54f12 Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Mon, 14 Sep 2026 01:28:40 +0200 Subject: [PATCH 19/26] Add breadcrumb for users#show --- app/views/users/show.html.erb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 3ae98c305..c181b365c 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -1,5 +1,19 @@ <% content_for :title, @user.name %> +<% content_for :breadcrumb do %> +
+
+ +
+
+<% end %> + <% if Errbit::Config.use_gravatar && (gravatar = gravatar_url(@user.email, s: 86)) %> <% content_for :title_avatar do %> <%= image_tag gravatar, class: "title-avatar", alt: "" %> From 964c98bc5653dabb2465fd5844beb8a82e2cef51 Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Mon, 14 Sep 2026 01:31:59 +0200 Subject: [PATCH 20/26] Un-style users#show --- app/controllers/users_controller.rb | 2 +- app/views/layouts/application.html.erb | 2 +- app/views/users/show.html.erb | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 6e79a8149..3594dbe80 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class UsersController < ApplicationController - layout "errbit", except: [:index, :new] + layout "errbit", except: [:index, :new, :show] def index @users = policy_scope(User) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 420fe2fca..495d923da 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -37,7 +37,7 @@
- <%= yield :title_avatar %> + <%#= yield :title_avatar %>

<%#= yield :title %>

<%= yield :meta %> diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index c181b365c..14cef34cf 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -32,23 +32,23 @@ class: "delete button" %> <% end %> -
+
- + <% if Errbit::Config.user_has_username %> - + <% end %> <% if Errbit::Config.github_authentication && @user.github_login.present? %> - + <% end %> From b9e0f465a9ea8bd6593deedf566f8885742a7019 Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Mon, 14 Sep 2026 01:34:03 +0200 Subject: [PATCH 21/26] Add name to users#show --- app/views/users/show.html.erb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 14cef34cf..0a9c0add7 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -33,6 +33,11 @@ <% end %>
<%= t(".email") %><%= @user.email %><%= @user.email %>
<%= t(".username") %><%= @user.username %><%= @user.username %>
<%= "#{Errbit::Config.github_site_title} Login" %><%= link_to @user.github_login, "#{Errbit::Config.github_url}/#{@user.github_login}" %><%= link_to @user.github_login, "#{Errbit::Config.github_url}/#{@user.github_login}" %>
+ + + + + From 20acca175cb5a78307f1fdcbe4878549f12f618c Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Mon, 14 Sep 2026 01:36:18 +0200 Subject: [PATCH 22/26] Add breadcrumb for users#edit --- app/views/users/edit.html.erb | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index 2c92cdacf..e1c84f48e 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -1,5 +1,20 @@ <% content_for :title, "#{t(".title")} #{@user.name}" %> +<% content_for :breadcrumb do %> +
+
+ +
+
+<% end %> + <% content_for :action_bar do %> <%= render "shared/link_github_account", user: @user %> <%= render "shared/link_google_account", user: @user %> @@ -9,7 +24,7 @@ <%= form_for @user, html: {autocomplete: "off"} do |f| %> <%= render "fields", f: f, user: @user %> -
+
<%= f.submit t(".update_user") %>
<% end %> From 3d03a0c83a6210c1d700ec78fd22f5823834d810 Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Mon, 14 Sep 2026 01:37:22 +0200 Subject: [PATCH 23/26] Update --- app/views/users/edit.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index e1c84f48e..ee230378d 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -8,7 +8,7 @@ - +
From 4b4e7607134229480d98dfb68d2e32232f73775e Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Mon, 14 Sep 2026 01:37:34 +0200 Subject: [PATCH 24/26] Style all pages --- app/controllers/users_controller.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 3594dbe80..2d9401a6b 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1,8 +1,6 @@ # frozen_string_literal: true class UsersController < ApplicationController - layout "errbit", except: [:index, :new, :show] - def index @users = policy_scope(User) .order_by(name: :asc) From 6acba19dd58eeb85db678d846360b4511bf683f9 Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Mon, 14 Sep 2026 01:39:26 +0200 Subject: [PATCH 25/26] Style users#edit --- app/views/users/edit.html.erb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index ee230378d..6a83d864d 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -24,7 +24,11 @@ <%= form_for @user, html: {autocomplete: "off"} do |f| %> <%= render "fields", f: f, user: @user %> -
- <%= f.submit t(".update_user") %> +
+
+ <%= button_tag type: :submit, class: "btn btn-primary" do %> + <%= inline_svg_tag "icons/floppy.svg" %> <%= t(".update_user") %> + <% end %> +
<% end %> From 5176ec044f23b8768c9c1054cab16924fbdf4dd4 Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Mon, 14 Sep 2026 20:52:53 +0200 Subject: [PATCH 26/26] Update locales --- config/locales/en.yml | 2 +- config/locales/pt-BR.yml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index ac807dea3..8a91c4559 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -209,7 +209,7 @@ en: name: "Name" name_placeholder: "Jon Snow" username: Username - email: Email + email: "Email" email_placeholder: "jon.snow@example.com" entries: Entries per page time_zone: Time Zone diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index e840bd868..0bd052eb5 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -174,9 +174,11 @@ pt-BR: success: "Isto é triste. %{name} não faz mais parte do seu time." error: "Você não pode excluir a si mesmo" fields: - name: Nome + name: "Nome" + name_placeholder: "Jon Snow" username: Usuário - email: E-mail + email: "E-mail" + email_placeholder: "jon.snow@example.com" entries: Registros por página time_zone: Fuso horário password: Senha
<%= t(".name") %><%= @user.name %>
<%= t(".email") %> <%= @user.email %>