show.html.haml 1.45 KB
/Author Igor Portela - www.igorportela.com
.span9
  %p#notice= notice
  %p
    %b
      = t('users.name')
      \:
    = @user.name
  %p
    %b
      = t('users.email')
      \:
    = @user.email 
  %p
    %b
      = t('users.address') if @user.address.present?
    = @user.address
  %p
    %b
      = t('users.zipcode') if @user.zipcode.present?
    = @user.zipcode
  %p
    %b
      = t('users.phone') if @user.phone.present?
    = @user.phone

  - if @user.videos.present?
    %p
      = @user.videos.size
      %b
        = t('shared.videos')
        \:
    %table.table.table-hover
      %thead
        %tr
          %th= t('shared.user')
          %th= t('videos.url')
          %th= t('videos.subtitle')
          %th= t('shared.created_at')
          %th= t('shared.updated_at')
          %th
          %th
          %th
      - @user.videos.each do |video|
        %tbody
          %tr
            %td= video.user.name if video.user.present?
            %td= format_video(video.url, "url")
            %td= video.legend
            %td= video.created_at
            %td= video.updated_at
            %td= link_to '', admin_video_path(video), class: "icon-search"
            %td= link_to '', video, confirm: 'Tem certeza?', method: :delete, class: 'icon-remove'
  - else
    .alert
      %strong Não existe vídeos para este usuário
  %p
    = link_to t('shared.back'), admin_users_path, :class => 'btn btn-primary'
  - content_for :sidebar, render(:partial => 'admin/sidebar')