Added per-user counter of approved/rejected screenshots

This commit is contained in:
Christoph Haas 2021-03-21 23:06:51 +01:00
parent c97a711e6b
commit 9635b3968c
5 changed files with 55 additions and 27 deletions

View file

@ -54,28 +54,39 @@ h1 Your data
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
h3 Statistics
p
= pluralize(current_user.approved_screenshots, 'approved screenshot')
p
= pluralize(current_user.rejected_screenshots, 'rejected screenshot')
- unless current_user.pseudo
.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