- 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')