Sha256: 700970ed51c210feae2186f39177db05fa908ba7554e10deba82351b4efa6c95

Contents?: true

Size: 1.35 KB

Versions: 3

Compression:

Stored size: 1.35 KB

Contents

- content_for(:header_title) { t(".show_user", user_name: @user.name) }

- if can? :edit, @user
  - content_for(:header_right) { link_to t('edit'), edit_user_path(@user), class: 'mobile-button-header' }

= link_to t('delete'), user_path(@user), method: :delete, class: 'mobile-button-danger', data: {confirm: t('are_you_sure')} if can? :destroy, @user

%h2= t(".tagged_on")
- @user.pictures_tagged_on.each do |picture|
  = picture_image_tag picture

- unless @user.pictures_tagged_on.any?
  = t(".user_hasnt_been_tagged_on_any_pictures")

%h2= t(".uploaded_pictures")
- @user.uploaded_pictures.each do |picture|
  = picture_image_tag picture

- unless @user.uploaded_pictures.any?
  = t(".this_user_havent_uploaded_any_pictures")

%h2= FamilyGallery::UserRole.model_name.human(count: 2)
= link_to t('add_new'), new_user_user_role_path(@user), class: 'mobile-button' if can?(:new, FamilyGallery::UserRole)

%br
%br

%table.mobile-table
  %thead
    %tr
      %th= FamilyGallery::UserRole.human_attribute_name(:role)
      %th= t('actions')
  %tbody
    - @user.user_roles.each do |user_role|
      %tr
        %td= user_role.role
        %td
          = link_to t('delete'), user_user_role_path(@user, user_role), method: :delete, data: {confirm: t('are_you_sure')} if can?(:destroy, user_role)
    - if @user.user_roles.empty?
      %tr
        %td{colspan: 1}= t('no_results')

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
family_gallery-0.0.8 app/views/family_gallery/users/show.mobile.haml
family_gallery-0.0.7 app/views/family_gallery/users/show.mobile.haml
family_gallery-0.0.6 app/views/family_gallery/users/show.mobile.haml