-
-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1785 from codebar/update-grid-container-on-admin-…
…workshop-pages Update grid container on admin workshop pages
- Loading branch information
Showing
11 changed files
with
111 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,36 @@ | ||
- if waiting_list.list.any? | ||
.mt-4 | ||
%strong Waiting list | ||
.row.mt-4 | ||
.col | ||
%strong Waiting list | ||
|
||
%table.table.table-borderless.mt-3 | ||
%colgroup | ||
%col | ||
%col | ||
%col{style: 'width: 40%;'} | ||
%col | ||
%tbody | ||
- waiting_list.list.each do |list| | ||
- invitation = list.invitation | ||
%tr | ||
%td | ||
= link_to admin_workshop_invitation_path(@workshop, invitation, attending: true), class: 'waiting_list border-0', method: :put, remote: true, title: 'Add to attendees' do | ||
%i.far.fa-plus-square | ||
%td | ||
= link_to admin_workshop_invitation_path(@workshop, invitation, attending: false), class: 'waiting_list_remove border-0', method: :put, remote: true, title: 'Remove from waitlist' do | ||
%i.far.fa-minus-square | ||
%td | ||
- if MemberPresenter.new(invitation.member).newbie? | ||
%span{'data-bs-toggle': 'tooltip', 'data-bs-placement': 'bottom', title: 'New attendee'} | ||
%i.fas.fa-paw | ||
= link_to admin_member_path(invitation.member), class: 'border-0' do | ||
- if invitation.member.full_name.blank? | ||
= invitation.member.email | ||
- else | ||
= invitation.member.full_name | ||
%td | ||
- if invitation.tutorial? | ||
%small Tutorial: #{invitation.tutorial} | ||
%br | ||
- if invitation.note? | ||
%small Note: #{invitation.note} | ||
%table.table.table-borderless.mt-3 | ||
%colgroup | ||
%col | ||
%col | ||
%col{style: 'width: 40%;'} | ||
%col | ||
%tbody | ||
- waiting_list.list.each do |list| | ||
- invitation = list.invitation | ||
%tr | ||
%td | ||
= link_to admin_workshop_invitation_path(@workshop, invitation, attending: true), class: 'waiting_list border-0', method: :put, remote: true, title: 'Add to attendees' do | ||
%i.far.fa-plus-square | ||
%td | ||
= link_to admin_workshop_invitation_path(@workshop, invitation, attending: false), class: 'waiting_list_remove border-0', method: :put, remote: true, title: 'Remove from waitlist' do | ||
%i.far.fa-minus-square | ||
%td | ||
- if MemberPresenter.new(invitation.member).newbie? | ||
%span{'data-bs-toggle': 'tooltip', 'data-bs-placement': 'bottom', title: 'New attendee'} | ||
%i.fas.fa-paw | ||
= link_to admin_member_path(invitation.member), class: 'border-0' do | ||
- if invitation.member.full_name.blank? | ||
= invitation.member.email | ||
- else | ||
= invitation.member.full_name | ||
%td | ||
- if invitation.tutorial? | ||
%small Tutorial: #{invitation.tutorial} | ||
%br | ||
- if invitation.note? | ||
%small Note: #{invitation.note} |
75 changes: 37 additions & 38 deletions
75
app/views/admin/workshops/_invitation_management.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,39 @@ | ||
- if @workshop.invitations.any? | ||
.row.mb-4 | ||
.col | ||
- if @workshop.invitations.any? | ||
.card.bg-light.border-success | ||
.card-body | ||
%p.mb-0 | ||
<strong>#{@workshop.invitations.count}</strong> members have been invited to this event. | ||
%br | ||
<strong>#{@attending_students.count}</strong> are attending as students and <strong>#{@attending_coaches.count}</strong> as coaches. | ||
- if @student_waiting_list.any? or @coach_waiting_list.any? | ||
There is also a waiting list of <strong>#{@student_waiting_list.count}</strong> students and <strong>#{@coach_waiting_list.count}</strong> coaches. | ||
.row.mb-4 | ||
.col | ||
- if @workshop.invitations.any? | ||
.card.bg-light.border-success | ||
.card-body | ||
%p.mb-0 | ||
<strong>#{@workshop.invitations.count}</strong> members have been invited to this event. | ||
%br | ||
<strong>#{@attending_students.count}</strong> are attending as students and <strong>#{@attending_coaches.count}</strong> as coaches. | ||
- if @student_waiting_list.any? or @coach_waiting_list.any? | ||
There is also a waiting list of <strong>#{@student_waiting_list.count}</strong> students and <strong>#{@coach_waiting_list.count}</strong> coaches. | ||
|
||
= simple_form_for :workshop, url: admin_workshop_invitations_path(@workshop, attending: true), remote: true, method: :put do |f| | ||
.row | ||
.col-6 | ||
= f.select :invitations, | ||
@workshop.invitations.includes(:member).not_accepted.all.map { |u| [ "#{u.member.full_name} (#{u.role})", u.token] }, | ||
{ include_blank: true }, | ||
{ class: 'chosen-select', required: true, | ||
data: { placeholder: t('messages.invitations.select_a_member_to_rsvp') } } | ||
.col | ||
%span{'data-bs-toggle': 'tooltip', 'data-bs-placement': 'bottom', title: t('admin.workshop.manage_rsvps.text')} | ||
%i.fas.fa-info-circle | ||
= simple_form_for :workshop, url: admin_workshop_invitations_path(@workshop, attending: true), remote: true, method: :put do |f| | ||
.row.mb-4 | ||
.col-auto | ||
= f.select :invitations, | ||
@workshop.invitations.includes(:member).not_accepted.all.map { |u| [ "#{u.member.full_name} (#{u.role})", u.token] }, | ||
{ include_blank: true }, | ||
{ class: 'chosen-select', required: true, | ||
data: { placeholder: t('messages.invitations.select_a_member_to_rsvp') } } | ||
.col-auto | ||
%span{'data-bs-toggle': 'tooltip', 'data-bs-placement': 'bottom', title: t('admin.workshop.manage_rsvps.text')} | ||
%i.fas.fa-info-circle | ||
|
||
.row.mt-4 | ||
.col-12.col-md-6 | ||
%h4 | ||
Students | ||
%span.badge.rounded-pill.bg-primary #{@attending_students.count} of #{@workshop.student_spaces} students have RSVP'd | ||
%span.badge.rounded-pill.bg-success #{ @attending_students.count(&:attended) } students have been signed in | ||
= render partial: 'admin/workshop/attendances', locals: { invitations: @attending_students } | ||
= render partial: 'admin/workshop/waiting_list', locals: { waiting_list: @student_waiting_list } | ||
.col-12.col-md-6 | ||
%h4 | ||
Coaches | ||
%span.badge.rounded-pill.bg-primary #{@attending_coaches.count} of #{@workshop.coach_spaces} coaches have RSVP'd | ||
%span.badge.rounded-pill.bg-success #{ @attending_coaches.count(&:attended) } coaches have been signed in | ||
= render partial: 'admin/workshop/attendances', locals: { invitations: @attending_coaches } | ||
= render partial: 'admin/workshop/waiting_list', locals: { waiting_list: @coach_waiting_list } | ||
.row | ||
.col-12.col-md-6 | ||
%h4 | ||
Students | ||
%span.badge.rounded-pill.bg-primary #{@attending_students.count} of #{@workshop.student_spaces} students have RSVP'd | ||
%span.badge.rounded-pill.bg-success #{ @attending_students.count(&:attended) } students have been signed in | ||
= render partial: 'admin/workshop/attendances', locals: { invitations: @attending_students } | ||
= render partial: 'admin/workshop/waiting_list', locals: { waiting_list: @student_waiting_list } | ||
.col-12.col-md-6 | ||
%h4 | ||
Coaches | ||
%span.badge.rounded-pill.bg-primary #{@attending_coaches.count} of #{@workshop.coach_spaces} coaches have RSVP'd | ||
%span.badge.rounded-pill.bg-success #{ @attending_coaches.count(&:attended) } coaches have been signed in | ||
= render partial: 'admin/workshop/attendances', locals: { invitations: @attending_coaches } | ||
= render partial: 'admin/workshop/waiting_list', locals: { waiting_list: @coach_waiting_list } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.container-fluid.pt-3 | ||
.container.py-4.py-lg-5 | ||
.row.mb-4 | ||
.col | ||
%h1 Edit Workshop | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.container-fluid.pt-3 | ||
.container.py-4.py-lg-5 | ||
.row.mb-4 | ||
.col | ||
%h1 New Workshop | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters