mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 05:37:59 +01:00
Link avatar on user's own profile to the avatar change page (#151)
This commit is contained in:
parent
fa4aef3051
commit
4f85936437
2 changed files with 10 additions and 2 deletions
|
@ -42,4 +42,8 @@
|
||||||
= button_to "Remove my avatar", Routes.avatar_path(@conn, :delete), method: "delete", class: "button", data: [confirm: "Are you really, really sure?"]
|
= button_to "Remove my avatar", Routes.avatar_path(@conn, :delete), method: "delete", class: "button", data: [confirm: "Are you really, really sure?"]
|
||||||
|
|
||||||
br
|
br
|
||||||
= link "Back", to: Routes.pow_registration_path(@conn, :edit)
|
- return_to = if blank?(@conn.params["profile"]) do
|
||||||
|
= Routes.pow_registration_path(@conn, :edit)
|
||||||
|
- else
|
||||||
|
= Routes.profile_path(@conn, :show, @current_user)
|
||||||
|
= link "Back", to: return_to
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
.profile-top
|
.profile-top
|
||||||
.profile-top__avatar
|
.profile-top__avatar
|
||||||
= render PhilomenaWeb.UserAttributionView, "_user_avatar.html", object: %{user: @user}, class: "avatar--125px"
|
- avatar = render PhilomenaWeb.UserAttributionView, "_user_avatar.html", object: %{user: @user}, class: "avatar--125px"
|
||||||
|
= if current?(@user, @conn.assigns.current_user) do
|
||||||
|
= link avatar, to: Routes.avatar_path(@conn, :edit, profile: true), title: "Change avatar"
|
||||||
|
- else
|
||||||
|
= avatar
|
||||||
.profile-top__name-and-links
|
.profile-top__name-and-links
|
||||||
div
|
div
|
||||||
h1.profile-top__name-header
|
h1.profile-top__name-header
|
||||||
|
|
Loading…
Reference in a new issue