My views improved. Own screenshots view added

This commit is contained in:
Christoph Haas 2021-03-09 22:43:50 +01:00
parent 15b58548cc
commit 0207d6b392
7 changed files with 93 additions and 39 deletions

View file

@ -1,34 +1,45 @@
.grid-container
= render partial: 'menu'
= render partial: 'menu'
h1 As far as we know…
h1 Your data
- unless current_user.name.blank?
h2 Your name
= current_user.name
= text_field_tag 'name', current_user.name
- unless current_user.email.blank?
h2 Your email address
p = current_user.email
p.help-text
' Your name will be shown to others along with the images you upload.
' Feel free to change it.
' This web site recognizes you by your email address.
' Don't worry - it will not be shown or given to anyone.
/ TODO: submit - save
- unless current_user.provider.blank?
h2 Account provider
p You logged in using #{current_user.pretty_provider}.
- 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.
h2 Number of screenshots you uploaded
p = current_user.screenshots.count
- unless current_user.provider.blank?
h2 Single-sign-on provider
p You logged in using #{current_user.pretty_provider}.
h2 Number of screenshots you uploaded
p = current_user.screenshots.count
/ - if current_user.is_admin?
/ h2 Admin
/ p Apparently you are an administrator. Be careful with that thing!
/ - you can moderate
/ - you can …
h2 Your permissions
ul
- if can? :approve, Screenshot
li
=> fa_icon 'thumbs-up'
'approve uploaded screenshots
- if can? :destroy, Screenshot
li
=> fa_icon 'trash'
'delete screenshots
- if can? :hide, Screenshot
li
=> fa_icon 'eye-slash'
'hide screenshots from the public
- if can? :unhide, Screenshot
li
=> fa_icon 'eye'
'restore (unhide) screenshots to the public
- if can? :view, Log
li
=> fa_icon 'book'
'view logs