= render partial: 'menu'

h1 Your data

/ h2 Number of screenshots you uploaded
/ p = current_user.screenshots.count

- 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.

  p 
    |
      If you have any questions about this web site please contact
      Christoph Haas (haas) or Paul Wise (pabs).


.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 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
