- if group
  .group-title.clearfix
    %h2= group.fancy_link
    #privacy{:class => group.viewable_by.to_s}
      =image_tag("privicon_"+group.viewable_by.to_s+".png", title: "Privacy: '"+group.viewable_by.to_s+"' can see this group.", alt: group.viewable_by.to_s)
    - can_edit = can? :edit, group
    - can_leave = group.users_include? current_user
    - can_email = can? :email_members, group
    - if can_edit || can_leave
      .dropdown.btn-group.group-options
        %a.btn.dropdown-toggle{ :href => "#", 'data-toggle' => 'dropdown' }
          %i.icon-cog
          Options
          = image_tag("dropdown.png", title:'Options', alt:'Options', class: "options-dropdown-icon")

        %ul.dropdown-menu.pull-right
          - if can_email
            %li= link_to "Email group members", "#email-members-modal", "data-toggle" => "modal"
            %hr
          - if can_edit
            %li= link_to "Edit group", edit_group_path(group)
          - if can_leave
            - membership = current_user.group_membership(group)
            %li= link_to "Leave group", membership, method: :delete, confirm: "Are you sure you wish to leave #{group.name}?"
    - if can_email
      #email-members-modal.modal.hidden
        = render "groups/email_members", :group => group

- if group
  .group-title.clearfix
    %h2= group.fancy_link
    #privacy{:class => group.viewable_by.to_s}
      =image_tag("privicon_"+group.viewable_by.to_s+".png", title: "Privacy: '"+group.viewable_by.to_s+"' can see this group.", alt: group.viewable_by.to_s)
    - can_edit = can? :edit, group
    - can_leave = group.users_include? current_user
    - can_email = can? :email_members, group
    - if can_edit || can_leave
      .dropdown.btn-group.group-options
        %a.btn.dropdown-toggle{ :href => "#", 'data-toggle' => 'dropdown' }
          %i.icon-cog
          Options
          = image_tag("dropdown.png", title:'Options', alt:'Options', class: "options-dropdown-icon")

        %ul.dropdown-menu.pull-right
          -#- if can_email
            -#%li= link_to "Email group members", "#email-members-modal", "data-toggle" => "modal"
            -#%hr
          - if can_edit
            %li= link_to "Edit group", edit_group_path(group)
          - if can_leave
            - membership = current_user.group_membership(group)
            %li= link_to "Leave group", membership, method: :delete, confirm: "Are you sure you wish to leave #{group.name}?"
    - if can_email
      #email-members-modal.modal.hidden
        = render "groups/email_members", :group => group

Disable group emailing for now.
Disable group emailing for now.
