Add gravatar to profile page. Attempt to make profile look nicer.

This commit is contained in:
Christoph Haas 2021-03-10 02:33:40 +01:00
parent d504e5e914
commit 4e07bf00fd
6 changed files with 116 additions and 47 deletions

View file

@ -1,16 +1,17 @@
= render partial: 'menu'
// Paginator and search bar
.grid-x
.small-6.medium-8.large-9.cell
// Paginator
= render(partial: 'packages/paginator', locals: {items: @logs})
/ .small-6.medium-4.large-3.cell
/ // Search form
/ = render 'packages/searchfield'
- if @logs
// Paginator
.grid-x
.small-6.medium-8.large-9.cell
// Paginator
= render(partial: 'packages/paginator', locals: {items: @logs})
table
thead
tr
@ -46,6 +47,12 @@
' -
td #{log.ip_address}
.grid-x
.small-6.medium-8.large-9.cell
// Paginator
= render(partial: 'packages/paginator', locals: {items: @logs})
- else
p Nothing here.

View file

@ -1,45 +1,81 @@
= render partial: 'menu'
h1 Your data
- unless current_user.name.blank?
h2 Your name
= current_user.name
/ h2 Number of screenshots you uploaded
/ p = current_user.screenshots.count
- unless current_user.email.blank?
h2 Your email address
p = current_user.email
p.help-text
' This web site recognizes you by your email address.
' Don't worry - it will not be shown or given to anyone.
- if current_user.provider == 'salsa'
h1 Information for Debian project members
p
|
You are recognized as a member of the Debian project.
Thanks for visiting. Your account has moderation privileges.
That means you can approve screenshots uploaded by visitors.
If screenshots are waiting for moderation you will see a
prominent red bar right at the top. You can also upload your
own screenshots which are going public instantly.
If you stumble upon screenshots that you find offending,
misleading or just useless then feel free to hide them.
Every screenshot will have a status label and action buttons
that are only visible to you.
- unless current_user.provider.blank?
h2 Account provider
p You logged in using #{current_user.pretty_provider}.
p
|
If you have any questions about this web site please contact
Christoph Haas (haas) or Paul Wise (pabs).
h2 Number of screenshots you uploaded
p = current_user.screenshots.count
h2 Your permissions
ul
- if can? :approve, Screenshot.new
li
=> fa_icon 'thumbs-up'
'approve uploaded screenshots
- if can? :destroy, Screenshot.new
li
=> fa_icon 'trash'
'delete screenshots
- if can? :hide, Screenshot.new
li
=> fa_icon 'eye-slash'
'hide screenshots from the public
- if can? :unhide, Screenshot.new
li
=> fa_icon 'eye'
'restore (unhide) screenshots for the public
- if can? :view, Log
li
=> fa_icon 'book'
'view logs
.grid-x
.cell.auto
.cell.small-8.card style="background-color: blue"
.card
.grid-x.grid-padding-x.grid-padding-y.align-middle
.cell.small-2
= image_tag current_user.gravatar_url, class: "gravatar"
.cell.small-6
h3 = current_user.pretty_name
- unless current_user.email.blank?
div
i = current_user.email
- unless current_user.provider.blank?
div Logged in via #{current_user.pretty_provider}.
.cell
hr
.card-section
h3 You are
p
= current_user.pretty_role
.cell
hr
.card-section
h3 Your permissions
ul
- if can? :approve, Screenshot.new
li
=> fa_icon 'thumbs-up'
'approve uploaded screenshots
- if can? :destroy, Screenshot.new
li
=> fa_icon 'trash'
'delete screenshots
- if can? :hide, Screenshot.new
li
=> fa_icon 'eye-slash'
'hide screenshots from the public
- if can? :unhide, Screenshot.new
li
=> fa_icon 'eye'
'restore (unhide) screenshots for the public
- if can? :view, Log
li
=> fa_icon 'book'
'view logs
.cell.auto