%h1 - if params[:past] = t 'activities.past' - else = t 'activities.upcoming' - isleader = @group.leaders.include?(current_person) || current_person.is_admin? .btn-group.pull-right - if params[:past] = link_to group_activities_path(@group), class: 'btn btn-default' do %i.fas.fa-history = t 'activities.upcoming' - else = link_to group_activities_path(@group, past: true), class: 'btn btn-default' do %i.fas.fa-history = t 'activities.past' - if isleader = link_to new_group_activity_path(@group), class: 'btn btn-default' do %i.fas.fa-plus = t 'activities.new' %table.table %thead %tr %th = t 'activerecord.attributes.activity.name' %th = t 'activerecord.attributes.activity.start' %th P/A/? - if isleader %th %tbody - @activities.each do |a| %tr %td = link_to a.name, group_activity_path(@group, a) %td = l a.start, format: :short %td = a.human_state_counts - if isleader %td = link_to edit_group_activity_path(@group, a) do %i.fas.fa-pencil-alt = will_paginate @activities