%li{:id => membership.user_id}
  %ul.unstyled.membership-row
    %li.name-label
      - if membership.user_name
        = membership.user_name
      - else
        = membership.user_email
    
    -if current_user.is_group_admin?(@group)
      %li.membership-admin-functions
        =link_to "edit", edit_membership_path(membership)
        |
        =link_to "remove", membership, method: :delete,
          confirm: "Are you sure you wish to remove #{membership.user_email} from the group?"
    
  %ul.unstyled.membership-row.tags
    %li.tags-label
      %span Tags:
    %li
      %input.hidden{:id => "user-existing-tags-" + membership.user_id.to_s, :value => membership.user.group_tags_from(@group).join(",")}
      %input.hidden{:id => "user-tags-" + membership.user_id.to_s}
  .clear-both

%li{:id => membership.user_id}
  %ul.unstyled.membership-row
    %li.name-label
      - if membership.user_name
        = membership.user_name
      - else
        = membership.user_email

    -if current_user.is_group_admin?(@group)
      %li.membership-admin-functions
        =link_to "edit", edit_membership_path(membership)
        |
        =link_to "remove", membership, method: :delete,
          confirm: "Are you sure you wish to remove #{membership.user_email} from the group?"

  - if @group.can_be_edited_by? current_user
    %ul.unstyled.membership-row.tags
      %li.tags-label
        %span Tags:
      %li
        %input.hidden{:id => "user-existing-tags-" + membership.user_id.to_s, :value => membership.user.group_tags_from(@group).join(",")}
        %input.hidden{:id => "user-tags-" + membership.user_id.to_s}
    .clear-both

Hide group member tags if user is not admin.
Hide group member tags if user is not admin.
