mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-01 03:46:44 +01:00
profile page appearance
This commit is contained in:
parent
66f91be92a
commit
c2c4a0b943
4 changed files with 94 additions and 61 deletions
|
@ -104,7 +104,9 @@
|
|||
}
|
||||
|
||||
.block__header > .fa,
|
||||
.block__header--single-item > .fa {
|
||||
.block__header--single-item > .fa,
|
||||
.block__header > span .fa,
|
||||
.block__header--single-item > span .fa {
|
||||
margin-right: var(--padding-normal);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,19 +1,15 @@
|
|||
.block__content.profile-about
|
||||
p
|
||||
= cond do
|
||||
- @user.description not in [nil, ""] ->
|
||||
= @about_me
|
||||
|
||||
- current?(@user, @conn.assigns.current_user) ->
|
||||
span: i.fa.icon--padded--right.fa-info-circle
|
||||
em
|
||||
' Want to
|
||||
=> link "add some info about yourself?", to: ~p"/profiles/#{@user}/description/edit"
|
||||
|
||||
- true ->
|
||||
span: i.fa.icon--padded--right.fa-info-circle
|
||||
| No description provided.
|
||||
|
||||
= if can?(@conn, :edit_description, @user) do
|
||||
= if @user.description not in [nil, ""] do
|
||||
hr.separator.separator--secondary
|
||||
a.button href=~p"/profiles/#{@user}/description/edit"
|
||||
i.fa.fa-edit>
|
||||
| Edit
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
= link "More information", to: ~p"/profiles/#{@user}/commission"
|
||||
|
||||
- current?(@user, @conn.assigns.current_user) ->
|
||||
span: i.fa.icon--padded--right.fa-info-circle
|
||||
= if Enum.any?(@conn.assigns.user.verified_links) do
|
||||
em
|
||||
' You don't have any commission information listed yet.
|
||||
|
@ -36,3 +37,6 @@
|
|||
' to set one up.
|
||||
|
||||
- true ->
|
||||
p
|
||||
span: i.fa.icon--padded--right.fa-info-circle
|
||||
| No commission listing set up
|
||||
|
|
|
@ -66,9 +66,15 @@
|
|||
= render PhilomenaWeb.ProfileView, "_commission.html", user: @user, commission_information: @commission_information, conn: @conn
|
||||
|
||||
.block
|
||||
.block__header
|
||||
.block__header.flex
|
||||
span
|
||||
i.fa.fa-link
|
||||
| Artist Links
|
||||
= if current?(@user, @conn.assigns.current_user) or manages_links?(@conn, @user) do
|
||||
.block__header__buttons
|
||||
a.button href=~p"/profiles/#{@user}/artist_links/new"
|
||||
i.fa.fa-link>
|
||||
| Create
|
||||
|
||||
= for link <- @user.verified_links, should_see_link?(@conn, @user, link) do
|
||||
- watchers = if link.tag, do: @watcher_counts[link.tag.id] || 0, else: 0
|
||||
|
@ -101,16 +107,22 @@
|
|||
=> unless link.public do
|
||||
br
|
||||
' Hidden
|
||||
= if Enum.count(@user.verified_links) == 0 do
|
||||
.block__content
|
||||
p
|
||||
span: i.fa.icon--padded--right.fa-info-circle
|
||||
| No artist links associated
|
||||
|
||||
= if current?(@user, @conn.assigns.current_user) or manages_links?(@conn, @user) do
|
||||
.block__content.alternating-color.break-word
|
||||
a.button href=~p"/profiles/#{@user}/artist_links/new"
|
||||
i.fa.fa-link>
|
||||
| Create an Artist Link
|
||||
.block
|
||||
.block__header
|
||||
.block__header.flex
|
||||
span
|
||||
i.fa.fa-award
|
||||
| Badges
|
||||
= if manages_awards?(@conn) and not hide_staff_tools?(@conn) do
|
||||
.block__header__buttons
|
||||
a.button href=~p"/profiles/#{@user}/awards/new"
|
||||
i.fa.fa-trophy>
|
||||
| Award
|
||||
= for award <- award_order(@user.awards) do
|
||||
.block__content.flex.flex--centered.flex--center-distributed.alternating-color.no-overflow title=award.label
|
||||
.flex__grow.center
|
||||
|
@ -129,24 +141,36 @@
|
|||
br
|
||||
a href=~p"/profiles/#{@user}/awards/#{award}/edit"
|
||||
' Edit
|
||||
= if manages_awards?(@conn) and not hide_staff_tools?(@conn) do
|
||||
.block__content.alternating-color.no-overflow
|
||||
a.button href=~p"/profiles/#{@user}/awards/new"
|
||||
i.fa.fa-trophy>
|
||||
| Award a badge
|
||||
|
||||
= if Enum.count(@user.awards) == 0 do
|
||||
.block__content
|
||||
p
|
||||
span: i.fa.icon--padded--right.fa-info-circle
|
||||
| No badge awards received
|
||||
.block
|
||||
.block__header
|
||||
.block__header.flex
|
||||
span
|
||||
i.fa.fa-question
|
||||
| About Me
|
||||
= if can?(@conn, :edit_description, @user) do
|
||||
.block__header__buttons
|
||||
a.button href=~p"/profiles/#{@user}/description/edit"
|
||||
i.fa.fa-edit>
|
||||
| Edit
|
||||
|
||||
= render PhilomenaWeb.ProfileView, "_about_me.html", user: @user, about_me: @about_me, conn: @conn
|
||||
|
||||
= if can_read_mod_notes?(@conn) and not hide_staff_tools?(@conn) do
|
||||
.block.block--warning
|
||||
.block__header
|
||||
.block__header.flex
|
||||
span
|
||||
i.fa.fa-sticky-note
|
||||
| Mod Notes
|
||||
.block__header__buttons
|
||||
a.button href=~p"/profiles/#{@user}/details"
|
||||
i.fa.fa-plus>
|
||||
| Edit
|
||||
.block__content
|
||||
= if Enum.count(@mod_notes) > 0 do
|
||||
table.table
|
||||
thead
|
||||
tr
|
||||
|
@ -157,21 +181,28 @@
|
|||
tr
|
||||
td = body
|
||||
td = pretty_time(mod_note.created_at)
|
||||
.block__content
|
||||
a.button href=~p"/profiles/#{@user}/details"
|
||||
i.fa.fa-plus>
|
||||
| Edit mod notes
|
||||
- else
|
||||
p
|
||||
span: i.fa.icon--padded--right.fa-info-circle
|
||||
| No mod notes
|
||||
= if can_index_user?(@conn) do
|
||||
.block.block--warning
|
||||
.block__header
|
||||
.block__header.flex
|
||||
span
|
||||
i.fa.fa-clipboard
|
||||
| Moderation Scratchpad
|
||||
.block__content.profile-about
|
||||
= @scratchpad
|
||||
.block__content
|
||||
.block__header__buttons
|
||||
a.button href=~p"/profiles/#{@user}/scratchpad/edit"
|
||||
i.fa.fa-edit>
|
||||
| Edit
|
||||
.block__content.profile-about
|
||||
- {_, contents} = @scratchpad
|
||||
= if String.trim(contents) != "" do
|
||||
= @scratchpad
|
||||
- else
|
||||
p
|
||||
span: i.fa.icon--padded--right.fa-info-circle
|
||||
| No information present
|
||||
|
||||
.column-layout__main
|
||||
= render PhilomenaWeb.ProfileView, "_statistics.html", user: @user, statistics: @statistics, conn: @conn
|
||||
|
|
Loading…
Reference in a new issue