Skip to content

Commit

Permalink
Merge e2e5e7f into 4d6239d
Browse files Browse the repository at this point in the history
  • Loading branch information
matyikriszta committed Aug 3, 2022
2 parents 4d6239d + e2e5e7f commit 2212b9e
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 76 deletions.
29 changes: 1 addition & 28 deletions app/assets/stylesheets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ nav a.menu {
.collapsed {
display: none;
}

.no-js .collapsed {
display: block;
}
Expand Down Expand Up @@ -82,34 +83,6 @@ u {
text-decoration: underline;
}

.stripe:not(.reverse):first-child {
padding: 80px 0px 40px;
}

.stripe:not(.reverse):nth-child(even) {
background-color: #f5f6f7;
padding: 60px 0;
}

.stripe.reverse:nth-child(even) {
padding-top: 60px;
padding-bottom: 60px;
}

.stripe.reverse:nth-child(odd) {
background-color: #f5f6f7;
padding-top: 60px;
padding-bottom: 60px;
}

.stripe.reverse:first-child {
padding: 50px 0;
}

.admin_margin {
margin-top: 15px;
}

form .hint {
color: gray;
display: inline-block;
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/meetings/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
.col-12
= f.input :chapters, collection: Chapter.all, label_method: :name, value_method: :id, selected: @meeting.chapters.map(&:id), input_html: { multiple: true }
.col-12
= f.input :invitable, as: :boolean, hint: 'Allow members to RSVP'
= f.input :invitable, as: :boolean, hint: 'Allow members to RSVP', hint_html: { class: 'ml-1' }
.text-right
= f.button :button, 'Save', class: 'btn btn-primary'
75 changes: 37 additions & 38 deletions app/views/admin/meetings/_invitation_management.html.haml
Original file line number Diff line number Diff line change
@@ -1,43 +1,42 @@
- if @invitations.any?
.row.mb-4
.col
.card.bg-white.border-success
.card-body
%p.mb-0
<strong>#{@invitations.count}</strong> members have RSVP'd to this event.

= simple_form_for :meeting_invitations, url: admin_meeting_invitations_path do |f|
.row
.col-6
= f.select :member,
Member.all.map { |u| ["#{u.full_name}", u.id] },
{ include_blank: true }, { class: 'chosen-select', required: true,
data: { placeholder: t('messages.invitations.select_a_member_to_rsvp') } }
= f.hidden_field :meeting_id, value: @meeting.slug
.col
= f.button :button, 'Add', class: 'btn btn-sm btn-primary mb-0 mr-2'
%span{'data-bs-toggle': 'tooltip', 'data-bs-placement': 'bottom', title: t('admin.workshop.manage_rsvps.text')}
%i.fas.fa-info-circle
.row.mb-4
.col
.card.bg-white.border-success
.card-body
%p.mb-0
<strong>#{@invitations.count}</strong> members have RSVP'd to this event.

.row.mt-4
.col-12.attendances
%h4 Participants
= simple_form_for :meeting_invitations, url: admin_meeting_invitations_path do |f|
.row
.col-6
= f.select :member,
Member.all.map { |u| ["#{u.full_name}", u.id] },
{ include_blank: true }, { class: 'chosen-select', required: true,
data: { placeholder: t('messages.invitations.select_a_member_to_rsvp') } }
= f.hidden_field :meeting_id, value: @meeting.slug
.col
= f.button :button, 'Add', class: 'btn btn-sm btn-primary mb-0 mr-2'
%span{'data-bs-toggle': 'tooltip', 'data-bs-placement': 'bottom', title: t('admin.workshop.manage_rsvps.text')}
%i.fas.fa-info-circle

- @invitations.each do |invitation|
.col-5.attendee
.row.mb-4
.col-1
- if (@meeting.date_and_time - 30.minutes).past?
- if invitation.attended?
= link_to '', admin_meeting_invitation_path(invitation, attendance_status: true, attended: false), class: 'far fa-check-square', method: :put
- else
= link_to '', admin_meeting_invitation_path(invitation, attendance_status: true, attended: true),
class: 'fa fa-square-o verify-attendance',
method: :put
.row.mt-4
.col-12.attendances
%h4 Participants

- @invitations.each do |invitation|
.col-5.attendee
.row.mb-4
.col-1
- if (@meeting.date_and_time - 30.minutes).past?
- if invitation.attended?
= link_to '', admin_meeting_invitation_path(invitation, attendance_status: true, attended: false), class: 'far fa-check-square', method: :put
- else
= link_to '', admin_meeting_invitation_path(invitation, attendance_status: false, attended: false), class: 'far fa-minus-square', method: :put
= link_to '', admin_meeting_invitation_path(invitation, attendance_status: true, attended: true),
class: 'fa fa-square-o verify-attendance',
method: :put

- else
= link_to '', admin_meeting_invitation_path(invitation, attendance_status: false, attended: false), class: 'far fa-minus-square', method: :put

.col-11
= link_to admin_member_path(invitation.member) do
= invitation.member.full_name
.col-11
= link_to admin_member_path(invitation.member) do
= invitation.member.full_name
4 changes: 2 additions & 2 deletions app/views/admin/meetings/edit.html.haml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.container-fluid.pt-3
.container.py-4.py-lg-5
.row.mb-4
.col
%h1 Edit Monthly

.row
.col.col-lg-10
.col.col-md-10.col-lg-8
= render partial: 'form'
4 changes: 2 additions & 2 deletions app/views/admin/meetings/new.html.haml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.container-fluid.pt-3
.container.py-4.py-lg-5
.row.mb-4
.col
%h1 New Monthly

.row
.col.col-lg-10
.col.col-md-10.col-lg-8
= render partial: 'form'
12 changes: 7 additions & 5 deletions app/views/admin/meetings/show.html.haml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.container-fluid.btn-group.p-0
.container-fluid.btn-group.p-0{ role: 'group' }
= link_to invite_admin_meeting_path(@meeting), class: 'btn btn-primary py-3 rounded-0', title: 'Invite' do
%i.fas.fa-paper-plane
%label.text-white Invite
Expand All @@ -12,11 +12,11 @@
%i.fas.fa-users
%label.text-white Labels

.container-fluid.mt-5
.container.py-4.py-lg-5
.row
.col
%h1
=@meeting.name
= @meeting.name
%h2
%small #{humanize_date(@meeting.date_and_time, @meeting.ends_at, with_time: true)}
.row
Expand Down Expand Up @@ -53,5 +53,7 @@
%h4 Agenda
= @meeting.description.html_safe

#invitations.stripe.reverse
= render partial: 'invitation_management'
- if @invitations.any?
.py-4.py-lg-5.bg-light
.container#invitations
= render partial: 'invitation_management'

0 comments on commit 2212b9e

Please sign in to comment.