- all_buttons = @activity.may_change?(current_person) = render partial: 'activities/prev_next' .row .col-md-9 .panel.panel-default .panel-heading .btn-group.pull-right %button.btn.btn-default.dropdown-toggle.btn-xs{data: {toggle: 'dropdown'}, 'aria-haspopup': true, 'aria-expanded': false} %i.fas.fa-cogs %span.caret %ul.dropdown-menu %li %a.copy-reactions{data: {activity: @activity.id, absent: true}} %i.fas.fa-copy = t 'activities.participant.copy_absent' %a.copy-reactions{data: {activity: @activity.id, present: true, absent: true, unknown: true}} %i.fas.fa-copy = t 'activities.participant.copy_responses' - if all_buttons %li.divider{role: 'separator'} %li = link_to edit_group_activity_path(@group, @activity) do %i.fas.fa-pencil = t :edit = @activity.name %table.table - unless @organizers.blank? %tr %td = t 'activities.attrs.organizers' %td = @organizers - unless @activity.description.blank? %tr %td = t 'activities.attrs.description' %td = @activity.description - unless @activity.location.blank? %tr %td = t 'activities.attrs.where' %td = @activity.location %tr %td = t 'activities.attrs.when' %td = l @activity.start, format: :long - if @activity.end \- - if @activity.end.to_date == @activity.start.to_date = l @activity.end, format: '%H:%M' - else = l @activity.end, format: :long - if @activity.deadline %tr %td = t 'activities.attrs.deadline' %td = l @activity.deadline, format: :long - if @assignable_subgroups.any? %tr %td = t 'activerecord.models.subgroup.other' %td = @assignable_subgroups.join(', ') - if @ownparticipant&.subgroup %tr %td = t 'activities.participant.yoursubgroup' %td = @ownparticipant.subgroup.name - if @ownparticipant .col-md-3 .panel.panel-default .panel-heading = t 'activities.participant.yourresponse' .panel-body = render partial: "activities/wide_presence_buttons", locals: {activity: @activity, person: @ownparticipant.person, state: @ownparticipant.attending} = editable @ownparticipant, :notes, url: presence_group_activity_path(@activity.group, @activity, person_id: @ownparticipant.person_id), title: t('activities.participant.notes'), value: @ownparticipant.notes, emptytext: t('activities.participant.add_notes') .hidden-xs .row .col-md-6 %h2 %span.state-count.all-count = @num_participants = t 'activities.participant.plural' = render partial: "state_counts", locals: {counts: @counts} .col-md-6 - if @activity.subgroups.any? = select_tag(:subgroup_filter, options_for_select(@subgroup_ids), class: 'form-control subgroup-filter') %table.table.table-bordered - @participants.each do |p| %tr.participant-row.countable{class: p.row_class, data: {person_id: p.person.id, activity_id: @activity.id, subgroup_id: p.subgroup_id}} %td = p.person.full_name - if p.is_organizer %i.fas.fa-star-o %td = editable p, :notes, url: presence_group_activity_path(@activity.group, @activity, person_id: p.person_id), title: t('activities.participant.notes'), value: p.notes, emptytext: "--" %td - if p.person.id == current_person.id || all_buttons = render partial: "activities/presence_buttons", locals: {activity: @activity, person: p.person, state: p.attending} .hidden-sm.hidden-md.hidden-lg - if @activity.subgroups.any? .panel.panel-default .panel-heading = t 'activerecord.models.subgroup.other' .panel-body = select_tag(:subgroup_filter, options_for_select(@subgroup_ids), class: 'form-control subgroup-filter') .panel.panel-default.panel-success .panel-heading %a{role: 'button', href: '#present-collapse', data: {toggle: 'collapse'}, 'aria-expanded': 'false'} %span.sv-show-collapsed %i.fas.fa-angle-down %span.sv-show-expanded %i.fas.fa-angle-up = t 'activities.state.present' %span.badge.state-count.present-count = @counts[true] || "0" %table.table.collapse#present-collapse %tbody - @participants.where(attending: true).each do |p| = render partial: "mobile_participant_row", locals: {participant: p, show_all_buttons: all_buttons} .panel.panel-default .panel-heading %a{role: 'button', href: '#unknown-collapse', data: {toggle: 'collapse'}, 'aria-expanded': 'false'} %span.sv-show-collapsed %i.fas.fa-angle-down %span.sv-show-expanded %i.fas.fa-angle-up = t 'activities.state.need_response' %span.badge.state-count.unknown-count = @counts[nil] || "0" %table.table.collapse#unknown-collapse %tbody - @participants.where(attending: nil).each do |p| = render partial: "mobile_participant_row", locals: {participant: p, show_all_buttons: all_buttons} .panel.panel-default.panel-danger .panel-heading %a{role: 'button', href: '#absent-collapse', data: {toggle: 'collapse'}, 'aria-expanded': 'false'} %span.sv-show-collapsed %i.fas.fa-angle-down %span.sv-show-expanded %i.fas.fa-angle-up = t 'activities.state.absent' %span.badge.state-count.absent-count = @counts[false] || "0" %table.table.collapse#absent-collapse %tbody - @participants.where(attending: false).each do |p| = render partial: "mobile_participant_row", locals: {participant: p, show_all_buttons: all_buttons}