- all_buttons = @activity.may_change?(current_person) .row .col-md-9 .panel.panel-default .panel-heading = @activity.name - if all_buttons = link_to edit_group_activity_path(@group, @activity), class: 'pull-right' do %i.fa.fa-pencil %table.table %tr %td = t 'activities.attrs.organizers' %td = @organizers %tr %td = t 'activities.attrs.description' %td = @activity.description %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 %tr %td = t 'activities.attrs.deadline' %td - if @activity.deadline = l @activity.deadline, format: :long - 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 %h2 = @num_participants = t 'activities.participant.plural' = render partial: "state_counts", locals: {counts: @counts} %table.table.table-bordered - @participants.each do |p| %tr{class: p.row_class, data: {person_id: p.person.id, activity_id: @activity.id}} %td = p.person.full_name - if p.is_organizer %i.fa.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 .panel.panel-default.panel-success .panel-heading %a{role: 'button', href: '#present-collapse', data: {toggle: 'collapse'}, 'aria-expanded': 'false'} %span.sv-show-collapsed %i.fa.fa-angle-down %span.sv-show-expanded %i.fa.fa-angle-up = t 'activities.state.present' %span.badge = @counts[true] || "0" %table.table.collapse#present-collapse %tbody - @participants.where(attending: true).each do |p| %tr{data: {person_id: p.person.id, activity_id: @activity.id}} %td = p.person.full_name - if p.is_organizer %i.fa.fa-star-o %td - if p.person.id == current_person.id || all_buttons = render partial: "activities/presence_buttons", locals: {activity: @activity, person: p.person, state: p.attending} %tr{data: {person_id: p.person_id, activity_id: @activity.id}} %td{colspan: "2"} = 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: "--" .panel.panel-default .panel-heading %a{role: 'button', href: '#unknown-collapse', data: {toggle: 'collapse'}, 'aria-expanded': 'false'} %span.sv-show-collapsed %i.fa.fa-angle-down %span.sv-show-expanded %i.fa.fa-angle-up = t 'activities.state.need_response' %span.badge = @counts[nil] || "0" %table.table.collapse#unknown-collapse %tbody - @participants.where(attending: nil).each do |p| %tr{data: {person_id: p.person.id, activity_id: @activity.id}} %td = p.person.full_name - if p.is_organizer %i.fa.fa-star-o %td - if p.person.id == current_person.id || all_buttons = render partial: "activities/presence_buttons", locals: {activity: @activity, person: p.person, state: p.attending} %tr{data: {person_id: p.person_id, activity_id: @activity.id}} %td{colspan: "2"} = 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: "--" .panel.panel-default.panel-danger .panel-heading %a{role: 'button', href: '#absent-collapse', data: {toggle: 'collapse'}, 'aria-expanded': 'false'} %span.sv-show-collapsed %i.fa.fa-angle-down %span.sv-show-expanded %i.fa.fa-angle-up = t 'activities.state.absent' %span.badge = @counts[false] || "0" %table.table.collapse#absent-collapse %tbody - @participants.where(attending: false).each do |p| %tr{data: {person_id: p.person.id, activity_id: @activity.id}} %td = p.person.full_name - if p.is_organizer %i.fa.fa-star-o %td - if p.person.id == current_person.id || all_buttons = render partial: "activities/presence_buttons", locals: {activity: @activity, person: p.person, state: p.attending} %tr{data: {person_id: p.person_id, activity_id: @activity.id}} %td{colspan: "2"} = 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: "--"