.group-title
  %span
    %h2
      = link_to @group.parent.name, group_path(@group.parent), title: "group" unless @group.parent.nil?
      = " - " unless @group.parent.nil?
      = @group.name
      - if @group.can_be_edited_by? current_user
        = link_to "Edit group", edit_group_path(@group), class: "btn btn-mini"
      - if @group.users_include? current_user
        - membership = current_user.group_membership(@group)
        = link_to "Leave group", membership, method: :delete, class: "btn btn-mini",
          confirm: "Are you sure you wish to leave #{@group.name}?"
.row
  %section.span4#content-left
    - if display_subgroups_block?(@group)
      .block
        =render 'subgroups', group: @group

    =render 'users', group: @group

  %section.span8#content-main
    %h1 Discussions
    = link_to 'Start a new discussion', new_discussion_path(discussion: { group_id: @group }), class: "btn btn-info", id: "new-discussion"
    #discussions
      - @group.discussions_sorted.each do |discussion|
        =render discussion

.group-title
  %span
    %h2
      = link_to @group.parent.name, group_path(@group.parent), title: "group" unless @group.parent.nil?
      = " - " unless @group.parent.nil?
      = @group.name
      - if @group.can_be_edited_by? current_user
        = link_to "Edit group", edit_group_path(@group), class: "btn btn-mini"
      - if @group.users_include? current_user
        - membership = current_user.group_membership(@group)
        = link_to "Leave group", membership, method: :delete, class: "btn btn-mini",
          confirm: "Are you sure you wish to leave #{@group.name}?"
.row
  %section.span4#content-left
    - if display_subgroups_block?(@group)
      .block
        =render 'subgroups', group: @group

    =render 'users', group: @group

  %section.span8#content-main
    %h1 Discussions
    - if current_user && @group.users_include?(current_user)
      = link_to 'Start a new discussion', new_discussion_path(discussion: { group_id: @group }), class: "btn btn-info", id: "new-discussion"
    #discussions
      - @group.discussions_sorted.each do |discussion|
        =render discussion

Remove 'Start a new discussion' button for non-members.
Remove 'Start a new discussion' button for non-members.
