<commit_before>.panel.user-profile
  .panel-body
    %h1
      %small
        - unless  @member.active
          = t ".inactive"
      = @member.display_name_with_uid
      %small
        - if @user.superadmin?
          %span.label.label-important= t ".superadmin"

    .row
      .col-sm-3.col-xs-5.text-center
        - if @user == current_user
          %a{href: "https://www.gravatar.com", target: "_blank"}
            = image_tag avatar_url(@user, 160)
        - else
          = image_tag avatar_url(@user, 160)

      .col-sm-9.col-xs-7
        :markdown
          #{@user.description}

        %ul.nav.nav-pills.pull-right
          - if @user == current_user
            %li
              %a{href: edit_user_path(@user)}
                %span.glyphicon.glyphicon-pencil
                = t "global.edit"
          - if admin? || @user != current_user
            %li
              %a{href: give_time_user_path(@user)}
                %span.glyphicon.glyphicon-time
                = t "global.give_time"


        %dl.dl-horizontal
          %h3 
            = t "global.contact_details"
          - if @user.email_if_real != ""
            %dt= User.human_attribute_name(:email)
            %dd= @user.email_if_real
          - phones = [@user.phone, @user.alt_phone].map(&:presence).compact
          - if phones.present?
            %dt= t(".phone", count: phones.size)
            %dd
              - phones.each_with_index do |ph, idx|
                - unless idx.zero?
                  &mdash;
                = ph

.row
  .col-sm-6.offers
    .panel.panel-default
      .panel-heading
        %h2.panel-title
          = Offer.model_name.human(count: :many)
          - if @user == current_user
            %a.pull-right{href: new_offer_path}
              %span.glyphicon.glyphicon-plus


      %table.table.table-condensed.offers
        - @member.offers.active.each do |post|
          %tr
            %td= link_to post, post
            %td= post.description
            %td
              %a{href: give_time_user_path(@user, offer: post.id), title: t("global.give_time")}
                %span.glyphicon.glyphicon-time

  .col-sm-6.inquiries
    .panel.panel-default
      .panel-heading
        %h2.panel-title
          = Inquiry.model_name.human(count: :many)
          - if @user == current_user
            %a.pull-right{href: new_inquiry_path}
              %span.glyphicon.glyphicon-plus

      %table.table.table-condensed.offers
        - @member.inquiries.active.each do |post|
          %tr
            %td= link_to post, post
            %td= post.description

.row
  .col-sm-4
    .panel.panel-default
      .panel-heading
        %h3.panel-title
          = t(".accounts")
      .panel-body
        - if @member.manager
          %p.danger
            ADMIN
        %p
          %strong
            = t(".created_at")
          = @member.entry_date ? l(@member.entry_date, format: :long) : mdash
          %br
          %strong
            = t(".user_no")
          = @member.member_uid || mdash
          %br
          %strong.lead{ class: green_red(@member.account&.balance) }
            = t(".balance")
            = seconds_to_hm(@member.account.try(:balance) || mdash)<commit_msg>Fix description show in user detail<commit_after>.panel.user-profile
  .panel-body
    %h1
      %small
        - unless  @member.active
          = t ".inactive"
      = @member.display_name_with_uid
      %small
        - if @user.superadmin?
          %span.label.label-important= t ".superadmin"

    .row
      .col-sm-3.col-xs-5.text-center
        - if @user == current_user
          %a{href: "https://www.gravatar.com", target: "_blank"}
            = image_tag avatar_url(@user, 160)
        - else
          = image_tag avatar_url(@user, 160)

      .col-sm-9.col-xs-7
        :markdown
          #{@user.description}

        %ul.nav.nav-pills.pull-right
          - if @user == current_user
            %li
              %a{href: edit_user_path(@user)}
                %span.glyphicon.glyphicon-pencil
                = t "global.edit"
          - if admin? || @user != current_user
            %li
              %a{href: give_time_user_path(@user)}
                %span.glyphicon.glyphicon-time
                = t "global.give_time"


        %dl.dl-horizontal
          %h3 
            = t "global.contact_details"
          - if @user.email_if_real != ""
            %dt= User.human_attribute_name(:email)
            %dd= @user.email_if_real
          - phones = [@user.phone, @user.alt_phone].map(&:presence).compact
          - if phones.present?
            %dt= t(".phone", count: phones.size)
            %dd
              - phones.each_with_index do |ph, idx|
                - unless idx.zero?
                  &mdash;
                = ph

.row
  .col-sm-6.offers
    .panel.panel-default
      .panel-heading
        %h2.panel-title
          = Offer.model_name.human(count: :many)
          - if @user == current_user
            %a.pull-right{href: new_offer_path}
              %span.glyphicon.glyphicon-plus


      %table.table.table-condensed.offers
        - @member.offers.active.each do |post|
          %tr
            %td= link_to post, post
            %td= strip_tags(post.rendered_description.to_html)
            %td
              %a{href: give_time_user_path(@user, offer: post.id), title: t("global.give_time")}
                %span.glyphicon.glyphicon-time

  .col-sm-6.inquiries
    .panel.panel-default
      .panel-heading
        %h2.panel-title
          = Inquiry.model_name.human(count: :many)
          - if @user == current_user
            %a.pull-right{href: new_inquiry_path}
              %span.glyphicon.glyphicon-plus

      %table.table.table-condensed.offers
        - @member.inquiries.active.each do |post|
          %tr
            %td= link_to post, post
            %td= strip_tags(post.rendered_description.to_html)

.row
  .col-sm-4
    .panel.panel-default
      .panel-heading
        %h3.panel-title
          = t(".accounts")
      .panel-body
        - if @member.manager
          %p.danger
            ADMIN
        %p
          %strong
            = t(".created_at")
          = @member.entry_date ? l(@member.entry_date, format: :long) : mdash
          %br
          %strong
            = t(".user_no")
          = @member.member_uid || mdash
          %br
          %strong.lead{ class: green_red(@member.account&.balance) }
            = t(".balance")
            = seconds_to_hm(@member.account.try(:balance) || mdash)
{'fraction_non_alphanumeric': 0.12714460784313725, 'fraction_numerical': 0.0055147058823529415, 'mean_word_length': 1.4862909367859862, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2243451', 'n_tokens_mistral': 2138, 'n_tokens_neox': 2040, 'n_words': 340}