From f074f05700658edd72a5783d4c996b4c7121f18d Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Tue, 1 Jul 2025 18:59:01 +0300 Subject: [PATCH] Add "Edit Profile Details" button to user profile This will be a toggle button for individual section edit buttons. --- app/views/users/show.html.erb | 8 ++++++++ config/locales/en.yml | 1 + 2 files changed, 9 insertions(+) diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 51d256fc6..ced7432ba 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -265,6 +265,14 @@ <%= render "sidebar_section", :present => !@user.social_links.empty? do %> <%= render "social_links/show", :social_links => @user.social_links %> <% end %> + + <% if owned %> +
+ <%= tag.button t(".edit_profile_details"), :type => "button", + :class => "btn btn-sm btn-outline-primary w-100 overflow-hidden", + :data => { :bs_toggle => "collapse", :bs_target => "[data-sidebar-edit]" } %> +
+ <% end %>
<%= @user.description.to_html %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index d48f31fda..ed21b3ed4 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -3073,6 +3073,7 @@ en: delete_user: "Delete this User" confirm: "Confirm" report: Report this User + edit_profile_details: Edit Profile Details edit_description: Edit Description contributions: one: "%{count} contribution in the last year" -- 2.39.5